System Hooks
Posted: Sat Jul 01, 2006 9:34 am
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
This is because "AttackHook" Isnt a function
this is from the doco
This is our system hook
And this is the actual function that hook calls
Any help you can offer would be greatly appreciated! thanks GIB
Error On Start Up
Code: Select all
Unknown SystemHook AttackHookthis is from the doco
Code: Select all
Pseudocode for the core combat system.
if( attackhook )
call hook
if hook returned 1, exit
endifCode: Select all
SystemHookScript Attack.ecl
{
AttackHook Attackfunc
}Code: Select all
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