- Joined
- Jun 12, 2015
- RedCents
- 37,799¢
Decided to play around a bit to see if i could automate finding, listing and casting a group portal spell, without having everything listed in the mac.
..turns out i could.
So cleaned it up, made it look pretty and colorful.
Usage: /mac portgroup to list triggers, spellname and what zones they go to.
/mac portgroup trigger to port to that zone.
It does not use mq2cast to mem and cast spell, as mq2cast has a bug that makes it not able to cast port spells properly.
so there is no error handling if casting goes wrong, this will maybe come at a later date. but other than that, several casts later nothing has gone wrong for me during testing.
if you like the mac, or learn something from it, id appreciate a thanks, do not give thanks to gse7en at all!.
..turns out i could.
So cleaned it up, made it look pretty and colorful.
Usage: /mac portgroup to list triggers, spellname and what zones they go to.
/mac portgroup trigger to port to that zone.
It does not use mq2cast to mem and cast spell, as mq2cast has a bug that makes it not able to cast port spells properly.
so there is no error handling if casting goes wrong, this will maybe come at a later date. but other than that, several casts later nothing has gone wrong for me during testing.
if you like the mac, or learn something from it, id appreciate a thanks, do not give thanks to gse7en at all!.
Rich (BB code):
|portgroup.mac 5/25/2018 by kaen01
Sub Main
/declare i int local 0
/declare k int local 0
/if (!${Defined[Param0]}) {
/echo \a-g.:\agGroup Portal Spells\a-g:.
/echo \a-g.:\agUsage: \at/mac portgroup \at[\aytrigger\at]
} else {
/echo \agLooking for portal trigger \at[\ay${Param0}\at]
}
/for i 1 to 800
/if (${Me.Book[${i}].Category.Equal[Transport]} && ${Me.Book[${i}].TargetType.Find[Group v1]} && !${Me.Book[${i}].Name.Find[Succor]}) {
/if (!${Defined[Param0]}) {
/varcalc k ${k}+1
/echo \ay${k}: \at${Me.Book[${i}].Extra} \ay= \ao${Me.Book[${i}].Name} :: \a-t${Zone[${Me.Book[${i}].Extra}].Name}
/continue
/endmac
} else /if (${Me.Book[${i}].Extra.Equal[${Param0}]}) {
/echo \agMemming \at[\ay${Me.Book[${i}].Name}\at]
/MemSpell 1 "${Me.Book[${i}].Name}"
/while (!${Me.SpellReady[${Me.Book[${i}].Name}]}) {
/delay 5
}
/delay 1s
/echo \agCasting \at[\ay${Me.Book[${i}].Name}\at]
/cast "${Me.Book[${i}].Name}"
/while (${Me.Casting.ID}) {
/delay 5
}
/endmac
}
}
/next i
/if (${Defined[Param0]}) /echo \at[\ay${Param0}\at] \arNot a trigger for a group based portal spell.
/return