Odpowiedz 
RonClient LUA functions / Funkcje LUA RonClient'a
09-10-2012, 02:08 PM (Ten post był ostatnio modyfikowany: 13-12-2012 12:58 PM przez Nakeib.)
Post: #1
RonClient LUA functions / Funkcje LUA RonClient'a
functionName(parameters) : return

Main functions:
sleep(miliseconds)
run(scriptName, functionName, arg1, arg2, ..., threaded, localDir)
lock(lockName)
unlock(lockName)
bitTest(value, bitNumber) : state
setFlag(flag)
clearFlag(flag)
hasFlag(flag) : state
new(type) : valuePtr
delete(valuePtr)
setDynamic(valuePtr, valueStr)
getDynamic(valuePtr, precision = 6) : valueStr
setGlobal(key, value)
getGlobal(key) : valueStr

Time functions:
getTime() : timestamp

INILoader functions:
newINILoader() : iniLoaderPtr
deleteINILoader(iniLoaderPtr)
iniOpenFile(iniLoaderPtr, path)
iniOpenString(iniLoaderPtr, str)
iniSaveFile(iniLoaderPtr, path)
iniGetValue(iniLoaderPtr, varname, index = 0) : valueStr
iniGetValue(iniLoaderPtr, varnum, index = 0) : valueStr
iniSetValue(iniLoaderPtr, varname, valueStr, index = 0)
iniGetSize(iniLoaderPtr) : size
iniGetVarName(iniLoaderPtr, varnum) : varname

Mouse functions:
setMouseHolder(mousePtr, posX, posY, type, holderPtr = 0, variablePtr = 0, windowPtr = 0)
getMouseHolder(mousePtr) : holder{posX, posY, type, holderPtr, variablePtr, windowPtr}
getMouseButtons(mousePtr) : buttons
getMousePosition(mousePtr) : position{x, y}

Keyboard functions:
getKeyState(keyboardPtr, key) : state
getCapsLockState(keyboardPtr) : state
getNumLockState(keyboardPtr) : state
getScrollLockState(keyboardPtr) : state
getKeyChar(keyboardPtr) : keyChar
getOldKeyChar(keyboardPtr) : keyChar

Window functions:
getWindowTemplate(templateName) : templatePtr
getWindowTemplateFont(templatePtr) : fontPtr
createWindow(x, y, templatePtr) : windowPtr
createWindow(x, y, templateName) : windowPtr
findWindow(wndType) : windowPtr
openWindow(wndType) : windowPtr
getWindowByTitle(title, wndType = WND_ALL) : windowPtr
addWindow(windowPtr)
killWindow(windowPtr)
closeWindow(windowPtr)
moveWindowOnTop(windowPtr)
isWindowOnList(windowPtr)
setWindowParam(windowPtr, 'title', title)
setWindowParam(windowPtr, 'position', x, y, ignoreConnections = 0)
setWindowParam(windowPtr, 'size', width, height, ignoreConnections = 0)
setWindowParam(windowPtr, 'type', type)
setWindowParam(windowPtr, 'executeaction', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowParam(windowPtr, 'activateaction', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowParam(windowPtr, 'closeaction', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowParam(windowPtr, 'minimizeaction', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowParam(windowPtr, 'intsize', width, height, adjust = 0)
setWindowParam(windowPtr, 'minsize', value)
setWindowParam(windowPtr, 'maxsize', value)
setWindowParam(windowPtr, 'closeability', state)
setWindowParam(windowPtr, 'minimizeability', state)
setWindowParam(windowPtr, 'hideability', state)
setWindowParam(windowPtr, 'alwaysactive', state)
setWindowParam(windowPtr, 'template', templatePtr)
getWindowParam(windowPtr, 'title') : titleStr
getWindowParam(windowPtr, 'position') : position{x, y}
getWindowParam(windowPtr, 'size') : size{x, y}
getWindowParam(windowPtr, 'template') : templatePtr
getWindowParam(windowPtr, 'container') : containerPtr
createWindowElement('container', align, x, y, width, hegiht, backgrounded, bordered, templatePtr) : elementPtr
createWindowElement('text', align, x, y, width, templatePtr) : elementPtr
createWindowElement('link', align, x, y, width, mousePtr, templatePtr) : elementPtr
createWindowElement('image', align, x, y, width, height, imagePtr, templatePtr) : elementPtr
createWindowElement('button', align, buttonType, x, y, width, height, templatePtr) : elementPtr
createWindowElement('textarea', align, x, y, width, hegiht, editable, multilined, templatePtr) : elementPtr
createWindowElement('memo', align, x, y, width, height, templatePtr) : elementPtr
createWindowElement('tablememo', align, x, y, width, height, templatePtr) : elementPtr
createWindowElement('list', align, x, y, width, height, templatePtr) : elementPtr
createWindowElement('timer', align, x, y, width, height, templatePtr) : elementPtr
createWindowElement('tab', align, x, y, width, height, backgrounded, bordered, templatePtr) : elementPtr
createWindowElement('itemcontainer', align, x, y, width, height, gameContainerPtr, templatePtr) : elementPtr
createWindowElement('checkbox', align, x, y, width, templatePtr) : elementPtr
createWindowElement('scrollbar', align, x, y, width, templatePtr) : elementPtr
createWindowElement('skillbar', align, x, y, width, height, valuePtr, templatePtr) : elementPtr
createWindowElement('colormap', align, x, y, width, height, templatePtr) : elementPtr
createWindowElement('cooldown', align, x, y, width, height, templatePtr) : elementPtr
createWindowElement('select', align, x, y, width, height, mousePtr, templatePtr) : elementPtr
getWindowElement(containerPtr, elementNumber = 0) : elementPtr
addWindowElement(containerPtr, elementPtr)
removeWindowElement(containerPtr, elementPtr)
deleteWindowElement(elementPtr)
clearWindowElements(containerPtr)
setWindowElementParam(elementPtr, 'position', x, y)
setWindowElementParam(elementPtr, 'size', width, height)
setWindowElementParam(elementPtr, 'locks', lwidth, lheight)
setWindowElementParam(elementPtr, 'enabled', state)
setWindowElementParam(elementPtr, 'shine', shine)
setWindowElementParam(elementPtr, 'comment', commentStr)
setWindowElementParam(elementPtr, 'action', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowElementParam(elementPtr, 'actiondbl', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowElementParam(elementPtr, 'actionlook', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowElementParam(elementPtr, 'actionuse', scriptName, functionName, arg1, arg2, ..., localDir, sameScript)
setWindowElementParam(elementPtr, 'intsize', width, height, adjust = 0)
setWindowElementParam(elementPtr, 'textalign', align)
setWindowElementParam(elementPtr, 'text', textStr)
setWindowElementParam(elementPtr, 'color', colorIndex) //Textarea element only
setWindowElementParam(elementPtr, 'color', red, green, blue, alpha = 1.0)
setWindowElementParam(elementPtr, 'colorin', red, green, blue, alpha = 1.0)
setWindowElementParam(elementPtr, 'colorout', red, green, blue, alpha = 1.0)
setWindowElementParam(elementPtr, 'background', state)
setWindowElementParam(elementPtr, 'background', imagePtr) //Cooldown element only
setWindowElementParam(elementPtr, 'border', state)
setWindowElementParam(elementPtr, 'fontsize', size)
setWindowElementParam(elementPtr, 'precision', precision)
setWindowElementParam(elementPtr, 'scroll', state)
setWindowElementParam(elementPtr, 'scrollalwaysvisible', horizontalState, verticalState)
setWindowElementParam(elementPtr, 'image', imagePtr)
setWindowElementParam(elementPtr, 'hotkey', hotkeyPtr)
setWindowElementParam(elementPtr, 'slot', slot)
setWindowElementParam(elementPtr, 'pressed', state)
setWindowElementParam(elementPtr, 'inverse', state)
setWindowElementParam(elementPtr, 'offset', offset)
setWindowElementParam(elementPtr, 'maxlength', maxlength)
setWindowElementParam(elementPtr, 'hidden', state)
setWindowElementParam(elementPtr, 'active', state)
setWindowElementParam(elementPtr, 'option', option, executeOnSet)
setWindowElementParam(elementPtr, 'option', option)
setWindowElementParam(elementPtr, 'rowheight', height)
setWindowElementParam(elementPtr, 'columnwidth', columnNum, width, percent = 0)
setWindowElementParam(elementPtr, 'columnname', columnNum, name)
setWindowElementParam(elementPtr, 'timestop', timestamp)
setWindowElementParam(elementPtr, 'timeinterval', miliseconds)
setWindowElementParam(elementPtr, 'state', state)
setWindowElementParam(elementPtr, 'valueptr', valuePtr)
setWindowElementParam(elementPtr, 'minvalue', minvalue)
setWindowElementParam(elementPtr, 'maxvalue', maxvalue)
setWindowElementParam(elementPtr, 'tabsheight', height)
setWindowElementParam(elementPtr, 'template', templatePtr)
setWindowElementParam(elementPtr, 'spellid', spellID)
setWindowElementParam(elementPtr, 'groupid', groupID)
setWindowElementParam(elementPtr, 'cast', castTime, period)
getWindowElementParam(elementPtr, 'position') : position{x, y}
getWindowElementParam(elementPtr, 'position', 'abs') : position{x, y} //Absolute position on screen
getWindowElementParam(elementPtr, 'size') : size{x, y}
getWindowElementParam(elementPtr, 'shine') : shine
getWindowElementParam(elementPtr, 'comment') : commentStr
getWindowElementParam(elementPtr, 'intsize') : intsize{x, y}
getWindowElementParam(elementPtr, 'scrolloffset') : scrolloffset{x, y}
getWindowElementParam(elementPtr, 'scrolloffset') : scrolloffset
getWindowElementParam(elementPtr, 'text') : textStr
getWindowElementParam(elementPtr, 'pressed') : state
getWindowElementParam(elementPtr, 'inverse') : state
getWindowElementParam(elementPtr, 'option') : option
getWindowElementParam(elementPtr, 'optionssize') : optionssize
getWindowElementParam(elementPtr, 'element') : elementStr
getWindowElementParam(elementPtr, 'tabssize') : tabssize
getWindowElementParam(elementPtr, 'activetab') : activetab
getWindowElementParam(elementPtr, 'slot') : slot
getWindowElementParam(elementPtr, 'container') : gameContainerPtr
getWindowElementParam(elementPtr, 'state') : state
getWindowElementParam(elementPtr, 'valueptr') : valuePtrType
getWindowElementParam(elementPtr, 'period') : period
getWindowElementParam(elementPtr, 'template') : templatePtr
addMemoElement(elementPtr, elementStr, active = 1)
addTableMemoRow(elementPtr)
addTableMemoColumn(elementPtr, columnElementPtr)
addListElement(elementPtr, elementStr, active = 1)
timerRun(elementPtr)
timerStop(elementPtr)
getGUIManager() : guiManagerPtr

GUI management functions:
GUIAddWindow(guiManagerPtr, windowPtr)
GUIRemoveWindow(guiManagerPtr, windowPtr)
GUIGetWindows(guiManagerPtr) : windows{windowPtr, ...}
GUIClearWindows(guiManagerPtr)
GUIContainWindow(guiManagerPtr, windowPtr)
GUIAddConnection(guiManagerPtr, windowPtr1, windowPtr2) : guiConnectionPtr
GUIRemoveConnection(guiManagerPtr, guiConnectionPtr)
GUIRemoveConnections(guiManagerPtr, windowPtr)
GUIGetConnections(guiManagerPtr, windowPtr) : connections{guiConnectionPtr, ...}
GUIAddActionOnResizeMainWindow(guiManagerPtr, functionName, arg1, arg2, ..., sameScript)
GUIAddActionOnSetPosition(guiManagerPtr, windowPtr, functionName, arg1, arg2, ..., sameScript)
GUIAddActionOnSetSize(guiManagerPtr, windowPtr, functionName, arg1, arg2, ..., sameScript)
GUIConnGetFirstWindow(guiConnectionPtr) : windowPtr
GUIConnGetSecondWindow(guiConnectionPtr) : windowPtr
GUIConnGetOtherWindow(guiConnectionPtr, windowPtr) : windowPtr
GUIConnContainWindow(guiConnectionPtr, windowPtr) : state
GUIConnSetAction(guiConnectionPtr, actionMain, actionOther)

System functions:
getMouse() : mousePtr
getKeyboard() : keyboardPtr
getResolution() : resolution{x, y}
takeScreenshot()

Hotkeys functions:
getHotkeyPtr(id) : hotkeyPtr
setHotkey(id, key)
getHotkey(id) : key
clearHotkey(id)
getHotkeyItemContainer(id) : itemcontainerPtr
setHotkeyItemContainer(id, itemcontainerPtr)

Interaction functions:
doPlayerLogout()
doPlayerSay(wordsStr)
doPlayerMove(direction)
doPlayerTurn(direction)
doPlayerAttack(creatureID)
doPlayerFollow(creatureID)
doMoveThing(fromPosition, fromItemId, fromStackPos, toPosition, count)
doUseThing(position, itemID, stackPos)
doUseWithThing(fromPosition, fromItemID, fromStackPos, toPosition, toItemID, toStackPos)
doUseThingBattle(itemID, count, creatureID)
doUseHotkey(id)
doContainerClose(index)
doContainerMoveUp(index)
doAddMagicEffect(position, type)
doAddDistanceShot(fromPosition, toPosition, type)
doAddAnimatedText(interval, position, color, textStr)
doRequestChannels()
doRequestOutfit()
doRequestSpells()
doRequestQuestLog()
doQuit()

Items functions:
setItemShine(itemPtr, shine)
getItemShine(itemPtr) : shine

Map functions:
getPathTo(position) : list{direction, ...}
getWaypoint(index) : waypoint{pos{x, y, z}, type, comment}
getWaypointsSize() : size
getItemByStackPos(position, stackPos) : item{id, count, stack, pointer}
getTopTopItem(position) : item{id, count, stack, pointer}
getTopDownItem(position) : item{id, count, stack, pointer}
getUseableItem(position, useWith = 0) : item{id, count, stack, pointer}
setDirectioPosition(position)
addPositionArrow(position)
removePositionArrow(position)
clearPositionArrows()

MiniMap functions:
getMiniMap() : minimapPtr
changeMiniMapLevel(minimapPtr, step)
resetMiniMapLevel(minimapPtr)
setMiniMapZoom(minimapPtr, zoom)
getMiniMapZoom(minimapPtr) : zoom
changeMiniMapZoom(minimapPtr, multiplier)
resetMiniMapZoom(minimapPtr)

Cooldowns functions:
newCooldown() : cooldownPtr
deleteCooldown(cooldownPtr)
addCooldown(id, cooldownPtr)
removeCooldown(id)
castCooldown(id, period)
castCooldownGroup(groupid, period)

Icons functions:
getLogoIcon() : imagePtr
getAttackIcon() : imagePtr
getFollowIcon() : imagePtr
getSelectIcon() : imagePtr
getDirArrowIcon() : imagePtr
getPosArrowIcon() : imagePtr
getSlotIcon(id) : imagePtr
getSkullIcon(id) : imagePtr
getShieldIcon(id) : imagePtr
getFightIcon(id) : imagePtr
getStatusIcon(id) : imagePtr
getButtonIcon(id) : imagePtr
getMinimapIcon(id) : imagePtr
getWaypointIcon(id) : imagePtr
getSpellGroupIcon(id) : imagePtr
getSpellIcon(id) : imagePtr
getCustomIcon(id) : imagePtr

Channels functions:
openChannel(channelID, channelName, closeable = true)
channelAddMessage(channelID, color, messageStr)
channelAddMessage(channelName, color, messageStr)

Containers functions:
getContainer(index) : containerPtr
containerGetLastIndex() : index
containerResetLastIndex()
containerGetPlaces(index) : places
containerGetSize(index) : size
containerGetItem(index, slot) : item{id, count, stack, pointer}
isContainer(itemid) : state
hasParent(index) : state

Game Pointers functions:
setPointer('window_game', windowPtr)
setPointer('window_console', windowPtr)
setPointer('element_consoletab', elementPtr)
setPointer('element_cmdline', elementPtr)
getPointer('window_game') : windowPtr
getPointer('window_console') : windowPtr
getPointer('element_consoletab') : elementPtr
getPointer('element_cmdline') : elementPtr

Player functions:
getPlayerID() : playerID
getPlayerPosition() : position{x, y, z}
getPlayerStep() : step
getPlayerHealth() : health
getPlayerMaxHealth() : healthMax
getPlayerHealthP() : healthPercent
getPlayerMana() : mana
getPlayerMaxMana() : manaMax
getPlayerManaP() : manaPercent
getPlayerCapacity() : capacity
getPlayerExperience() : experience
getPlayerLevel() : level
getPlayerLevelP() : levelPercent
getPlayerMagicLevel() : magicLevel
getPlayerMagicLevelP() : magicLevelPercent
getPlayerSoul() : soul
getPlayerStamina() : stamina
getPlayerSkill(num) : skill
getPlayerSkillP(num) : skillPercent
getPlayerAttackID() : attackID
getPlayerFollowID() : followID
getPlayerSelectID() : selectID
getPlayerBattle() : battle{creatureID, ...}
getPlayerInventory() : containerPtr
getPlayerInventoryItem(slot) : item{id, count, stack, pointer}
playerCheckItemPresence(itemid, itemSubType = 0) : state

Creature functions:
setCreatureName(creatureID, name)
getCreatureID(name, radius = 0) : creatureID
setCreatureShine(creatureID, shine)
getCreatureShine(creatureID) : shine
getCreatureName(creatureID) : name
getCreaturePosition(creatureID) : position{x, y, z}
getCreatureHealth(creatureID) : health
getCreatureSkull(creatureID) : skull
getCreatureShield(creatureID) : shield
getCreatureWar(creatureID) : war
getCreatureStep(creatureID) : step

Sounds functions:
playBackgroundSound(id, sampleClass = SAMPLE_BACKGROUND)
stopBackgroundSound()
playSystemSound(id)
playEffectSound(id, x, y, z)
playDistanceSound(id, x, y, z)
playCustomSound(id, volume, offset)

Text functions:
getText(keyStr) : textStr

Tools functions:
divideText(textStr, fontPtr, fontSize, lineWidth) : lines{lineStr1, lineStr2, ...}
Znajdź wszystkie posty użytkownika
Odpowiedz cytując ten post
Odpowiedz 


Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości