Преглед изворни кода

* Standardization of doc\sample\ folder.
* Deleted doc\sample\PCLoginEvent.txt, which contained outdated information.
* Follow-up r16812, fixed file encoding.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16813 54d463be-8e91-2dee-dedb-b68131a5f0ec

euphyy пре 12 година
родитељ
комит
d2d9897606

+ 1 - 1
db/re/skill_db.txt

@@ -1,4 +1,4 @@
-//id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description
+//id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description
 // 01 ID
 // 02 range (combo skills do not check for range when used,
 //           if range is < 5, the skill is considered melee-range)

+ 0 - 53
doc/sample/PCLoginEvent.txt

@@ -1,53 +0,0 @@
-// rAthena Special NPC
-
-// PCLoginEvent NPC (davidsiaw)
-//==============================================================================
-// How it works:
-// When a player logs in, the NPC will run as if he just clicked it. Which means
-// if the script is like this:
-//
-// [code]
-// prontera,0,0,0	script	OnPCLoginEvent	-1,{
-//	mes "lmao";
-//	close;
-// }
-// [/code]
-// 
-// every player who logs in will receive a message 'lmao' in their face as soon
-// as they can see the map.
-//-----------------------------------------------------------------------------
-// Note:
-// 1) This NPC will only run if its name is 'PCLoginEvent'
-// 2) I made it invisible because you don't need to see it. Its an abstract NPC
-// 3) If you don't want it, simply delete it
-// 4) If you have more than one PCLoginEvent NPC, strange things will happen.
-// 5) You can put this script in ANY file.
-// 6) I put an end; there because that just makes it do nothing.
-// 7) Modify this script to your liking and give your players a surprise
-// 8) Remember: IT RUNS LIKE A NORMAL NPC. BUT THE ONLY WAY TO 'CLICK' IT IS BY
-//              LOGGING ON
-// 9) There are 2 ways to use this - check the examples below!
-
-//
-// The 1st type -- with 'event_script_type' set to 0
-//
-prontera,0,0,0	script	OnPCLoginEvent	-1,{
-	end;
-}
-
-//
-// The 2nd type -- with 'event_script_type' set to 1
-//
-prontera,155,175,0	script	An NPC	46,{
-	close;
-OnPCLoginEvent:
-	// this part will run
-	close;
-}
-
-prontera,156,176,0	script	Another NPC	46,{
-	close;
-OnPCLoginEvent:
-	// this part runs AS WELL
-	close;
-}

+ 10 - 1
doc/sample/bank_test.txt

