Doubts Parry

Open discussion forum. For topics that do not fit anywhere else.

Moderator: POL Developer

Post Reply
DerexScript
New User
Posts: 24
Joined: Thu Jan 12, 2017 7:19 am

Doubts Parry

Post 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?
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: Doubts Parry

Post 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
DerexScript
New User
Posts: 24
Joined: Thu Jan 12, 2017 7:19 am

Re: Doubts Parry

Post by DerexScript »

And what this "Func HueHuebrbr" function is doing ??
LoL
guialtran
Grandmaster Poster
Posts: 120
Joined: Wed Jul 30, 2008 12:42 pm

Re: Doubts Parry

Post 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.
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: Doubts Parry

Post 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
DerexScript
New User
Posts: 24
Joined: Thu Jan 12, 2017 7:19 am

Re: Doubts Parry

Post by DerexScript »

Thank you, this example helped a lot!
Post Reply