From be2662202390c9070c311bfd0f4b1a93ccc3111c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 9 Mar 2021 18:46:48 -0300 Subject: Fix typos, remove broken code, improve logic. Delete old variables. --- npc/001-4/lilica.txt | 8 ++------ npc/003-3/malindou.txt | 11 ++++++++++- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'npc') diff --git a/npc/001-4/lilica.txt b/npc/001-4/lilica.txt index ab0754127..5d7f152e5 100644 --- a/npc/001-4/lilica.txt +++ b/npc/001-4/lilica.txt @@ -62,12 +62,9 @@ L_QuestDone: inventoryplace .@Hat, 1; delitem GoldenEasteregg, 40; delitem SilverEasteregg, 10; - //if (rand(0, 10000) < 1000) goto L_Unlucky; - setq SQuest_Easter, gettime(7), max(500, getq2(SQuest_Easter)+100); + if (rand2(10000) < 100) goto L_Unlucky; + setq SQuest_Easter, gettime(7), min(500, getq2(SQuest_Easter)+100); npctalk3 l("Strange Coins stock on shops was restored!"); - //EASTER_EVENT=gettime(7); - // The code below not allow hat to leave user account. A bad idea here so I left commented. - //getitembound(.@Hat, 1, 1); getnameditem(.@Hat, strcharinfo(0)); mesn; mesq l("Here you go! Happy easter! Bhop bhop!"); @@ -80,7 +77,6 @@ L_Unlucky: mes l("But in accordance to an old %s, you were unlucky.", b(l("Community Decision"))); mes l("This means ##BAll items were lost##b, and you need to collect EVERYTHING, again, to get the hat."); mes l("But, hm hm hm! I have a %s for you! It won't have what you wanted, but maybe you're lucky, after all?", getitemlink(GoldenGift)); - //mes l("But hey, it is Easter and the poll is still open, so here are 15 @@ as a consolation prize.", getitemlink(StrangeCoin)); mes l("Better luck next time!\""); close; diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index ad54b65cd..6e7ed170c 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -604,6 +604,15 @@ OnInit: debugmes "* Iced Water re-id"; debugmes ""; } + // Current UPDATE value: Ter Mar 9 18:45:00 BRT 2021 + // Easter Upgrade + if ($UPDATE < 1615326300) { + $UPDATE=1615326300; + DelChrRegFromEveryPlayer("EASTER_EVENT"); + debugmes ""; + debugmes "* Easter changes"; + debugmes ""; + } // This mensures Contributors Credits, and changes only during updates. @@ -659,7 +668,7 @@ OnClock0500: if (gettime(GETTIME_DAYOFMONTH) >= 7) query_sql("DELETE FROM `chatlog` WHERE `time` < '"+sqldate(-7)+"'"); end; - + d // This is for HUB OnSkillInvoke: if (!playerattached()) -- cgit v1.2.3-70-g09d2