diff options
Diffstat (limited to 'world/map/npc/019-1')
-rw-r--r-- | world/map/npc/019-1/_import.txt | 1 | ||||
-rw-r--r-- | world/map/npc/019-1/_mobs.txt | 6 | ||||
-rw-r--r-- | world/map/npc/019-1/mobmanager.txt | 40 | ||||
-rw-r--r-- | world/map/npc/019-1/santa_helper.txt | 58 |
4 files changed, 35 insertions, 70 deletions
diff --git a/world/map/npc/019-1/_import.txt b/world/map/npc/019-1/_import.txt index cf294dcd..c86b158e 100644 --- a/world/map/npc/019-1/_import.txt +++ b/world/map/npc/019-1/_import.txt @@ -3,6 +3,5 @@ map: 019-1.gat npc: npc/019-1/_mobs.txt npc: npc/019-1/_warps.txt -npc: npc/019-1/mobmanager.txt npc: npc/019-1/santa_helper.txt npc: npc/019-1/snowman.txt diff --git a/world/map/npc/019-1/_mobs.txt b/world/map/npc/019-1/_mobs.txt index c638f1b0..1e6403db 100644 --- a/world/map/npc/019-1/_mobs.txt +++ b/world/map/npc/019-1/_mobs.txt @@ -4,6 +4,7 @@ 019-1.gat,0,0,0,0|monster|Fluffy|1020,50,100000,30000,Mob019-1::On1020 019-1.gat,0,0,0,0|monster|Reinboo|1094,4,100000,30000,Mob019-1::On1094 019-1.gat,0,0,0,0|monster|WhiteBell|1095,5,100000,30000,Mob019-1::On1095 +019-1.gat,0,0,0,0|monster|Santaboo|1112,4,100000,30000,Mob019-1::On1112 019-1.gat,0,0,0|script|Mob019-1|-1, @@ -23,5 +24,10 @@ On1095: callfunc "MobPoints"; end; +On1112: + set @mobID, 1112; + callfunc "MobPoints"; + end; + end; } diff --git a/world/map/npc/019-1/mobmanager.txt b/world/map/npc/019-1/mobmanager.txt deleted file mode 100644 index 22917bea..00000000 --- a/world/map/npc/019-1/mobmanager.txt +++ /dev/null @@ -1,40 +0,0 @@ -// Spawns mobs - -019-1.gat,0,0,0|script|SpawnManager|-1, -{ - end; // just to be secure - -OnInit: - set $@019_1_SANTASLIME_MONSTER_MAX_NUMBER,15; - set $@019_1_SANTASLIME_MOMSTER_ID,1015; - set $@019_1_SANTASLIME_MONSTER_SPAWN_X1,32; - set $@019_1_SANTASLIME_MONSTER_SPAWN_Y1,31; - set $@019_1_SANTASLIME_MONSTER_SPAWN_X2,111; - set $@019_1_SANTASLIME_MONSTER_SPAWN_Y2,101; - set $@019_1_SANTASLIME_month,gettime(6); - set $@019_1_SANTASLIME_monster_number,0; - if (debug >= 2) end; - initnpctimer; - if ($@019_1_SANTASLIME_month == 12 || $@019_1_SANTASLIME_month == 1 || $@019_1_SANTASLIME_month == 2) goto L_Init_Spawn; - end; - -L_Init_Spawn: - areamonster "019-1.gat", $@019_1_SANTASLIME_MONSTER_SPAWN_X1, $@019_1_SANTASLIME_MONSTER_SPAWN_Y1, $@019_1_SANTASLIME_MONSTER_SPAWN_X2, $@019_1_SANTASLIME_MONSTER_SPAWN_Y2, "Santa Slime", $@019_1_SANTASLIME_MOMSTER_ID, $@019_1_SANTASLIME_MONSTER_MAX_NUMBER, "SpawnManager::OnMonsterDeath"; - set $@monster_number,$@019_1_SANTASLIME_MONSTER_MAX_NUMBER; - end; - -L_Spawn: - areamonster "019-1.gat", $@019_1_SANTASLIME_MONSTER_SPAWN_X1, $@019_1_SANTASLIME_MONSTER_SPAWN_Y1, $@019_1_SANTASLIME_MONSTER_SPAWN_X2, $@019_1_SANTASLIME_MONSTER_SPAWN_Y2, "Santa Slime", $@019_1_SANTASLIME_MOMSTER_ID, 1, "SpawnManager::OnMonsterDeath"; - set $@019_1_SANTASLIME_monster_number,$@019_1_SANTASLIME_monster_number+1; - end; - -OnTimer20000: - initnpctimer; - set $@019_1_SANTASLIME_month,gettime(6); - if (($@019_1_SANTASLIME_month == 12 || $@019_1_SANTASLIME_month == 1 || $@019_1_SANTASLIME_month == 2) && $@019_1_SANTASLIME_monster_number < $@019_1_SANTASLIME_MONSTER_MAX_NUMBER) goto L_Spawn; - end; - -OnMonsterDeath: - set $@019_1_SANTASLIME_monster_number,$@019_1_SANTASLIME_monster_number-1; - end; -} diff --git a/world/map/npc/019-1/santa_helper.txt b/world/map/npc/019-1/santa_helper.txt index 758a1b0a..76ce9422 100644 --- a/world/map/npc/019-1/santa_helper.txt +++ b/world/map/npc/019-1/santa_helper.txt @@ -1,11 +1,14 @@ // Author: accoring to git history probably Jaxad +// and extended by wushin to be included in the annual // quest made seasonal and adapted to new scripting standards by Jenalya 019-1.gat,74,75,0|script|Santa's Helper|105, { callfunc "ClearVariables"; - if (FLAGS & FLAG_SANTAS_HELPER) goto L_Done; - if ((gettime(6) == 12) || ((gettime(6) == 1) && (gettime(5) < 7))) goto L_Quest; + callfunc "XmasStates"; + + if (($@xmas_time) && (@xmas_sh_done)) goto L_Done; + if ($@xmas_time) goto L_Quest; mes "[Santa's Helper]"; mes "\"Ah, isn't it peaceful here? Around Christmas time we always have problems with some slimy monsters."; @@ -17,10 +20,6 @@ goto L_Close; L_Quest: - set @purple_amount, 25; - set @blue_amount, 20; - set @green_amount, 5; - mes "[Santa's Helper]"; mes "\"Hello my young friend."; mes "Would you like to help me?\""; @@ -30,44 +29,48 @@ L_Quest: mes "If you help me, I'll give you something very nice\""; next; -L_M: +L_Menu: menu - "I have some present boxes", L_Y, - "Hmm, see you later", L_N, - "What you need exactly?", L_R; + "I have some present boxes", L_Yes, + "Hmm, see you later", L_No, + "What you need exactly?", L_Help; -L_Y: +L_Yes: mes "[Santa's Helper]"; mes "\"Hmm, let me check what you have.\""; next; - if (countitem("PurplePresentBox") < @purple_amount) + if (countitem("PurplePresentBox") < $@xmas_sh_purple_amount) goto L_NoItem; - if (countitem("BluePresentBox") < @blue_amount) + if (countitem("BluePresentBox") < $@xmas_sh_blue_amount) goto L_NoItem; - if (countitem("GreenPresentBox") < @green_amount) + if (countitem("GreenPresentBox") < $@xmas_sh_green_amount) goto L_NoItem; getinventorylist; - if (@inventorylist_count > 99) + set @SantasHelper_Reward$, $@SantasHelper_Annual_Reward$[ rand(getarraysize($@SantasHelper_Annual_Reward$)) ]; + if ((@inventorylist_count > 99) || (checkweight(@SantasHelper_Reward$, 1) == 0)) goto L_TooMany; mes "[Santa's Helper]"; mes "\"Great! Here is something for you\""; - delitem "PurplePresentBox", @purple_amount; - delitem "BluePresentBox", @blue_amount; - delitem "GreenPresentBox", @green_amount; - getitem "TurtleneckSweater", 1; - set FLAGS, FLAGS | FLAG_SANTAS_HELPER; + delitem "PurplePresentBox", $@xmas_sh_purple_amount; + delitem "BluePresentBox", $@xmas_sh_blue_amount; + delitem "GreenPresentBox", $@xmas_sh_green_amount; + getitem @SantasHelper_Reward$, 1; + set @SantasHelper_Reward$, ""; + set XMASTIME, XMASTIME | $@xmas_sh_bit; + set @karma_bonus, $@xmas_karma_bonus; + callfunc "XmasNice"; goto L_Close; -L_R: +L_Help: mes "[Santa's Helper]"; mes "\"I need:"; - mes @purple_amount + " Purple Present Boxes"; - mes @blue_amount + " Blue Present Boxes"; - mes @green_amount + " Green Present Boxes\""; + mes $@xmas_sh_purple_amount + " Purple Present Boxes"; + mes $@xmas_sh_blue_amount + " Blue Present Boxes"; + mes $@xmas_sh_green_amount + " Green Present Boxes\""; next; - goto L_M; + goto L_Menu; -L_N: +L_No: mes "[Santa's Helper]"; mes "\"Enjoy your holidays and I wish you a happy Christmas!\""; goto L_Close; @@ -89,8 +92,5 @@ L_TooMany: goto L_Close; L_Close: - set @purple_amount, 0; - set @blue_amount, 0; - set @green_amount, 0; close; } |