UOX3 Script Engine

API and Event handling

Effect Related Functions

DoStaticEffect
Prototype
DoStaticEffect( int targThing, short Effect, UCHAR speed, UCHAR loop, UCHAR targType );
DoStaticEffect( int targThing, short Effect, UCHAR speed, UCHAR loop, UCHAR targType, UCHAR explode );
PurposeDoes a static effect for a char (first prototype) or for an item (second prototype)
When targType == 0 it's a char, when == 1 it's an item
Example of Usage
DoStaticEffect( srcChar, 0x376A, 9, 6, 0 );
DoStaticEffect( srcItem, 0x36B0, 0, 9, 1, 0 );

 

DoMovingEffect
Prototype
DoMovingEffect( srcObject, trgObject, effect, speed, loop, explode, [hue], [renderMode] );
DoMovingEffect( srcObject, targX, targY, targZ, effect, speed, loop, explode, [hue], [renderMode] );
PurposeDoes a moving effect (eg fireball) from srcObject to trgObject, or srcObject to targ location
effect is the ID of the moving effect
explode == 0 no explosion
explode == 1 explodes
hue = the colour of the effect
rendermode = unknown, leave at 0 or leave out
hue and renderMode are OPTIONAL, none, one or both can be left out, but if setting renderMode, hue MUST be specified
Example of Usage
function onUse( pUser, iUsed )  
{
	DoMovingEffect( pUser, pUser, 0x36D5, 0x07, 0x00, true, 0x1EC ); 
}

 

DoTempEffect
Prototype
DoTempEffect( iType, src, trg, targNum, more1, more2, more3, [itemPtr] );
PurposeDoes a temporary effect (things like protection, night sight, and what not) frm src to trg. If iType = 0, then it's a character, otherwise it's an item.
Example of Usage
DoTempEffect( 0, pTalking, pTalkingTo, 3, GetSkill( pTalking, 0 ) / 100, 0, 0 );
Does a clumsy on who the person is talking to, intensity based upon skill 0 of talking player (Alchemy)

 

DoSoundEffect
Prototype
DoSoundEffect( iObject, iType, soundID, bAllHear );
PurposePlays a sound, from iObject, which is different based on iType. If iType == 0, iObject is a character. If iType == 1, iObject is an item. If iType == 2, iObject is a socket. SoundID is the full ID of the sound to play. If bAllHear is TRUE, then everyone nearby hears it. If it's false, then only the thing as represented by iObject hears it.
Example of Usage
DoSoundEffect( pTalking, 0, 568, FALSE );
Plays a miss target sound based on person talking

 

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