summaryrefslogtreecommitdiff
path: root/npc/items/warpTowels.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 13:33:57 -0300
commitcf18ce071c79ae37e14ea38943e0b1d88da70a7b (patch)
treef9159c9b60b3018300dd22ffba0d797bc5e828e5 /npc/items/warpTowels.txt
parent8a4bf716002a017de77fe7df301ef8e4aaf00a2e (diff)
downloadserverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.gz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.bz2
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.tar.xz
serverdata-cf18ce071c79ae37e14ea38943e0b1d88da70a7b.zip
Override
Diffstat (limited to 'npc/items/warpTowels.txt')
-rwxr-xr-xnpc/items/warpTowels.txt152
1 files changed, 152 insertions, 0 deletions
diff --git a/npc/items/warpTowels.txt b/npc/items/warpTowels.txt
new file mode 100755
index 00000000..18fea9f7
--- /dev/null
+++ b/npc/items/warpTowels.txt
@@ -0,0 +1,152 @@
+function script WarpTowel {
+ @seconds = TowelLastUsed - (gettimetick(2) - 1200);
+ if (@seconds > 0)
+ goto L_DontPanic;
+ if (isin("botcheck",25,27,51,47))
+ goto L_Prison;
+ if (getmapflag(getmapname(), mf_nosave) || getmapflag(getmapname(), MF_NOTELEPORT) || getmapflag(getmapname(), MF_NOWARP) || isin("009-7",$@fightclub_x1,$@fightclub_y1,$@fightclub_x2,$@fightclub_y2))
+ goto L_Forbid;
+
+ if (@warpTowelName$ == "HitchhikersTowel")
+ goto L_Save;
+ if(@warpTowelName$ == "WhiteHitchhikersTowel")
+ goto L_White;
+ if(@warpTowelName$ == "RedHitchhikersTowel")
+ goto L_Red;
+ if(@warpTowelName$ == "GreenHitchhikersTowel")
+ goto L_Green;
+ if(@warpTowelName$ == "BlueHitchhikersTowel")
+ goto L_Blue;
+ if(@warpTowelName$ == "YellowHitchhikersTowel")
+ goto L_Yellow;
+ if(@warpTowelName$ == "PurpleHitchhikersTowel")
+ goto L_Purple;
+ if(@warpTowelName$ == "OrangeHitchhikersTowel")
+ goto L_Orange;
+ if(@warpTowelName$ == "PinkHitchhikersTowel")
+ goto L_Pink;
+ if(@warpTowelName$ == "TealHitchhikersTowel")
+ goto L_Teal;
+ if(@warpTowelName$ == "LimeHitchhikersTowel")
+ goto L_Lime;
+ goto L_Save;
+
+L_White:
+ // Koga
+ @NextLocationMap$ = "035-2";
+ @NextLocationX = 20;
+ @NextLocationY = 21;
+ goto L_WarpPlayer;
+
+L_Red:
+ // Barbarians
+ @NextLocationMap$ = "033-1";
+ @NextLocationX = 66;
+ @NextLocationY = 33;
+ goto L_WarpPlayer;
+
+L_Green:
+ // Candor
+ @NextLocationMap$ = "029-1";
+ @NextLocationX = 69;
+ @NextLocationY = 69;
+ goto L_WarpPlayer;
+
+L_Blue:
+ // Blue Sages
+ @NextLocationMap$ = "048-2";
+ @NextLocationX = 26;
+ @NextLocationY = 47;
+ goto L_WarpPlayer;
+
+L_Yellow:
+ // Tulimshar Mines
+ @NextLocationMap$ = "002-2";
+ @NextLocationX = 27;
+ @NextLocationY = 28;
+ goto L_WarpPlayer;
+
+L_Purple:
+ // Dimonds Inn
+ @NextLocationMap$ = "010-1";
+ @NextLocationX = 27;
+ @NextLocationY = 97;
+ goto L_WarpPlayer;
+
+L_Orange:
+ // Graveyard
+ @NextLocationMap$ = "027-1";
+ @NextLocationX = 70;
+ @NextLocationY = 100;
+ goto L_WarpPlayer;
+
+L_Pink:
+ // Terranite Cave
+ @NextLocationMap$ = "012-3";
+ @NextLocationX = 448;
+ @NextLocationY = 66;
+ goto L_WarpPlayer;
+
+L_Teal:
+ // Mana Seed
+ @NextLocationMap$ = "012-3";
+ @NextLocationX = 64;
+ @NextLocationY = 130;
+ goto L_WarpPlayer;
+
+L_Lime:
+ // Pachua
+ @NextLocationMap$ = "006-1";
+ @NextLocationX = 28;
+ @NextLocationY = 97;
+ if(QUEST_MIRIAM_start != 0) goto L_Cheat;
+ goto L_WarpPlayer;
+
+L_Cheat:
+ QUEST_MIRIAM_cheat = 1;
+ QUEST_MIRIAM_run = gettimetick(2) - QUEST_MIRIAM_start;
+ QUEST_MIRIAM_start = 0;
+ goto L_WarpPlayer;
+
+L_Save:
+ // Soul Menhir
+ @NextLocationMap$ = getsavepoint(0);
+ @NextLocationX = getsavepoint(1);
+ @NextLocationY = getsavepoint(2);
+ goto L_WarpPlayer;
+
+L_WarpPlayer:
+ TowelLastUsed = gettimetick(2);
+ warp @NextLocationMap$,@NextLocationX,@NextLocationY;
+ goto L_BreakChance;
+
+L_BreakChance:
+ if (rand(15))
+ goto L_Keep;
+ getitem "HitchhikersTowel", 1;
+ 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;
+
+L_Prison:
+ message strcharinfo(0), "Towel : You must be warped by a GM to leave the botcheck area.";
+ goto L_Keep;
+
+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;
+
+L_Keep:
+ getitem @warpTowelName$, 1;
+ goto L_End;
+
+L_End:
+ @NextLocationMap$ = "";
+ @NextLocationX = 0;
+ @NextLocationY = 0;
+ @warpTowelName$ = "";
+ return;
+}