diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-16 15:40:18 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-16 15:40:18 -0300 |
commit | 1431ce06df820b913114b1ac47c14ff6ff6512aa (patch) | |
tree | c3af562a0f1d47c023123904ca817db812bf573b /npc/001-5/worker.txt | |
parent | 8ff593ae1062a310b1708de7fa1097e72eeb53de (diff) | |
download | serverdata-1431ce06df820b913114b1ac47c14ff6ff6512aa.tar.gz serverdata-1431ce06df820b913114b1ac47c14ff6ff6512aa.tar.bz2 serverdata-1431ce06df820b913114b1ac47c14ff6ff6512aa.tar.xz serverdata-1431ce06df820b913114b1ac47c14ff6ff6512aa.zip |
Worker's Day: Now there is a limit on how much you can exchange.
This is reset every day.
Diffstat (limited to 'npc/001-5/worker.txt')
-rw-r--r-- | npc/001-5/worker.txt | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/npc/001-5/worker.txt b/npc/001-5/worker.txt index d16ac07c8..92a7e561a 100644 --- a/npc/001-5/worker.txt +++ b/npc/001-5/worker.txt @@ -1,6 +1,6 @@ // TMW2 Script // Author: Jesusalva -// Workers from Worker Day +// Workers from Worker Day. 001-5,23,73,0 script Soren NPC_CONSTR_WORKER,{ mesn; @@ -12,8 +12,24 @@ } 001-5,75,69,0 script Simon NPC_CONSTR_WORKER,{ + function alreadyFinished; + .@year=getq(SQuest_WorkerDay); + .@day=getq3(SQuest_WorkerDay); + if (.@year != gettime(GETTIME_YEAR)-2000 || + .@day != gettime(GETTIME_DAYOFMONTH)) + setq SQuest_WorkerDay, + gettime(GETTIME_YEAR)-2000, 0, gettime(GETTIME_DAYOFMONTH); + + // Main Loop + do + { + .@attempts=getq2(SQuest_WorkerDay); + if (.@attempts > BaseLevel/10) + alreadyFinished(); + mesn; mesq l("Hey dude. During this event you can trade one @@ for more... useful items.", getitemlink(Pearl)); + mesc l("Attempts for today: %d/%d", .@attempts, BaseLevel/10); if (countitem(Pearl) == 0) close; next; @@ -29,29 +45,39 @@ case 1: delitem Pearl, 1; getitem StrangeCoin, 12; + setq2 SQuest_WorkerDay, .@attempts+1; break; case 2: delitem Pearl, 1; getitem SnakeEgg, 2; + setq2 SQuest_WorkerDay, .@attempts+1; break; case 3: delitem Pearl, 1; getitem BronzeGift, 2; + setq2 SQuest_WorkerDay, .@attempts+1; break; case 4: delitem Pearl, 1; Zeny=Zeny+1600; + setq2 SQuest_WorkerDay, .@attempts+1; break; case 5: delitem Pearl, 2; getitem SilverGift, 1; getitem BronzeGift, 1; + setq2 SQuest_WorkerDay, .@attempts+1; break; } + } while (@menu < 6); close; +function alreadyFinished { + mesc l("I already got enough %s, thank you.", getitemlink(Pearl)), 1; + close; +} } |