summaryrefslogtreecommitdiff
path: root/world/map/npc/items
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/items')
-rw-r--r--world/map/npc/items/anchor_stone.txt26
-rw-r--r--world/map/npc/items/magicring_item.txt27
-rw-r--r--world/map/npc/items/manapearl_item.txt2
-rw-r--r--world/map/npc/items/maps.txt3
-rw-r--r--world/map/npc/items/shovel.txt8
5 files changed, 60 insertions, 6 deletions
diff --git a/world/map/npc/items/anchor_stone.txt b/world/map/npc/items/anchor_stone.txt
index d63632af..e0be2f1c 100644
--- a/world/map/npc/items/anchor_stone.txt
+++ b/world/map/npc/items/anchor_stone.txt
@@ -9,6 +9,11 @@ function|script|useAnchorStone
end;
OnUse:
+ if (isin("botcheck",25,27,51,47))
+ goto L_Prison;
+ if (getmapflag(getmap(), MF_NOSAVE) || getmapflag(getmap(), MF_NOTELEPORT) || getmapflag(getmap(), MF_NOWARP) || isin("009-7",$@fightclub_x1,$@fightclub_y1,$@fightclub_x2,$@fightclub_y2))
+ goto L_Forbid;
+
if ( @StoneName$ == "AnchorStone" ) goto L_AnchorStone;
if ( @StoneName$ == "AnchoredAnchorStone" ) goto L_AnchoredAnchorStone;
goto L_Close;
@@ -20,7 +25,7 @@ L_AnchorStone:
"Yes", L_AS_Yes;
L_AS_Yes:
- set AnchorStoneDest, getmaphash(getmap()); // since a hash could be negative I take a seperate variable for that since shifting would destroy the sign bit and create a different hash
+ 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;
@@ -32,13 +37,20 @@ L_AnchoredAnchorStone:
mes "\"You want to recall to the place the [@@" + AnchoredAnchorStone + "|@@] is bound to?\"";
menu
"No", L_Close,
- "Yes", L_AAS_Yes;
+ "Yes", L_AAS_Yes,
+ "Unbind Anchored Anchor Stone", L_AAS_Unbind;
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_Unbind:
+ mes "";
+ mes "\"You really want to unbind the [@@" + AnchoredAnchorStone + "|@@] from it's destination?\"";
+ menu
+ "No", L_Close,
+ "Yes", L_AAStoAS;
+
L_AAS_Error:
mes "\"Something went wrong the [@@" + AnchoredAnchorStone + "|@@] lost its destination and turns back to normal.\"";
goto L_AAStoAS;
@@ -51,6 +63,14 @@ L_AAStoAS:
getitem AnchorStone, 1;
close;
+L_Forbid:
+ message strcharinfo(0), "Anchor Stone : This area is protected by a force that doesn't tolerate the power of the Anchor Stone.";
+ goto L_Close;
+
+L_Prison:
+ message strcharinfo(0), "Anchor Stone : You must be warped by a GM to leave the botcheck area.";
+ goto L_Close;
+
L_Close:
close;
}
diff --git a/world/map/npc/items/magicring_item.txt b/world/map/npc/items/magicring_item.txt
new file mode 100644
index 00000000..eeb1aee6
--- /dev/null
+++ b/world/map/npc/items/magicring_item.txt
@@ -0,0 +1,27 @@
+// Variables passed to this script:
+// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script.
+
+function|script|MagicRingItem
+{
+
+ set @debug_mask, 65535;
+ set @debug_shift, 0;
+ set @mexp, ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift);
+
+ set @magicring_mexp_needed, 5404;
+
+ if ( @mexp >= @magicring_mexp_needed )
+ goto L_Return;
+
+ message strcharinfo(0), "You are not experienced enough to use the Magic Ring.";
+
+ // This is for debug
+ if (debug)
+ goto L_Return;
+
+ callfunc "UnequipLater";
+ goto L_Return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/items/manapearl_item.txt b/world/map/npc/items/manapearl_item.txt
index 9c1f1c04..2d7ce428 100644
--- a/world/map/npc/items/manapearl_item.txt
+++ b/world/map/npc/items/manapearl_item.txt
@@ -15,7 +15,7 @@ function|script|ManaPearlItem
if ( @mexp >= @manapearl_mexp_needed )
goto L_Return;
- message strcharinfo(0), "You are not expirienced enough to keep up the mana flow that is needed to stay in resonance with the Mana Pearl.";
+ message strcharinfo(0), "You are not experienced enough to keep up the mana flow that is needed to stay in resonance with the Mana Pearl.";
// This is for debug
if (debug)
diff --git a/world/map/npc/items/maps.txt b/world/map/npc/items/maps.txt
index 29d54e7d..c7f33d83 100644
--- a/world/map/npc/items/maps.txt
+++ b/world/map/npc/items/maps.txt
@@ -1,5 +1,6 @@
function|script|readMap
-{
+{ // call Treasure Hunt quest. If quest handled use, skip message. See "treasure_hunt.txt"
+ if (call("treasure_try_map", @MapName$)) goto L_Return;
message strcharinfo(0), "You have no clue how to use this item yet.";
goto L_Return;
diff --git a/world/map/npc/items/shovel.txt b/world/map/npc/items/shovel.txt
index b706f1fe..7023f2ec 100644
--- a/world/map/npc/items/shovel.txt
+++ b/world/map/npc/items/shovel.txt
@@ -1,5 +1,11 @@
function|script|useShovel
-{
+{ // call Treasure Hunt quest. If quest handled use, skip message. See "treasure_hunt.txt"
+ if (call("treasure_try_shovel", @ShovelName$)) goto L_Return;
+ // More quests can be plugged in here.
message strcharinfo(0), "You have no clue how to use this item yet.";
+ goto L_Return;
+
+L_Return:
+ set @ShovelName$, "";
return;
}