summaryrefslogtreecommitdiff
path: root/npc/quests/quests_juperos.txt
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2020-07-07 15:40:02 +0200
committerskyleo <skyleo@skyleo.de>2020-07-07 17:15:11 +0200
commit17c3637481b1255923f13f070108bcfa49a567f2 (patch)
treee4bd5fe20db01d9843bf8bc926f5cd55145c7d6c /npc/quests/quests_juperos.txt
parent1dfebbd4966310387357cbddae600418a56df658 (diff)
downloadhercules-17c3637481b1255923f13f070108bcfa49a567f2.tar.gz
hercules-17c3637481b1255923f13f070108bcfa49a567f2.tar.bz2
hercules-17c3637481b1255923f13f070108bcfa49a567f2.tar.xz
hercules-17c3637481b1255923f13f070108bcfa49a567f2.zip
Refactor scripts that use OnTouch Logic to use areawarp instead
This fixes a few bugs and possible exploits, some OnTouch-Warp-NPCs didn't cover the entire area they intended to areawarp. If you have any NPC Dialogue open, you will not trigger the OnTouch and thus not get warped. Areawarp though will ensure that you are guaranteed to get warped. This also fixes some poor timer usage in juperos quest for example, where one of the NPCs just won't ever get enabled again.
Diffstat (limited to 'npc/quests/quests_juperos.txt')
-rw-r--r--npc/quests/quests_juperos.txt22
1 files changed, 3 insertions, 19 deletions
diff --git a/npc/quests/quests_juperos.txt b/npc/quests/quests_juperos.txt
index d120bfc27..f9120796d 100644
--- a/npc/quests/quests_juperos.txt
+++ b/npc/quests/quests_juperos.txt
@@ -4914,7 +4914,7 @@ OnTouch:
case 1:
specialeffect(EF_LIGHTSPHERE, AREA, playerattached());
close2;
- stopnpctimer;
+ stopnpctimer(1);
warp "juperos_02",130,142;
break;
case 2:
@@ -4922,7 +4922,7 @@ OnTouch:
mes "Not now!";
mes "I can't leave yet!";
close2;
- stopnpctimer;
+ stopnpctimer(1);
warp "jupe_gate",50,168;
break;
}
@@ -4930,23 +4930,7 @@ OnTouch:
OnTimer10000:
warp "juperos_02",128,278;
- enablenpc "gate#start#2";
- disablenpc "gate#start";
- end;
-}
-
-jupe_gate,50,171,0 script gate#start#2 FAKE_NPC,2,2,{
-OnInit:
- disablenpc "gate#start#2";
- end;
-
-OnTouch:
- warp "juperos_02",130,142;
- end;
-
-OnTimer2000:
- enablenpc "gate#start";
- disablenpc "gate#start#2";
+ areawarp("jupe_gate", 48, 169, 52, 173, "juperos_02", 130, 142);
end;
}