combat scripts

Forkedman

Active Member
I've been slowly tweaking bits and pieces of script as my group levels up and I've started poking my head around the class files and I've got a few questions if nobody minds.


Action[4]:Set[Fever] - Is called by the Combat Routine
MobHealth[4,1]:Set[1]
MobHealth[4,2]:Set[100]

Unsure about this - guessing it determines if it should be cast based on the mobs health?

Power[4,1]:Set[1]
Power[4,2]:Set[100]

Amount of power the caster has?

SpellRange[4,1]:Set[82]
SpellRange[4,2]:Set[382]

Spell to cast and casting order in that action?


These are then used by the combat routine to run the bot through combat based on the variables in the routine?


So with the following from the wiki:

case Nukes
call CastSpellRange ${SpellRange[${xAction},1]} ${SpellRange[${xAction},2]} 0 0 ${KillTarget}
break



CastSpellRange ${SpellRange[${xAction},1]}

Calls Action 1 in the Combat_Init?

I'm sure I've missed what would be some pretty obvious things but I'm pretty new to programing and it's all still pretty confusing. So any answers or advice would be great.
 

Pygar

EQ2Bot Specialist
I've been slowly tweaking bits and pieces of script as my group levels up and I've started poking my head around the class files and I've got a few questions if nobody minds.


Action[4]:Set[Fever] - Is called by the Combat Routine
MobHealth[4,1]:Set[1]
MobHealth[4,2]:Set[100]

Unsure about this - guessing it determines if it should be cast based on the mobs health?

Power[4,1]:Set[1]
Power[4,2]:Set[100]

Amount of power the caster has?

SpellRange[4,1]:Set[82]
SpellRange[4,2]:Set[382]

Spell to cast and casting order in that action?


These are then used by the combat routine to run the bot through combat based on the variables in the routine?


So with the following from the wiki:

case Nukes
call CastSpellRange ${SpellRange[${xAction},1]} ${SpellRange[${xAction},2]} 0 0 ${KillTarget}
break



CastSpellRange ${SpellRange[${xAction},1]}

Calls Action 1 in the Combat_Init?

I'm sure I've missed what would be some pretty obvious things but I'm pretty new to programing and it's all still pretty confusing. So any answers or advice would be great.
You missed on the last part, It casts the spell associated with whatever itteration of the combat loop you are currently on. So they cast Action[1], then 2, then 3, etc.

The giant problem in your example posted is the SpellRange 1 and 2 values. As its designed to cast all spells between those to values, so in your example it is going to try to cast all spells between 82 and 382, and I wager thats a ton of spells.

I'm hoping the case Fever that corresponds to that combat_init definition is casting those two abilities with seperate castspellrange statements, or your results aren't going to be as you might predict.
 
Top Bottom