User Tools

Site Tools


scripting-items

Scripting - Items data and function

Here can find some infomation about Enhanced Scripting function and data about Mobiles!

Find

Find item by Serial
Syntax Items.FindBySerial(int)
Description:
Find item and get item object by specific serial
Returns: Item
In Object: Items
Parameters: Int serialnumber
Exception: If item not found function return null!

Find item by ItemID
Syntax Items.FindByID(int, int, int)
Description:
Find item serial by specific item ID, color and Container. Can use -1 on color for no chose color, can use -1 on container for serach in all item in memory.
Returns: Item
In Object: Items
Parameters: Int itemid, int color, int serialcontainer
Exception: If item not found function return null!




Move

Move item
Syntax Items.Move(item, item, int or item, mobile, int or item, item, int, int, int)
Description:
Move specific item whit amount to specific destination allow also move item on mobile, if set amount 0 move all item stack, if ask to move amount major stack move all stack. Also can specify coords for move item in x y on container grid. All parameters can be int (for serial), or object item and mobile.
Returns: none
In Object: Items
Parameters: Item source, Item destination, Int amount or Item source, Mobile destination, Int amount or Item source, Item destination, Int amount, Int XGridPosition, Int YGridPosition

Move item on Ground
Syntax Items.MoveOnGround(item, int, int, int, int)
Description:
Move specific item whit amount to specific destination on ground by coords (X, Y, Z).
Returns: none
In Object: Items
Parameters: Item source, Int amount, Int XPosition, Int YPosition, Int ZPosition





Drop

Drop Item on ground
Syntax Items.DropItemGroundSelf(item, int)
Description:
Drop on character feet specific item whit amount, if set amount 0 move all item stack, if ask to drop amount major stack drop all stack
Returns: none
In Object: Items
Parameters: Item source, Int amount




Use

Use item
Syntax Items.UseItem(item or int)
Description:
Use (double click) specific item, can insert item object ot serial
Returns: none
In Object: Items
Parameters: Item itemtouse or Int serialitemtouse

Single Click
Syntax Items.SingleClick(item or int)
Description:
Perform a single click specific item, can insert item object ot serial
Returns: none
In Object: Items
Parameters: Item itemtoclick or Int serialitemtoclick

Use item By ItemID
Syntax Items.UseItemByID(int, int)
Description:
Use (double click) specific item owned by player by ItemID and Color (-1 all color).
Returns: none
In Object: Items
Parameters: int itemid, int color

Use item on Mobile
Syntax Items.UseItemOnMobile(int or item, int or mobile)
Description:
Use and autotarget whit 0xBF.2C packet a item on specific mobile (whit out iterruption or target lost).
Returns: none
In Object: Items
Parameters: int itemserial or item itemtouse, int mobielserial or mobile mobiletarget




Properties

Item WaitforProps
Syntax Items.WaitForProps(item or int, int)
Description:
Retrive Propriety of specific item.
Returns: none
In Object: Items
Parameters: Item itemtocheck, int serialitemtocheck, Int delay of props wait (ms)

Get Item Proprerties
Syntax Items.GetPropValue(int or item, string)
Description: Get value of item propriety!
Returns: Int
In Object: Items
Parameters: Int serialtoinspect or Item itemtoinspect, String PropName

Get Item Proprerties String
Syntax Items.GetPropStringByIndex(int or item, int)
Description: Get string name of prop by index, if no prop in selected index return empty.
Returns: String
In Object: Items
Parameters: Int serialtoinspect or Item itemtoinspect, Int PropIndex

Get Item Proprerties String List
Syntax Items.GetPropStringList(int or item)
Description: Get string list of all props name on specific item, if item no props list is empty.
Returns: List (String)
In Object: Items
Parameters: Int serialtoinspect or Item itemtoinspect





WaitForContent

Item container WaitforContents
Syntax Items.WaitForContents(item or int, int)
Description:
Force a item to open and automatic wait response for item inside
Returns: none
In Object: Items
Parameters: Item itemtouse, int serialitemtouse, Int delay of content wait (ms)




