PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
System Hooks

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
DevGIB



Joined: 06 Feb 2006
Posts: 93

PostPosted: Sat Jul 01, 2006 1:34 pm    Post subject: System Hooks Reply with quote

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

Author Message
tekproxy
Distro Developer


Joined: 06 Apr 2006
Posts: 350
Location: Nederland, Texas

PostPosted: Sat Jul 01, 2006 4:08 pm    Post subject: Reply with quote

There is no hook called "AttackHook". Change it to "Attack" and it should work.

Author Message
DevGIB



Joined: 06 Feb 2006
Posts: 93

PostPosted: Sat Jul 01, 2006 4:42 pm    Post subject: Reply with quote

it worked thanks teky

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty