Translocate by means of AA/Spell/Item

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

Shadows91
a lesser mummy
a lesser mummy
Posts: 31
Joined: Mon Feb 09, 2009 11:21 pm

Translocate by means of AA/Spell/Item

Post by Shadows91 » Sun Mar 15, 2009 5:04 pm

Usage: Supply the trigger text to translocate the player using AA, Spell, or Item.

Required Plugins:
- MQ2Cast
- MQ2Bandolier


In the events section add:

Code: Select all

#event Gate			"#*#Gate Now#*#"
At the bottom add:

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

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 1:50 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 1:51 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 1:52 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:29 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:30 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:31 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:32 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:34 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:35 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:36 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:37 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:38 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:39 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Translocate by means of AA/Spell/Item

Post by xyilla » Sun Sep 07, 2025 2:40 pm