summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
authorHoraK-FDF <horak-fdf@web.de>2024-11-09 23:02:43 +0000
committerLed Mitz <smoothshifter@tuta.io>2024-11-09 23:02:43 +0000
commit5fb61add3ba8a667c5846725c473fa9217f786fb (patch)
treec2b75909a23f9322d286deeab9dd97c186306e5c /world
parentaebc17117f24d16219f3f63b44a17e2723077254 (diff)
downloadserverdata-master.tar.gz
serverdata-master.tar.bz2
serverdata-master.tar.xz
serverdata-master.zip
Anchor Stone UpdateHEADmaster
- added restrictions for some maps its the same as the towels restrictions - added constants <br> need to think about a timeout if any and how to prevent alts on same acc which didnt earned it to use it.
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;
}