summaryrefslogtreecommitdiff
path: root/world/map/npc/items
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-02-01 11:48:15 -0500
committermekolat <mekolat@users.noreply.github.com>2016-02-01 11:48:15 -0500
commita6777719c6276c657c24a7ea272b58723ad974f9 (patch)
tree6073581d819b686b5577564ec0fa5187b49de0c4 /world/map/npc/items
parent3505ebd9e1ba7f7773d04b0c0a7aa717142324eb (diff)
parent7f40ee23eab1217e8761c2c04e3120ab1e06ada1 (diff)
downloadclassic-serverdata-a6777719c6276c657c24a7ea272b58723ad974f9.tar.gz
classic-serverdata-a6777719c6276c657c24a7ea272b58723ad974f9.tar.bz2
classic-serverdata-a6777719c6276c657c24a7ea272b58723ad974f9.tar.xz
classic-serverdata-a6777719c6276c657c24a7ea272b58723ad974f9.zip
Merge pull request #453 from rumly111/noremovetowels
Don't remove towels from inventory on usage
Diffstat (limited to 'world/map/npc/items')
-rw-r--r--world/map/npc/items/warpTowels.txt27
1 files changed, 1 insertions, 26 deletions
diff --git a/world/map/npc/items/warpTowels.txt b/world/map/npc/items/warpTowels.txt
index 122ac7c0..91c4fccc 100644
--- a/world/map/npc/items/warpTowels.txt
+++ b/world/map/npc/items/warpTowels.txt
@@ -1,7 +1,7 @@
// See #TravelConfig
function|script|WarpTowel
{
- set @seconds, TowelLastUsed - (gettimetick(2) - 1800);
+ set @seconds, TowelLastUsed - (gettimetick(2) - 1200);
if (@seconds > 0)
goto L_DontPanic;
if (isin("botcheck",25,27,51,47))
@@ -9,8 +9,6 @@ function|script|WarpTowel
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;
- callfunc "MultiWarpTowel";
-
if (@warpTowelName$ == "HitchhikersTowel")
goto L_Save;
if(@warpTowelName$ == "WhiteHitchhikersTowel")
@@ -154,26 +152,3 @@ L_End:
set @warpTowelName$, "";
return;
}
-
-function|script|MultiWarpTowel
-{
- setarray $@warpTowels$, "HitchhikersTowel", "WhiteHitchhikersTowel", "RedHitchhikersTowel", "GreenHitchhikersTowel", "BlueHitchhikersTowel", "YellowHitchhikersTowel", "PurpleHitchhikersTowel", "OrangeHitchhikersTowel", "PinkHitchhikersTowel", "TealHitchhikersTowel", "LimeHitchhikersTowel";
- set @towel_count, 0;
- set @towel_loop, 0;
- goto L_CountTowelLoop;
-
-L_CountTowelLoop:
- set @towel_count, (@towel_count + countitem($@warpTowels$[@towel_loop]));
- delitem $@warpTowels$[@towel_loop], countitem($@warpTowels$[@towel_loop]);
- goto L_DelLoopAgain;
-
-L_DelLoopAgain:
- if((@towel_loop + 1) == getarraysize($@warpTowels$))
- goto L_Return;
- set @towel_loop, (@towel_loop + 1);
- goto L_CountTowelLoop;
-
-L_Return:
- cleararray $@warpTowels$, "", getarraysize($@warpTowels$);
- return;
-}