UOX3 Script Engine

API and Event handling

Attack Related Functions

ApplyDefenseModifiers
Prototype
ApplyDefenseModifiers( dmgType, pAtt, pDef, skillNum, hitLoc, baseDmg, armorDmg );
Purpose Returns a netDmg value after applying defense modifiers to baseDmg, with a boolean at the end deciding whether or not armor gets damaged.
Example of Usage
var netDmg = ApplyDefenseModifiers( dmgType, pAtt, pDef, fightSkill, hitLoc, baseDmg, true );

ApplyDamageBonuses
Prototype
ApplyDamageBonuses( dmgType, pAttacker, pDefender, fightSkill, hitLoc, baseDmg );
Purpose Returns a newDmg value after applying combat bonus modifiers to baseDmg
Example of Usage
var newDmg = ApplyDamageBonuses( dmgType, pAttacker, pDefender, fightSkill, hitLoc, baseDmg );

AttackTarget
Prototype
AttackTarget( pChar );
PurposeCauses pChar to attack it's current target
Example of Usage
SetTarget( pTalking, pTalkingTo );

AttackTarget( pTalking );

 

Attack
Prototype
Attack( attacker, target );
PurposeCauses attacker to attack target. target becomes the target of attacker.
Example of Usage
Attack( pTalking, pTalkingTo );

 

FindNearestTarget
Prototype
CHARACTER FindNearestTarget( pChar );
PurposeFinds the nearest target to pChar (not including pChar).
Example of Usage
Attack( pChar, FindNearestTarget( pChar ) );

 

FindStrongestTarget
Prototype
CHARACTER FindStrongestTarget( pChar );
PurposeFinds the strongest target near pChar (not including pChar).
Example of Usage
Attack( pChar, FindStrongestTarget( pChar ) );

 

FindWeakestTarget
Prototype
CHARACTER FindWeakestTarget( pChar );
PurposeFinds the weakest target near pChar (not including pChar).
Example of Usage
Attack( pChar, FindWeakestTarget( pChar ) );

 

FindFirstTarget
Prototype
CHARACTER FindFirstTarget( pChar );
PurposeFinds the first target near pChar (not including pChar).
Example of Usage
Attack( pChar, FindFirstTarget( pChar ) );

 

FindLastTarget
Prototype
CHARACTER FindLastTarget( pChar );
PurposeFinds the last target near pChar (not including pChar).
Example of Usage
Attack( pChar, FindLastTarget( pChar ) );

 

FindSmartestTarget
Prototype
CHARACTER FindSmartestTarget( pChar );
PurposeFinds the smartest target near pChar (not including pChar).
Example of Usage
Attack( pChar, FindSmartestTarget( pChar ) );

 

FindDumbestTarget
Prototype
CHARACTER FindDumbestTarget( pChar );
PurposeFinds the dumbest target near pChar (not including pChar).
Example of Usage
Attack( pChar, FindDumbestTarget( pChar ) );

 

FindQuickestTarget
Prototype
CHARACTER FindQuickestTarget( pChar );
PurposeFinds the character with highest dexterity near pChar (not including pChar).
Example of Usage
Attack( pChar, FindQuickestTarget( pChar ) );

 

FindSlowestTarget
Prototype
CHARACTER FindSlowestTarget( pChar );
PurposeFinds the slowest character near pChar (not including pChar).
Example of Usage
Attack( pChar, FindSlowestTarget( pChar ) );

 

©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)