AddSimpleAction

Pilus edited this page Aug 11, 2015 · 1 revision
Clone this wiki locally

Syntax:

.AddSimpleAction()

Arguments:

.AddSimpleAction(actionType,...) has arguments depending on the first argument (actionType) passed.

.AddSimpleAction("script", code, delay)

.AddSimpleAction("buff", buffName, buffDetails, buffIcon, untilCanceled, filter, buffType, buffDuration, cancelable, stackable, count, delay, range, alwaysCastOnSelf)

.AddSimpleAction("equip_item", name, delay)

.AddSimpleAction("expression", expression_type, text, delay)

.AddSimpleAction("random_expression", allow_same, expressionType1, expressionText1, expressionType2, expressionText2, etc...)

.AddSimpleAction("bag", size, texture)

.AddSimpleAction("book", title, pages, material, font, normalSize, h1Size, h2Size)

.AddSimpleAction("sound", path, delay, range)

.AddSimpleAction("produce_item", guid, amount, lootText, delay)

.AddSimpleAction("message", text, color, outputType, delay) note: color is a string ('red' etc)

.AddSimpleAction("screen_effect", fadeIn, fadeOut, duration, color, delay) note: color is a color table ({r=0,g=0,b=1})

.AddSimpleAction("remove_buff", name, filter, amount, delay)

.AddSimpleAction("consume_item", guid, amount, delay)

Returns:

Returns nothing.

Example:

local item = GHI_CreateItem();

item.SetName("Test item");

item.AddSimpleAction("script","print('test');");

item.Save()