[crossfire] Spellcasting Swords & Python Troubles

Nicolas Weeger nicolas.weeger at laposte.net
Thu May 19 16:17:33 CDT 2005


>
     
      Hi,
     
     
Hi.

Nice idea to have spells :)
Imagine a sword casting a fireball, something like that :)

>
     
      Second issue, which is somewhat more trickery. For some reason, the 
     
     >
     
      testing server keeps segfaulting when the script casts the spell with 
     
     >
     
      CastAbility.  Anybody have an idea of whats happening or how to find 
     
     >
     
      that out? I'm attaching the small script here.
     
     
After checking, the issue is that your rod doesn't have the "map" 
field correctly set. So when cast_spell calls get_map_flags 
(spell_util.c:1041), op being said rod, its map is NULL, which is a 
Bad Thing (tm).
The solution seems to do:
  	CFPython.CastAbility(activator, spellrod, spellname, direction, "")

ie swap activator & spellrod.
That seems to work, as far as i can tell (even though i wonder why i 
get a lightning when the spell is chaos spray...)

>
     
            Thanks,
     
     >
     
                   Alex Schultz (aka Rednaxela)
     
     
Hope this helps.
Ryo

    
    


More information about the crossfire mailing list