ApplySection | ||
---|---|---|
Prototype | ApplySection( scriptSection ); | |
Purpose | Applies a DFN section to an item/character | |
Example of Usage | object.ApplySection( "orcishlord" ); |
SetLocation | ||
---|---|---|
Prototype | SetLocation( short targX, short targY, SCHAR targZ ); | |
Purpose | Moves the object to (targX, targY, targZ ) | |
Example of Usage | object.SetLocation( 1000, 1000, 0, 0 ); |
Teleport | ||
---|---|---|
Prototype | This method could eiter take 1,2,3 or 4 parameter: void Teleport( togoto ); void Teleport( x, y ); void Teleport( x, y, z ); void Teleport( x, y, z, world ); | |
Purpose | In the first Method you need a string, including x, y, z and Worldnumber. NOTE: Anyone exact informations about the string? If you don't give the z-coordinate/worldnumber the actual z-coordinate/worldnumber will be taken. Worldnumber 0=Trammel, Worldnumber 1= Felucca. | |
Example of Usage | myItem.Teleport( 4467, 1284, 5 ); //the object will be sent to moonglow |
Delete | ||
---|---|---|
Prototype | Delete(); | |
Purpose | Delete's the object | |
Example of Usage | object.Delete(); |
FirstItem | ||
---|---|---|
Prototype | void FirstItem(); | |
Purpose | Returns a handle to the first item in the container (or multi). If it's null, then there are no items. | |
Example of Usage | function onUseChecked( pUser, iUsed ) { var mItem; for( mItem = someCont.FirstItem(); !someCont.FinishedItems(); mItem = someCont.NextItem() ) { if( mItem != null ) { if( mItem.id == 0x0eed ) //Gold, gold, gold! pUser.SysMessage( "I'm carrying "+mItem.amount+" gold coins! I'm rich!" ); } } } |
NextItem | ||
---|---|---|
Prototype | void NextItem(); | |
Purpose | Returns the next item found in the container (or multi) | |
Example of Usage | SEE ABOVE FUNCTION |
FinishedItems | ||
---|---|---|
Prototype | bool FinishedItems(); | |
Purpose | Returns true if there are no more items left to look through in the container (or multi) | |
Example of Usage | SEE ABOVE FUNCTION |
TextMessage | ||
---|---|---|
Prototype | void TextMessage( message ); | |
Purpose | The function has 5 extra optional arguments (if including an optional parameter, make sure to also include the preceding argument): allHear (broadcast true/false) txtHue (colour of the text sent to the client) speechTarget (intended target of message. 0 = only visible to sender and receiver, 1 = visible to all players in range, 2 = visible to all NPCs and players in range, 3 = visible to all PCs everywhere + NPCs in range, 4 = visible to all PCs everywhere (broadcast), 5 = only visible to receiver) speechTargetSerial (serial of the receiver of the message, used if speechTarget is 0 or 5) speechFontType (type of font to use. Defaults to normal. 0 = bold, 1 = normal with shadow, 2 = bold with shadow, 3 = normal, 4 = gothic, 5 = italic, 6 = small and dark, 7 = colourful, 8 = runic (only works with CAPS), 9 = small and light) | |
Example of Usage | myChar.TextMessage( "Hello world!" ); |
DistanceTo | ||
---|---|---|
Prototype | unsigned short DistanceTo( object ); | |
Purpose | Returns the distance to the object. | |
Example of Usage | mObj.DistanceTo( ourObj ); |
GetTag | ||
---|---|---|
Prototype |
tagdata GetTag( "TagName" ); | |
Purpose | Returns the tag with the name TagName stored on Object. Note: The Tags you store on Objects are persistent, that means they're stored in the worldsave. The Tags could contain anything, but you should be careful with storing Character and Item objects in there, better store the Serial returned by GetSerial(...). | |
Example of Usage |
var TagValue = myObj.GetTag( "LastObject" ); |
GetNumTags | ||
---|---|---|
Prototype |
int GetNumTags(); | |
Purpose | Returns the number of Tags assigned to Object. Note: The Tags you store on Objects are persistent, that means they're stored in the worldsave. The Tags could contain anything, but you should be careful with storing Character and Item objects in there, better store the Serial returned by GetSerial(...). | |
Example of Usage |
var NumberofTags = mObj.GetNumTags(); |
SetTag | ||
---|---|---|
Prototype |
void SetTag( "TagName", "TagValue" ); | |
Purpose | Sets a new Value for the Tag called "TagName" on Object. To
retrieve this Value use GetTag. Note: If you want to store a value with decimals, you have to store it as a string. Note: The Tags you store on Objects are persistent, that means they're stored in the worldsave. The Tags could contain anything, but you should be careful with storing Character and Item objects in there, better store the Serial returned by GetSerial(...). | |
Example of Usage |
var TagValue = "ItWork!" |
StaticEffect | ||
---|---|---|
Prototype | void StaticEffect( Effect, speed, loop ); | |
Purpose | Does a static effect for a char. NOTE: Anyone got a list of the possible effects? | |
Example of Usage | MyChar.StaticEffect( 0x376A, 9, 6 ); |
Resist | ||
---|---|---|
Prototype | int Resist( type ); | |
Purpose | Gets and sets the resistance values of a char or item. Types are:
| |
Example of Usage | Set the Armor value of an item to 25: |
CanSee | ||
---|---|---|
Prototype | bool CanSee( object ); | |
Purpose | LineOfSight-checking; check if character/socket can see a specified object/target location | |
Example of Usage | if( !myChar.CanSee( targetChar )) return; if( myChar.CanSee( targetChar.x, targetChar.y, targetChar.z ) { //Do stuff! } |
©Copyright 2000-2001 WWW.UOX3.NET (Daniel Stratton/Matthew Randall)