diff options
author | skyleo <skyleo@skyleo.de> | 2020-07-07 15:40:02 +0200 |
---|---|---|
committer | skyleo <skyleo@skyleo.de> | 2020-07-07 17:15:11 +0200 |
commit | 17c3637481b1255923f13f070108bcfa49a567f2 (patch) | |
tree | e4bd5fe20db01d9843bf8bc926f5cd55145c7d6c /npc/quests/seals | |
parent | 1dfebbd4966310387357cbddae600418a56df658 (diff) | |
download | hercules-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/seals')
-rw-r--r-- | npc/quests/seals/god_weapon_creation.txt | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/npc/quests/seals/god_weapon_creation.txt b/npc/quests/seals/god_weapon_creation.txt index 8009bd36d..17979e51a 100644 --- a/npc/quests/seals/god_weapon_creation.txt +++ b/npc/quests/seals/god_weapon_creation.txt @@ -807,41 +807,15 @@ OnTimer610000: end; OnTimer612000: - donpcevent "god_wep_warpmaster::OnEnable"; + areawarp("que_god01", 130, 55, 190, 135, "prontera", 156, 324); end; OnTimer615000: - donpcevent "god_wep_warpmaster::OnDisable"; donpcevent "#god_hopewarp1::OnReset"; stopnpctimer; end; } -que_god01,169,82,0 script god_wep_warpmaster FAKE_NPC,{ -OnEnable: - for(.@i = 1; .@i<=6; ++.@i) - enablenpc "god_failwarp#"+.@i; - end; -OnDisable: - for(.@i = 1; .@i<=6; ++.@i) - disablenpc "god_failwarp#"+.@i; - end; -} - -que_god01,154,67,0 script god_failwarp#1 FAKE_NPC,4,7,{ -OnInit: - disablenpc strnpcinfo(NPC_NAME); - end; -OnTouch: - warp "prontera",156,324; - end; -} -que_god01,154,82,0 duplicate(god_failwarp#1) god_failwarp#2 FAKE_NPC,4,7 -que_god01,145,99,0 duplicate(god_failwarp#1) god_failwarp#3 FAKE_NPC,9,9 -que_god01,164,99,0 duplicate(god_failwarp#1) god_failwarp#4 FAKE_NPC,9,9 -que_god01,145,118,0 duplicate(god_failwarp#1) god_failwarp#5 FAKE_NPC,9,9 -que_god01,164,118,0 duplicate(god_failwarp#1) god_failwarp#6 FAKE_NPC,9,9 - // Original name: "Godly Item Quests Related#god" que_god01,293,3,0 script Godly Item Quests#god 4_F_01,{ callfunc "F_GM_NPC"; @@ -864,24 +838,16 @@ que_god01,293,3,0 script Godly Item Quests#god 4_F_01,{ mes "[Use in case of emergency]"; mes "What services would you like to use?"; next; - switch(select("Turn off Warps.", "Reset Timer.", "Reset chat room.")) { + switch(select("Reset Timer.", "Reset chat room.")) { case 1: mes "[Use in case of emergency]"; - mes "Press the 'Next' button to turn off warps."; - next; - donpcevent "god_wep_warpmaster::OnDisable"; - mes "[Use in case of emergency]"; - mes "You have successfully turned off warps."; - close; - case 2: - mes "[Use in case of emergency]"; mes "Press the 'Next' button to reset timer."; next; donpcevent "Grunburti#god::OnEnable"; mes "[Use in case of emergency]"; mes "You have successfully reset timer."; close; - case 3: + case 2: mes "[Use in case of emergency]"; mes "Please press the 'Next' button to reset the arena chat room in que_god01."; next; |