@@ -1,4 +1,13 @@
-// Bank Test
+//===== rAthena Script =======================================
+//= Sample: Bank Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20070315
+//===== Description: ========================================= 
+//= Contains commands needed for a basic bank.
+//============================================================
+
 prontera,162,188,1	script	Bank Test	112,{
 	cutin "kafra_06",2;
 

+ 10 - 0
doc/sample/basejob_baseclass_upper.txt

@@ -1,3 +1,13 @@
+//===== rAthena Script =======================================
+//= Sample: Class Constants
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20110123
+//===== Description: ========================================= 
+//= Outputs the values of class constants.
+//============================================================
+
 prontera,155,177,1	script	Tell Me	725,{
 	mes "[Tell Me]";
 	mes "Class: " + Class;

+ 17 - 0
doc/sample/checkoption.txt

@@ -0,0 +1,17 @@
+//===== rAthena Script =======================================
+//= Sample: Checkoption
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20070315
+//===== Description: ========================================= 
+//= Demonstrates the 'checkoption' command.
+//============================================================
+
+prontera,156,89,6	script	test_checkoption	117,{
+	mes "Please enter a value of type!";
+	input @value;
+	if(checkoption(@value) == 1) mes "True!";
+	else if(checkoption(@value) == 0) mes "False!";
+	close;
+}

+ 17 - 7
doc/sample/delitem2.txt

@@ -1,20 +1,30 @@
-prontera,160,182,5	script	Deleter2	51,{
-	mes "Input item ID";
+//===== rAthena Script =======================================
+//= Sample: Delitem2
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20070315
+//===== Description: ========================================= 
+//= Demonstrates the 'delitem2' command.
+//============================================================
+
+prontera,160,182,5	script	Delitem2	51,{
+	mes "Item ID?";
 	next;
 	input @nameid;
 	mes "Amount?";
 	next;
 	input @amount;
-	mes "Identified?";
+	mes "Identified? (0:no, 1:yes)";
 	next;
 	input @iden;
-	mes "How many times refined?";
+	mes "Refined how many times?";
 	next;
 	input @ref;
-	mes "Attribute?";
+	mes "Attribute? (0:normal, 1:broken)";
 	next;
 	input @attr;
-	mes "4 cards (one after another):";
+	mes "4 cards (one after another)...";
 	next;
 	input @c1;
 	input @c2;
@@ -24,6 +34,6 @@ prontera,160,182,5	script	Deleter2	51,{
 	mes "delitem2 "+@nameid+","+@amount+","+@iden+","+@ref+","+@attr+","+@c1+","+@c2+","+@c3+","+@c4;
 	next;
 	delitem2 @nameid,@amount,@iden,@ref,@attr,@c1,@c2,@c3,@c4;
-	mes "And here is the moment when Your item should disappear :P";
+	mes "And here is the moment when your item should disappear! :P";
 	close;
 }

+ 17 - 25
doc/sample/getequipcardid.txt

@@ -1,33 +1,25 @@
-//===== By: ================================================== 
+//===== rAthena Script =======================================
+//= Sample: Getequipcardid
+//===== By: ==================================================
 //= Lupus
-//= Shows your HAT's slots IDs
-//= Use it for some checks... e.g.
-//= 			is your EQUPPED weapon has FIRE property?
-//= 			is your EQUPPED item produced?
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates the 'getequipcardid' command.
 //============================================================
 
 prontera,155,177,4	script	Check My Hat	810,{
 	mes "Checking your head...";
-	set @ref,0;
-
-	if (getequipisequiped(1)) goto L_CHECK1;
+	if (getequipisequiped(1)) {
+		set @id,getequipid(1);
+		set @ref,getequiprefinerycnt(1);
+		mes "Your hat is... "+getitemname(@id)+"...";
+		if(@ref) mes "It has been refined "+@ref+" times.";
+		mes "Card Slot 0:"+getequipcardid(1,0)+" 1:"+getequipcardid(1,1);
+		mes "Card Slot 2:"+getequipcardid(1,2)+" 3:"+getequipcardid(1,3);
+		close;
+	}
 	mes "Nothing?";
 	emotion e_hmm;
 	close;
-
-L_CHECK1:
-	set @id,getequipid(1);
-	if(getequipisidentify(1)) goto L_CHECK2;
-	mes "How can you wear not identified hats?";
-	npctalk "You're a cheater!";
-	emotion e_wah;
-	close;
-
-L_CHECK2:
-	set @ref,getequiprefinerycnt(1);
-	mes "Your hat is... "+getitemname(@id)+"...";
-	if(@ref)mes "It has been refined "+@ref+" times.";
-	mes "Card Slot 0:"+getequipcardid(1,0)+" 1:"+getequipcardid(1,1);
-	mes "Card Slot 2:"+getequipcardid(1,2)+" 3:"+getequipcardid(1,3);
-	close;
-}
+}

+ 16 - 0
doc/sample/getequipid.txt

@@ -0,0 +1,16 @@
+//===== rAthena Script =======================================
+//= Sample: Getequipid
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates the 'getequipid' command.
+//============================================================
+
+prontera,161,181,6	script	GetEquipID Sample	105,{
+	mes "[GetEquipID Sample]";
+	for(set .@i,1; .@i<11; set .@i,.@i+1)
+		mes "GetEquipID(" + .@i + ") : " + getequipid(1);
+	close;
+}

+ 19 - 12
doc/sample/getiteminfo.txt

@@ -1,16 +1,23 @@
-//by Lupus
+//===== rAthena Script =======================================
+//= Sample: Getiteminfo
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates the 'getiteminfo' command.
+//============================================================
 
 prontera,156,179,6	script	test_getiteminfo	117,{
-	mes "Please enter an item ID (501 ... 14000)";
-	input @value;
-//WOW! this line uses INTERNAL function of your client to show item name by its ID!
-// ^nItemID^XXXX -> Item Name
-	mes "Item ID: "+@value+" ^nItemID^"+@value;
-	mes "Current Item info:";
-	set @id,0;
-L_LOOP:
-	mes " getiteminfo("+@value+","+@id+") = "+getiteminfo(@value,@id);
-	set @id,@id+1;
-	if(@id<14) goto L_LOOP;
+	mes "Please enter an item ID.";
+	input .@value;
+
+	// This line uses an INTERNAL function of your client to show item name by its ID!
+	// ^nItemID^XXXX -> Item Name
+	mes "Item ID: "+.@value+" ^nItemID^"+.@value;
+
+	mes "Current item info:";
+	for(set .@id,0; .@id<14; set .@id,.@id+1)
+		mes " getiteminfo("+.@value+","+.@id+") = "+getiteminfo(.@value,.@id);
 	close;
 }

+ 16 - 11
doc/sample/getmonsterinfo.txt

@@ -1,18 +1,23 @@
-//by Lupus
+//===== rAthena Script =======================================
+//= Sample: Getmonsterinfo
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates the 'getmonsterinfo' command.
+//============================================================
 
 prontera,156,179,6	script	test_getmonsterinfo	117,{
-	mes "Please enter a monster ID (1001 ... 2000)";
-	input @value;
-	if(getmonsterinfo(@value,MOB_LV)<0 || getmonsterinfo(@value,MOB_NAME)=="Dummy") {
-		mes "Wrong MOB ID.";
+	mes "Please enter a monster ID.";
+	input .@value;
+	if(getmonsterinfo(.@value,MOB_LV)<0 || getmonsterinfo(.@value,MOB_NAME)=="Dummy") {
+		mes "Invalid monster ID.";
 		close;
 	}
-	mes "Monster ID: "+@value+" '"+getmonsterinfo(@value,MOB_NAME)+"'";
+	mes "Monster ID: "+.@value+" '"+getmonsterinfo(.@value,MOB_NAME)+"'";
 	mes "Current Monster info:";
-	set @id,0;
-L_LOOP:
-	mes " getmonsterinfo("+@value+","+@id+") = "+getmonsterinfo(@value,@id);
-	set @id,@id+1;
-	if(@id<22) goto L_LOOP;
+	for(set .@id,0; .@id<23; set .@id,.@id+1)
+		mes " getmonsterinfo("+.@value+","+@id+") = "+getmonsterinfo(.@value,@id);
 	close;
 }

+ 10 - 36
doc/sample/gstorage_test.txt

@@ -1,4 +1,13 @@
-/* Guild Warehouse Service Test-Script 
+//===== rAthena Script =======================================
+//= Sample: Guild Storage Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20070315
+//===== Description: ========================================= 
+//= Contains commands needed for a guild warehouse NPC.
+//============================================================
+
 prontera,165,188,4	script	Guild Warehouse	112,{
 	cutin "kafra_06",2;
 
@@ -29,41 +38,6 @@ GS_EXIT3:
 	mes "[Guild Warehouser]";
 	mes "Come back whenever you want.";
 
-GS_EXIT4:
-	cutin "kafra_06",255;
-	close;
-}
-*/
-
-// カプラギルド倉庫サービス	テストスクリプト
-prontera,165,188,4	script	ギルド倉庫カプラ	112,{
-	cutin "kafra_06",2;
-
-	mes"[ギルド倉庫カプラ]";
-	mes "カプラギルド倉庫サービスです。";
-	mes "毎度ご利用ありがとうございます♪";
-	mes "テスト用なので金は貰いません。";
-	next;
-	menu "ギルド倉庫を利用する",GS_OPEN,"やっぱやめる",GS_EXIT3;
-
-GS_OPEN:
-	set @flag,guildopenstorage(0);
-	if(@flag == 1) goto GS_EXIT1;
-	if(@flag == 2) goto GS_EXIT2;
-	goto GS_EXIT4;
-
-GS_EXIT1:
-	mes "ギルドメンバーが倉庫を使用中です。";
-	mes "しばらく待ってから利用してください。";
-	goto GS_EXIT4;
-
-GS_EXIT2:
-	mes "ギルドに所属してない方は利用することができません。";
-	goto GS_EXIT4;
-
-GS_EXIT3:
-	mes "またのご利用をお待ちしています♪";
-
 GS_EXIT4:
 	cutin "kafra_06",255;
 	close;

+ 74 - 65
doc/sample/npc_dynamic_shop.txt

@@ -1,86 +1,95 @@
--	shop	dyn_shop1	-1,501:50
+//===== rAthena Script =======================================
+//= Sample: Dynamic Shop
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20101219
+//===== Description: ========================================= 
+//= Contains commands needed for a dynamic shop.
+//============================================================
+
+// Dummy shop to insert items into:
+-	shop	dyn_shop1	-1,501:50.
 
 prontera,181,200,4	script	Dynamic Shop	123,{
-callshop "dyn_shop1",0;
-npcshopattach "dyn_shop1";
-end;
+	callshop "dyn_shop1",0;
+	npcshopattach "dyn_shop1";
+	end;
 
 OnSellItem:
-for(set @i, 0; @i < getarraysize(@sold_nameid); set @i, @i + 1){
-	if(countitem(@sold_nameid[@i]) < @sold_quantity[@i] || @sold_quantity[@i] <= 0){
-		mes "omgh4x!";
-		close;
-	}
-	if(@sold_nameid[@i] == 501){
-		delitem 501, @sold_quantity[@i];
-		set $@rpotsleft, $@rpotsleft + @sold_quantity[@i];
-		set Zeny, Zeny + @sold_quantity[@i]*20;
-	} else {
-		if(@sold_nameid[@i] == 502){
-			delitem 502, @sold_quantity[@i];
-			set $@opotsleft, $@opotsleft + @sold_quantity[@i];
-			set Zeny, Zeny + @sold_quantity[@i]*100;
-		} else {
-			mes "Sorry, I don't need your items.";
+	for(set @i, 0; @i < getarraysize(@sold_nameid); set @i, @i + 1){
+		if(countitem(@sold_nameid[@i]) < @sold_quantity[@i] || @sold_quantity[@i] <= 0){
+			mes "omgh4x!";
 			close;
+		} else if(@sold_nameid[@i] == 501){
+			delitem 501, @sold_quantity[@i];
+			set $@rpotsleft, $@rpotsleft + @sold_quantity[@i];
+			set Zeny, Zeny + @sold_quantity[@i]*20;
+		} else {
+			if(@sold_nameid[@i] == 502){
+				delitem 502, @sold_quantity[@i];
+				set $@opotsleft, $@opotsleft + @sold_quantity[@i];
+				set Zeny, Zeny + @sold_quantity[@i]*100;
+			} else {
+				mes "Sorry, I don't need your items.";
+				close;
+			}
 		}
 	}
-}
-deletearray @sold_quantity, getarraysize(@sold_quantity);
-deletearray @sold_nameid, getarraysize(@sold_nameid);
-mes "Deal completed.";
-close;
+	deletearray @sold_quantity, getarraysize(@sold_quantity);
+	deletearray @sold_nameid, getarraysize(@sold_nameid);
+	mes "Deal completed.";
+	close;
 
 OnBuyItem:
-for(set @i, 0; @i < getarraysize(@bought_nameid); set @i, @i + 1){
-	if(@bought_quantity[@i] <= 0){
-		mes "omgh4x!";
-		close;
-	}
-	if(@bought_nameid[@i] == 501){
-		if(@bought_quantity[@i] > $@rpotsleft){
-			if($@rpotsleft > 0){
-				set @bought_quantity[@i], $@rpotsleft;
+	for(set @i, 0; @i < getarraysize(@bought_nameid); set @i, @i + 1){
+		if(@bought_quantity[@i] <= 0){
+			mes "omgh4x!";
+			close;
+		} else if(@bought_nameid[@i] == 501){
+			if(@bought_quantity[@i] > $@rpotsleft){
+				if($@rpotsleft > 0){
+					set @bought_quantity[@i], $@rpotsleft;
+				} else {
+					mes "We are out of red potions!";
+					close;
+				}
+			}
+			if(Zeny >= 40*@bought_quantity[@i]){
+				set Zeny, Zeny - 40*@bought_quantity[@i];
+				getitem 501, @bought_quantity[@i];
+				set $@rpotsleft, $@rpotsleft - @bought_quantity[@i];
 			} else {
-				mes "We are out of red potions!";
+				mes "You have insufficient cash.";
 				close;
 			}
-		}
-		if(Zeny >= 40*@bought_quantity[@i]){
-			set Zeny, Zeny - 40*@bought_quantity[@i];
-			getitem 501, @bought_quantity[@i];
-			set $@rpotsleft, $@rpotsleft - @bought_quantity[@i];
 		} else {
-			mes "You have insufficient cash.";
-			close;
-		}
-	} else {
-		if(@bought_quantity[@i] > $@opotsleft){
-			if($@opotsleft > 0){
-				set @bought_quantity[@i], $@opotsleft;
+			if(@bought_quantity[@i] > $@opotsleft){
+				if($@opotsleft > 0){
+					set @bought_quantity[@i], $@opotsleft;
+				} else {
+					mes "We are out of orange potions!";
+					close;
+				}
+			}
+			if(Zeny >= 200*@bought_quantity[@i]){
+				set Zeny, Zeny - 200*@bought_quantity[@i];
+				getitem 502, @bought_quantity[@i];
+				set $@opotsleft, $@opotsleft - @bought_quantity[@i];
 			} else {
-				mes "We are out of orange potions!";
+				mes "You have insufficient cash.";
 				close;
 			}
 		}
-		if(Zeny >= 200*@bought_quantity[@i]){
-			set Zeny, Zeny - 200*@bought_quantity[@i];
-			getitem 502, @bought_quantity[@i];
-			set $@opotsleft, $@opotsleft - @bought_quantity[@i];
-		} else {
-			mes "You have insufficient cash.";
-			close;
-		}
 	}
-}
-deletearray @bought_quantity, getarraysize(@bought_quantity);
-deletearray @bought_nameid, getarraysize(@bought_nameid);
-mes "Trade done.";
-close;
+	deletearray @bought_quantity, getarraysize(@bought_quantity);
+	deletearray @bought_nameid, getarraysize(@bought_nameid);
+	mes "Trade done.";
+	close;
 
 OnInit:
-npcshopitem "dyn_shop1", 501,40,502,200;
-set $@rpotsleft, 10;
-set $@opotsleft, 10;
-end;
+	npcshopitem "dyn_shop1", 501,40,502,200;
+	set $@rpotsleft, 10;
+	set $@opotsleft, 10;
+	end;
 }

+ 0 - 16
doc/sample/npc_equip_sample.txt

@@ -1,16 +0,0 @@
-
-prontera,161,181,6	script	GetEquipID Sample	105,{
-   	mes "[GetEquipID Sample]";
-	mes " GetEquipID(01) : " + getequipid(1);
-	mes " GetEquipID(02) : " + getequipid(2);
-	mes " GetEquipID(03) : " + getequipid(3);
-	mes " GetEquipID(04) : " + getequipid(4);
-	mes " GetEquipID(05) : " + getequipid(5);
-	mes " GetEquipID(06) : " + getequipid(6);
-	mes " GetEquipID(07) : " + getequipid(7);
-	mes " GetEquipID(08) : " + getequipid(8);
-	mes " GetEquipID(09) : " + getequipid(9);
-	mes " GetEquipID(10) : " + getequipid(10);
-        close;
-        end;
-}

+ 17 - 47
doc/sample/npc_extend_shop.txt

@@ -1,60 +1,30 @@
-//SuperNovice
-prontera,182,213,3	shop	Super Novice Shop	716,1243:-1,2112:-1,2340:-1,2352:-1,2414:-1,2510:-1,2628:-1,5055:-1
+//===== rAthena Script =======================================
+//= Sample: Extended Shops
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= An example of shop NPCs.
+//============================================================
 
-//Whips
+prontera,182,213,3	shop	Super Novice Shop	716,1243:-1,2112:-1,2340:-1,2352:-1,2414:-1,2510:-1,2628:-1,5055:-1
 prontera,149,139,5	shop	Whips Merchant	58,1951:-1,1953:-1,1955:-1,1957:-1,1959:-1,1961:-1,1962:-1,1963:-1,1964:-1
-
-//Headgears
 prontera,162,175,3	shop	Headgears Merchant 1	73,2209:-1,2210:-1,2211:-1,2221:-1,2223:-1,2217:-1,2227:-1,2231:-1,2225:-1,2229:-1
-
-//Headgears
 prontera,162,172,3	shop	Headgears Merchant 2	73,2203:-1,2212:-1,2218:-1,2239:-1,2241:-1,2242:-1,2243:-1,2263:-1,2265:-1,2276:-1,2288:-1,2291:-1,2297:-1
-
-//Armor
 prontera,162,169,3	shop	Armours Merchant	73,2311:-1,2313:-1,2315:-1,2317:-1,2318:-1,2320:-1,2322:-1,2324:-1,2326:-1,2327:-1,2329:-1,2331:-1,2334:-1,2336:-1,2337:-1,2342:-1
-
-//Shields
 prontera,162,166,3	shop	Shields Merchant	73,2102:-1,2104:-1,2106:-1,2108:-1,2109:-1,2110:-1,2111:-1
-
-//Boots
 prontera,162,163,3	shop	Boots Merchant	73,2402:-1,2404:-1,2406:-1,2407:-1,2412:-1,2413:-1
-
-//Robes
 prontera,162,160,3	shop	Robes Merchant	73,2502:-1,2504:-1,2506:-1,2507:-1,2508:-1,2509:-1
-
-//Accessory
 prontera,162,157,3	shop	Accessory Merchant	73,2601:-1,2602:-1,2603:-1,2604:-1,2605:-1,2607:-1,2608:-1,2615:-1,2616:-1,2618:-1,2619:-1
-
-//Arrows
 prontera,162,154,3	shop	Arrows Merchant	73,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1757:-1,1758:-1,1759:-1,1760:-1,1761:-1,1762:-1,1763:-1,1764:-1,1765:-1,1766:-1,1767:-1,1768:-1,1769:-1
-
-//Alchemist
 prontera,162,151,3	shop	Alchemist Shop	73.7127:-1,7128:-1,7129:-1,7130:-1,7131:-1,7132:-1,7133:-1,7144:-1,7134:-1,1093:-1
-
-//Taming Merchant
 prontera,162,148,3	shop	Taming Merchant	73,619:-1,620:-1,621:-1,623:-1,624:-1,625:-1,626:-1,627:-1,628:-1,629:-1,630:-1,631:-1,632:-1,633:-1,634:-1,635:-1,636:-1,637:-1,638:-1,639:-1,640:-1,641:-1,642:-1,659:-1
-
-//Pet Equipment
 prontera,162,145,3	shop	Pet Equipment	73,10001:-1,10002:-1,10003:-1,10004:-1,10005:-1,10006:-1,10007:-1,10008:-1,10009:-1,10010:-1,10011:-1,10012:-1,10013:-1,10014:-1,10015:-1,10016:-1,10017:-1,10018:-1,10019:-1,10020:-1
-
-
-//Weapon Cards
-prontera,148,234,5	shop	Weapon Card's Merchant	80,4004:100000,4018:100000,4025:100000,4026:100000,4019:100000,4029:100000,4043:100000,4017:100000,4020:100000,4024:100000,4037:100000,4055:100000,4057:100000,4076:100000,4096:100000,4104:100000,4030:100000,4049:100000,4062:100000,4069:100000,4085:100000,4007:100000,4060:100000,4063:100000,4068:100000,4080:100000,4094:100000,4111:100000,4118:100000,4082:20700,4092:100000,4126:100000,4072:100000,4115:100000,4035:100000,4086:100000,4106:100000,4117:100000,4125:100000
-
-//Headgear Cards
-prontera,148,231,5	shop	Headgear Card's Merchant	80,4010:100000,4039:100000,4046:100000,4052:100000,4087:100000,4110:100000,4112:100000,4122:100000,4127:100000
-
-//Armor Cards
-prontera,146,229,5	shop	Armor Card's Merchant	80,4003:100000,4008:100000,4011:100000,4014:100000,4016:100000,4021:100000,4023:100000,4031:100000,4078:100000,4089:100000,4098:100000,4099:100000,4101:100000,4114:100000,4119:100000,4141:100000,4061:100000,4105:100000
-
-//Shield Cards
-prontera,144,227,5	shop	Shield Card's Merchant	80,4013:100000,4032:100000,4058:100000,4059:100000,4066:100000,4074:100000,4083:100000,4120:100000,4124:100000,4136:100000,4138:100000,4045:100000,4067:100000,4075:100000,4090:100000
-
-//Robe Cards
-prontera,142,225,5	shop	Robe Card's Merchant	80,4056:100000,4071:100000,4081:100000,4095:100000,4108:100000,4109:100000,4113:100000,4116:100000,4133:100000,4015:100000,4088:100000,4102:100000,4129:100000
-
-//Shoe Cards
-prontera,140,223,5	shop	Shoes Card's Merchant	80,4009:100000,4038:100000,4050:100000,4070:100000,4097:100000,4100:100000,4107:100000
-
-//Accessory Cards
-prontera,138,221,5	shop	Accessory Card's Merchant	80,4022:100500,4027:100500,4028:100500,4034:100500,4051:100500,4064:100500,4091:100500,4079:100500,4033:100500,4040:100500,4044:100500,4048:100500,4053:100500,4073:100500,4077:100500,4084:100500,4093:100500,4103:100500,4139:100500
+prontera,148,234,5	shop	Weapon Card Merchant	80,4004:100000,4018:100000,4025:100000,4026:100000,4019:100000,4029:100000,4043:100000,4017:100000,4020:100000,4024:100000,4037:100000,4055:100000,4057:100000,4076:100000,4096:100000,4104:100000,4030:100000,4049:100000,4062:100000,4069:100000,4085:100000,4007:100000,4060:100000,4063:100000,4068:100000,4080:100000,4094:100000,4111:100000,4118:100000,4082:20700,4092:100000,4126:100000,4072:100000,4115:100000,4035:100000,4086:100000,4106:100000,4117:100000,4125:100000
+prontera,148,231,5	shop	Headgear Card Merchant	80,4010:100000,4039:100000,4046:100000,4052:100000,4087:100000,4110:100000,4112:100000,4122:100000,4127:100000
+prontera,146,229,5	shop	Armor Card Merchant	80,4003:100000,4008:100000,4011:100000,4014:100000,4016:100000,4021:100000,4023:100000,4031:100000,4078:100000,4089:100000,4098:100000,4099:100000,4101:100000,4114:100000,4119:100000,4141:100000,4061:100000,4105:100000
+prontera,144,227,5	shop	Shield Card Merchant	80,4013:100000,4032:100000,4058:100000,4059:100000,4066:100000,4074:100000,4083:100000,4120:100000,4124:100000,4136:100000,4138:100000,4045:100000,4067:100000,4075:100000,4090:100000
+prontera,142,225,5	shop	Robe Card Merchant	80,4056:100000,4071:100000,4081:100000,4095:100000,4108:100000,4109:100000,4113:100000,4116:100000,4133:100000,4015:100000,4088:100000,4102:100000,4129:100000
+prontera,140,223,5	shop	Shoes Card Merchant	80,4009:100000,4038:100000,4050:100000,4070:100000,4097:100000,4100:100000,4107:100000
+prontera,138,221,5	shop	Accessory Card Merchant	80,4022:100500,4027:100500,4028:100500,4034:100500,4051:100500,4064:100500,4091:100500,4079:100500,4033:100500,4040:100500,4044:100500,4048:100500,4053:100500,4073:100500,4077:100500,4084:100500,4093:100500,4103:100500,4139:100500

+ 25 - 22
doc/sample/npc_live_dialogues.txt

@@ -1,51 +1,54 @@
-//by Lupus.
-// *** Usage of Global_Functions.txt (you can translate Global_Functions.txt function messages)
-// Here's a polite wolf NPC ^_- Luppy
-// learn how to make your NPC more alive.
-// PS don't use it as a normal NPC in your server. It's exploitable 8)
+//===== rAthena Script =======================================
+//= Sample: Live Dialogue
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 20070320
+//===== Description: ========================================= 
+//= An example of an NPC with live dialogue.
+//= Note: This relies on Global_Functions.txt to run.
+//============================================================
 
 prontera,167,177,5	script	Luppy	1107,{
-        mes "[Luppy]";
+	mes "[Luppy]";
 
-	//say random greeting from Global_Functions.txt
+	// Say a random greeting from Global_Functions.txt
 	mes callfunc("F_Hi");
 
-	//say a compliment according to player's gender
-	//1st string is for FEMALE, 2nd for MALE
+	// Say a compliment according to player's gender
+	// 1st string is for FEMALE, 2nd for MALE
 	mes callfunc("F_Sex","What a beautiful lady!","What a handsome man!");
 
-	//add some random greeting and goodbye into the menu
+	// Add some random greeting and goodbye into the menu
 	menu callfunc("F_Hi"),-, callfunc("F_Bye"),M_BYE;
 
-        mes "[Luppy]";
-	//give a random prize from set list of items
+	mes "[Luppy]";
+	// Give a random prize from set list of items
 	if(@gotstuff){
-		//again, say stuff according to player's gender
+		// Again, say stuff according to player's gender
 		mes "I like "+callfunc("F_Sex","smiling ladies!","bloody pirates!");
 
-		//show one of 3 emotion from the list (we added ,1 to show emotion over PLAYER's head)
+		// Show one of 3 emotion from the list (we added ,1 to show emotion over PLAYER's head)
 		emotion callfunc("F_RandMes",3,e_scissors,e_kis,e_pat),1;
 		close;
 	}
 
-	//we set a temp var to give present just once. Player can get more by RE-entering the server
+	// We set a temp var to give present just once. Player can get more by relogging.
 	set @gotstuff,1;
 
-	//get item Id from the list of presents: Apple, Mastela Fruit, Yggdrasil Seed or Orange Juice
+	// Get item ID from the list of presents: Apple, Mastela Fruit, Yggdrasil Seed or Orange Juice
 	set @itemIDfromList, callfunc("F_RandMes",4,512,522,608,620);
 
-	//again, say stuff according to player's gender
+	// Again, say stuff according to player's gender
 	mes "Hey, "+callfunc("F_Sex","sister!","brother!")+" I have "+getitemname(@itemIDfromList)+" for you!";
 
-	//get the item from the list
+	// Get the item from the list
 	getitem @itemIDfromList,1;
 	close;
 
 M_BYE:
 	mes "[Luppy]";
-	//add some random goodbye from Global_Functions.txt
+	// Add some random goodbye from Global_Functions.txt
 	mes callfunc("F_Bye");
 	close;
-}
-
-//Please, be more creative. Or else this li'l wolfy would eat you up!
+}

+ 10 - 0
doc/sample/npc_pcre.txt

@@ -1,3 +1,13 @@
+//===== rAthena Script =======================================
+//= Sample: PCRE
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20100108
+//===== Description: ========================================= 
+//= Demonstrates PCRE commands.
+//============================================================
+
 prontera,152,181,5	script	MouseJstr	763,{
 
 // hello

+ 10 - 0
doc/sample/npc_shop_test.txt

@@ -1,3 +1,13 @@
+//===== rAthena Script =======================================
+//= Sample: Shops
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20090206
+//===== Description: ========================================= 
+//= An example of shop NPCs.
+//============================================================
+
 // Near fountain in Prontera
 prontera,156,192,3	shop	Card Shop1	95,4001:100,4002:100,4003:100,4004:100,4005:100,4006:100,4007:100,4008:100,4009:100,4010:100,4011:100,4012:100,4013:100,4014:100,4015:100,4016:100,4017:100,4018:100,4019:100,4020:100,4021:100,4022:100,4023:100,4024:100,4025:100,4026:100,4027:100,4028:100,4029:100,4030:100,4031:100,4032:100,4033:100,4034:100,4035:100,4036:100,4037:100,4038:100,4039:100,4040:100,4041:100,4042:100,4043:100,4044:100,4045:100,4046:100,4047:100,4048:100,4049:100,4050:100
 prontera,154,192,1	shop	Card Shop2	123,4051:100,4052:100,4053:100,4054:100,4055:100,4056:100,4057:100,4058:100,4059:100,4060:100,4061:100,4062:100,4063:100,4064:100,4065:100,4066:100,4067:100,4068:100,4069:100,4070:100,4071:100,4072:100,4073:100,4074:100,4075:100,4076:100,4077:100,4078:100,4079:100,4080:100,4081:100,4082:100,4083:100,4084:100,4085:100,4086:100,4087:100,4088:100,4089:100,4090:100,4091:100,4092:100,4093:100,4094:100,4095:100,4096:100,4097:100,4098:100,4099:100,4100:100

+ 10 - 2
doc/sample/npc_test_array.txt

@@ -1,4 +1,13 @@
-// Array Test
+//===== rAthena Script =======================================
+//= Sample: Array Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20090206
+//===== Description: ========================================= 
+//= Demonstrates array commands.
+//============================================================
+
 prontera,164,190,1	script	Array Test	112,{
 	set @hoge[0],1;
 	set @hoge[1],5;
@@ -30,6 +39,5 @@ prontera,164,190,1	script	Array Test	112,{
 	mes "hoge[1]=> " + @hoge[1];
 	mes "hoge[2]=> " + @hoge[2];
 	mes "hoge[3]=> " + @hoge[3];
-
 	close;
 }

+ 27 - 18
doc/sample/npc_test_chat.txt

@@ -1,28 +1,37 @@
-
+//===== rAthena Script =======================================
+//= Sample: Chat Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates waitingroom commands.
+//============================================================
 
 prontera,158,182,0	script	Chat Test::test0001	116,{
-	mes "Trigger Number" + getwaitingroomstate(2);
-	mes "Trigger State" + getwaitingroomstate(3);
-	menu "Enable",L_ENA,"Disable",L_DISA,"Delete",L_DEL,"Create",L_MAKE;
-	close;
-L_ENA:
-	enablewaitingroomevent;
-	close;
-L_DISA:
-	disablewaitingroomevent;
-	close;
-L_DEL:
-	delwaitingroom;
-	close;
-L_MAKE:
-	waitingroom "Test",15,"test0001::OnChatEvent",1;
-	close;
+	mes "Trigger Number: " + getwaitingroomstate(2);
+	mes "Trigger State: " + getwaitingroomstate(3);
+	switch(select("Enable:Disable:Delete:Create")) {
+	case 1:
+		enablewaitingroomevent;
+		close;
+	case 2:
+		disablewaitingroomevent;
+		close;
+	case 3:
+		delwaitingroom;
+		close;
+	case 4:
+		waitingroom "Test",15,"test0001::OnChatEvent",1;
+		close;
+	}
+
 OnInit:
 	waitingroom "Test",15,"test0001::OnChatEvent",1;
 	end;
+
 OnChatEvent:
 	disablewaitingroomevent;
 	warpwaitingpc "prontera",160,180;
 	end;
-
 }

+ 14 - 12
doc/sample/npc_test_duplicate.txt

@@ -1,14 +1,16 @@
-//
-// This sample script tests:
-// * how npc-variables work with duplicated npcs
-// * how the trigger area is applied to duplicates
-//
-// Outcome (r11216 trunk):
-// * the variables are _shared_ between all duplicates
-// * each duplicate knows its own map coordinates
-// * 'OnInit' loads the middle poring last, for some reason
-// * duplicates always override the source npc's trigger area (even 0x0)
-//
+//===== rAthena Script =======================================
+//= Sample: Duplicate Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20070915
+//===== Description: ========================================= 
+//= An example of how duplicate NPCs are handled:
+//=  NPC variables are shared between all duplicates.
+//=  Each duplicate knows its own map coordinates.
+//=  Duplicates always override the source NPC's trigger area (even 0x0).
+//=  'OnInit' loads the middle Poring last, for some reason.
+//============================================================
 
 -	script	Test Script	-1,1,1,{
 	mes "Hi.";
@@ -27,4 +29,4 @@ OnTouch:
 
 prontera,150,175,4	duplicate(Test Script)	Test1	909
 prontera,155,175,4	duplicate(Test Script)	Test2	909,2,2
-prontera,160,175,4	duplicate(Test Script)	Test3	909,3,3
+prontera,160,175,4	duplicate(Test Script)	Test3	909,3,3

+ 14 - 6
doc/sample/npc_test_func.txt

@@ -1,9 +1,18 @@
+//===== rAthena Script =======================================
+//= Sample: Functions
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20120901
+//===== Description: ========================================= 
+//= Demonstrates use of functions.
+//============================================================
 
 // Define the function func001
 function	script	func001	{
 	mes "Hello there!";
 	next;
-	return;		// continue script
+	return;	// Return to script
 }
 
 // Define the function func002
@@ -11,17 +20,16 @@ function	script	func002	{
 	return "I'm a function";
 }
 
-// An NPC using 3 different methods of displaying npc dialog from both internal
-// and external sources.
+// Uses 3 different methods of displaying dialogue from both internal and external sources.
 prontera,168,189,1	script	Functions	112,{
 	callfunc "func001";		// Calls func001 and displays "Hello there!"
-	mes callfunc("func002"); // Calls func002 and displays "I'm a function"
+	mes callfunc("func002");	// Calls func002 and displays "I'm a function"
 	next;
-	callsub L_SUB001;	// Calls the label L_SUB001 and displays "I'm a label"
+	callsub L_SUB001;		// Calls the label L_SUB001 and displays "I'm a label"
 	close;
 	end;
 
 L_SUB001:
 	mes "I'm a label";
-	return;		// continue script
+	return;
 }

+ 27 - 18
doc/sample/npc_test_npctimer.txt

@@ -1,33 +1,42 @@
+//===== rAthena Script =======================================
+//= Sample: NPC Timers
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates NPC timer commands.
+//============================================================
 
 prontera,156,183,0	script	NPCtimerTest::npctimerX0000	116,{
 	mes "Timer value" + getnpctimer(0);
 	mes "State timer" + getnpctimer(1,"npctimerX0000");
 	mes "Number of events" + getnpctimer(2);
-	menu "Initialization",L_INIT,"Stop",L_STOP,"Start",L_START,"Settings",L_SET;
-	close;
-L_INIT:
-	initnpctimer;
-	close;
-L_STOP:
-	stopnpctimer;
-	close;
-L_START:
-	startnpctimer;
-	close;
-L_SET:
-	input @temp;
-	setnpctimer @temp;
-	close;
+	switch(select("Initialization:Stop:Start:Settings")) {
+	case 1:
+		initnpctimer;
+		close;
+	case 2:
+		stopnpctimer;
+		close;
+	case 3:
+		startnpctimer;
+		close;
+	case 4:
+		input .@temp;
+		setnpctimer .@temp;
+		close;
+	}
 
 OnTimer1000:
-	announce "After a second",0;
+	npctalk "After a second...";
 	end;
 
 OnTimer5000:
-	announce "After 5 seconds",0;
+	npctalk "After 5 seconds...";
 	end;
 
 OnTimer10000:
-	announce "After 10 seconds",0;
+	npctalk "After 10 seconds...";
 	end;
 }

+ 12 - 5
doc/sample/npc_test_npctimer2.txt

@@ -1,16 +1,23 @@
+//===== rAthena Script =======================================
+//= Sample: Attached NPC Timers
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates attached NPC timer commands.
+//============================================================
+
 prontera,156,183,0	script	NPCtimerTest::npctimerX0000	116,{
-L_INIT:
 	mes "What would you like to know?";
-	menu "Tell me my level",L_WAIT;
-
-L_WAIT:
+	select("Tell me my level.");
 	mes "I need time to think...";
 	initnpctimer;
 	attachnpctimer;
 	close;
 
 OnTimer5000:
-	mes "Ah, your level is " + readparam(11);
+	mes "Ah, your level is " + readparam(11) + "!";
 	detachnpctimer;
 	close;
 }

+ 10 - 0
doc/sample/npc_test_quest.txt

@@ -1,3 +1,13 @@
+//===== rAthena Script =======================================
+//= Sample: Quest Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20120904
+//===== Description: ========================================= 
+//= Demonstrates quest commands.
+//============================================================
+
 // Before installing an NPC like the one below, you would
 // need to add the quest to /db/quest_db.txt - e.g:
 // 9000,0,1002,3,0,0,0,0,"3 Splats Please!"

+ 22 - 42
doc/sample/npc_test_setitemx.txt

@@ -1,69 +1,49 @@
-//by Lupus.
-// SVN TRUNK 9940+ only
-
-//setiteminfo(itemID,n,Value), where n
-//		0 value_buy;
-//		1 value_sell;
-//		2 type;
-//		3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
-//				if = 0, then monsters don't drop it at all (rare or a quest item)
-//				if = 10000, then this item is sold in NPC shops only
-//		4 sex;
-//		5 equip;
-//		6 weight;
-//		7 atk;
-//		8 def;
-//		9 range;
-//		10 slot;
-//		11 look;
-//		12 elv;
-//		13 wlv;
+//===== rAthena Script =======================================
+//= Sample: Setiteminfo & Setitemscript
+//===== By: ==================================================
+//= Lupus
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates 'setiteminfo' and 'setitemscript' commands.
+//============================================================
 
 prontera,164,161,5	script	Lupus	1013,{
-	menu "Make Knife[3] Edible",M_1,
-		"Make Apple Equippable",M_2,
-		"Edible Knife = Full SP",M_3,
-		"Knife = Weapon + 3 Notes",M_4;
+	menu
+	  "Make Knife[3] Edible",M_1,
+	  "Make Apple Equippable",M_2,
+	  "Edible Knife = Full SP",M_3,
+	  "Knife = Weapon + 3 Notes",M_4;
 	close;
 
 M_1:
-	//WORKS!
-	mes "Ok. We Made Knife[3] Edible";
+	mes "Ok. We made Knife[3] edible.";
 	setiteminfo(1201,2,0); //type = 0 : potion
 	setitemscript(1201,"{dispbottom \"* You used Knife[3]\";}");
 	close;
 
 M_2:
-	//WORKS!
-	mes "Ok. We Made Apple Equippable";
-	//item type -> headgear
-	setiteminfo(512,2,5); //type = 5
-	//where to equip to
-	setiteminfo(512,5,512); //equip = 512
-	//set as headgear location
-	setiteminfo(512,11,256); //loc = 256
-	//set Headgear Sprite ID
-	setiteminfo(512,14,85); //view id = 85
-
+	mes "Ok. We made Apple equippable.";
+	setiteminfo(512,2,5); //item type -> headgear (type = 5)
+	setiteminfo(512,5,512); //where to equip to (equip = 512)
+	setiteminfo(512,11,256); //set as headgear location (loc = 256)
+	setiteminfo(512,14,85); //set Headgear Sprite ID (view id = 85)
 	setitemscript(512,"{dispbottom \"* Other item's changed\";}",0);
 	setitemscript(512,"{dispbottom \"* Equipped\";}",1);
 	setitemscript(512,"{dispbottom \"* Unequipped\";}",2);
 	close;
 
 M_3:
-	//WORKS!
-	mes "Ok. Now Edible Knife[3] restores your SP";
+	mes "Ok. Now edible Knife[3] restores your SP.";
 	setitemscript(1201,2,0);
 	setitemscript(1201,"{dispbottom \"* You ate Knife[3] + Full SP\"; percentheal 0,100;}");
 	close;
 
 M_4:
-	//WORKS!
-	mes "Ok. We Made Knife... a weapon. But added 3 notes.";
+	mes "Ok. We made Knife a weapon, but added 3 notes.";
 	setiteminfo(1201,2,4); //type = 4 : weapon again
 	setitemscript(1201,"{dispbottom \"* 1 Used\";}",0);
 	setitemscript(1201,"{dispbottom \"* 2 Equipped\";}",1);
 	setitemscript(1201,"{dispbottom \"* 3 Unequipped\";}",2);
 	close;
-
 }

+ 29 - 21
doc/sample/npc_test_setmapflag.txt

@@ -1,24 +1,32 @@
-//by Jbain
+//===== rAthena Script =======================================
+//= Sample: Mapflag Test
+//===== By: ==================================================
+//= Jbain
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates mapflag commands.
+//============================================================
 
 prontera,165,145,0	script	EXPflagtest	123,{
-	mes "[Yo man]";
-	mes "Setup the map rates";
-	menu "Job EXP",L_job,"Base  EXP",L_base,"PVP ON",L_pvp,"Reset all flags",-;
-
-	removemapflag "prontera",MF_BEXP;
-	removemapflag "prontera",MF_JEXP;
-	removemapflag "prontera",MF_PVP;
-	close;
-
-L_job:
-	input @rate;
-	setmapflag "prontera",MF_JEXP,@rate;
-	close;
-L_base:
-	input @rate;
-	setmapflag "prontera",MF_BEXP,@rate;
-	close;
-L_pvp:
-	setmapflag "prontera",MF_PVP;
-	close;
+	mes "[EXPflagtest]";
+	mes "Set up the map rates:";
+	switch(select("Job EXP:Base EXP:PVP on:Reset all flags")) {
+	case 1:
+		input .@rate;
+		setmapflag "prontera",MF_JEXP,.@rate;
+		close;
+	case 2:
+		input .@rate;
+		setmapflag "prontera",MF_BEXP,.@rate;
+		close;
+	case 3:
+		setmapflag "prontera",MF_PVP;
+		close;
+	case 4:
+		removemapflag "prontera",MF_BEXP;
+		removemapflag "prontera",MF_JEXP;
+		removemapflag "prontera",MF_PVP;
+		close;
+	}
 }

+ 22 - 13
doc/sample/npc_test_skill.txt

@@ -1,4 +1,12 @@
-// Giving skills to characters via an NPC
+//===== rAthena Script =======================================
+//= Sample: Skill
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20121003
+//===== Description: ========================================= 
+//= Demonstrates the 'skill' command.
+//============================================================
 
 // skill <skill id>,<level>{,<flag>};
 //	flag=0 Grants the skill permanently
@@ -9,16 +17,17 @@
 
 prontera,157,182,0	script	Skills	116,{
 	mes "What skill would you like?";
-	menu "First Aid",L_GETSKILL142,"Play Dead",L_GETSKILL143,"Heal",L_GETSKILL28,"None",L_YAME;
-L_GETSKILL142:
-	skill 142,1,0; // Permanently gives player level 1 First Aid
-	close;
-L_GETSKILL143:
-	skill 143,1,0; // Permanently gives player level 1 Play Dead
-	close;
-L_GETSKILL28:
-	skill 28,3,1; // Temporarily gives player level 3 Heal
-	close;
-L_YAME:
-	close;
+	switch(select("First Aid:Play Dead:Heal:None")) {
+	case 1:
+		skill 142,1,0;	// Permanently gives player level 1 First Aid
+		close;
+	case 2:
+		skill 143,1,0;	// Permanently gives player level 1 Play Dead
+		close;
+	case 3:
+		skill 28,3,1;	// Temporarily gives player level 3 Heal
+		close;
+	case 4:
+		close;
+	}
 }

+ 16 - 7
doc/sample/npc_test_str.txt

@@ -1,15 +1,24 @@
-// Some Test Example
+//===== rAthena Script =======================================
+//= Sample: String Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20070315
+//===== Description: ========================================= 
+//= An example of string comparisons.
+//============================================================
+
 prontera,164,188,1	script	sTrInG2compare	112,{
 	set @str$, "StRiNg1";
 	mes "sTrInG2 isn't equal to " + @str$ ;
 	mes "Our Var is equal to " + @str$ + " ...OK?";
 	next;
-	mes "Comparision eqOK�F" + (@str$=="StRiNg1");
-	mes "Comparision eqNG�F" + (@str$=="sTrInG2");
-	mes "Comparision neOK�F" + (@str$!="00000");
-	mes "Comparision neNG�F" + (@str$!="StRiNg1");
-	mes "Comparision gtOK�F" + ("aab">"aaa");
-	mes "Comparision ltNG�F" + ("aab"<"aaa");
+	mes "Comparison eqOK�F" + (@str$=="StRiNg1");
+	mes "Comparison eqNG�F" + (@str$=="sTrInG2");
+	mes "Comparison neOK�F" + (@str$!="00000");
+	mes "Comparison neNG�F" + (@str$!="StRiNg1");
+	mes "Comparison gtOK�F" + ("aab">"aaa");
+	mes "Comparison ltNG�F" + ("aab"<"aaa");
 	next;
 	input @str2$;
 	mes "You've entered '" + @str2$ + "' string.";

+ 0 - 15
doc/sample/npc_testchkoption.txt

@@ -1,15 +0,0 @@
-prontera,156,89,6	script	test_chkoption	117,{
-	mes "Please enter a value of type!";
-	input @value;
-	if(checkoption(@value) == 1) goto L1;
-	if(checkoption(@value) == 0) goto L0;
-	end;
-	L1:
-		mes "True!";
-		close;
-		end;
-	L0:
-		mes "False!";
-		close;
-		end;
-}

+ 10 - 3
doc/sample/npc_time_sample.txt

@@ -1,3 +1,12 @@
+//===== rAthena Script =======================================
+//= Sample: Time Test
+//===== By: ==================================================
+//= rAthena Dev Team
+//===== Current Version: =====================================
+//= 20070315
+//===== Description: ========================================= 
+//= Demonstrates time commands.
+//============================================================
 
 prontera,157,181,6	script	Time Sample	105,{
 	mes "[Time Sample]";
@@ -13,6 +22,4 @@ prontera,157,181,6	script	Time Sample	105,{
 	mes " GetTime(7) : " + gettime(7) + " (Year)";
 	mes " GetTimeStr : " + gettimestr("%Y-%m/%d %H:%M:%S",19);
 	close;
-	end;
-}
-
+}

+ 1 - 2
doc/script_commands.txt

@@ -908,8 +908,7 @@ OnPCLogoutEvent:
 OnPCBaseLvUpEvent:
 OnPCJobLvUpEvent:
 
-It's pretty obvious when these four special labels will be invoked. For more
-information, see 'doc/sample/PCLoginEvent.txt'
+It's pretty obvious when these four special labels will be invoked.
 
 OnPCDieEvent: