It is currently Fri Dec 05, 2008 2:25 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: System Hooks
PostPosted: Sat Jul 01, 2006 9:34 am 
Offline

Joined: Mon Feb 06, 2006 6:12 am
Posts: 93
Ok on our shard we are running a zulu type setup on pol095... we have classes but because of the way the combat system is designed in the core it calcs tactics into the archery how ever the ranger classe doesnt have tactics so it makes it a bit of a problem for us... we have been given a hook from another shard that should help us how ever it doesnt start properly i know why but im not sure how to fix it... so ill explain

Error On Start Up
Code:
Unknown SystemHook AttackHook

This is because "AttackHook" Isnt a function

this is from the doco
Code:
Pseudocode for the core combat system.

if( attackhook )
  call hook
  if hook returned 1, exit
endif


This is our system hook
Code:
SystemHookScript Attack.ecl
{
   AttackHook   Attackfunc
}


And this is the actual function that hook calls
Code:
exported function Attackfunc( attacker, defender )
   if (attacker == defender)
      return 1;
   endif
   
   var weaponType := cfg[attacker.weapon.objtype];
   
   
   if (attacker.npctemplate) //special attack styles.. currently in for monsters with anim probs
      if (GetObjProperty(attacker, "SpecialAttack"))
         DoSpecialMonsterAttack(attacker, defender, weaponType, GetObjProperty(attacker, "SpecialAttack"));
         return 1;
      endif
   endif   
   

   if (weaponType.Attribute=="Archery")
      ArcheryAttack( attacker, defender );
      return 1;
   endif
   
   return 0;   
endfunction



Any help you can offer would be greatly appreciated! thanks GIB


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 01, 2006 12:08 pm 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
There is no hook called "AttackHook". Change it to "Attack" and it should work.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 01, 2006 12:42 pm 
Offline

Joined: Mon Feb 06, 2006 6:12 am
Posts: 93
it worked thanks teky


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl