summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
Diffstat (limited to 'world')
-rw-r--r--world/map/db/const-quest.txt7
-rw-r--r--world/map/npc/items/anchor_stone.txt24
2 files changed, 29 insertions, 2 deletions
diff --git a/world/map/db/const-quest.txt b/world/map/db/const-quest.txt
index 88ecb334..75000466 100644
--- a/world/map/db/const-quest.txt
+++ b/world/map/db/const-quest.txt
@@ -165,6 +165,13 @@ GEM_BIF_CHANCE 5
NORMAL_BIF_CHANCE 4
BIG_BIF_CHANCE 8
+// Anchor Stone constants:
+// biggest maps use 520 tiles (012-3, 012-4) so 1023 is good atm but if maps ever grow bigger these values need to be changed
+AS_X_MASK 1023
+AS_X_SHIFT 0
+AS_Y_MASK 1047552
+AS_Y_SHIFT 10
+
// Flags for the battle caves.
BATTLE_CAVE1 1
BATTLE_CAVE2 2
diff --git a/world/map/npc/items/anchor_stone.txt b/world/map/npc/items/anchor_stone.txt
index c1ea722b..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;
@@ -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;
}