# UOX3 Script Engine

### API and Event handling

### Effect Related Functions

StaticEffect
Prototype |
    void StaticEffect( short Effect, UCHAR speed, UCHAR loop ); //Chars
    void StaticEffect( short Effect, UCHAR speed, UCHAR loop, UCHAR explode ); //Items
Purpose | Does a static effect for a char (first prototype) or for an item (second prototype)
Example of Usage |
    srcChar.StaticEffect( 0x376A, 9, 0 );
    srcItem.DoStaticEffect( 0x36B0, 9, 0, false );

DoMovingEffect
Prototype |
    DoMovingEffect( srcObject, trgObject, effect, speed, loop, explode, [hue], [renderMode] );
    DoMovingEffect( srcObject, targX, targY, targZ, effect, speed, loop, explode, [hue], [renderMode] );
Purpose | Does 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 = how to render the effect. Available options: 0 - normal, 1 - transparent, 2 - additive, 3 - dark colors transparent, 4 - bright colors transparent, 5 - semi transparent, 6 - subtractive/negative colors, 7 - inverted colors? 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 onUseChecked( pUser, iUsed )
    {
    	DoMovingEffect( pUser, pUser, 0x36D5, 0x07, 0x00, true, 0x1EC );
    }

DoTempEffect
Prototype |
    DoTempEffect( iType, src, trg, targNum, more1, more2, more3, [itemPtr] );
Purpose | Does 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)

SoundEffect
Prototype |
    void SoundEffect( soundID, bAllHear );
Purpose | Plays a sound effect. 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 object it plays for will hear it..
Example of Usage |
    myChar.SoundEffect( 568, FALSE );
    Plays a miss target sound based on person talking

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