diff options
author | mekolat <mekolat@gmail.com> | 2015-04-21 00:45:10 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2015-04-30 02:06:42 -0400 |
commit | 3a0df71ee09f9fceb323f608638cc94d9d65124e (patch) | |
tree | 877deffe3f331b74d6af72bc0cf8f30f840736aa /world | |
parent | 27fe76b6a48cf51aa87346094845fb0ed6333304 (diff) | |
download | serverdata-3a0df71ee09f9fceb323f608638cc94d9d65124e.tar.gz serverdata-3a0df71ee09f9fceb323f608638cc94d9d65124e.tar.bz2 serverdata-3a0df71ee09f9fceb323f608638cc94d9d65124e.tar.xz serverdata-3a0df71ee09f9fceb323f608638cc94d9d65124e.zip |
make generic npcs use strnpcinfo
Diffstat (limited to 'world')
-rw-r--r-- | world/map/npc/001-1/stat_reset.txt | 2 | ||||
-rw-r--r-- | world/map/npc/002-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/002-3/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/006-1/pachua.txt | 3 | ||||
-rw-r--r-- | world/map/npc/006-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/008-1/diryn.txt | 2 | ||||
-rw-r--r-- | world/map/npc/009-2/wyara.txt | 2 | ||||
-rw-r--r-- | world/map/npc/012-3/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/013-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/020-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/027-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/029-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/033-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/048-2/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/055-1/traveler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/functions/banker.txt | 2 | ||||
-rw-r--r-- | world/map/npc/functions/inn.txt | 12 | ||||
-rw-r--r-- | world/map/npc/functions/stat_reset.txt | 8 | ||||
-rw-r--r-- | world/map/npc/functions/travelers.txt | 22 |
19 files changed, 41 insertions, 34 deletions
diff --git a/world/map/npc/001-1/stat_reset.txt b/world/map/npc/001-1/stat_reset.txt index 1ad2bc4e..e8c61ca3 100644 --- a/world/map/npc/001-1/stat_reset.txt +++ b/world/map/npc/001-1/stat_reset.txt @@ -2,7 +2,7 @@ 001-1,117,105,0|script|Malivox|103 { - set @NpcName$, "Malivox"; + set @npcname$, "Malivox"; callfunc "StatReset"; close; } diff --git a/world/map/npc/002-1/traveler.txt b/world/map/npc/002-1/traveler.txt index 0645cce2..975786ae 100644 --- a/world/map/npc/002-1/traveler.txt +++ b/world/map/npc/002-1/traveler.txt @@ -4,7 +4,7 @@ 002-1,60,41,0|script|Nina the Traveler|103 { - set @NpcName$, "Nina"; + set @npcname$, "Nina"; set @NpcTravelBit, $@tulimshar_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/002-3/traveler.txt b/world/map/npc/002-3/traveler.txt index a1fd4f6f..48175be8 100644 --- a/world/map/npc/002-3/traveler.txt +++ b/world/map/npc/002-3/traveler.txt @@ -4,7 +4,7 @@ 002-3,25,28,0|script|Jena the Traveler|103 { - set @NpcName$, "Jena"; + set @npcname$, "Jena"; set @NpcTravelBit, $@tul_mine_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/006-1/pachua.txt b/world/map/npc/006-1/pachua.txt index cdc8d40e..905ffcb4 100644 --- a/world/map/npc/006-1/pachua.txt +++ b/world/map/npc/006-1/pachua.txt @@ -1,9 +1,6 @@ 006-1,24,113,0|script|Pachua|143 { - set @distance_handler, 1; callfunc "PCtoNPCRange"; - if (@npc_check) - goto L_Close; set @halloween_npc_id, $@halloween_npc_pachua; callfunc "TrickOrTreat"; diff --git a/world/map/npc/006-1/traveler.txt b/world/map/npc/006-1/traveler.txt index f87cf083..7c84e040 100644 --- a/world/map/npc/006-1/traveler.txt +++ b/world/map/npc/006-1/traveler.txt @@ -4,7 +4,7 @@ 006-1,25,95,0|script|Rhutan the Traveler|103 { - set @NpcName$, "Rhutan"; + set @npcname$, "Rhutan"; set @NpcTravelBit, $@pachua_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/008-1/diryn.txt b/world/map/npc/008-1/diryn.txt index dae18c13..6570f1d8 100644 --- a/world/map/npc/008-1/diryn.txt +++ b/world/map/npc/008-1/diryn.txt @@ -4,7 +4,7 @@ 008-1,81,82,0|script|Diryn the Traveler|103 { - set @NpcName$, "Diryn"; + set @npcname$, "Diryn"; set @NpcTravelBit, $@hurnscald_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/009-2/wyara.txt b/world/map/npc/009-2/wyara.txt index 3b14a178..17f6bc61 100644 --- a/world/map/npc/009-2/wyara.txt +++ b/world/map/npc/009-2/wyara.txt @@ -63,7 +63,7 @@ L_Shop: close; L_StatReset: - set @NpcName$, "Wyara"; + set @npcname$, "Wyara"; callfunc "StatReset"; goto L_Close; diff --git a/world/map/npc/012-3/traveler.txt b/world/map/npc/012-3/traveler.txt index aa173080..b3c158ea 100644 --- a/world/map/npc/012-3/traveler.txt +++ b/world/map/npc/012-3/traveler.txt @@ -4,7 +4,7 @@ 012-3,439,62,0|script|Meridith the Traveler|103 { - set @NpcName$, "Meridith"; + set @npcname$, "Meridith"; set @NpcTravelBit, $@terranite_cave_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/013-1/traveler.txt b/world/map/npc/013-1/traveler.txt index efa6c53a..7439b8d8 100644 --- a/world/map/npc/013-1/traveler.txt +++ b/world/map/npc/013-1/traveler.txt @@ -1,6 +1,6 @@ 013-1,120,90,0|script|Faris the Traveler|103 { - set @NpcName$, "Faris"; + set @npcname$, "Faris"; set @NpcTravelBit, $@magic_house_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/020-1/traveler.txt b/world/map/npc/020-1/traveler.txt index d873a57f..421ed0e7 100644 --- a/world/map/npc/020-1/traveler.txt +++ b/world/map/npc/020-1/traveler.txt @@ -1,6 +1,6 @@ 020-1,57,123,0|script|Knox the Traveler|103 { - set @NpcName$, "Knox"; + set @npcname$, "Knox"; set @NpcTravelBit, $@nivalis_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/027-1/traveler.txt b/world/map/npc/027-1/traveler.txt index ca8d8f47..0c8bb753 100644 --- a/world/map/npc/027-1/traveler.txt +++ b/world/map/npc/027-1/traveler.txt @@ -4,7 +4,7 @@ 027-1,83,84,0|script|Styx the Traveler|103 { - set @NpcName$, "Styx"; + set @npcname$, "Styx"; set @NpcTravelBit, $@graveyard_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/029-1/traveler.txt b/world/map/npc/029-1/traveler.txt index 1d7f354a..befa8eef 100644 --- a/world/map/npc/029-1/traveler.txt +++ b/world/map/npc/029-1/traveler.txt @@ -4,7 +4,7 @@ 029-1,69,68,0|script|Knitra the Traveler|103 { - set @NpcName$, "Knitra"; + set @npcname$, "Knitra"; set @NpcTravelBit, $@candor_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/033-1/traveler.txt b/world/map/npc/033-1/traveler.txt index 681a4100..462e2586 100644 --- a/world/map/npc/033-1/traveler.txt +++ b/world/map/npc/033-1/traveler.txt @@ -4,7 +4,7 @@ 033-1,63,30,0|script|Khoenan the Traveler|103 { - set @NpcName$, "Khoenan"; + set @npcname$, "Khoenan"; set @NpcTravelBit, $@barbarians_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/048-2/traveler.txt b/world/map/npc/048-2/traveler.txt index 4d8af7fe..7b654d85 100644 --- a/world/map/npc/048-2/traveler.txt +++ b/world/map/npc/048-2/traveler.txt @@ -4,7 +4,7 @@ 048-2,23,46,0|script|Drake the Traveler|103 { - set @NpcName$, "Drake"; + set @npcname$, "Drake"; set @NpcTravelBit, $@blue_sage_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/055-1/traveler.txt b/world/map/npc/055-1/traveler.txt index 0277fbd4..1f36de77 100644 --- a/world/map/npc/055-1/traveler.txt +++ b/world/map/npc/055-1/traveler.txt @@ -4,7 +4,7 @@ 055-1,135,60,0|script|Sherman the Traveler|103 { - set @NpcName$, "Sherman"; + set @npcname$, "Sherman"; set @NpcTravelBit, $@hurns_farms_bit; callfunc "Traveler"; end; diff --git a/world/map/npc/functions/banker.txt b/world/map/npc/functions/banker.txt index ea5dfa22..9492f0f5 100644 --- a/world/map/npc/functions/banker.txt +++ b/world/map/npc/functions/banker.txt @@ -8,6 +8,7 @@ function|script|Banker goto L_Start; L_Start: + if(@npcname$ == "") set @npcname$, strnpcinfo(1); mes "[" + @npcname$ + "]"; mes "\"Welcome to the bank!"; mes "How can I help you?\""; @@ -248,5 +249,6 @@ L_Change_Bank: goto L_Start; L_Return: + set @npcname$, ""; return; } diff --git a/world/map/npc/functions/inn.txt b/world/map/npc/functions/inn.txt index ffa75582..e45c398c 100644 --- a/world/map/npc/functions/inn.txt +++ b/world/map/npc/functions/inn.txt @@ -2,12 +2,13 @@ function|script|Inn { + if(@npcname$ == "") set @npcname$, strnpcinfo(1); mes "[" + @npcname$ + "]"; mes "\"Would you like to rest? It's only " + @cost + " gp.\""; next; menu "Yes", L_Next, - "No", L_No; + "No", L_Close; L_Next: if (Zeny < @cost) @@ -17,15 +18,18 @@ L_Next: mes "[" + @npcname$ + "]"; mes "\"Sleep well!\""; - close; + next; + goto L_Close; -L_No: +L_Close: mes "[" + @npcname$ + "]"; mes "\"See you.\""; + set @npcname$, ""; close; L_NoMoney: mes "[" + @npcname$ + "]"; mes "\"You don't have enough money to stay here.\""; - close; + next; + goto L_Close; } diff --git a/world/map/npc/functions/stat_reset.txt b/world/map/npc/functions/stat_reset.txt index d8f484ff..fdb833f7 100644 --- a/world/map/npc/functions/stat_reset.txt +++ b/world/map/npc/functions/stat_reset.txt @@ -8,7 +8,7 @@ function|script|StatReset set @cost, BaseLevel * 100; - mes "[" + @NpcName$ + "]"; + mes "[" + @npcname$ + "]"; mes "\"I have come across a spell that will"; mes "reset your status points."; mes "Normally this spell is expensive, but"; @@ -31,19 +31,19 @@ L_Reset: set Zeny, Zeny-@cost; resetstatus; - mes "[" + @NpcName$ + "]"; + mes "[" + @npcname$ + "]"; mes "\"There you are."; mes ""; mes "Good as new!\""; goto L_Return; L_Pass: - mes "[" + @NpcName$ + "]"; + mes "[" + @npcname$ + "]"; mes "\"Very well then, see you.\""; goto L_Return; L_NoMoney: - mes "[" + @NpcName$ + "]"; + mes "[" + @npcname$ + "]"; mes "\"Oh dear, the price cannot be bargained."; mes ""; mes "Perhaps you can borrow from a friend?\""; diff --git a/world/map/npc/functions/travelers.txt b/world/map/npc/functions/travelers.txt index 07b084d9..88a9ed9d 100644 --- a/world/map/npc/functions/travelers.txt +++ b/world/map/npc/functions/travelers.txt @@ -46,7 +46,8 @@ OnInit: function|script|TravelerTut { //Explain Travelers - mes "["+@NpcName$+"]"; + if(@npcname$ == "") set @npcname$, strnpcinfo(1); + mes "["+@npcname$+"]"; mes "\"We travelers are found all over the world. Once you have found another traveler, we can create a link and send you between us.\""; next; if (TravelFound & $@tut_bit) @@ -58,13 +59,15 @@ L_SetBit: goto L_Return; L_Return: + set @npcname$, ""; return; } function|script|Traveler { - mes "["+@NpcName$+"]"; - mes "\"Greetings. I am "+@NpcName$+" the Traveler.\""; + if(@npcname$ == "") set @npcname$, strnpcinfo(1); + mes "["+@npcname$+"]"; + mes "\"Greetings. I am "+@npcname$+" the Traveler.\""; next; if (TravelFound & $@tut_bit) @@ -87,7 +90,7 @@ L_TravelTut: goto L_Main; L_SetTravelBit: - mes "["+@NpcName$+"]"; + mes "["+@npcname$+"]"; mes "\"Uplink Set. You can now return to this spot for a fee.\""; next; set TravelFound, TravelFound | @NpcTravelBit; @@ -120,7 +123,7 @@ L_TravelChecks: goto L_TravelPlayer; L_TravelPlayer: - mes "["+@NpcName$+"]"; + mes "["+@npcname$+"]"; mes "\"Be fearless!\""; close2; set Zeny, Zeny - @NextLocationCost; @@ -223,30 +226,31 @@ L_TravelCandor: goto L_TravelChecks; L_TravelNo: - mes "["+@NpcName$+"]"; + mes "["+@npcname$+"]"; mes "\"Perhaps some day you will have the courage to help us.\""; close2; goto L_Clearvars; L_NoMoney: - mes "["+@NpcName$+"]"; + mes "["+@npcname$+"]"; mes "\"Sorry, but you don't have enough money. Maybe next time.\""; close2; goto L_Clearvars; L_NoFound: - mes "["+@NpcName$+"]"; + mes "["+@npcname$+"]"; mes "\"Sorry, but you haven't visited a traveler yet at that location. You should talk to a traveler there so you can quickly travel there in the future.\""; close2; goto L_Clearvars; L_AlreadyThere: - mes "["+@NpcName$+"]"; + mes "["+@npcname$+"]"; mes "\"Umm, you are already here. Are you sure you know where you are going?\""; close2; goto L_Clearvars; L_Clearvars: + set @npcname$, ""; set @Cost, 0; set @NextLocationBit, 0; set @NextLocationCost, 0; |