Required Plugins:
- MQ2Cast
- MQ2Bandolier
In the events section add:
Code: Select all
#event Gate "#*#Gate Now#*#"Code: Select all
| -=-=-=-=-=-=-=-=-=-=-=-=-
| -= Gate Event =-
| -=-=-=-=-=-=-=-=-=-=-=-=-
| * Will translocate the player
| either by means of spells,
| items, or alternate abilities.
| * Attempts to recast if the
| spell/item/AA fails to
| translocate the player.
| * Origin is not supported.
| * Not compatable with ranger
| style gating~
| -=-=-=-=-=-=-=-=-=-=-=-=-
Sub Event_Gate
/declare currentZoneID int local ${Zone.ID}
/stick off
| >Characters with AA gate
/If (${Cast.Ready[1217]}) {
/popup -= Attempting to Cast AA "Gate"
/If (${Me.Ducking}) /Stand
/Casting 1217
:AAGate
/If (${Me.Ducking}) /Stand
/If (${currentZoneID} == ${Zone.ID} && ${Me.PctHPs} > 5) {
/If (!${Cast.Result.Equal[CAST_SUCCESS]}) {
/If (!${Cast.Status.Equal[C]} && ${Cast.Ready[1217]}) {
/popup -= Recasting AA "Gate"
/Casting 1217
}
/delay 10
/goto :AAGate
}
}
| >Classes with spell Gate minus Wizard.
} else /If (${Select[${Me.Class.ShortName},ENC,MAG,NEC,DRU,CLR,SHM]}) {
/popup -= Attempting to Cast Spell "Gate"
/Casting "Gate" 1
:SpellGate
/If (${Me.Ducking}) /Stand
/If (${currentZoneID} == ${Zone.ID} && ${Me.PctHPs} > 5) {
/If (!${Cast.Result.Equal[CAST_SUCCESS]}) {
/If (!${Cast.Status.Equal[C]} && ${Cast.Ready[Gate|gem1]}) {
/popup -= Casting Spell "Gate"
/Casting "Gate" 1
}
/delay 10
/goto :SpellGate
}
}
| >Wizard transport method.
} else /If (${Me.Class.ShortName.Equal[WIZ]}) {
/popup -= Preparing "Knowledge Gate"
/Memorize "Knowledge Gate" 1
:WizGate
/If (${Me.Ducking}) /Stand
/If (${Zone.ID} != 202 && ${Me.PctHPs} > 5) {
/If (!${Cast.Status.Equal[C]} && ${Cast.Ready[Knowledge Gate|gem1]}) {
/popup -= Casting "Knowledge Gate"
/Casting "Knowledge Gate" 1
}
/delay 10
/goto :WizGate
}
| >Melee transport method.
} else {
/If (${FindItemCount[=Philter of Major Translocation]} > 0) {
/If (${FindItemCount[=Philter of Major Translocation]} < 5) {
/bc ${Me.CleanName} is low on "Philter of Major Translocation" (${FindItemCount[=Philter of Major Translocation]}).
/popup -= You are low on "Philter of Major Translocation" (${FindItemCount[=Philter of Major Translocation]})
} else {
/popup -= Attempting to cast "Philter of Major Translocation"
}
/If (${Me.Ducking}) /Stand
/Casting "Philter of Major Translocation"|Item
} else {
/bc ${Me.CleanName} is out of "Philter of Major Translocation".
}
| >Check if it actually swapped in the gate potion.
:PotionGate
/If (${FindItemCount[=Philter of Major Translocation]} > 0) {
/If (${Me.Ducking}) /Stand
/If (${currentZoneID} == ${Zone.ID} && ${Me.PctHPs} > 5) {
/If (!${Cast.Result.Equal[CAST_SUCCESS]}) {
/If (!${Cast.Status.Equal[C]} && ${Cast.Ready[96467]}) {
/Casting "Philter of Major Translocation"|Item
/Popup -= Recasting "Philter of Major Translocation"
}
/delay 10
/goto :PotionGate
}
}
}
}
/return
