//
// Athena Sample Script
//  (c) 2003 Athena Project.
//
// $Id: npc_sampleJ.txt,v 1.13 2003/07/07 16:48:00 shr Exp $

// ̃t@ĆAAthenaŎgpXNvg̉Ǝgp̃Tv
// ȂĂ܂B

// =============
// *{Iȏ
// =============
// <parameters_1>\t<command>\t<displayname>\t<parameters_2>
// \tTAB킵܂B
// command  "warp" / "monster" / "shop" / "script" ̂ꂩɂȂ܂B
// esɂ"//"ȍ~̓RgƂĖ܂B
// ȉAXɂĉĂ܂B
//
// <n>ƂĂ镔nƂł͂ȂACӂ̕/l܂B
// ܂A[n]͕KvɉĎw肷Cӂ̕/lƂȂĂ܂B

// ========
// *command
// ========
//
// ---------------
// *ʏwarp(warp)
// ---------------
//  : <gatname>,<x>,<y>	warp	<displayname(hidden)>	<dx>,<dy>,<destination_gatname>[.gat],<destination_x>,<destination_y>
//
// <gatname>	- }bvf[^t@CBgq͕K{łB
// <x>,<y>		- [v|Cg̒SW(x,y)
// <displayname(hidden)>	- npcBꕶȏ̔Cӂ̕Ŏw肵܂Bj[NȖOłKv͂܂B
// 				  ۂɂ͕\܂B
// <dx>,<dy>	- ͈(x,y) <x,y>𒆐S(dx+1,dy+1)͈̔͂PCƔ܂
// <destination_gatname>,<destination_x>,<destination_y> -
// ړ̃}bvf[^t@C,W(x,y)
// destination_gatnameɂĂ͊gq".gat"͂ĂĂ\܂B
// ړmapf[^t@C݂Ȃ(邢map_configŎw肳ĂȂ)ꍇ͔܂B
// ړ̍Wi֎~łꍇ́A_ȍWɃ[v܂B
// ܂AWɕwarpuĂꍇAɋLqĂ̂LɂȂ܂
// ́Acnft@CŎw肳Anpc*.txtt@C܂warpLqƂƂ܂B
// :
prontera.gat,156,185,4	warp	sample1	0,0,prontera.gat,156,225
prontera.gat,156,185,4	warp	sample1a	0,0,prontera.gat,156,230
// sample1̕ɋLqĂ̂ŁA156,225Ɉړ܂
prontera.gat,156,220,4	warp	sample1-1	0,0,prontera.gat,156,180

// --------------------
// *X^[(monster)
// --------------------
// :<gatname>,<x>,<y>[,<xs>,<ys>]	monster	<displayname>	<npcid>,<number>[,<spawn_delay1>,<spawn_delay2>]
// <gatname>	- }bvf[^t@CBgq͕K{łB
// <x>,<y>		- zuW(x,y) 0,0ł΃_Ȉʒuɔzu܂B
// [,<xs>,<ys>]	- ͈͓ɔzu鎞Ɏw肵܂B
// <displayname> - }EXJ[\킹Ƃɕ\閼OBO͈ꕶȏw肵Ă
// <npcid>		- LN^[BڍׂɂĂ͂@(db/mob_db.txtQlɂȂƎv܂...)
// <number>		- zu
// [,<spawn_delay1>,<spawn_delay2>] - pc_idX^[̐ԂɂĂ̒`
// Oo+ox1,|ꂽ+ox2,|ꂽ+5b ŎZol̂Ał傫
// oԂƂ܂
// :
prontera.gat,0,0	monster	|	1002,5

// ---------
// *X(shop)
// ---------
// :<gatname>,<x>,<y>,<direction>	shop	<displayname>	<npcid>,<item_id1>:<price1>[,<item_id2>:<price2>[,.....<item_id_N>:<priceN>]]
// <gatname>	- }bvf[^t@CBgq͕K{łB
// <x>,<y>		- NPC̔zuW(x,y)
// <direction>	- npčĂB0k(yW+)ƂāAv45x݂ɂȂĂ܂
// <displayname> - }EXJ[\킹Ƃɕ\閼OBO͈ꕶȏw肵Ă
// <npcid>		- LN^[BڍׂɂĂ͂@
// <item_id_N>:<price_N>	- item_id_N̏iiprice_NƂĔ̔EChEɕ\܂B
// 						  item_idɂĂdb/item_db.txtQƂĂB
// :
prontera.gat,136,203,6	shop	l	73,501:5,502:20,503:55,504:120,506:20,645:80,656:150,601:30,602:30,611:20,610:400

// -====================-
// *NPCXNvg(script)
// -====================-
// :
// <gatname>,<x>,<y>,<direction>	script	<displayname>	<npcid>[,<xs>,<ys>],{ <script> ... }
// <gatname>	- }bvf[^t@CBgq͕K{łB
// <x>,<y>		- NPC̔zuW(x,y)
// <direction>	- npčĂB0k(yW+)ƂāAv45x݂ɂȂĂ܂
// <displayname> - }EXJ[\킹Ƃɕ\閼OBO͈ꕶȏw肵Ă
// <npcid>		- LN^[BڍׂɂĂ͂@
// [,<xs>,<ys>]	- (x,y)𒆐SƂ(xs,ys)ȓPCߊƃXNvg܂
// 				  (warpƓ悤Ȕ̂ɂȂ܂)
//
// ̌ɑ{}XNvgƂĔF܂
// }(s) ŃXNvg̏IƔfĂ܂B
// ̂߁A}̌ɂ̓Rg(//`)͕tȂłB
// (̎dl͕ύX\ł)
//
// ------------------------
// *{}̃XNvgɂ
// ------------------------
// X̖ߌ␔,,x,Zq̊Ԃ
// Xy[X^uAsA/* */ɂ͂܂ꂽRgA//s܂ł̃Rg
// Rɓ鎖o܂ (C)
// e߂͍Ō";"܂ (C)
//
// ---
// *l
// ---
// scriptŎgpl  /  / ϐ / x 4ނɕ܂B
// 
// * [0-9]̗ŕ\킳10iA0xŎn܂16i
//      lƂĈ͕̂t32bit݂̂ŁA͈܂
// * ""ň͂܂ꂽʂ̕񂪎g܂B
//      񒆂"ꂽꍇ\"A\ꂽꍇ\\Ƃ܂
// *ϐ/x [A-Za-z0-9_]@(ꕶڂ̂)g܂B
//      ȃxƂ-݂܂B͎̖߂Ӗ܂
//      ȉŐ萔▄ߍݕϐɂ܂
// 
// -----------------------
// *萔܂͖ߍݕϐ
// -----------------------
// db/const.txt<萔> <l>ƋLq鎖
// XNvgŗp\Ȓ萔錾o܂B
// (NPCX̏iXg,ڂ̐ݒ蕔ɂ͗po܂)
//
// ܂A̒ŃLN^[̃Xe[^XQƂ
// ߍݕϐ̒`Ă܂BݗLȕ͈ȉ7ł
//
//  BaseLevel : x[Xx
//  JobLevel  : Wux
//  StatusPoint : U蕪\ȃXe[^X|Cg
//  SkillPoint  : U蕪\ȃXL|Cg
//  Class : LN^[̐EƂ̎
//     ClasslɂĂJob_Novicedb/const.txtŒ萔`Ă܂̂łgƗǂł傤
//  Zeny  : 
//  Sex   : [0=, 1=]
//
// ̕ϐ́Aif߂set߂ŎRɎQƂo܂A
// ύXStatusPointSkillPointZenŷ݂ő̖ߍݕϐ͕ύXĂӖ܂B
// ܂ÂR̖ߍݕϐύXꍇAύX̓NCAgɑɔf܂B
//
// -------
// *x
// -------
// x́Ax̌:t
// label:
// ̂悤ɋLq܂B
// gotomenuAif̔ѐƂĎg܂B
//
// ---
// *
// ---
// ߂̈ƂĐlvĂ鏊́ASĂ̏Ŏp\łB
// Ẑ݂łAC̎̃TuZbgɂȂĂ܂
// p\ȉZq()APZq - ! ~A2Zq + - * / % & | ^ && || == != > >= < <= ł
//
// ̏ꍇ + ŘA\łB
//  + l  l +  Ƃꍇ͐l𕶎ւƕϊA܂B
//
// -----------------
// *{}Ŏg閽
// -----------------
//
//  mes "<message>";
// bZ[WEChEmessage\܂
// ̐F^000000^ɑ16i6Ŏw肵܂(F͍(^000000)ł)
//
//  next;
// bZ[WEChE"next"̃{^\܂
//
//  close;
// bZ[WEChE"close"̃{^\AXNvg̎sI܂
//
//  menu "<choice1>",<Label1>[,"<choice2>",<Label2>....];
// IEChE\܂B"choice1","choice2"Iɕ\
// j[őI񂾏ꍇ́ǍɋLq郉xɃWv܂B
// ܂AIڂ̓[Jϐl15ɂĎQƂł܂B
// ̗łƑI"choice1"AIԂLabel1:Ŏn܂sɃWv܂B
// āAϐl15ɂ1ƂlZbg܂
// cancelI񂾏ꍇAXNvg̎sI܂
//
//  goto <Label>;
// Label:Ŏn܂s瑱s܂
//
//  cutin "<filename>[.bmp]",<pos>;
// ʏfilenameŎw肷摜\܂
// filename	- \bmpt@CBgq͖Ă\܂
// pos		- \ʒu 0- 1- 2-E 3-? 4-? 255-\
// ݂̃NCAgł́AcutinsƂɈȑOcutinsĂ摜\Ăꍇ́A
// ɕ\Ă摜ĂŎw肳摜\܂
// 
//  jobchange <Jobid>;
// PC̐EJobnameŎw肵EɕύX܂BwłJobidɂĂdb/const.txtJob_ł͂܂s
// QƂĂBconstŎw肵Ă閄߂ݕϐgpł܂B
// jobchangesƁAJobLv1ɁAXe[^X{[iX͂̐E
// 킹ɕω܂BAthena-d2.1ł̓XL͎gȂ̂ŁAڕύXƎvĂB
// []
// 1.ǉ2E(NZC_[)jobchangeꍇAFpbgύXĂꍇ̓\[XG[
// N܂̂ŁAsȂ悤ɂĂB
// 2.o[hƃ_T[Jobname͕ʂɂȂĂ܂B
// ̂߁AjPCɑ΂Job_DancersAPCɑ΂job_BirdsȂ悤ɂĂB
// NCAgɂĂ̓\[XG[ŗ܂B
// mapł͐`FbNsĂȂ߁AXNvgŃ`FbNKv܂B
// npc_testJ.txt̗QƂĂB
// 3.db/const.txtɂknight2/crusader2̋Lq܂Ajobւjobchange͍sȂقłB
// ۂ̃Q[łjob͎gpĂȂ悤łB
//
//  input [<variable>];
// ̓EChEJ܂B
// ͂ꂽvariableꍇ̕ϐɁA
// ꍇ̓[Jϐl14ɃZbg܂B
//
//  warp "<destination_gatname>",<destination_x>,<destination_y>;
// w肵}bvx,yWɃ[v܂Bڍׂ͏Lwarp(NPC)̍QƂĂB
//
//  setlook <n1>,<n2>;
// PC̊Oݒ肵܂B
// <n1>	- (1 .. 8)
// 		1-^
// 		2-
// 		3-
// 		4-
// 		5-
// 		6-F
// 		7-F
// 		8-
// <n2> - C
// 		Oݒ͊YACe𑕔ĂȂĂt܂B
// 		zO̔ԍݒ肷ƁANCAg\[XG[ŗ܂B
// 		ATVj,ǉ2EɊւĂ͕F̕ύX͍sȂł(͂胊\[XG[܂)
// ⓪,̐ݒ̓Xe[^XČvZɏ㏑Ă܂߁A
// Iȗprɂ̂ݗp\łB
//
//  set <variable>,<n>;
// ϐ<variable>̒l<n>ɃZbg܂B
// <n>͐l݂̂ŕ񂪈܂񂪁AΉ\łB
//
//  if (<cond>) goto <Label>;
// łB<cond>̌vZʂ0ȊȌꍇALabelɃWv܂B
//
//  getitem <item_id>,<num>;
// PC̏iXgitem_idŎw肳ACenumǉ܂B
//
//  delitem <item_id>,<num>;
// PC̏iXgitem_idŎw肳ACenum폜܂B
//
//  viewpoint <type>,<x>,<y>,<id>,<color>;
// ~j}bvx,y̍WɃ}[N(colorFw)t܂B
// <type> 1-\
//        2-폜
//
//  heal <hp>,<sp>;
// PCHP/SPhp,spŎw肵l񕜂܂B
//
//  end;
// ŃXNvg̎sI܂B
//
//  setoption <str>;
// PCɈȉŎti(?)t܂B
// 0x0000	- ti폜
// 0x0001	- ?
// 0x0002	- nCh(et)
// 0x0004	- ??
// 0x0008	- J[g
// 0x0010	- 
// 0x0020	- yRyR(iCg,NZC_[̎̂ݗL)
// 0x0040	- nCh(e)
// 0x0080	- J[g2
// 0x0100	- J[g3
// 0x0200	- J[g4
// 0x0400	- J[g5
// 0x0800	- I[N(SagẽXLAo[XI[LbVԂɂȂ)
// setoptionsƂAXZbgĂl̓NA܂B
// ꂼ̒l͉Zlݒ肷邱ƂɂAɕtit܂B
// Ⴆ΁A0x38ŃJ[gāAAꂽyRiCgƂ̂ł܂B
// setoptionŃZbgꂽl̓NCAgIL܂B
// [memo]bIȂ̂ŎdlύX̉\܂B
//
//  savepoint "<gatname>",<x>,<y>;
// Z[u|Cggatname,x,yɐݒ肵܂
//
// -----
// *֐
// -----
// ߂Ȃǂňȉ̊֐gpł܂B
//
//  rand(<n>[,n2])
// n݂̂̏ꍇA0(n-1)܂ł̐_ɕԂ܂B
// n2^Ăꍇ n  n2 ܂ł̐_ɕԂ܂
//
//  countitem(<item_id>)
// vC[̏Aitem_idŎw肷ACe̐Ԃ܂
//
// [memo]
// _[vꍇA͈͎sscript𗘗p܂(npc_warp.txtQ)
//

