From 0f19650502bb6fd268841d0faba9a4c581aab0ee Mon Sep 17 00:00:00 2001 From: Lupus Date: Sun, 30 Jul 2006 09:25:00 +0000 Subject: updated gunslinger job quest/ fixed louyang bug git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7976 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/Changelog.txt | 3 ++ npc/cities/louyang.txt | 2 +- npc/jobs/1-1e/gunslinger.txt | 114 +++++++++++++---------------------------- npc/other/Global_Functions.txt | 4 +- 4 files changed, 44 insertions(+), 79 deletions(-) diff --git a/npc/Changelog.txt b/npc/Changelog.txt index 5f3ee0968..7ab6bb258 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -38,6 +38,9 @@ Playtester Date Added ====== + +07/30 + * Optimized Gunslinger Job Quest, rediced vars number, updated Global_Functions.txt [Lupus] 07/29 * Some more sign quest warps and a small change to the comodo gambling NPC. [MasterOfMuppets] * Fixed a mixed up mob id in Thanatos spawns [Playtester] diff --git a/npc/cities/louyang.txt b/npc/cities/louyang.txt index d053ee180..f135c725e 100644 --- a/npc/cities/louyang.txt +++ b/npc/cities/louyang.txt @@ -519,7 +519,7 @@ louyang.gat,276,136,4 script Fist Master 819,{ } louyang.gat,272,133,0 script Trainee::trainees 819,{ - set @talk,rand(11); + set @talk,rand(12); if(@talk == 1) goto L_QUOT1; if(@talk == 2) goto L_QUOT2; if(@talk == 3) goto L_QUOT3; diff --git a/npc/jobs/1-1e/gunslinger.txt b/npc/jobs/1-1e/gunslinger.txt index 3e0693f69..1ff0d61bd 100644 --- a/npc/jobs/1-1e/gunslinger.txt +++ b/npc/jobs/1-1e/gunslinger.txt @@ -7,7 +7,7 @@ //= DON'T REMOVE THIS! (by request of him, he provided all //= the info regarding the quests and shops.) //===== Current Version: ===================================== -//= 1.0 +//= 1.6 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= @@ -17,6 +17,8 @@ //= 1.0 Made the NPC [erKURITA] //= 1.5 Couple fixes to the npc, aswell as adding the missing //= 3 green herbs. [erKURITA] +//= 1.6 job number->const, commonized variable name, +//= optimized [Lupus] //============================================================ que_ng.gat,152,167,3 script Gunslinger Jobchanger 901,{ @@ -25,22 +27,22 @@ set @npcname$,"[Armsmith]"; if (Class == Job_Novice) { - if (gs_quest >= 1) { + if (GUNS_Q >= 1) { mes @npcname$; mes "So, you've comeback?"; next; - if (gs_quest == 5) { + if (GUNS_Q == 5) { if (SkillPoint > 0) { mes @npcname$; mes "Err, excuse me, but you still have Skill Points left. You have to use them all first before I can turn you into a Gunslinger"; close2; - set @npcname$,0; + set @npcname$,""; end; } else if (JobLevel < 10) { mes @npcname$; mes "Err, excuse me, but you don't have Level 10 Job. You need to have 10 level job in order to change to Gunslinger"; close2; - set @npcname$,0; + set @npcname$,""; end; } mes @npcname$; @@ -48,14 +50,14 @@ if (Class == Job_Novice) { next; mes @npcname$; mes "A gunslinger!!!"; - jobchange 24; + jobchange Job_Gunslinger; + callfunc "F_ClearJobVar"; //clears all job variables for the current player next; mes @npcname$; mes "Oh, I forgot, here's a token of my appreciation"; getitem 13150,1; close2; - set gs_quest,0; - set @npcname$,0; + set @npcname$,""; end; } else mes @npcname$; @@ -66,14 +68,14 @@ if (Class == Job_Novice) { mes @npcname$; mes "You need to go to Payon. At the small wooden wall and in the south exit, Mr. Tanieh will be there waiting to ask you a few things. Go now then"; close2; - set @npcname$,0; + set @npcname$,""; end; case 2: next; mes @npcname$; mes "Then GET GOING! Don't you want to become a gunslinger, do you?"; close2; - set @npcname$,0; + set @npcname$,""; end; } } else @@ -89,21 +91,22 @@ if (Class == Job_Novice) { mes @npcname$; mes "He'll be waiting for you next to the small wooden wall of the south exit. See you later then"; close2; - set gs_quest,1; - set @npcname$,0; + set GUNS_Q,1; + set @npcname$,""; end; case 2: next; mes @npcname$; mes "Too bad for you son"; close2; - set @npcname$,0; + set @npcname$,""; end; } } else mes @npcname$; mes "Hi son, how's life treating you?"; + set @npcname$,""; close; } @@ -111,7 +114,7 @@ payon.gat,184,65,3 script Mr. Tanieh 866,{ set @npcname$,"[Mr. Tanieh]"; -if (gs_quest == 1) { +if (GUNS_Q == 1) { mes @npcname$; mes "Oh, you're ^0000CC"+strcharinfo(0)+"^000000, right? Einbroch's Armsmith told me you were going to help me in a few things"; next; @@ -122,38 +125,10 @@ if (gs_quest == 1) { mes "So, will you do it, please?"; switch (select ("Yes, I will:Sorry I can't now")) { case 1: - next; - mes @npcname$; - mes "Thanks very much!! Ok, here's what I need:"; - mes "^33CCFF 3 Feathers^000000"; - mes "^009933 3 Zargons^000000"; - mes "^660066 3 Rainbow Shells^000000"; - mes "^009900 3 Green Herbs^000000"; - set randtrunk,rand(1,5); - if (randtrunk == 1) { - mes "^663300 1 Trunk^000000"; - set trunk,1019; - } else if (randtrunk == 2) { - mes "^663300 1 Fine-Grained Trunk^000000"; - set trunk,1066; - } else if (randtrunk == 3) { - mes "^663300 1 Solid Trunk^000000"; - set trunk,1067; - } else if (randtrunk == 4) { - mes "^663300 1 Barren Trunk^000000"; - set trunk,1068; - } else if (randtrunk == 5) { - mes "^663300 1 Thin Trunk"; - set trunk,7186; - } - mes "^FF6600 10 Shells^000000"; - next; - mes @npcname$; - mes "Hurry please, I am not sure if my wife will last any longer... oh dear"; - close2; - set @npcname$,""; - set gs_quest,2; - end; + set GUNS_Q2,callfunc("F_RandMes",5,1019,1066,1067,1068,7186); + set GUNS_Q,2; + goto L_LIST; + case 2: next; mes @npcname$; @@ -163,7 +138,7 @@ if (gs_quest == 1) { end; } - } else if (gs_quest == 2) { + } else if (GUNS_Q == 2) { mes @npcname$; mes "Oh, you've come back! Have you brought the items?"; next; @@ -188,7 +163,7 @@ if (gs_quest == 1) { close2; set @npcname$,""; end; - } else if (countitem(trunk) < 1) { + } else if (countitem(GUNS_Q2) < 1) { mes @npcname$; mes "Sorry, you don't have the exact Trunk"; close2; @@ -212,42 +187,27 @@ if (gs_quest == 1) { delitem 949,3; delitem 912,3; delitem 1013,3; - delitem trunk,1; + delitem GUNS_Q2,1; delitem 935,10; delitem 511,3; next; mes @npcname$; mes "Oh my~~ You've been of great help. I'll recommend you to the Einbroch Armory for your job change."; close2; - set gs_quest,3; - set @npcname$,0; - set trunk,0; - set randtrunk,0; + set GUNS_Q,3; + set GUNS_Q2,0; + set @npcname$,""; end; case 2: - next; + L_LIST: + next; mes @npcname$; mes "Ok, I'll tell you again, so please take note!:"; mes "^33CCFF 3 Feathers^000000"; mes "^009933 3 Zargons^000000"; mes "^660066 3 Rainbow Shells^000000"; mes "^009900 3 Green Herbs^000000"; - if (randtrunk == 1) { - mes "^663300 1 Trunk^000000"; - set trunk,1019; - } else if (randtrunk == 2) { - mes "^663300 1 Fine-Grained Trunk^000000"; - set trunk,1066; - } else if (randtrunk == 3) { - mes "^663300 1 Solid Trunk^000000"; - set trunk,1067; - } else if (randtrunk == 4) { - mes "^663300 1 Barren Trunk^000000"; - set trunk,1068; - } else if (randtrunk == 5) { - mes "^663300 1 Thin Trunk"; - set trunk,7186; - } + mes "^663300 1 "+getitemname(GUNS_Q2)+"^000000"; mes "^FF6600 10 Shells^000000"; next; mes @npcname$; @@ -256,8 +216,8 @@ if (gs_quest == 1) { set @npcname$,""; end; } - } else if (gs_quest == 3) || (gs_quest == 4) { - if (countitem(519) >= 1) && (gs_quest == 4) { + } else if (GUNS_Q == 3) || (GUNS_Q == 4) { + if (countitem(519) >= 1) && (GUNS_Q == 4) { mes @npcname$; mes "THAT'S IT!! I was missing the Milk! Oh yes, thanks so much, will you give it to me?"; switch(select("Yes, take it please:Sorry but I need it")) { @@ -267,7 +227,7 @@ if (gs_quest == 1) { mes "Thanks so much! Go talk again with the Einbroch Armsmith. He'll change you. Thanks again and see you."; delitem 519,1; close2; - set gs_quest,5; + set GUNS_Q,5; set @npcname$,""; end; case 2: @@ -283,18 +243,18 @@ if (gs_quest == 1) { mes "*sigh* All I need now is wait. Thanks for your help... but I believe there's something missing.."; close2; set @npcname$,""; - set gs_quest,4; + set GUNS_Q,4; end; - } else if (Class == 24) || (gs_quest == 5) { + } else if (Class == Job_Gunslinger) || (GUNS_Q == 5) { mes @npcname$; mes "Hi ^0000CC"+strcharinfo(0)+"^000000!, how have you been doing? My wife sends you regards and thanks for the ingredients"; close2; - set @npcname$,0; + set @npcname$,""; end; } mes @npcname$; mes "Hi son, how you doing? Nice day eh?"; close2; -set @npcname$,0; +set @npcname$,""; end; } \ No newline at end of file diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index d6a8eb869..fec53aa9c 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Lupus, kobra_k88 //===== Current Version: ===================================== -//= 2.02 +//= 2.03 //===== Compatible With: ===================================== //= eAthena 1.0 //===== Description: ========================================= @@ -24,6 +24,7 @@ //= 2.0 Fixed F_Save/LoadQuestSkills functions. Had to split in into 2 vars [Lupus] //= 2.01 Added $talk to F_ClearGarbage [Evera] //= 2.02 Added $dtsglobalelig and $dts|(1<<6) to F_ClearGarbage [Evera] +//= 2.03 Added Gunslinger vars to F_ClearJobVar [Lupus] //============================================================ @@ -62,6 +63,7 @@ function script F_ClearJobVar { set TAEK_Q,0; set STGL_Q,0; set SOUL_Q,0; + set GUNS_Q,0; set GUNS_Q2,0; return; } -- cgit v1.2.3-70-g09d2