Message

Item Message
Syntax Items.Message(item or int, int, string)
Description:
Display a message over specific item whit color.
Returns: void
In Object: Items
Parameters: Int ItemSerial or Item SelectedItem, Int MessageColor, String Message




Filter Type

Enable Filter
Syntax Items.Filter.Enabled
Description:
Enable or not filter in ApplyFilter function.
Type: bool
In Object: Items

Serials Filter
Syntax Items.Filter.Serials
Description:
Set a list of serial to filter in ApplyFilter function.
Type: list(int)
In Object: Items

Graphics Filter
Syntax Items.Filter.Graphics
Description:
Set a list of Graphics to filter in ApplyFilter function.
Type: list(int)
In Object: Items

Color Filter
Syntax Items.Filter.Hues
Description:
Set a list of color to filter in ApplyFilter function.
Type: list(int)
In Object: Items

Name Filter
Syntax Items.Filter.Name
Description:
Set a name to filter in ApplyFilter function, blank no filter by name
Type: string
In Object: Items

Range Min Filter
Syntax Items.Filter.RangeMin
Description:
Set a value of minimum range in ApplyFilter function
Type: int
In Object: Items

Range Max Filter
Syntax Items.Filter.RangeMax
Description:
Set a value of maximum range in ApplyFilter function
Type: int
In Object: Items

Movable Filter
Syntax Items.Filter.Movable
Description:
Set search parameter movable for ApplyFilter function
Type: bool
In Object: Items

Layers Filter
Syntax Items.Filter.Layers
Description:
Set search list by layer for ApplyFilter function
Type: list
In Object: Items

Ground Filter
Syntax Items.Filter.OnGround
Description:
Set search parameter if item is on ground for ApplyFilter function. (1=Only OnGround, 0=Skipp OnGround, -1= Both
Type: Int
In Object: Items

Corpse Filter
Syntax Items.Filter.IsCorpse
Description:
Set search parameter if item is a corpse for ApplyFilter function. (1=Only Corpse, 0=Skipp Corpse, -1= Both
Type: Int
In Object: Items

Container Filter
Syntax Items.Filter.IsContainer
Description:
Set search parameter if item is a container for ApplyFilter function. (1=Only container, 0=Skipp Container, -1= Both).
Type: Int
In Object: Items

Ignore list Filter
Syntax Items.Filter.CheckIgnoreObject
Description:
Set search parameter True or false for remove IgnoreObject from result.
Type: bool
In Object: Items




ApplyFilter

Seach a item whit a filter
Syntax Items.ApplyFilter(filter)
Description:
Seatch a item by filter
Returns: list(item)
In Object: Items

Apply a selector on item list
Syntax Items.Select((List)Item, string)
Description:
Apply a selector on mobile list. Possible selector:
  • Random
  • Nearest
  • Farthest
  • Less
  • Most
  • Weakest
  • Strongest
Returns: Item
In Object: Items




Count

Count Type in Backpack
Syntax Items.BackpackCount(int, int)
Description:
Return amount of specific item (By ItemID) and color in backpack and subcontainer, Color -1 is WildCard for all color.
Returns: Int
In Object: Items
Parameters: Int itemid, Int color

Count Type in Container
Syntax Items.ContainerCount(int or item, int, int)
Description:
Return amount of specific item (By ItemID) and color in specific container, Color -1 is WildCard for all color.
Returns: Int
In Object: Items
Parameters: Int containerserial or Item container, Int itemid, Int color




Hide

Hide item
Syntax Items.Hide(int or item)
Description:
Hide a item.
Returns: void
In Object: Items
Parameters: Int serialnumber or int item




Context

Context Exist
Syntax Items.ContextExist(int or item, string)
Description:
Check on specific item if context menu by string exist. Return context id if exist, -1 if not present.
Returns: Int
In Object: Items
Parameters: Int itemserial or item itemtocheck, string contextstring

scripting-items.txt · Last modified: 2018/10/12 18:58 by wikiadmin