Code: Select all
#event xp "You gain party experience!!"
#include enc_spellcast.mac
Sub Main
/echo groupbot v1.0
:MainLoop
/doevents
/assist soandso
/delay 10
/if $char(buff,"Maelstrom of Ro")==0 {
/call cast "Maelstrom of Ro"
}
/if $char(buff,"Elemental Draw Recourse")==0 {
/call cast "Elemental Draw"
}
/if $char(mana,pct)<=90 {
/call cast "Rod of Mystical Transvergance" item
}
/if $target(type)!="NPC" /goto :MainLoop
/if n $target(hp,pct)>99 /goto :MainLoop
/call cast "Veil of Lost Hopes" item
/if $target(type)!="NPC" /goto :MainLoop
/if n $target(hp,pct)>96 /goto :MainLoop
/pet attack
:rest
/delay 1
/if n $target(hp,pct)>90 /goto :rest
:NukeLoop
/call cast "sun vortex"
/delay 140
/goto :MainLoop
Sub Event_xp
/pet hold
/returnand here is the include file
Code: Select all
#event Fizzle "Your spell fizzles!"
#event Interrupt "Your casting has been interrupted!"
#event Interrupt "Your spell is interrupted."
#event Recover "You haven't recovered yet..."
#event Recover "Spell recovery time not yet met."
#event Resisted "Your target resisted the Forlorn Deeds spell."
#event OutOfMana "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event NoLOS "You cannot see your target."
#event Stunned "You cannot cast while stunned"
#event Standing "You must be standing to cast a spell"
#event Collapse "Your gate is too unstable, and collapses."
#event Malosinia "looks very uncomfortable."
#event Success "slows down"
Sub Cast(SpellName,Item)
:StartCast
/if "@Item"=="Item" {
/call ClearReturnValue
/cast item "@SpellName"
} else {
/if n $char(gem,"@SpellName")==0 /return CAST_UNKNOWNSPELL
/call ClearReturnValue
/if n $char(gem,"@SpellName")<0 {
/delay 0
/goto :StartCast
}
/cast "@SpellName"
}
:WaitCast
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :WaitCast
}
/doevents Fizzle
/doevents Interrupt
/doevents Recover
/doevents Standing
/doevents OutOfRange
/doevents OutOfMana
/doevents NoLOS
/doevents Resisted
/doevents Success
/doevents Malosinia
/if "$return"=="CAST_RESTART" /goto :StartCast
/if "$return"!="CAST_SUCCESS" /return "$return"
/return CAST_SUCCESS
Sub ClearReturnValue
/return CAST_SUCCESS
Sub Event_Fizzle
/return CAST_RESTART
Sub Event_Interrupt
/return CAST_RESTART
Sub Event_Recover
/delay 5
/return CAST_RESTART
Sub Event_Standing
/stand
/return CAST_RESTART
Sub Event_Collapse
/return CAST_RESTART
Sub Event_OutOfMana
/return CAST_OUTOFMANA
Sub Event_OutOfRange
/return CAST_OUTOFRANGE
Sub Event_NoLOS
/return CAST_CANNOTSEE
Sub Event_Stunned
/return CAST_STUNNED
Sub Event_Resisted
/return CAST_RESTART
Sub Event_Malosinia
/return CAST_SUCCESS
/return
now there is also some buff commands in there. You'll notice that there are two buffs that i want on me at all times. "Maelstrom of ro" and "elemental recourse" are the two buffs we have added and they work fine. they recast automatically everytime the buff icon wears off. I also have it set that if my mana drops below 90% that i cast my mod rod which is in inventory slot 7. All 3 of these are working but they arent perferct obviously
Here is the bugs and add in requests i need help on hehe. First with the malosinia part. At 99% my veil of lost hopes casts normally and will cast until it is no longer resisted which is what im shooting for. after that the pet engages and everything appears fine. I cast the first sun vortex spell at 90%ish like normal. here is where things get goofy... the next time sun vortex casts after the delay ive put in, my veil of lost hopes casts again too. This is not such a big deal but the spell has landed so i dont need it to cast again since it's just a debuff. bascially i don't think i have it in the right spot of i messed up the include file somewhere and that's why it's recasting, so if anyone can help me on this part that would be great!
Next problem lol.... as you can see im very stuck! The mod rod portion is the next part i want to get working right. Mod rods have a reuse time of 5 minutes on them so if i go below 90% and cast it once it will spam me that the reuse time has not yet been met. I expected that to happen when i added the line to cast it. What i need help on is how to get around the spam. I'm sure there is a way, but i can't find anything to try and use heh. If I can get that working right then i'd like one more feature added. Mod rods have 3 charges on them so after the 3rd use the rod is gone. When this happens i want my "Magi`kots Pants of Convergenace" to target me and cast another rod which will be placed in inventory slot 7 again.
Other then these little anoyances these work ok. I just don't know how to fix the little bugs and add the other feature i want. Any help is VERY appreciated! Thank you for taking the time to read this mess heh. I hope i've made it clear enough that someone will actually be able to help me on it lol. Thanks again!

