diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-05-27 16:09:56 +0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-06-01 22:28:22 -0300 |
commit | 5350a4750bf916ed6f628b51cf2f84a379672533 (patch) | |
tree | 5900d5430d4b33600ca0e1a7a566df4aae5d61b0 /npc | |
parent | de679dade0f287087f7ad09d5e2f3cf27dab3317 (diff) | |
download | serverdata-5350a4750bf916ed6f628b51cf2f84a379672533.tar.gz serverdata-5350a4750bf916ed6f628b51cf2f84a379672533.tar.bz2 serverdata-5350a4750bf916ed6f628b51cf2f84a379672533.tar.xz serverdata-5350a4750bf916ed6f628b51cf2f84a379672533.zip |
General fixes on Piou Isles.
spaces2tabs + force 2space indents in comment section to keep it neat
Me, jes, test all agree that tabs>spaces :3
Arkim-ize Glim daily
Rename new Piou island quests LilitQuest->PiouQuest and shift IDs
Trim unused quest vars, shift ID up
Diffstat (limited to 'npc')
-rw-r--r-- | npc/006-0/core.txt | 2 | ||||
-rw-r--r-- | npc/006-2-1/glim.txt | 127 | ||||
-rw-r--r-- | npc/006-2-1/miltaco.txt | 2 | ||||
-rw-r--r-- | npc/006-2-1/server.txt | 21 | ||||
-rw-r--r-- | npc/006-2-5/dusk.txt | 22 | ||||
-rw-r--r-- | npc/006-2-5/reed.txt | 148 |
6 files changed, 170 insertions, 152 deletions
diff --git a/npc/006-0/core.txt b/npc/006-0/core.txt index 93b01e4c9..21a2e5c0e 100644 --- a/npc/006-0/core.txt +++ b/npc/006-0/core.txt @@ -8,7 +8,7 @@ OnTouch: if (CRAZYPOINTS < 3) goto L_Reject; // FIXME /* TODO: Piou Isles Arc */ - if (!getq2(LilitQuest_Glim)) goto L_Reject; // FIXME lame hack + if (!getq3(PiouQuest_Glim)) goto L_Reject; // FIXME lame hack if (getq(General_Narrator) < 3) goto L_Reject; // Tulimshar Arc must be finished specialeffect(5000, SELF, getcharid(3)); diff --git a/npc/006-2-1/glim.txt b/npc/006-2-1/glim.txt index a9d620d5c..0ffcfd41e 100644 --- a/npc/006-2-1/glim.txt +++ b/npc/006-2-1/glim.txt @@ -1,71 +1,90 @@ // TMW2 scripts. // Authors: -// Jesusalva -// +seeds +// Jesusalva +// +seeds // Description: -// Daily quest to exchange Tolchi Arrow Boxes for a small amount of gp and exp +// Daily quest to exchange Tolchi Arrow Boxes for a small amount of gp and exp // Variables: -// $GLIM_ST -// How many Tolchi Arrow Boxes were given -// q1 -// Controls your own progress helping Glim - Items today -// q2 -// Controls your own progress helping Glim - Your timer +// $GLIM_ST +// How many Tolchi Arrow Boxes were given +// q2 +// Controls your own progress helping Glim - Items today +// q3 +// Controls your own progress helping Glim - Your timer 006-2-1,82,28,0 script Glim NPC_PIOU_VIKING,{ + function handle_donation; L_Loop: - .@q1=getq(LilitQuest_Glim); - .@q2=getq2(LilitQuest_Glim); - mesn; - mesq l("Argh, I've run out o' arrows! Say, ye don't have any I could use, do ye? I only got %s...", fnum($GLIM_ST)); - next; - if (.@q2 < $@GLIM_QTIMER) { - setq1 LilitQuest_Glim, 0; - setq2 LilitQuest_Glim, $@GLIM_QTIMER; - } + .@q3 = getq3(PiouQuest_Glim); + mesn; + mesq l("Argh, I've run out o' arrows! Say, ye don't have any I could use, do ye? I only got %s...", fnum($GLIM_ST)); + next; + if (.@q3 < $@GLIM_QTIMER) { + setq2 PiouQuest_Glim, 0; + setq3 PiouQuest_Glim, $@GLIM_QTIMER; + } - // Daily limit reached - .@q1=getq1(LilitQuest_Glim); - if (.@q1 >= (BaseLevel-17)/3) goto L_Timer; - select - rif(countitem(TolchiAmmoBox), l("Give Glim a %s"), getitemname(TolchiAmmoBox)), - l("Maybe later."); - mes ""; + // Daily limit reached + .@q2 = getq2(PiouQuest_Glim); + .@donations_limit = (BaseLevel-17)/3 - .@q2; + .@tabox_limit = min(countitem(TolchiAmmoBox), .@donations_limit); - switch (@menu) { - case 1: - delitem TolchiAmmoBox, 1; - getexp 64, 0; - Zeny+=150; - break; - case 2: - close; - break; - } - $GLIM_ST+=1; - setq1 LilitQuest_Glim, .@q1+1; - goto L_Loop; + if (.@donations_limit <= 0) + goto L_Timer; + + select + rif(.@tabox_limit > 0, l("Give Glim a %s", getitemname(TolchiAmmoBox))), + l("Maybe later."); + mes ""; + + switch (@menu) { + case 1: + handle_donation(TolchiAmmoBox, 1, 150, 64); + break; + case 2: + close; + break; + } + goto L_Loop; L_Timer: - if (BaseLevel < 10) { - mesq l("Wait a minute! I ain't trustin' a weakling like ye fer good arrows!"); - mesn; - mesq l("Come back when ye've grown sum muscles."); - close; - } - mesn; - mesq l("I'm all stocked up now, thanks to ye. Come back in @@ and ye might be able to help me again.", FuzzyTime($@GLIM_TIMER+(60*60*24),2,2)); - close; + if (BaseLevel < 10) { + mesq l("Wait a minute! I ain't trustin' a weakling like ye fer good arrows!"); + mesn; + mesq l("Come back when ye've grown sum muscles."); + close; + } + mesn; + mesq l("I'm all stocked up now, thanks to ye. Come back in @@ and ye might be able to help me again.", FuzzyTime($@GLIM_TIMER+(60*60*24),2,2)); + close; + +function handle_donation { // (partID, Amount, Zeny, bEXP) + .@partID = getarg(0); + .@amount = getarg(1); + .@zeny = getarg(2); + .@bEXP = getarg(3); + + delitem .@partID, .@amount; + getexp (.@amount * .@bEXP), 0; + Zeny += (.@amount * .@zeny); + $GLIM_ST += .@amount; + setq2 PiouQuest_Glim, (getq2(PiouQuest_Glim) + .@amount); +} OnInit: - .sex=G_OTHER; - .distance=5; - // No end; on purpose + .sex = G_OTHER; + .distance = 5; -OnHour00: - $@GLIM_QTIMER=gettimeparam(GETTIME_DAYOFMONTH); - $@GLIM_QTIMER=gettimetick(2); - end; + $@GLIM_QTIMER = gettimeparam(GETTIME_DAYOFMONTH); + $@GLIM_TIMER = gettimetick(2); + $@GLIM_TIMER -= gettime(1); + $@GLIM_TIMER -= gettime(2)*60; + $@GLIM_TIMER -= gettime(3)*3600; + end; +OnHour00: + $@GLIM_QTIMER = gettimeparam(GETTIME_DAYOFMONTH); + $@GLIM_TIMER = gettimetick(2); + end; } diff --git a/npc/006-2-1/miltaco.txt b/npc/006-2-1/miltaco.txt index 427b9a47a..385376bfe 100644 --- a/npc/006-2-1/miltaco.txt +++ b/npc/006-2-1/miltaco.txt @@ -24,7 +24,7 @@ switch (@menu) { case 1: - BarberSayStyle 2; + BarberSayStyle 3; break; case 2: BarberChangeStyle; diff --git a/npc/006-2-1/server.txt b/npc/006-2-1/server.txt index 8f0d04c62..886c2277e 100644 --- a/npc/006-2-1/server.txt +++ b/npc/006-2-1/server.txt @@ -20,23 +20,22 @@ OnInit: .distance = 5; tradertype(NST_MARKET); - sellitem Piberries, 20, 20; - sellitem Aquada, 120, 5; - sellitem LettuceLeaf, 30, 15; - sellitem Bread, 46, 10; - sellitem Cheese, 55, 15; - + sellitem Piberries, -1, 20; + sellitem Aquada, -1, 5; + sellitem LettuceLeaf, -1, 15; + sellitem Bread, -1, 10; + sellitem Cheese, -1, 15; end; OnClock0556: OnClock1201: OnClock1759: OnClock0003: - restoreshopitem Piberries, 20, 20; - restoreshopitem Aquada, 120, 5; - restoreshopitem LettuceLeaf, 30, 15; - restoreshopitem Bread, 46, 10; - restoreshopitem Cheese, 55, 15; + restoreshopitem Piberries, -1, 20; + restoreshopitem Aquada, -1, 5; + restoreshopitem LettuceLeaf, -1, 15; + restoreshopitem Bread, -1, 10; + restoreshopitem Cheese, -1, 15; end; diff --git a/npc/006-2-5/dusk.txt b/npc/006-2-5/dusk.txt index fa4ba8733..a49d2cc10 100644 --- a/npc/006-2-5/dusk.txt +++ b/npc/006-2-5/dusk.txt @@ -1,21 +1,21 @@ // TMW-2 scripts. // Original Authors: Hal9000 & Qwerty Dragon // TMW-2 Authors: -// +seeds -// dangerduck +// +seeds +// dangerduck // Description: -// Piou captain who gives information about the war, and the piou queen. +// Piou captain who gives information about the war, and the piou queen. 006-2-5,36,25,0 script Captain Dusk NPC_PIOU_KNIGHT_R,{ function duskHello; function duskAboutQueen; function duskAboutWar; - .@q=getq(LilitQuest_Pouf); - if (.@q <= 2) - { - switch (rand2(3)) - { + switch (getq(PiouQuest_Pouf)) { + case 0: + case 1: + case 2: + switch (rand2(3)) { case 0: npctalk3 l("Don't think you'll sneak anything by me. I'm watching you..."); break; @@ -26,10 +26,10 @@ npctalk3 l("Best steer clear of the Princess, %s. It won't go well if you upset her.", strcharinfo(0)); break; } - } - else if (.@q == 3) - { + break; + default: duskHello(); + break; } close; diff --git a/npc/006-2-5/reed.txt b/npc/006-2-5/reed.txt index c880c0924..f19a2196f 100644 --- a/npc/006-2-5/reed.txt +++ b/npc/006-2-5/reed.txt @@ -1,93 +1,93 @@ // TMW-2 scripts. // Original Authors: Hal9000 & Qwerty Dragon // TMW-2 Authors: -// +seeds -// dangerduck +// +seeds +// dangerduck // Description: -// Piou captain who gives information about shrewboo mounts and the Piou Knights. +// Piou captain who gives information about shrewboo mounts and the Piou Knights. 006-2-5,40,25,0 script Captain Reed NPC_PIOU_KNIGHT_L,{ - function reedHello; - function reedAboutKnights; - function reedAboutShrewboos; - .@q=getq(LilitQuest_Pouf); + function reedHello; + function reedAboutKnights; + function reedAboutShrewboos; + .@q=getq(PiouQuest_Pouf); - if (.@q <= 2) { - switch (rand2(3)) { - case 0: - npctalk3 l("This is no place for a weakling like you. I suggest you leave."); - break; - case 1: - npctalk3 l("Allowing you to remain on our Isles is dangerous. Tread carefully, %s.", get_race()); - break; - default: - npctalk3 l("I'll be keeping an eye on you, %s. Don't make trouble.", strcharinfo(0)); - } - } else if (.@q == 3) { - reedHello(); - } - close; + if (.@q <= 2) { + switch (rand2(3)) { + case 0: + npctalk3 l("This is no place for a weakling like you. I suggest you leave."); + break; + case 1: + npctalk3 l("Allowing you to remain on our Isles is dangerous. Tread carefully, %s.", get_race()); + break; + default: + npctalk3 l("I'll be keeping an eye on you, %s. Don't make trouble.", strcharinfo(0)); + } + } else if (.@q == 3) { + reedHello(); + } + close; function reedHello { - mesn; - mesq l("Do you need assistance, Knight %s?", strcharinfo(0)); - next; - select - l("What can you tell me about the Piou Knights?"), - l("Why do Piou Knights need mounts if they can fly?"), - l("I just wanted to say hi."); - mes ""; - switch (@menu) { - case 1: - reedAboutKnights(); - break; - case 2: - reedAboutShrewboos(); - break; - } - return; + mesn; + mesq l("Do you need assistance, Knight %s?", strcharinfo(0)); + next; + select + l("What can you tell me about the Piou Knights?"), + l("Why do Piou Knights need mounts if they can fly?"), + l("I just wanted to say hi."); + mes ""; + switch (@menu) { + case 1: + reedAboutKnights(); + break; + case 2: + reedAboutShrewboos(); + break; + } + return; } function reedAboutKnights { - mesn; - mesq l("The Order of Piou Knights was originally created as a defense against hunters from the humanoid races."); - next; - mesn; - mesc l("Our Order stopped the hunters from harming any piou on Piou Isles, but it could not do anything for the pious who refused to live here."); - next; - mesn; - mesq l("We grew in strength and knowledge over time, and dedicated ourselves to upholding justice and peace on the Isles, and in the world."); - next; - mesn; - mesq l("When the ducks joined the Moubootaur and created the Duck Side, our convictions and oaths to the Order ensured we would oppose them."); - next; - mesn; - mesc l("The humanoid races do not consider ducks or pious to be a threat, thus we are the only line of defense against the Duck Side."); - next; - mesn; - mesq l("Remember that, %s. You dedicated yourself to the Order of Piou Knights, and you are now sworn to oppose the Duck Side.", strcharinfo(0)); - next; - return; + mesn; + mesq l("The Order of Piou Knights was originally created as a defense against hunters from the humanoid races."); + next; + mesn; + mesc l("Our Order stopped the hunters from harming any piou on Piou Isles, but it could not do anything for the pious who refused to live here."); + next; + mesn; + mesq l("We grew in strength and knowledge over time, and dedicated ourselves to upholding justice and peace on the Isles, and in the world."); + next; + mesn; + mesq l("When the ducks joined the Moubootaur and created the Duck Side, our convictions and oaths to the Order ensured we would oppose them."); + next; + mesn; + mesc l("The humanoid races do not consider ducks or pious to be a threat, thus we are the only line of defense against the Duck Side."); + next; + mesn; + mesq l("Remember that, %s. You dedicated yourself to the Order of Piou Knights, and you are now sworn to oppose the Duck Side.", strcharinfo(0)); + next; + return; } function reedAboutShrewboos { - mesn; - mesq l("Our warriors are burdened with strong, yet heavy, armor."); - next; - mesn; - mesc l("Due to this detriment to our speed and ability to fly, we started training shrewboos as mounts."); - next; - mesn; - mesq l("Over time, we improved our training, and our warboos are now extremely efficient fighting steeds."); - next; - mesn; - mesq l("They also give Piou Knights a much needed speed boost against the ducks, who are naturally fast."); - next; - return; + mesn; + mesq l("Our warriors are burdened with strong, yet heavy, armor."); + next; + mesn; + mesc l("Due to this detriment to our speed and ability to fly, we started training shrewboos as mounts."); + next; + mesn; + mesq l("Over time, we improved our training, and our warboos are now extremely efficient fighting steeds."); + next; + mesn; + mesq l("They also give Piou Knights a much needed speed boost against the ducks, who are naturally fast."); + next; + return; } OnInit: - .sex = G_OTHER; - .distance = 4; - end; + .sex = G_OTHER; + .distance = 4; + end; } |