[crossfire] Spellcasting Swords & Python Troubles

Alex Schultz alex_sch at telus.net
Fri May 20 23:56:12 CDT 2005


Alex Schultz wrote:

>
     
      The python code for the spellcasting swords is now working perfectly 
     
     >
     
      now except for one issue. If the spell casted kills the monster before 
     
     >
     
      the monster gets hit by the sword normally, then the server crashes 
     
     >
     
      with this message:
     
     >
     
     
     >
     
      PYTHON - triggerEvent:: eventcode 2
     
     >
     
      PYTHON - HandleEvent:: got script file >/python/swordcast.py<
     
     >
     
      PYTHON - HandleEvent:: script loaded (/python/swordcast.py)!
     
     >
     
      Object (null) is freed but has speed.
     
     >
     
      Aborted
     
     >
     
     
     >
     
      Which would seem to be the case because the spell already killed the 
     
     >
     
      monster and it was freed from memory, and then when the sword tries to 
     
     >
     
      hit it, after the spell is cast it fails because the monster died so 
     
     >
     
      quickly. Cone spells to not appear to be effected (probably only 
     
     >
     
      damages after 1 tick or so), bolt spells like small lightning and 
     
     >
     
      steambolt are affected, and I haven't tested it yet, but finger of 
     
     >
     
      death  and bullet spells might be affected too. If anybody has any 
     
     >
     
      ideas on how to get around this, I would appreciate it.
     
     
Very sorry to be putting so many posts here in a row, but that previous 
analysis of mine of the the problem was incorrect. From further 
analysis, I found that it is happening somewhere inside this call 
"(PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP);" (server/attack.c 
line 693) but after the spell gets a chance to activate.

    
    


More information about the crossfire mailing list