Page 1 of 1
Doubts Parry
Posted: Tue Feb 28, 2017 10:46 am
by DerexScript
Could someone explain to me how the parry system works?
As I say to the shield that he must defend?
ParryAdvancement, what do you control using this hook?
Can someone show me an example?
Re: Doubts Parry
Posted: Tue Feb 28, 2017 7:33 pm
by guialtran
syshook.cfg
SystemHookScript parry.ecl
{
ParryAdvancement MyFuncParryAdvancement
}
//////////////////////////////////////////////////////////////////////////////////////
//exemple
//SystemHookScript :pkgName:MyFolder/NameMyecl.ecl
//{
// SyshookNames FuncName
//}
//OBS: The list of SyshookNames: CheckSkill, OpenSpellbook, GetBookPage, CombatAdvancement, //ParryAdvancement, Attack, Pushthrough, SpeechMul, HitMiss, OnCast, CanDecay, Ouch, CanDie, UnHide
/////////////////////////////////////////////////////////////////////////////////////////
parry.src
program parry()
print( "Using Parry Advancement..." );
return 1;
endprogram
exported function MyFuncParryAdvancement( attacker, weapon, defender, shield )
FuncHueHuebrbr( attacker, weapon, defender, shield );
endfunction
Re: Doubts Parry
Posted: Tue Feb 28, 2017 8:15 pm
by DerexScript
And what this "Func HueHuebrbr" function is doing ??
LoL
Re: Doubts Parry
Posted: Thu Mar 02, 2017 8:29 pm
by guialtran
You can choose what will happen.
Read setup.
And play the dice.
ParryAdvancement:
params: CharRef character, WeaponRef weapon, CharRef opponent, ItemRef opponent_shield. When called: A Character attacks another whom wields a shield, before parry success is determined. Used to override 'parry' skill advancement.
Re: Doubts Parry
Posted: Fri Mar 03, 2017 3:10 am
by RusseL
My parrying hook. Does only parrying skill points award.
Everything else is handled inside of attackhook
syshook.cfg
Code: Select all
SystemHookScript newparry.ecl
{
ParryAdvancement NewParryAdvancement
}
newparry.src
Code: Select all
use uo;
use os;
include ":attributes:attributes";
var npcdesccfg := readconfigfile("::npcdesc");
program newcombat()
Print( "[core] Using New parry advancement!" );
return 1;
endprogram
exported function NewParryAdvancement( attacker, weapon, defender, shield )
if (polcore().sysload > 85 ) return; endif
if (!defender.isa(POLCLASS_NPC) &&
((npcdesccfg[attacker.npctemplate])."alignment" == "evil") &&
(RandomInt (100) < gettrueeffectiveskill(defender, SKILLID_PARRY)/2))
AwardPoints( defender, SKILLID_PARRY, 40 );
endif
endfunction
Re: Doubts Parry
Posted: Wed Mar 08, 2017 1:10 pm
by DerexScript
Thank you, this example helped a lot!