diff options
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r-- | world/map/npc/functions/evil_obelisk.txt | 148 | ||||
-rw-r--r-- | world/map/npc/functions/global_event_handler.txt | 2 | ||||
-rw-r--r-- | world/map/npc/functions/mob_points.txt | 15 | ||||
-rw-r--r-- | world/map/npc/functions/vault.txt | 50 |
4 files changed, 134 insertions, 81 deletions
diff --git a/world/map/npc/functions/evil_obelisk.txt b/world/map/npc/functions/evil_obelisk.txt index a5fe6e55..e2ba0bbe 100644 --- a/world/map/npc/functions/evil_obelisk.txt +++ b/world/map/npc/functions/evil_obelisk.txt @@ -1,105 +1,165 @@ +// FIXME: There's no for loop so make a callsub loop function|script|EvilObelisk { mes "[Evil Obelisk]"; - mes "(A mystical aura surrounds this stone. It seems to crave money.)"; + //if (mobcount(getmap(), "All") > 300) goto L_Full; // , the craving done + mes "(A mystical red aura surrounds this stone. The stone seems to glow brighter as your coin purse gets closer... It seems to crave money.)"; next; - set @cost_jacko, 6500; - set @cost_gy1, 4000; - set @cost_gy2, 3000; - set @cost_skull, 2800; - set @cost_snake, 2500; - set @cost_keshlam, 10000; + set @cost_jacko, 5000; + set @cost_gy1, 7500; + set @cost_gy2, 11000; + set @cost_skull, 4000; + set @cost_snake, 4500; + set @cost_keshlam, 18000; menu "Don't pay it anything.", L_Close, + "Pay it " + @cost_skull + " gold.", L_SKULL, + "Pay it " + @cost_snake + " gold.", L_SNAKE, "Pay it " + @cost_jacko + " gold.", L_JACKO, "Pay it " + @cost_gy1 + " gold.", L_GRAVEYARD1, "Pay it " + @cost_gy2 + " gold.", L_GRAVEYARD2, - "Pay it " + @cost_skull + " gold.", L_SKULL, - "Pay it " + @cost_snake + " gold.", L_SNAKE, "Pay it " + @cost_keshlam + " gold.", L_KESHLAM; L_JACKO: if (Zeny < @cost_jacko) goto L_NotEnough; set Zeny, Zeny - @cost_jacko; - set @mob_id, 1022; - set @mob_count, rand(1,2); + set @mob_id, JackO; + set @mob_count, rand(1,3); goto L_Summon; + L_GRAVEYARD1: if (Zeny < @cost_gy1) goto L_NotEnough; - set @temp, rand(2); + set Zeny, Zeny - @cost_gy1; + set @mob_count, rand(6,8); + set @tmp_count, 0; + goto L_GRAVEYARD1_1; + +L_GRAVEYARD1_1: + set @tmp_count, @tmp_count + 1; + if (@tmp_count > @mob_count) goto L_Close; + set @temp, rand(3); if(@temp == 0) - set @mob_id, 1036; // Zombie + set @mob_id, Zombie; if(@temp == 1) - set @mob_id, 1045; // Fallen - set @mob_count, rand(1,2); - set Zeny, Zeny - @cost_gy1; - goto L_Summon; + set @mob_id, Fallen; + if(@temp == 2) + set @mob_id, LadySkeleton; + if(@temp == 3) + set @mob_id, Skeleton; + callsub S_Summon; + goto L_GRAVEYARD1_1; + L_GRAVEYARD2: if (Zeny < @cost_gy2) goto L_NotEnough; - set @temp, rand(2); + set Zeny, Zeny - @cost_gy2; + set @mob_count, rand(6,8); + set @tmp_count, 0; + goto L_GRAVEYARD2_1; + +L_GRAVEYARD2_1: + set @tmp_count, @tmp_count + 1; + if (@tmp_count > @mob_count) goto L_Close; + set @temp, rand(6); if(@temp == 0) - set @mob_id, 1044; // Lady Skelly + set @mob_id, LadySkeleton; if(@temp == 1) - set @mob_id, 1043; // Normal Skelly - set @mob_count, rand(1,2); - set Zeny, Zeny - @cost_gy2; - goto L_Summon; + set @mob_id, Skeleton; + if(@temp == 2) + set @mob_id, WitchGuard; + if(@temp == 3) + set @mob_id, RedBone; + if(@temp == 4) + set @mob_id, Stalker; + if(@temp == 5) + set @mob_id, Scythe; + callsub S_Summon; + goto L_GRAVEYARD2_1; + L_SKULL: if (Zeny < @cost_skull) goto L_NotEnough; - set @temp, rand(2); + set Zeny, Zeny - @cost_skull; + set @mob_count, rand(7,9); + set @tmp_count, 0; + goto L_SKULL_1; + +L_SKULL_1: + set @tmp_count, @tmp_count + 1; + if (@tmp_count > @mob_count) goto L_Close; + set @temp, rand(3); if(@temp == 0) - set @mob_id, 1024; // Poison + set @mob_id, PoisonSkull; if(@temp == 1) - set @mob_id, 1023; // Fire - set @mob_count, rand(1,4); - set Zeny, Zeny - @cost_skull; - goto L_Summon; + set @mob_id, FireSkull; + if(@temp == 2) + set @mob_id, IceSkull; + callsub S_Summon; + goto L_SKULL_1; + L_SNAKE: if (Zeny < @cost_snake) goto L_NotEnough; + set Zeny, Zeny - @cost_snake; + set @mob_count, rand(4,10); + set @tmp_count, 0; + goto L_SNAKE_1; + +L_SNAKE_1: + set @tmp_count, @tmp_count + 1; + if (@tmp_count > @mob_count) goto L_Close; set @temp, rand(4); if(@temp == 0) - set @mob_id, 1034; // Grass + set @mob_id, GrassSnake; if(@temp == 1) - set @mob_id, 1026; // Mnt. + set @mob_id, MountainSnake; if(@temp == 2) - set @mob_id, 1010; // Normal + set @mob_id, Snake; if(@temp == 3) - set @mob_id, 1021; // Cave - set @mob_count, rand(1,4); - set Zeny, Zeny - @cost_snake; - goto L_Summon; + set @mob_id, CaveSnake; + callsub S_Summon; + goto L_SNAKE_1; + L_KESHLAM: if (Zeny < @cost_keshlam) goto L_NotEnough; + set Zeny, Zeny - @cost_keshlam; + set @mob_count, rand(3,7); + set @tmp_count, 0; + goto L_KESHLAM_1; + +L_KESHLAM_1: + set @tmp_count, @tmp_count + 1; + if (@tmp_count > @mob_count) goto L_Close; set @temp, rand(3); if(@temp == 0) - set @mob_id, 1140; // Tengu + set @mob_id, Tengu; if(@temp == 1) - set @mob_id, 1141; // Sasquatch + set @mob_id, Sasquatch; if(@temp == 2) - set @mob_id, 1143; // Mana Slayer - set @mob_count, rand(1,3); - set Zeny, Zeny - @cost_keshlam; - goto L_Summon; + set @mob_id, ManaSlayer; + callsub S_Summon; + goto L_KESHLAM_1; + +S_Summon: + areamonster @map$, @x0, @y0, @x1, @y1, "", @mob_id, 1; + return; L_Summon: areamonster @map$, @x0, @y0, @x1, @y1, "", @mob_id, @mob_count; goto L_Close; L_NotEnough: - mes "You don't have that much money"; + mes "You don't have that much money."; goto L_Close; L_Close: @@ -109,6 +169,8 @@ L_Close: set @cost_skull, 0; set @cost_snake, 0; set @cost_keshlam, 0; + set @temp, 0; + set @tmp_count, 0; return; } diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index 690b0566..f7156539 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -24,10 +24,12 @@ OnPCLoginEvent: OnPCKillEvent: callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things + callfunc "SweetTooth"; end; OnMobKillEvent: callfunc "MobPoints"; + callfunc "SweetTooth"; end; OnPCDieEvent: diff --git a/world/map/npc/functions/mob_points.txt b/world/map/npc/functions/mob_points.txt index cf93fdae..ecea5b82 100644 --- a/world/map/npc/functions/mob_points.txt +++ b/world/map/npc/functions/mob_points.txt @@ -4,6 +4,8 @@ function|script|MobPoints { if (@mobID < 1002) goto L_Return; + callsub S_Vault; + setarray @points, 1, // 1002 Maggot 2, // 1003 Scorpion @@ -176,7 +178,11 @@ function|script|MobPoints 0, // 1165 RESERVED 0, // 1166 RESERVED 0, // 1167 RESERVED - 0 // 1168 Floyd + 0, // 1168 Floyd + 0, // 1169 Crystal Spider + 0, // 1170 Crystal Golem + 0, // 1171 Black Crystal Golem + 0 // 1172 Bif ; if ((MPQUEST == 1) && (@mobID < 1128)) @@ -266,6 +272,13 @@ L_Terranite: set TERRAC, TERRAC + 1; goto L_Return; +S_Vault: + if (#EXP_CREDIT < 1) goto L_Return; + set @exp_bonus, min(#EXP_CREDIT, mobinfo(@mobID, MOB_BASEEXP) * 2); + set #EXP_CREDIT, #EXP_CREDIT - @exp_bonus; + getexp @exp_bonus, 0; + return; + L_Return: set @value, 0; return; diff --git a/world/map/npc/functions/vault.txt b/world/map/npc/functions/vault.txt index ee30863c..a0da16b1 100644 --- a/world/map/npc/functions/vault.txt +++ b/world/map/npc/functions/vault.txt @@ -24,7 +24,7 @@ L_Return: S_Exp: if (##ADD_LVL < 1) goto S_Return; - getexp ##ADD_LVL, 0; + set #EXP_CREDIT, #EXP_CREDIT + ##ADD_LVL; set ##ADD_LVL, 0; return; @@ -46,7 +46,7 @@ S_Preset: if (##PRESET >= 1 && @last_preset < 1) getitem "SharpKnife",1; if (##PRESET >= 2 && @last_preset < 2) - getitem "Dagger",1; + getitem "SlingBullet",500; if (##PRESET >= 3 && @last_preset < 3) getitem "Bow",1; if (##PRESET >= 3 && @last_preset < 3) @@ -54,59 +54,35 @@ S_Preset: if (##PRESET >= 4 && @last_preset < 4) getitem "Arrow",500; if (##PRESET >= 5 && @last_preset < 5) - getitem "Scythe",1; + getitem "JeansShorts",1; if (##PRESET >= 6 && @last_preset < 6) - getitem "ShortBow",1; + getitem "IronArrow",500; if (##PRESET >= 7 && @last_preset < 7) getitem "IronArrow",500; if (##PRESET >= 8 && @last_preset < 8) - getitem "ShortSword",1; + getitem "IronPowder", 150; if (##PRESET >= 9 && @last_preset < 9) - getitem "BoneArrows",100; + getitem "BoneArrows",150; if (##PRESET >= 10 && @last_preset < 10) - getitem "ForestBow",1; + getitem "BoneArrows",150; if (##PRESET >= 11 && @last_preset < 11) - getitem "IronArrow",500; + getitem "SilverArrow",200; if (##PRESET >= 12 && @last_preset < 12) - getitem "IceGladius",1; + getitem "ThornArrow",100; if (##PRESET >= 13 && @last_preset < 13) - getitem "Arrow",500; + getitem "SilverArrow",200; if (##PRESET >= 14 && @last_preset < 14) getitem "TerraniteArrow",100; if (##PRESET >= 15 && @last_preset < 15) - getitem "BoneArrows",100; + getitem "ArmorBreaker",100; if (##PRESET >= 16 && @last_preset < 16) - getitem "BoneKnife",1; + getitem "ThornArrow",100; if (##PRESET >= 17 && @last_preset < 17) getitem "TerraniteArrow",100; if (##PRESET >= 18 && @last_preset < 18) - getitem "Setzer",1; + getitem "IronPowder", 150; if (##PRESET >= 19 && @last_preset < 19) getitem "TerraniteArrow",250; - //if (##PRESET >= 20 && @last_preset < 20) - // getitem "BansheeBow",1; - - /* Handle equipment */ - if (##PRESET >= 2 && @last_preset < 2) - getitem "SilkHeadband",1; - if (##PRESET >= 4 && @last_preset < 4) - getitem "LeatherShirt",1; - if (##PRESET >= 6 && @last_preset < 6) - getitem "JeansShorts",1; - if (##PRESET >= 8 && @last_preset < 8) - getitem "SilkRobe",1; - if (##PRESET >= 10 && @last_preset < 10) - getitem "InfantryHelmet",1; - if (##PRESET >= 12 && @last_preset < 12) - getitem "ChainmailShirt",1; - if (##PRESET >= 14 && @last_preset < 14) - getitem "CottonBoots",1; - if (##PRESET >= 16 && @last_preset < 16) - getitem "JeansChaps",1; - if (##PRESET >= 18 && @last_preset < 18) - getitem "CottonGloves",1; - if (##PRESET >= 20 && @last_preset < 20) - getitem "LightPlatemail",1; set ##PRESET, 0; return; |