summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2014-10-27 15:55:26 -0500
committerwushin <pasekei@gmail.com>2014-10-28 22:24:25 -0500
commitca14cc2a830a2e614c1d86f1db75000b68421200 (patch)
treea25b8b166f3099b46e3fa9885ecd56ed8681924c /world
parent0bc1c20799c9b01e60035ce1c82fd8a38c110c4c (diff)
downloadserverdata-ca14cc2a830a2e614c1d86f1db75000b68421200.tar.gz
serverdata-ca14cc2a830a2e614c1d86f1db75000b68421200.tar.bz2
serverdata-ca14cc2a830a2e614c1d86f1db75000b68421200.tar.xz
serverdata-ca14cc2a830a2e614c1d86f1db75000b68421200.zip
Halloween Debug
Age is now 1 week older then event start
Diffstat (limited to 'world')
-rw-r--r--world/map/npc/annuals/halloween/config.txt8
-rw-r--r--world/map/npc/annuals/halloween/trick_or_treat.txt17
2 files changed, 17 insertions, 8 deletions
diff --git a/world/map/npc/annuals/halloween/config.txt b/world/map/npc/annuals/halloween/config.txt
index 59839668..a3d5fd58 100644
--- a/world/map/npc/annuals/halloween/config.txt
+++ b/world/map/npc/annuals/halloween/config.txt
@@ -127,8 +127,6 @@ L_Main:
set $@halloween_memory_count, 8;
// Level to go trick-or-treating
set $@halloween_min_level, 10;
- // Age to go trick-or-treating
- set $@halloween_min_age, (7*86400);
// Number of trick and treats completed to get charm.
set $@halloween_charm_count, 10;
@@ -333,6 +331,12 @@ L_Main:
set $@n, 0;
+ // Age to go trick-or-treating (1 week before the start)
+ if ((gettime(6) >= $@halloween_start_month) || (gettime(6) <= $@halloween_end_month))
+ set $@halloween_min_age, ((gettime(5) + 7)*86400);
+ if (gettime(6) == $@halloween_reward_start_month)
+ set $@halloween_min_age, ((gettime(5) + 38)*86400);
+
if((gettime(6) == $@halloween_reward_start_month && gettime(5) >= $@halloween_reward_start_day
&& (gettime(5) <= $@halloween_reward_end_day && $@halloween_reward_start_month == $@halloween_end_month
|| !($@halloween_reward_start_month == $@halloween_end_month)))
diff --git a/world/map/npc/annuals/halloween/trick_or_treat.txt b/world/map/npc/annuals/halloween/trick_or_treat.txt
index 3407efd5..150b5939 100644
--- a/world/map/npc/annuals/halloween/trick_or_treat.txt
+++ b/world/map/npc/annuals/halloween/trick_or_treat.txt
@@ -100,11 +100,11 @@ L_Check_Inventory:
goto L_Tricking_Trick_or_Treat;
L_Check_Karma:
- // Please don't change this, you'll break stuff.
+ // NPC Cheater detection starts after max NPCs hit
if (rand($@halloween_num_npcs, 65535) <= @karma)
goto L_Cheater;
- // this is a cheap, limited form of ilog2
- if ((@karma >= 16) && !(rand( 4 - (@karma >= 64) + (@karma >= 256) + (@karma >= 1024) )))
+ // NPC Cheater detection engages at 48 Trick or Treats
+ if (@karma >= 48)
goto L_Cheater;
if (HALLOWEENTIME & $@halloween_got_big_reward)
goto L_Tricking_Trick_or_Treat;
@@ -161,8 +161,8 @@ L_Tricking_Reward:
next;
if (@karma >= 16)
set @scare_factor, rand(@scare_factor / 2, @scare_factor);
- if (@karma >= 256)
- goto L_Tricking_End;
+ if (@karma >= 24)
+ set @scare_factor, rand(@scare_factor / 3, @scare_factor);
if (@scare_factor < 1)
set @scare_factor, 1;
goto L_Tricking_Reward_Loop;
@@ -266,7 +266,12 @@ L_Return:
function|script|HalloweenTree|,
{
mes "[Confused Tree]";
- mes "\"I love halloween, wearing masks and going trick or treating is so much fun.\"";
+ if ((HALLOWEENTIME & 65535) > ($@halloween_num_npcs * 3))
+ mes "\"Whoa slow down greedy, leave some candy for the reset of us!\"";
+ if ((HALLOWEENTIME & 65535) > $@halloween_num_npcs)
+ mes "\"I see you have ben enjoying trick or treating, I hope you don't get a stomach ache.\"";
+ if ((HALLOWEENTIME & 65535) <= $@halloween_num_npcs)
+ mes "\"I love halloween, wearing masks and going trick or treating is so much fun.\"";
goto L_StartMenu;
L_StartMenu: