UOX3 Script Engine

API and Event handling

Magic Related Functions

CastSpell
Prototype
CastSpell( character, spellNum );
PurposeCauses character to cast spellNum. Character can be an NPC or PC. spellNum can be any valid spellNum (0=>63).
Example of Usage
CastSpell( pTalking, 32 );
The player talking casts the recall spell

 

UseReagant
Prototype
bool UseReagant( player, reagID, amount );
PurposeDeletes reagant based on reagID in amount from player. Returns true if the player has enough
reagID values
0 == sulfurous ash
1 == mandrake
2 == nightshade
3 == blood moss
4 == spider's silk
5 == ginseng
6 == garlic
7 == black pearl
Example of Usage
var bBool = UseReagant( player, 0, 1 );

 

UseReagants
Prototype
bool UseReagants( player, ash, drake, shade, moss, silk, ginseng, garlic, pearl );
PurposeUses up a number of reagants (0 is valid for each reag) and returns true if the player has enough
Example of Usage
var bBool = UseReagants( player, 1, 1, 1, 1, 1, 1, 1, 1 );

 

HasSpell
Prototype
bool HasSpell( player, spellNum );
PurposeScans through player's contents to see if they have spellNum in the first spellbook encountered
Example of Usage
var bHasSpell = HasSpell( player, 0 );

 

AddSpell
Prototype
AddSpell( player, spellNum );
PurposeAdds spell spellNum to player's first spellbook encountered
Example of Usage
AddSpell( player, 0 );

 

RemoveSpell
Prototype
RemoveSpell( player, spellNum );
PurposeRemoves spellNum from player's spellbook
Example of Usage
RemoveSpell( pTalking, 0 );

 

SpellFail
Prototype
SpellFail( socket, player );
PurposeMakes the sounds and noises associated with spell failure for player
Example of Usage
SpellFail( sock, player );

 

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