[crossfire] Spellcasting Swords & Python Troubles

Andreas Kirschbaum kirschbaum at myrealbox.com
Wed May 25 02:48:30 CDT 2005


Alex Schultz wrote:
>
     
      Andreas Kirschbaum wrote:
     
     >
     
      >- It uses CastAbility() but not CastSpell(). CastAbility() creates
     
     >
     
      >  the spell object from the archetype name. Therefore it uses default
     
     >
     
      >  values (level 0) for the spell.
     
     >
     
      >
     
     >
     
      >  I cannot use CastSpell() (which takes a spell object) because it
     
     >
     
      >  does not include a "caster" parameter. Any objections to add that
     
     >
     
      >  parameter so that both functions (CastAbility and CastSpell)
     
     >
     
      >  basically have the same parameter list? (Btw: no script in
     
     >
     
      >  /maps-bigworld/python currently calls that function.)
     
     >
     
      >
     
     >
     
      I don't have any objections, though for this script I prefer using a
     
     >
     
      approach that allows one to set the casting level to something other
     
     >
     
      than the default spell level.
     
     
That is the reason why I want to add the parameter "caster" to
CastSpell(): this function casts the spell from the passed in spell
object (including all customized parameters). But currently you cannot
use it for your script because it re-uses the parameter "who" (the rod)
as the "caster". This crashes the server because the rod is not on the
map but in an inventory.

    
    


More information about the crossfire mailing list