Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Pre-Combat Buffing Script Question

rion26rion26 Member Posts: 25
Hi there, I have made a little script that allows me to cast some buffs on my Mage so I don´t have to do it manually. As it works atm, she will cast one spell each round. For example:

IF
ActionListEmpty()
HaveSpell(WIZARD_PROTECTION_FROM_EVIL)
HaveSpell(WIZARD_STONE_SKIN)

THEN
RESPONSE #100
Spell(Myself,WIZARD_STONE_SKIN)
Spell(Myself,WIZARD_PROTECTION_FROM_EVIL)
END

Now I would like her to insta-cast all the buffs. I have tried the FORCESPELL command, wich works, but keeps the Spells that she casts all memorized. Is there a way to insta-cast the spells and remove them from the spellbook, so you can´t cast them ad infinitum without ever resting?

Thanks for your help!

Comments

  • subtledoctorsubtledoctor Member Posts: 11,466
    I'm not great with scripting, but isn't there a RemoveSpell command?

    rion26
  • UnpersonUnperson Member Posts: 29
    Yeah, I pretty much suck at scripting, but I guess you could use ReallyForceSpell for insta-casting and RemoveSpell to spend the spell.

    subtledoctorrion26
  • rapsam2003rapsam2003 Member Posts: 1,636
    edited April 2016
    rion26 said:

    I have tried the FORCESPELL command, wich works, but keeps the Spells that she casts all memorized.

    From IESDP:
    113 ForceSpell(O:Target,I:Spell*Spell)
    113 ForceSpellRES(S:RES*, O:Target)
    113 ForceSpellRES(S:RES*, O:Target,I:CastingLevel)
    This action causes the active creature to cast the specified spell at the target object. The spell need not currently be memorised by the caster, and will not be interrupted while being cast. The caster must meet the level requirements of the spell. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. This action may not be reliable.
    In other words, the ForceSpell action doesn't remove the spell from the caster's memorization because it doesn't care if the spell is memorized or not.

    rion26 said:

    Is there a way to insta-cast the spells and remove them from the spellbook, so you can´t cast them ad infinitum without ever resting?

    Why can't you simply use the Spell or SpellRES action? Again from IESDP:
    31 Spell(O:Target*,I:Spell*Spell)
    31 SpellRES(S:RES*, O:Target*)
    This action causes the active creature to cast the specified spell at the target object. The spell must currently be memorised by the caster, and may be interrupted while being cast. The caster must meet the level requirements of the spell. For the RES version of the action, the spell name can not consist of only numbers, should be written in upper case and should be no more than 7 characters long. This action may not be reliable.
    So, using this action would allow you to only cast memorized spells. Said spells would then be "used" (no longer memorized).

    rion26
  • rion26rion26 Member Posts: 25
    Works like a charm. Thanks Guys!

    rapsam2003
Sign In or Register to comment.