// script̗:
prontera.gat,146,203,2	script	fobK[v	116,{
	cutin "kafra_02",2;
	if(countitem(515)<10) goto Llesscarrot;
	mes "[fobK[v]";
	mes "炠Aɂ񂶂RĂ܂ˁB";
	mes "ƂŁADƏɂ킽F肵܂B";
	mes "ɂ񂶂10{ƌł݂݃wAoh܂ˁB";
	next;
	if(countitem(515)<10) goto Llesscarrot_err;
	delitem 515,10;
	getitem 2214,1;
	goto Llesscarrot;
Llesscarrot_err:
	mes "[fobK[v]";
	mes "Hɂ񂶂񂪑ȂȂĂ܂ˁB";
	mes "Ƃō͖̎ɂ܂B";
	next;
// ʏ͂
Llesscarrot:
	mes "[fobK[v]";
	mes "Ⴂ܂B";
	mes "܂?";
	next;
	menu "Xe[^X|Cg10₷",Lstp,"XL|Cg1₷",Lskill,
	     "~ł",Lzeny,"ē̃eXg",Lviewpoint,"]E",Ljobchange,"J[g",Lcart,"߂",Lend;
Lstp:	set StatusPoint,StatusPoint+10;
	goto Lend;
Lskill:	set SkillPoint,SkillPoint+1;
	goto Lend;
Lzeny:	set Zeny,Zeny+1000;
	goto Lend;
Lviewpoint:
	viewpoint 1,156,360,1,0x0000ff;
	mes "[fobK[v]";
	mes "ve";
	next;
	viewpoint 2,156,360,1,0x0000ff;
	viewpoint 1,156,22,2,0x00ff00;
	viewpoint 1,22,203,3,0x00ff00;
	viewpoint 1,289,203,4,0x00ff00;
	mes "[fobK[v]";
	mes "3ӏOɏo܂B";
	next;
	viewpoint 2,156,22,2,0x00ff00;
	viewpoint 2,22,203,3,0x00ff00;
	viewpoint 2,289,203,4,0x00ff00;
	goto Lend;
Ljobchange:
	cutin "kafra_02",255;
	mes "[fobK[v]";
	mes "ڂ݂̂ł";
	mes "]E\łB";
	mes "]EĂAXL";
	mes "̂ߎg܂B";
	mes "ǂ̐EƂɓ]E܂?";
	next;
	menu	"S",Lnv,
		"m",Lsm,
		"}WV",Lmg,
		"A[`[",Lac,
		"ARCg",Lal,
		"l",Lmc,
		"V[t",Ltf,
		"iCg",Lkn,
		"v[Xg",Lpr,
		"EBU[h",Lwz,
		"b艮",Lbs,
		"n^[",Lht,
		"ATV",Las,
		"܂",Lrandom,
		"߂",Ljchcancel;
Lnv:	jobchange Job_Novice;	goto Lend;
Lsm:	jobchange Job_Swordman;	goto Lend;
Lmg:	jobchange Job_Mage;	goto Lend;
Lac:	jobchange Job_Archer;	goto Lend;
Lal:	jobchange Job_Acolyte;	goto Lend;
Lmc:	jobchange Job_Merchant;	goto Lend;
Ltf:	jobchange Job_Thief;	goto Lend;
Lkn:	jobchange Job_Knight;	goto Lend;
Lpr:	jobchange Job_Priest;	goto Lend;
Lwz:	jobchange Job_Wizard;	goto Lend;
Lbs:	jobchange Job_Blacksmith;	goto Lend;
Lht:	jobchange Job_Hunter;	goto Lend;
Las:	jobchange Job_Assassin;	goto Lend;
Lrandom:
	mes "[fobK[v]";
	mes "ł́c";
	set l0,rand(13);
	jobchange l0;
	mes "̐EƂŊ撣ĂˁB";
	goto Lend;
Ljchcancel:	mes "A߂̂łc";
	mes "]EƂ";
	mes "CyɐĂ";	close;
	goto Lend;
Lcart:
	mes "[fobK[v]";
	mes "J[głˁB";
	mes "t܂HƂO܂H";
	menu "",LattachC,"O",LremoveC;
LattachC:
	mes "͂AǂB";
	setoption 0x08;
	goto Lend;
LremoveC:
	mes "ł́AO܂ˁB";
	setoption 0x00;
	goto Lend;
Lend:	cutin "kafra_02",255;
	close;
	end;	}

prontera.gat,156,195,4	script	JvE	112,{
	mes "[JvE]";
	mes "Ⴂ܂";
	mes "ł́A݂Athenȁ󋵂܂B";
	next;
	menu "",Lcont,"Ȃ",Lend;
Lcont:	mes "[JvE]";
	mes "AthenałROG~IJX35̃vOx[XƂĊJ͂܂܂"
	mes "rA\[X̕}Ȁ݂ԂɂȂĂ܂B";
	next;
	mes "ݎĂ̂͂̒ʂł";
	mes "E}bvԈړ|Cg";
	mes "ElNPC";
	mes "EbNPC@(,xWvA_ϐAACe󂯓nAϐQƁAcutin";
	mes "Eϐۑ";
	mes "EACe";
	mes "E`bg";
	mes "E퓬()";
	mes "EEpisode 4ȍ~^CṽpPbgdl";
	mes "Eol,lv㏸";
	mes "EACe̗p̈ꕔ";
	next;
	mes "[JvE]";
	mes "tɌĂȂ̂͑̈ȉ̒ʂłB";
	mes "EXL";
	mes "Eɂp[^ω";
	mes "Ep[eB/Mh";
	mes "Eybg";
	mes "EB/쐬";
	next;
	mes "[JvE]";
	mes "ƒӓ_łAAthenałID̍Ō_F܂_MtƐVKIDsdgɂȂĂ܂A";
Lcont2:	mes "2ڈȍ~_F,_MtĂƃpX[hG[ɂȂ܂B";
	next;
	mes "[JvE]";
	mes "Ⴆ΁AID:^ff0000hoge^0000ff_F^000000@pass:0123loginꍇAhogeIDƂēo^܂B";
	mes "āA2ڈȍ~ID:^ff0000hoge^000000@pass:0123ƂloginĉB";
	next;
	mes "[JvE]";
	mes "keepɃ`FbNĂꍇA኱sւȎdlłAȏ̓_낵肢܂B";
	close;
Lend:	mes "[JvE]";
	mes "ł͒ӓ_̂݁AĒ܂B";
	next;
	mes "[JvE]";
	mes "AthenałID̍Ō_F܂_MtƐVKIDsdgɂȂĂ܂A";
	goto Lcont2;	}

