diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-06-30 12:22:33 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-06-30 12:22:33 -0300 |
commit | 29b88b625c9dae38e7d67cf8d18abd77647de694 (patch) | |
tree | a005fadd8824b1873851c9dd33aaf53388f5abea | |
parent | 3c50d926f6cd12b1a4f4fc29c2eee1bbe5e9d051 (diff) | |
download | serverdata-29b88b625c9dae38e7d67cf8d18abd77647de694.tar.gz serverdata-29b88b625c9dae38e7d67cf8d18abd77647de694.tar.bz2 serverdata-29b88b625c9dae38e7d67cf8d18abd77647de694.tar.xz serverdata-29b88b625c9dae38e7d67cf8d18abd77647de694.zip |
Move the debug timers from Aurora Events around.
-rw-r--r-- | npc/commands/event.txt | 10 | ||||
-rw-r--r-- | npc/functions/aurora.txt | 12 |
2 files changed, 14 insertions, 8 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt index 06b9cd980..b29f7e285 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -13,6 +13,7 @@ function script sClear { end; // Delete all Easter Stuff + consolebug "sClear pre Easter %d", gettimetick(0); if ($EVENT$ != "Easter") { DelItemFromEveryPlayer(SilverEasteregg); DelItemFromEveryPlayer(GoldenEasteregg); @@ -22,6 +23,7 @@ function script sClear { delmonsterdrop(Forain, DarkEggshellHat); } + consolebug "sClear pre Christmas %d", gettimetick(0); // Delete all Christmas stuff if ($EVENT$ != "Christmas") { $XMAS_MONEY=0; // Golbarez @@ -40,6 +42,7 @@ function script sClear { removemapmask "020-2", MASK_CHRISTMAS; } + consolebug "sClear pre Valentine %d", gettimetick(0); // Delete all Valentine Day stuff if ($EVENT$ != "Valentine") { // ItemDB prefers account variables than quest log @@ -59,6 +62,7 @@ function script sClear { donpcevent "Aurora::OnValentine"; } + consolebug "sClear pre Misc %d", gettimetick(0); // Longer EXP rate controls if ($EVENT$ == "Anniversary") { $BCONFB_EXPR-=50; @@ -75,14 +79,17 @@ function script sClear { kamibroadcast("Regnum's Blessing is over."); } + consolebug "sClear pre Aurora %d", gettimetick(0); // Hand Aurora Event Rewards callfunc("FYRewardEvent"); + consolebug "sClear Aurora %d", gettimetick(0); $WORLDEXPO_ENEMY$=""; deletearray $FYREWARD_PT; deletearray $FYREWARD_ID; deletearray $FYREWARD_AM; $FYLOGIN_PTS=0; + consolebug "sClear pre Patrick %d", gettimetick(0); // Simpler events $PATRICK_DAYCTRL=0; $PATRICK_DAYMAX=0; @@ -93,14 +100,17 @@ function script sClear { DelAccRegFromEveryPlayer("#THANKS_STREAK"); // Not so simple but still needs cleanup. + consolebug "sClear pre EVTC Control %d", gettimetick(0); DelItemFromEveryPlayer(Event1HSword); DelItemFromEveryPlayer(Event2HSword); DelItemFromEveryPlayer(EventBow); DelItemFromEveryPlayer(EventWand); + consolebug "sClear SeasonReload %d", gettimetick(0); // We must remove any event drop charcommand("@reloadmobdb"); SeasonReload(1); + consolebug "sClear end %d", gettimetick(0); return; } diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt index 9d871ef65..51f03c183 100644 --- a/npc/functions/aurora.txt +++ b/npc/functions/aurora.txt @@ -53,7 +53,6 @@ // AEF: BEGIN function script FYNewEvent { - consolebug "FYNewEvent %d", gettimetick(0); debugmes "\033[1mFY event is set to happen...\033[0m"; // Aurora Events only begin after Liberation Day if ($GAME_STORYLINE < 1) @@ -97,7 +96,6 @@ function script FYNewEvent { deletearray $FYRAID_TIME; deletearray $FYRAID_HP; deletearray $FYRAID_LV; - consolebug "FYNewEvent Select %d", gettimetick(0); // Select the event switch ($FYEVENT_CYCLE % 12) { case 1: @@ -161,9 +159,7 @@ function script FYNewEvent { kamibroadcast($DREAMTOWER_SAGE$+"'s Dream Towers have appeared!", "Aurora Events"); break; } - consolebug "FYNewEvent Restore %d", gettimetick(0); donpcevent "Aurora::OnRestore"; - consolebug "FYNewEvent end %d", gettimetick(0); return; } @@ -176,7 +172,6 @@ function script FYNewEvent { // types: misc, bp, warp, pot, heal, ore, magic, gift // maxlv: 3 5 2 3 - 6 - 5 function script FYT { - consolebug "FYT %d - %d", getarg(1, 0), gettimetick(0); .@t=getarg(0); .@l=getarg(1, 0); switch (.@t) { @@ -268,11 +263,12 @@ function script FYT { function script FYE_Autoset { - consolebug "FYAutoset %d", gettimetick(0); // Sets 30 ranked rewards .@b=FY_BP; .@g=FY_GIFT; .@h=FY_HEAL; .@m=FY_MISC; .@mg=FY_MAGIC; .@o=FY_ORE; .@p=FY_POT; .@w=FY_WARP; - consolebug "FYAutoset Set %d", gettimetick(0); + // TODO: This function takes ~2 seconds to finish when setting the array + // It might be improved by using a for() loop maybe + //consolebug "FYAutoset Set %d", gettimetick(0); setarray $FYREWARD_ID, FYT(.@g, 1), StrangeCoin, FYT(.@m, 1), FYT(.@b, 1), FYT(.@p, 1), FYT(.@h, 1), FYT(.@o, 1), FYT(.@o, 6), FYT(.@g, 2), FYT(.@w, 1), @@ -281,7 +277,7 @@ function script FYE_Autoset { FYT(.@w, 2), StrangeCoin, FYT(.@b, 4), FYT(.@p, 3), AncientBlueprint, FYT(.@g, 4), FYT(.@o, 4), FYT(.@b, 5), FYT(.@o, 5), FYT(.@g, 5); - consolebug "FYAutoset IAT %d", gettimetick(0); + //consolebug "FYAutoset IAT %d", gettimetick(0); // Item Amount Table .@hv=rand2(1,3); .@p1=any(1,2); .@p2=(.@p1 == 1 ? 2 : 1); |