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/006-2-1/glim.txt | |
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/006-2-1/glim.txt')
-rw-r--r-- | npc/006-2-1/glim.txt | 127 |
1 files changed, 73 insertions, 54 deletions
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; } |