summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/008-1/andra.txt2
-rw-r--r--world/map/npc/014-1/goop.txt2
-rw-r--r--world/map/npc/018-2/caul.txt1
-rw-r--r--world/map/npc/029-1/hasan.txt2
-rw-r--r--world/map/npc/030-2/wrapping_paper_helper.txt15
-rw-r--r--world/map/npc/functions/global_event_handler.txt4
-rw-r--r--world/map/npc/items/anchor_stone.txt56
-rw-r--r--world/map/npc/items/maps.txt9
-rw-r--r--world/map/npc/items/rubber_bat.txt5
-rw-r--r--world/map/npc/items/rubber_duck.txt5
-rw-r--r--world/map/npc/items/scissors.txt1
-rw-r--r--world/map/npc/items/shovel.txt5
-rw-r--r--world/map/npc/items/silver_bell.txt6
-rw-r--r--world/map/npc/items/warpTowels.txt15
-rw-r--r--world/map/npc/magic/event-summon-managuardian.txt1
-rw-r--r--world/map/npc/magic/event-summon-manatyrant.txt1
-rw-r--r--world/map/npc/magic/level1-summon-maggots.txt1
-rw-r--r--world/map/npc/magic/level2-lightning-strike.txt4
-rw-r--r--world/map/npc/magic/level2-magic-knuckles.txt38
-rw-r--r--world/map/npc/magic/level2-make-bones.txt2
-rw-r--r--world/map/npc/magic/level2-protect.txt5
-rw-r--r--world/map/npc/magic/level2-rain.txt11
-rw-r--r--world/map/npc/magic/level2-summon-fluffies.txt1
-rw-r--r--world/map/npc/magic/level2-summon-mouboo.txt1
-rw-r--r--world/map/npc/magic/level2-summon-pinkie.txt1
-rw-r--r--world/map/npc/magic/level2-summon-snakes.txt1
-rw-r--r--world/map/npc/magic/level2-summon-spiky-mushroom.txt1
-rw-r--r--world/map/npc/magic/level2-summon-wickedmushroom.txt1
-rw-r--r--world/map/npc/mobs/miner_mania.txt2
-rw-r--r--world/map/npc/mobs/mob_points.txt4
-rw-r--r--world/map/npc/scripts.conf3
31 files changed, 146 insertions, 60 deletions
diff --git a/world/map/npc/008-1/andra.txt b/world/map/npc/008-1/andra.txt
index 68796fd7..4d643fc6 100644
--- a/world/map/npc/008-1/andra.txt
+++ b/world/map/npc/008-1/andra.txt
@@ -54,6 +54,7 @@ L_Next4:
mes "\"Great! Thank you for you help. If you have more items and want to help again, feel free to talk to me. We just have to be careful to not oversoak the soil with water.. but you don't need to worry, I will know when it is the right time to stop planting.";
next;
delitem "BottleOfWater", @water_amount;
+ getitem "EmptyBottle", @water_amount; // simply falls out if inv full.
delitem "GrassSeed", @seeds_amount;
set FLAGS, FLAGS | FLAG_ANDRA_HELPED;
mes "Andra pours some water in a lot of different places and then throws some seeds to the sky. The wind carries some of them really far from her.";
@@ -118,6 +119,7 @@ L_Next5:
if ($@spawned_plants >= $@MAX_GLOBAL_PLANTS) goto L_Gather;
if (countitem("BottleOfWater") < @water_amount || countitem("GrassSeed") < @seeds_amount) goto L_NotEnough;
delitem "BottleOfWater", @water_amount;
+ getitem "EmptyBottle", @water_amount; // simply falls out if inv full.
delitem "GrassSeed", @seeds_amount;
mes "Andra pours some water in a lot of different places and then throws the seeds to the sky. The wind carries some of them really far from her.";
close2;
diff --git a/world/map/npc/014-1/goop.txt b/world/map/npc/014-1/goop.txt
index 09f27626..e9de3a43 100644
--- a/world/map/npc/014-1/goop.txt
+++ b/world/map/npc/014-1/goop.txt
@@ -1 +1 @@
-014-1,90,101,0|shop|Gwyneth|188,GrassFedTofu:*100,Honey:*100,ActivatedSulphur:*100,VeganWater:*100,FairTradeSoil:*100,LactoseFreeAcorn:*100,RawAir:*1000,FreeRangeMoss:*100,JadeEgg:*300
+014-1,90,101,0|shop|Gwyneth|188,GrassFedTofu:*100,GlutenFreeHoney:*100,ActivatedSulphur:*100,VeganWater:*100,FairTradeSoil:*100,LactoseFreeAcorn:*100,RawAir:*1000,FreeRangeMoss:*100,JadeEgg:*300
diff --git a/world/map/npc/018-2/caul.txt b/world/map/npc/018-2/caul.txt
index 66f99a6e..f8134105 100644
--- a/world/map/npc/018-2/caul.txt
+++ b/world/map/npc/018-2/caul.txt
@@ -784,6 +784,7 @@ L_brew_dempo_init:
delitem "BottleOfWater", 1;
delitem "Bone", 1;
delitem "Lifestone", 1;
+ getitem "EmptyBottle", 1;
set @finish_dempo, 0;
// color can be either black or white at the beginning.
diff --git a/world/map/npc/029-1/hasan.txt b/world/map/npc/029-1/hasan.txt
index b87794dc..1310cb47 100644
--- a/world/map/npc/029-1/hasan.txt
+++ b/world/map/npc/029-1/hasan.txt
@@ -50,7 +50,7 @@ L_Main:
mes "\"Thats why the price is so high.\"";
mes "\"Because I'm the toughest person in all of Candor\"";
mes "[Scared Man]";
- mes "\"No, your just a mean bully. Wait till I tell the guards about this!\"";
+ mes "\"No, you're just a mean bully. Wait till I tell the guards about this!\"";
mes "[Unfriendly Guy]";
mes "\"You do that and the next swimming lesson will be sleeping with the fishes.\"";
mes "[Scared Man]";
diff --git a/world/map/npc/030-2/wrapping_paper_helper.txt b/world/map/npc/030-2/wrapping_paper_helper.txt
index 3ac10b12..4571d5e6 100644
--- a/world/map/npc/030-2/wrapping_paper_helper.txt
+++ b/world/map/npc/030-2/wrapping_paper_helper.txt
@@ -48,7 +48,7 @@ L_Again:
L_White:
getinventorylist;
- if (@inventorylist_count == 100 || (checkweight("WhiteWrap", $@xmas_wrap_reward) == 0))
+ if (@inventorylist_count > (100-2) || (checkweight("WhiteWrap", $@xmas_wrap_reward) == 0))
goto L_FullInv;
if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("PileOfAsh") < $@xmas_poa_amount))
goto L_NoItems;
@@ -56,13 +56,14 @@ getinventorylist;
delitem "BottleOfWater", $@xmas_water_amount;
delitem "PileOfAsh", $@xmas_poa_amount;
getitem "WhiteWrap", $@xmas_wrap_reward;
+ getitem "EmptyBottle", $@xmas_water_amount;
mes "[Reino]";
mes "\"This one is classical.\"";
goto L_MadePaper;
L_Yellow:
getinventorylist;
- if (@inventorylist_count == 100 || (checkweight("YellowWrap", $@xmas_wrap_reward) == 0))
+ if (@inventorylist_count > (100-2) || (checkweight("YellowWrap", $@xmas_wrap_reward) == 0))
goto L_FullInv;
if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("YellowDye") < $@xmas_wrap_yellow_amount))
goto L_NoItems;
@@ -70,13 +71,14 @@ L_Yellow:
delitem "BottleOfWater", $@xmas_water_amount;
delitem "YellowDye", $@xmas_wrap_yellow_amount;
getitem "YellowWrap", $@xmas_wrap_reward;
+ getitem "EmptyBottle", $@xmas_water_amount;
mes "[Reino]";
mes "\"Right, bright paper brings good vibes.\"";
goto L_MadePaper;
L_Blue:
getinventorylist;
- if (@inventorylist_count == 100 || (checkweight("BlueWrap", $@xmas_wrap_reward) == 0))
+ if (@inventorylist_count > (100-2) || (checkweight("BlueWrap", $@xmas_wrap_reward) == 0))
goto L_FullInv;
if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("LightBlueDye") < $@xmas_wrap_ltblue_amount))
goto L_NoItems;
@@ -84,13 +86,14 @@ L_Blue:
delitem "BottleOfWater", $@xmas_water_amount;
delitem "LightBlueDye", $@xmas_wrap_ltblue_amount;
getitem "BlueWrap", $@xmas_wrap_reward;
+ getitem "EmptyBottle", $@xmas_water_amount;
mes "[Reino]";
mes "\"Plain and simple. Here.\"";
goto L_MadePaper;
L_Purple:
getinventorylist;
- if (@inventorylist_count == 100 || (checkweight("PurpleWrap", $@xmas_wrap_reward) == 0))
+ if (@inventorylist_count > (100-2) || (checkweight("PurpleWrap", $@xmas_wrap_reward) == 0))
goto L_FullInv;
if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("PurpleDye") < $@xmas_wrap_purple_amount))
goto L_NoItems;
@@ -98,13 +101,14 @@ L_Purple:
delitem "BottleOfWater", $@xmas_water_amount;
delitem "PurpleDye", $@xmas_wrap_purple_amount;
getitem "PurpleWrap", $@xmas_wrap_reward;
+ getitem "EmptyBottle", $@xmas_water_amount;
mes "[Reino]";
mes "\"Mh, personally I don't like it that much, but here you go.\"";
goto L_MadePaper;
L_Green:
getinventorylist;
- if (@inventorylist_count == 100 || (checkweight("GreenWrap", $@xmas_wrap_reward) == 0))
+ if (@inventorylist_count > (100-2) || (checkweight("GreenWrap", $@xmas_wrap_reward) == 0))
goto L_FullInv;
if ((countitem("ReedBundle") < $@xmas_reed_amount) || (countitem("BottleOfWater") < $@xmas_water_amount) || (countitem("GreenDye") < $@xmas_wrap_green_amount))
goto L_NoItems;
@@ -112,6 +116,7 @@ L_Green:
delitem "BottleOfWater", $@xmas_water_amount;
delitem "GreenDye", $@xmas_wrap_green_amount;
getitem "GreenWrap", $@xmas_wrap_reward;
+ getitem "EmptyBottle", $@xmas_water_amount;
mes "[Reino]";
mes "\"Yeah, this is really Christmas-styled.\"";
goto L_MadePaper;
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt
index 915423e8..b1c5917e 100644
--- a/world/map/npc/functions/global_event_handler.txt
+++ b/world/map/npc/functions/global_event_handler.txt
@@ -19,6 +19,7 @@ OnPCLoginEvent:
callfunc "ConvertChristmas21"; // Christmas 2021
callfunc "VaultLogin"; // Mirror Lake Protocol biddings
callfunc "VaultLogout"; // Clean some stuff, to be safe
+ if (WEIGHT_LIMIT) set MaxWeightOverride, WEIGHT_LIMIT; // If this char var set, override max weight (tradebots, etc)
// add more here
set @login_event, 2;
end;
@@ -37,6 +38,7 @@ OnMobKillEvent:
OnPCDieEvent:
set @necromancer, 0;
addtimer 0, "Magic Timer::OnClear"; // reset magic block on death
+ addtimer 0, "::OnDischarge"; // seeks OnDischarge in ALL npcs (discharge chargeable spells on PC death)
callfunc "SpawnGhost";
callfunc "MiriamExpire"; // force the speed skill quest to expire
set @killerrid, 0; // reset killer rid
@@ -44,7 +46,7 @@ OnPCDieEvent:
end;
OnPCLogoutEvent:
-// if (getnpcid("#Upmarmu#" + getcharid(3)) >= 1) addnpctimer 0, "#Upmarmu#" + getcharid(3) + "::OnDestroy"; // @upmarmu_spell_npc_name$ is already lost at this point so it must be done like this
+ if (getnpcid("#Upmarmu#" + getcharid(3)) >= 1) addnpctimer 0, "#Upmarmu#" + getcharid(3) + "::OnDestroy"; // @upmarmu_spell_npc_name$ is already lost at this point so it must be done like this
callfunc "VaultLogout";
end;
diff --git a/world/map/npc/items/anchor_stone.txt b/world/map/npc/items/anchor_stone.txt
new file mode 100644
index 00000000..c1ea722b
--- /dev/null
+++ b/world/map/npc/items/anchor_stone.txt
@@ -0,0 +1,56 @@
+function|script|useAnchorStone
+{
+ addtimer 0, "AS_Core::OnUse";
+ return;
+}
+
+-|script|AS_Core|32767
+{
+ end;
+
+OnUse:
+ if ( @StoneName$ == "AnchorStone" ) goto L_AnchorStone;
+ if ( @StoneName$ == "AnchoredAnchorStone" ) goto L_AnchoredAnchorStone;
+ goto L_Close;
+
+L_AnchorStone:
+ mes "\"You really want to bind the [@@" + AnchorStone + "|@@] to this place?\"";
+ menu
+ "No", L_Close,
+ "Yes", L_AS_Yes;
+
+L_AS_Yes:
+ set AnchorStoneDest, getmaphash(getmap()); // since a hash could be negative I take a separate variable for that since shifting would destroy the sign bit and create a different hash
+ set AnchorStoneDestCoord, gety() << AS_Y_SHIFT | getx() << AS_X_SHIFT;
+
+ delitem AnchorStone, 1;
+ getitem AnchoredAnchorStone, 1;
+ close;
+
+L_AnchoredAnchorStone:
+ if ((AnchorStoneDest < 1) && (AnchorStoneDest > -1)) goto L_AAS_Error;
+ mes "\"You want to recall to the place the [@@" + AnchoredAnchorStone + "|@@] is bound to?\"";
+ menu
+ "No", L_Close,
+ "Yes", L_AAS_Yes;
+
+L_AAS_Yes:
+ warp getmapnamefromhash(AnchorStoneDest), (AnchorStoneDestCoord & AS_X_MASK >> AS_X_SHIFT), (AnchorStoneDestCoord & AS_Y_MASK >> AS_Y_SHIFT);
+
+ goto L_AAStoAS;
+
+L_AAS_Error:
+ mes "\"Something went wrong the [@@" + AnchoredAnchorStone + "|@@] lost its destination and turns back to normal.\"";
+ goto L_AAStoAS;
+
+L_AAStoAS:
+ set AnchorStoneDest, 0;
+ set AnchorStoneDestCoord, 0;
+
+ delitem AnchoredAnchorStone, 1;
+ getitem AnchorStone, 1;
+ close;
+
+L_Close:
+ close;
+}
diff --git a/world/map/npc/items/maps.txt b/world/map/npc/items/maps.txt
new file mode 100644
index 00000000..29d54e7d
--- /dev/null
+++ b/world/map/npc/items/maps.txt
@@ -0,0 +1,9 @@
+function|script|readMap
+{
+ message strcharinfo(0), "You have no clue how to use this item yet.";
+ goto L_Return;
+
+L_Return:
+ set @MapName$, "";
+ return;
+}
diff --git a/world/map/npc/items/rubber_bat.txt b/world/map/npc/items/rubber_bat.txt
index 0bf80ede..ea569a22 100644
--- a/world/map/npc/items/rubber_bat.txt
+++ b/world/map/npc/items/rubber_bat.txt
@@ -1,12 +1,11 @@
function|script|rubberBat
{
- if (gettimetick(2) - @lastbat < 2) goto L_Return;
+ if (gettimetick(2) - @lastsound < 2) goto L_Return;
misceffect 403;
- set @lastbat, gettimetick(2);
+ set @lastsound, gettimetick(2);
goto L_Return;
L_Return:
- getitem "RubberBat", 1;
// debugmes "Check";
if ($DOOMSDAY == 3)
addtimer 10, "#TMWFinalExam::OnRubberBat";
diff --git a/world/map/npc/items/rubber_duck.txt b/world/map/npc/items/rubber_duck.txt
index 3f591c15..8a822752 100644
--- a/world/map/npc/items/rubber_duck.txt
+++ b/world/map/npc/items/rubber_duck.txt
@@ -1,11 +1,10 @@
function|script|rubberDuck
{
- if (gettimetick(2) - @lastbat < 2) goto L_Return;
+ if (gettimetick(2) - @lastsound < 2) goto L_Return;
misceffect 406;
- set @lastbat, gettimetick(2);
+ set @lastsound, gettimetick(2);
goto L_Return;
L_Return:
- getitem "RubberDucky", 1;
return;
}
diff --git a/world/map/npc/items/scissors.txt b/world/map/npc/items/scissors.txt
index fbf3b344..2e12c6b1 100644
--- a/world/map/npc/items/scissors.txt
+++ b/world/map/npc/items/scissors.txt
@@ -1,6 +1,5 @@
function|script|useScissors
{
- getitem "Scissors", 1;
if (rand(3))
goto L_Change;
message strcharinfo(0), "Whoops!";
diff --git a/world/map/npc/items/shovel.txt b/world/map/npc/items/shovel.txt
new file mode 100644
index 00000000..b706f1fe
--- /dev/null
+++ b/world/map/npc/items/shovel.txt
@@ -0,0 +1,5 @@
+function|script|useShovel
+{
+ message strcharinfo(0), "You have no clue how to use this item yet.";
+ return;
+}
diff --git a/world/map/npc/items/silver_bell.txt b/world/map/npc/items/silver_bell.txt
index 8a791bff..07623426 100644
--- a/world/map/npc/items/silver_bell.txt
+++ b/world/map/npc/items/silver_bell.txt
@@ -1,12 +1,10 @@
function|script|SilverBellSound
{
- if (gettimetick(2) - @lastsilverbell < 20) goto L_Return;
+ if (gettimetick(2) - @lastsound < 2) goto L_Return;
misceffect 404;
- set @lastsilverbell, gettimetick(2);
+ set @lastsound, gettimetick(2);
goto L_Return;
L_Return:
- getitem "SilverBell", 1;
-// debugmes "Check";
return;
}
diff --git a/world/map/npc/items/warpTowels.txt b/world/map/npc/items/warpTowels.txt
index 77a405b5..7ea7ec17 100644
--- a/world/map/npc/items/warpTowels.txt
+++ b/world/map/npc/items/warpTowels.txt
@@ -117,26 +117,25 @@ L_WarpPlayer:
goto L_BreakChance;
L_BreakChance:
- if (rand(15))
- goto L_Keep;
- getitem "HitchhikersTowel", 1;
+ if (@warpTowelName$ != "HitchhikersTowel" && rand(15) < 1)
+ goto L_Break;
goto L_End;
L_Forbid:
message strcharinfo(0), "Towel : This area is protected by a force that doesn't tolerate the power of the Towel.";
- goto L_Keep;
+ goto L_End;
L_Prison:
message strcharinfo(0), "Towel : You must be warped by a GM to leave the botcheck area.";
- goto L_Keep;
+ goto L_End;
L_DontPanic:
callfunc "HumanTime";
message strcharinfo(0), "Towel : Your towel is still too low on power to jump again. Try again in ##B"+ @time$ + "##b.";
- goto L_Keep;
+ goto L_End;
-L_Keep:
- getitem @warpTowelName$, 1;
+L_Break:
+ delitem @warpTowelName$, 1;
goto L_End;
L_End:
diff --git a/world/map/npc/magic/event-summon-managuardian.txt b/world/map/npc/magic/event-summon-managuardian.txt
index e66c3eb7..1aa172ad 100644
--- a/world/map/npc/magic/event-summon-managuardian.txt
+++ b/world/map/npc/magic/event-summon-managuardian.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
// FIXME: Incomplete check, should still work during sieges
- if (getmapflag(getmap(), MF_TOWN)) end;
if (Sp < 100) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (countitem("TinyManaElixir") < 1) end;
diff --git a/world/map/npc/magic/event-summon-manatyrant.txt b/world/map/npc/magic/event-summon-manatyrant.txt
index bf2634c5..ff082930 100644
--- a/world/map/npc/magic/event-summon-manatyrant.txt
+++ b/world/map/npc/magic/event-summon-manatyrant.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if ($DOOMSDAY_SUMMON < 2) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (Sp < 100) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (countitem("LargeManaElixir") < 1) end;
diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt
index 05cadbc8..ce95422c 100644
--- a/world/map/npc/magic/level1-summon-maggots.txt
+++ b/world/map/npc/magic/level1-summon-maggots.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if (Sp < 21) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (countitem("InsectSlime") < 1 || countitem("Root") < 1) end;
if (getmap() == "033-1") goto L_SpecialRules6;
diff --git a/world/map/npc/magic/level2-lightning-strike.txt b/world/map/npc/magic/level2-lightning-strike.txt
index bdd311a6..0a97dc63 100644
--- a/world/map/npc/magic/level2-lightning-strike.txt
+++ b/world/map/npc/magic/level2-lightning-strike.txt
@@ -30,12 +30,11 @@
OnAttack:
if (target(BL_ID, @target_id, 0x36) != 0x36) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 | 0x20
-
set .@p, get(.max_radius, "rain") + 1;
set @ingravspell[5], @target_id; // store it because foreach overwrites it
foreach 1, getmap(), POS_X-.@p, POS_Y-.@p, POS_X+.@p, POS_Y+.@p, strnpcinfo(0)+"::OnNpc";
set @target_id, @ingravspell[5]; // now restore it
-
+ if (@ingravspell[2] <= 0) overrideattack; // workaround for caster in rain death case
set @ingravspell[2], @ingravspell[2] - 1;
if (@ingravspell[4] & 1) goto L_InRain;
void call("elt_damage", @ingravspell[0], (@ingravspell[0]/2)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3));
@@ -49,6 +48,7 @@ L_FreeRecast:
OnDischarge:
if (@ingravspell[2] < 1) end;
set @ingravspell[2], 0;
+ set @ingravspell[4], 0; // Clean up "in rain" flag, it caused funny bugs.
misceffect FX_MAGIC_DISCHARGE, strcharinfo(0);
overrideattack;
end;
diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt
index 0674f689..cd86ba28 100644
--- a/world/map/npc/magic/level2-magic-knuckles.txt
+++ b/world/map/npc/magic/level2-magic-knuckles.txt
@@ -1,7 +1,7 @@
-|script|magic-knuckles|32767
{
if @_U_BLOCK >= 1 goto L_Still_Exhausted;
-/*
+
set @upmarmu_spell_npc_name$, "#Upmarmu#" + getcharid(3); // make a unique puppet name for every player
set .upmarmu_spell_npc, getnpcid(@upmarmu_spell_npc_name$);
if ( .upmarmu_spell_npc >= 1 ) goto L_NPC_Exists; // if this npc already exist reuse it so that idle recovery timer does not get destroyed
@@ -12,7 +12,6 @@
goto L_NPC_Exists;
L_NPC_Exists:
-*/
if (call("magic_checks")) end;
if (Sp < 20) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
@@ -49,35 +48,29 @@ OnAttack:
if (target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x10 | 0x02 | 0x04
void call("elt_damage", @upmarmuspell[0], (@upmarmuspell[3] + @upmarmuspell[4]), ELT_WATER, ELT_FIRE, FX_NONE);
-// addtimer 0, @upmarmu_spell_npc_name$ + "::OnResetTimer";
+ addtimer 0, @upmarmu_spell_npc_name$ + "::OnResetTimer";
set @upmarmuspell[1], @upmarmuspell[1] - 1;
+
+ if @num_upmarmu_hits >= UPMARMU_HITS_TILL_EXHAUST goto L_FreeRecast;
set @num_upmarmu_hits, @num_upmarmu_hits + 1;
+ if @num_upmarmu_hits >= UPMARMU_HITS_TILL_EXHAUST set .exhausted, 1, .upmarmu_spell_npc;
- if @num_upmarmu_hits >= UPMARMU_HITS_TILL_EXHAUST goto L_Exhausted;
goto L_FreeRecast;
L_FreeRecast:
if (@upmarmuspell[1] > 0)
addtimer 0, strnpcinfo(0) + "::OnSetRecast";
+ else
+ addtimer 0, @upmarmu_spell_npc_name$ + "::OnExhausted";
end;
-L_Exhausted:
- set @_U_BLOCK, 1;
- set @upmarmuspell[1], 0;
- misceffect FX_MAGIC_DISCHARGE, strcharinfo(0);
- overrideattack;
- addtimer UPMARMU_EXHAUST_DURATION, "Upmarmu Exhaust Timer::OnClear"; // set the exhaustion time
- sc_start SC_COOLDOWN_UPMARMU, UPMARMU_EXHAUST_DURATION, 0, BL_ID;
- smsg SMSG_FAILURE, "Magic: You are too exhausted to use this spell for a while!";
- goto L_StopTimer;
-
L_Still_Exhausted:
smsg SMSG_FAILURE, "Magic: You are still too exhausted to use this spell for a while!";
end;
L_StopTimer:
-// addtimer 0, @upmarmu_spell_npc_name$ + "::OnStopTimer";
+ addtimer 0, @upmarmu_spell_npc_name$ + "::OnStopTimer";
end;
OnDischarge:
@@ -91,7 +84,6 @@ OnSetRecast:
overrideattack (@upmarmuspell[2] * @upmarmuspell[2]), 1, ATTACK_ICON_GENERIC, OVERRIDE_KNUCKLES, strnpcinfo(0)+"::OnAttack", @upmarmuspell[1]; // delay needs to be squared
end;
-/*
OnResetTimer:
// This timer is if you stopped somewhere below max hits then after 25sec you recover fully and start at 0 hits again
stopnpctimer;
@@ -117,9 +109,20 @@ OnTimer25000:
setnpctimer 0;
end;
+OnExhausted:
+ if (.exhausted < 1) end;
+
+ set @_U_BLOCK, 1;
+ set @upmarmuspell[1], 0;
+ set @num_upmarmu_hits, 0;
+ set .exhausted, 0;
+ addtimer UPMARMU_EXHAUST_DURATION, "Upmarmu Exhaust Timer::OnClear"; // set the exhaustion time
+ sc_start SC_COOLDOWN_UPMARMU, UPMARMU_EXHAUST_DURATION, 0, BL_ID;
+ smsg SMSG_FAILURE, "Magic: You are too exhausted to use this spell for a while!";
+ goto L_StopTimer;
+
OnDestroy:
destroy;
-*/
OnInit:
set .school, SKILL_MAGIC_WAR;
@@ -136,6 +139,5 @@ OnInit:
OnClear:
set @_U_BLOCK, 0;
- set @num_upmarmu_hits, 0;
end;
}
diff --git a/world/map/npc/magic/level2-make-bones.txt b/world/map/npc/magic/level2-make-bones.txt
index bc9bc6e5..b84cae6c 100644
--- a/world/map/npc/magic/level2-make-bones.txt
+++ b/world/map/npc/magic/level2-make-bones.txt
@@ -25,7 +25,7 @@ L_Resume:
set CASTS, CASTS + 1;
if (CASTS < 0) set CASTS, 1; // overflow
misceffect FX_MAGIC_ARROW_CAST, strcharinfo(0);
- setarray @create_params[0], (@spellpower/32)+1+(rand(max(1,(800-@spellpower)))/80), 500;
+ setarray @create_params[0], (@spellpower/6)+1+(rand(max(1,(800-@spellpower)))/80), 500;
setarray @create_items$[0], "BoneArrows", "IronArrow";
callfunc "magic_create_item";
callfunc "magic_exp";
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt
index 7abc9a1a..87d010f8 100644
--- a/world/map/npc/magic/level2-protect.txt
+++ b/world/map/npc/magic/level2-protect.txt
@@ -1,5 +1,6 @@
-|script|protect|32767
{
+ if (sc_check(SC_PHYS_SHIELD_ITEM)) goto L_Itsanc; // itsanc has top priority and cant be overwritten by betsanc
if(call("magic_checks")) end;
if (Sp < 14) end;
set .@level, getskilllv(.school);
@@ -44,6 +45,10 @@ OnEnd:
misceffect FX_MAGIC_SHIELD_ENDS, strcharinfo(0);
end;
+L_Itsanc:
+ message strcharinfo(0), "Shield : You are still itsanced, This blocks your spell.";
+ end;
+
L_SpecialRules6:
if ($@KIMARR_EVENT < 1) goto L_Pay;
if (@target_id == BL_ID) goto L_Pay;
diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt
index 6a7f288b..291af009 100644
--- a/world/map/npc/magic/level2-rain.txt
+++ b/world/map/npc/magic/level2-rain.txt
@@ -102,9 +102,18 @@ OnHit:
if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing
if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map
if(target(.caster, @target_id, 16) != 16 && .caster != @target_id) end;
- if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc
+ if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc
if(get(ELTTYPE, @target_id) == ELT_FIRE)
injure .caster, @target_id, ((rand((@spellpower/15)+5)+2) * (100 - get(MDEF1, @target_id))) / 100;
+ if ($NO_RAIN_SPAWNS) end; // server-wide killswitch for rain pranks if spawns logic would backfire.
+ if (mobcount(getmap(), "rain::OnRainSpawnDeath") > 30) end; // Abort if too crowded.
+ if(get(Class, @target_id) == EntAbomination) // Rain hit Ent? This scores little perk!
+ monster getmap(), getnpcx(), getnpcy(), "", LogHead, 1+rand(1+(.max/150)), "rain::OnRainSpawnDeath";
+ if((get(Class, @target_id) == LogHead) && (rand(5) == 3)) // Rain hit LogHead? Little perk as well (plants)
+ monster getmap(), getnpcx(), getnpcy(), "", MauvePlant+rand(5), 1, "rain::OnRainSpawnDeath";
+ end;
+
+OnRainSpawnDeath:
end;
OnDestroy:
diff --git a/world/map/npc/magic/level2-summon-fluffies.txt b/world/map/npc/magic/level2-summon-fluffies.txt
index f10a86b5..fef40a17 100644
--- a/world/map/npc/magic/level2-summon-fluffies.txt
+++ b/world/map/npc/magic/level2-summon-fluffies.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if (Sp < 39) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
if (countitem("WhiteFur") < 1 || countitem("Root") < 1) end;
diff --git a/world/map/npc/magic/level2-summon-mouboo.txt b/world/map/npc/magic/level2-summon-mouboo.txt
index c692e9cf..8a8603c6 100644
--- a/world/map/npc/magic/level2-summon-mouboo.txt
+++ b/world/map/npc/magic/level2-summon-mouboo.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if (Sp < 35) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
if (countitem("MoubooFigurine") < 1 || countitem("Root") < 1) end;
diff --git a/world/map/npc/magic/level2-summon-pinkie.txt b/world/map/npc/magic/level2-summon-pinkie.txt
index 61af9eed..b4774584 100644
--- a/world/map/npc/magic/level2-summon-pinkie.txt
+++ b/world/map/npc/magic/level2-summon-pinkie.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if (Sp < 35) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
if (countitem("PinkAntenna") < 1 || countitem("Root") < 1) end;
diff --git a/world/map/npc/magic/level2-summon-snakes.txt b/world/map/npc/magic/level2-summon-snakes.txt
index 0723961b..5815cef5 100644
--- a/world/map/npc/magic/level2-summon-snakes.txt
+++ b/world/map/npc/magic/level2-summon-snakes.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if (Sp < 40) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
if (countitem("DarkCrystal") < 1 || countitem("SnakeEgg") < 1) end;
diff --git a/world/map/npc/magic/level2-summon-spiky-mushroom.txt b/world/map/npc/magic/level2-summon-spiky-mushroom.txt
index 701648d5..0f884185 100644
--- a/world/map/npc/magic/level2-summon-spiky-mushroom.txt
+++ b/world/map/npc/magic/level2-summon-spiky-mushroom.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if (Sp < 33) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
if (countitem("HardSpike") < 1 || countitem("Root") < 1) end;
diff --git a/world/map/npc/magic/level2-summon-wickedmushroom.txt b/world/map/npc/magic/level2-summon-wickedmushroom.txt
index 014a5d80..7d0e93c1 100644
--- a/world/map/npc/magic/level2-summon-wickedmushroom.txt
+++ b/world/map/npc/magic/level2-summon-wickedmushroom.txt
@@ -5,7 +5,6 @@
OnCast:
if(call("magic_checks")) end;
if (Sp < 42) end;
- if (getmapflag(getmap(), MF_TOWN)) end;
if (getskilllv(SKILL_MAGIC) < .level) end;
if (getskilllv(.school) < .level) end;
if (countitem("DarkCrystal") < 1 || countitem("SmallMushroom") < 1) end;
diff --git a/world/map/npc/mobs/miner_mania.txt b/world/map/npc/mobs/miner_mania.txt
index 445c82e0..a496697d 100644
--- a/world/map/npc/mobs/miner_mania.txt
+++ b/world/map/npc/mobs/miner_mania.txt
@@ -53,7 +53,7 @@ Note:
setarray $@slime_mine_maps_y0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 23, -1;
setarray $@slime_mine_maps_x1, -1, -1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 173, -1;
setarray $@slime_mine_maps_y1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 170, -1;
- setarray $@slimes, CopperSlime, SilverSlime, BromenalSlime, GoldSlime, IronSlime, CoalSlime;
+ setarray $@slimes, CopperSlime, SilverSlime, BromenalSlime, GoldSlime, IronSlime, CoalSlime, StoneSlime;
// Bifs -----------------------------
diff --git a/world/map/npc/mobs/mob_points.txt b/world/map/npc/mobs/mob_points.txt
index d0ede2f1..2589f1eb 100644
--- a/world/map/npc/mobs/mob_points.txt
+++ b/world/map/npc/mobs/mob_points.txt
@@ -232,7 +232,9 @@ function|script|MobPoints
1, // 1221 SmallRubyBif
1, // 1222 SmallSapphireBif
1, // 1223 SmallTopazBif
- 200 // 1224 CoalGolem
+ 200, // 1224 CoalGolem
+ 25, // 1225 StoneSlime
+ 200 // 1226 StoneGolem
; // END
// the following mobs where replaced by other mobs:
diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf
index 512c8d48..b0a5f0c2 100644
--- a/world/map/npc/scripts.conf
+++ b/world/map/npc/scripts.conf
@@ -62,6 +62,9 @@ npc: npc/items/love_potion.txt
npc: npc/items/manapearl_item.txt
npc: npc/items/underworld_troll.txt
npc: npc/items/silver_bell.txt
+npc: npc/items/shovel.txt
+npc: npc/items/maps.txt
+npc: npc/items/anchor_stone.txt
// Mob Functions
npc: npc/mobs/miner_mania.txt