Implementation of the SkillCheck
Moderator: POL Developer
Implementation of the SkillCheck
in the official distro where in which script is implemented? Is it possible to create a custom script? What would the procedure look like?
Re: Implementation of the SkillCheck
https://docs.polserver.com/pol100/fullf ... CheckSkill
https://docs.polserver.com/pol100/scrip ... hookScript
file - > syshook.cfg
SystemHookScript zhpAttack.ecl
{
Attack ZHPAttack
}
SystemHookScript shilcombat.ecl
{
CombatAdvancement ShilCombatAdvancement
}
SystemHookScript parry.ecl
{
ParryAdvancement ParryAdvancement
}
SystemHookScript shilhook.ecl
{
CheckSkill ShilCheckSkill
}
file -> shilhook.src
program shilhook()
print( "shilhook start hi!" );
return 1;
endprogram
exported function ShilCheckSkill( who, skillid, difficulty, points )
//You have to do everything.
return 1;
// the core does the work for you, calls the skill advance script to the attacker, parry advance to the player who was attacked, and hit script on the target
return 0;
endfunction
file -> parry.src
program parry()
print( "parry start hi!" );
return 1;
endprogram
exported function ParryAdvancement( attacker, weapon, defender, shield )
....
endfunction
file -> zhpAttack.src
program zhaAttack()
print( "zhaAttack start hi!" );
return 1;
endprogram
exported function ZHPAttack( attacker, defender )
//can not attack
return 1;
//can attack
return 0;
endfunction
file -> shilcombat.src
program shilcombat()
print( "shilcombat start hi!" );
return 1;
endprogram
exported function ShilCombatAdvancement( attacker, weapon, defender )
...
endfunction
https://docs.polserver.com/pol100/scrip ... hookScript
file - > syshook.cfg
SystemHookScript zhpAttack.ecl
{
Attack ZHPAttack
}
SystemHookScript shilcombat.ecl
{
CombatAdvancement ShilCombatAdvancement
}
SystemHookScript parry.ecl
{
ParryAdvancement ParryAdvancement
}
SystemHookScript shilhook.ecl
{
CheckSkill ShilCheckSkill
}
file -> shilhook.src
program shilhook()
print( "shilhook start hi!" );
return 1;
endprogram
exported function ShilCheckSkill( who, skillid, difficulty, points )
//You have to do everything.
return 1;
// the core does the work for you, calls the skill advance script to the attacker, parry advance to the player who was attacked, and hit script on the target
return 0;
endfunction
file -> parry.src
program parry()
print( "parry start hi!" );
return 1;
endprogram
exported function ParryAdvancement( attacker, weapon, defender, shield )
....
endfunction
file -> zhpAttack.src
program zhaAttack()
print( "zhaAttack start hi!" );
return 1;
endprogram
exported function ZHPAttack( attacker, defender )
//can not attack
return 1;
//can attack

return 0;
endfunction
file -> shilcombat.src
program shilcombat()
print( "shilcombat start hi!" );
return 1;
endprogram
exported function ShilCombatAdvancement( attacker, weapon, defender )
...
endfunction