• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua functions list

elf

Sing, sing blue silver
Senator
Joined
Dec 11, 2007
Messages
3,666
Solutions
1
Reaction score
125
Location
Warsaw, Poland
GitHub
tayandenga
Twitch
tayandenga
//get*
getCreatureHealth(cid)
getCreatureMaxHealth(cid)
getCreatureMana(cid)
getCreatureMaxMana(cid)
getCreatureMaster(cid)
getCreatureSummons(cid)
getCreatureOutfit(cid)
getCreaturePosition(cid)
getCreatureName(cid)
getCreatureSpeed(cid)
getCreatureBaseSpeed(cid)
getCreatureTarget(cid)
getCreatureByName(name)
getCreatureSkullType(cid)
getCreatureCondition(cid, condition[, subId])
getCreatureNoMove(cid)
getMonsterInfo(name)
getMonsterHealingSpells(name)
getMonsterAttackSpells(name)
getMonsterLootList(name)
getMonsterTargetList(cid)
getMonsterFriendList(cid)
getPlayerByNameWildcard(name~)
getPlayerLossSkill(cid)
getPlayerLossPercent(cid, lossType)
getPlayerGUIDByName(name[, multiworld])
getPlayerNameByGUID(guid[, multiworld])
getPlayerFood(cid)
getPlayerLevel(cid)
getPlayerExperience(cid)
getPlayerMagLevel(cid[, ignoreBuffs])
getPlayerSpentMana(cid)
getPlayerAccess(cid)
getPlayerSkillLevel(cid, skillid)
getPlayerSkillTries(cid, skillid)
getPlayerTown(cid)
getPlayerVocation(cid)
getPlayerRequiredMana(cid, magicLevel)
getPlayerRequiredSkillTries(cid, skillId, skillLevel)
getPlayerItemCount(cid, itemid)
getPlayerSoul(cid)
getPlayerAccountId(cid)
getPlayerAccount(cid)
getPlayerIp(cid)
getPlayerFreeCap(cid)
getPlayerLight(cid)
getPlayerSlotItem(cid, slot)
getPlayerWeapon(cid[, ignoreAmmo])
getPlayerItemById(cid, deepSearch, itemId[, subType])
getPlayerDepotItems(cid, depotid)
getPlayerGuildId(cid)
getPlayerGuildName(cid)
getPlayerGuildRank(cid)
getPlayerGuildNick(cid)
getPlayerGuildLevel(cid)
getPlayerSex(cid)
getPlayerLookDir(cid)
getPlayerStorageValue(uid, valueid)
getPlayerGUID(cid)
getPlayerFlagValue(cid, flag)
getPlayerCustomFlagValue(cid, flag)
getPlayerPromotionLevel(cid)
getPlayerGroupId(cid)
getPlayerLearnedInstantSpell(cid, name)
getPlayerInstantSpellCount(cid)
getPlayerInstantSpellInfo(cid, index)
getPlayerSex(cid)
getPlayerBlessing(cid, blessing)
getPlayerStamina(cid)
getPlayerExtraExpRate(cid)
getPlayerPartner(cid)
getPlayerParty(cid)
getPlayerPremiumDays(cid)
getPlayerBalance(cid)
getPlayerRedSkullTicks(cid)
getPlayerRates(cid)
getInstantSpellInfo(cid, name)
getPlayersByAccountId(accountNumber)
getPlayersByIp(ip[, mask = 0xFFFFFFFF])
getPlayersOnline()
getPartyMembers(lid)
getAccountIdByName(name)
getAccountByName(name)
getAccountIdByAccount(accName)
getAccountByAccountId(accId)
getIpByName(name)
getItemRWInfo(uid)
getItemDescriptionsById(itemid)
getItemWeightById(itemid, count[, precise])
getItemDescriptions(uid)
getItemWeight(uid[, precise])
getItemAttack(uid)
getItemExtraAttack(uid)
getItemDefense(uid)
getItemExtraDefense(uid)
getItemArmor(uid)
getItemAttackSpeed(uid)
getItemHitChance(uid)
getItemShootRange(uid)
getItemIdByName(name[, reportError])
getItemLevelDoor(itemid)
getItemWeaponType(uid)
getFluidSourceType(type)
getContainerSize(uid)
getContainerCap(uid)
getContainerCapById(itemid)
getContainerItem(uid, slot)
getDepotId(uid)
getTileItemById(pos, itemId[, subType])
getTileItemByType(pos, type)
getTileThingByPos(pos)
getTileInfo(pos)
getTopCreature(pos)
getClosestFreeTile(cid, targetpos[, extended[, ignoreHouse]])
getThingFromPos(pos)
getThing(uid)
getThingPos(uid)
getHouseOwner(houseid)
getHouseName(houseid)
getHouseEntry(houseid)
getHouseRent(houseid)
getHousePrice(houseid)
getHouseTown(houseid)
getHouseAccessList(houseid, listid)
getHouseByPlayerGUID(playerGUID)
getHouseFromPos(pos)
getHouseTilesSize(houseid)
getTownId(townName)
getTownName(townId)
getTownTemplePosition(townId)
getTownHouses(townId)
getWorldType()
getWorldTime()
getWorldLight()
getWorldCreatures(type) //0 players, 1 monsters, 2 npcs, 3 all
getWorldUpTime()
getHighscoreString(skillId)
getVocationInfo(id)
getGuildId(guildName)
getGuildMotd(guildId)
getSpectators(centerPos, rangex, rangey, multifloor)
getSearchString(fromPosition, toPosition[, fromIsCreature[, toIsCreature]])
getWaypointPosition(name)
getGameState()
getNotationsCount(accId)
getBanData(value)
getBanList(type[, value])
getBanReason(id)
getBanAction(id[, ipBanishment])
getGlobalStorageValue(valueid)
getExperienceStage(level)
getConfigFile()
getConfigValue(key)
getLogsDir()
getDataDir()

//set*
setCreatureMaxHealth(cid, health)
setCreatureMaxMana(cid, mana)
setPlayerStorageValue(uid, valueid, newvalue)
setPlayerGroupId(cid, newGroupId)
setPlayerPromotionLevel(cid, level)
setPlayerStamina(cid, minutes)
setPlayerExtraExpRate(cid, value)
setPlayerPartner(cid, guid)
setHouseOwner(houseid, ownerGUID)
setHouseAccessList(houseid, listid, listtext)
setItemName(uid)
setItemPluralName(uid)
setItemArticle(uid)
setItemAttack(uid, attack)
setItemExtraAttack(uid, extraattack)
setItemDefense(uid, defense)
setItemArmor(uid, armor)
setItemExtraDefense(uid, extradefense)
setItemAttackSpeed(uid, attackspeed)
setItemHitChance(uid, hitChance)
setItemShootRange(uid, shootRange)
setCombatArea(combat, area)
setCombatCondition(combat, condition)
setCombatParam(combat, key, value)
setConditionParam(condition, key, value)
setCombatCallBack(combat, key, function_name)
setCombatFormula(combat, type, mina, minb, maxa, maxb)
setConditionFormula(combat, mina, minb, maxa, maxb)
setGlobalStorageValue(valueid, newvalue)
setWorldType(type)

//do*
doCreatureAddHealth(cid, health[, force])
doCreatureAddMana(cid, mana)
doCreatureSetDropLoot(cid, doDrop)
doCreatureSetSkullType(cid, skull)
doCreatureSetLookDir(cid, dir)
doCreatureChangeOutfit(cid, outfit)
doCreatureSay(cid, text, type[, pos])
doCreatureSetNoMove(cid, cannotMove)
doSetCreatureLight(cid, lightLevel, lightColor, time)
doSetCreatureOutfit(cid, outfit, time)
doRemoveCreature(cid)
doMoveCreature(cid, direction)
doConvinceCreature(cid, target)
doChallengeCreature(cid, target)
doChangeSpeed(cid, delta)
doSummonMonster(name, pos)
doCreateMonster(name, pos)
doMonsterChangeTarget(cid)
doMonsterSetTarget(cid, target)
doCreateNpc(name, pos)
doSetMonsterOutfit(cid, name, time)
doPlayerBroadcastMessage(cid, message[, type])
doPlayerSetSex(cid, newSex)
doPlayerSetTown(cid, townid)
doPlayerSetVocation(cid,voc)
doPlayerRemoveItem(cid, itemid, count[, subtype])
doPlayerAddExp(cid, exp)
doPlayerSetGuildId(cid, id)
doPlayerSetGuildRank(cid, rank)
doPlayerSetGuildNick(cid, nick)
doPlayerAddOutfit(cid,looktype, addons)
doPlayerRemoveOutfit(cid,looktype, addons)
doPlayerSetRedSkullTicks(cid, amount)
doPlayerSetLossPercent(cid, lossType, newPercent)
doPlayerSetLossSkill(cid, doLose)
doPlayerAddSkillTry(cid, skillid, n)
doPlayerAddSpentMana(cid, amount)
doPlayerAddSoul(cid, soul)
doPlayerAddItem(uid, itemid[, count/subtype[, canDropOnMap]])
doPlayerAddItemEx(cid, uid[, canDropOnMap])
doPlayerSendTextMessage(cid, MessageClasses, message)
doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel)
doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time])
doPlayerAddMoney(cid, money)
doPlayerRemoveMoney(cid, money)
doPlayerWithdrawMoney(cid, money)
doPlayerDepositMoney(cid, money)
doPlayerTransferMoneyTo(cid, target, money)
doPlayerPopupFYI(cid, message)
doPlayerSendTutorial(cid, id)
doPlayerAddMapMark(cid, pos, type[, description])
doPlayerAddPremiumDays(cid, days)
doPlayerAddBlessing(cid, blessing)
doPlayerAddStamina(cid, minutes)
doPlayerResetIdleTime(cid)
doPlayerLearnInstantSpell(cid, name)
doPlayerUnlearnInstantSpell(cid, name)
doPlayerFeed(cid, food)
doPlayerSendCancel(cid, text)
doPlayerSendDefaultCancel(cid, ReturnValue)
doPlayerSetExperienceRate(cid, value)
doPlayerSetMagicRate(cid, value)
doPlayerSetSkillRate(cid, skill, value)
doPlayerJoinParty(cid, lid)
doPlayerSendOutfitWindow(cid)
doCreateItem(itemid, type/count, pos)
doCreateItemEx(itemid[, count/subtype])
doAddContainerItemEx(uid, virtuid)
doAddContainerItem(uid, itemid[, count/subtype])
doChangeTypeItem(uid, newtype)
doDecayItem(uid)
doRemoveItem(uid[, n])
doTransformItem(uid, toitemid[, count/subtype])
doSetItemActionId(uid, actionid)
doSetItemText(uid, text[, writer[, date]])
doSetItemSpecialDescription(uid, desc)
doSetItemOutfit(cid, item, time)
doTileAddItemEx(pos, uid)
doTileQueryAdd(uid, pos[, flags])
doAddCondition(cid, condition)
doRemoveCondition(cid, type[, subId])
doRemoveConditions(cid[, onlyPersistent])
doAreaCombatHealth(cid, type, pos, area, min, max, effect)
doTargetCombatHealth(cid, target, type, min, max, effect)
doAreaCombatMana(cid, pos, area, min, max, effect)
doTargetCombatMana(cid, target, min, max, effect)
doAreaCombatCondition(cid, pos, area, condition, effect)
doTargetCombatCondition(cid, target, condition, effect)
doAreaCombatDispel(cid, pos, area, type, effect)
doTargetCombatDispel(cid, target, type, effect)
doCombat(cid, combat, param)
doTeleportThing(cid, newpos[, pushmove])
doCreateTeleport(itemid, topos, createpos)
doSendMagicEffect(pos, type[, creature])
doSendDistanceShoot(frompos, topos, type[, creature])
doSendAnimatedText(pos, text, color[, creature])
doShowTextDialog(cid, itemid, text)
doRelocate(pos, posTo)
doBroadcastMessage(message, type)
doWaypointAddTemporial(name, pos)
doSetGameState(id)
doAddIpBanishment(ip[, length[, comment[, admin]]])
doAddNamelock(name[, reason[, action[, comment[, admin]]]])
doAddBanishment(accId[, length[, reason[, action[, comment[, admin]]]]])
doAddDeletion(accId[, reason[, action[, comment[, admin]]]]])
doAddNotation(accId[, reason[, action[, comment[, admin]]]]])
doRemoveIpBanishment(ip[, mask])
doRemoveNamelock(name)
doRemoveBanisment(accId)
doRemoveDeletion(accId)
doRemoveNotations(accId)
doSaveServer()
doReloadInfo()
doCleanHouse(houseId)
doCleanMap()
doRefreshMap()

//is*
isCreature(cid)
isMonster(uid)
isNpc(uid)
isPlayer(cid)
isPlayerPzLocked(cid)
isItemStackable(itemid)
isItemRune(itemid)
isItemMovable(itemid)
isItemDoor(itemid)
isItemContainer(itemid)
isItemFluidContainer(itemid)
isContainer(uid)
isCorpse(uid)
isMovable(uid)
isSightClear(fromPos, toPos, floorCheck)
isIpBanished(ip[, mask])
isPlayerNamelocked(name)
isAccountBanished(accId)
isAccountDeleted(accId)
isInArray({array}, value)

//others
registerCreatureEvent(uid, eventName)
createCombatArea({area}[, {exArea}])
createConditionObject(type[, ticks[, buff[, subId]]])
addDamageCondition(condition, rounds, time, value)
addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
createCombatObject()
numberToVariant(number)
stringToVariant(string)
positionToVariant(pos)
targetPositionToVariant(pos)
variantToNumber(var)
variantToString(var)
variantToPosition(var)
canPlayerWearOutfit(cid, looktype, addons)
executeRaid(name)
addEvent(callback, delay, ...)
stopEvent(eventid)
hasProperty(uid)

//db table
db.executeQuery(query)
db.storeQuery(query)
db.escapeString(str)
db.escapeBlob(s, length)
db.stringComparisonOperator()

//result table
result.getDataInt(resId, s)
result.getDataLong(resId, s)
result.getDataString(resId, s)
result.getDataStream(resId, s, length)
result.next(resId)
result.free(resId)

//bit table
#bit.cast
bit.bnot(n)
bit.band(type, n)
bit.bor(type, n)
bit.bxor(type, n)
bit.lshift(type, n)
bit.rshift(type, n)
#bit.arshift
#bit.ucast
bit.ubnot(n)
bit.uband(type, n)
bit.ubor(type, n)
bit.ubxor(type, n)
bit.ulshift(type, n)
bit.urshift(type, n)
#bit.uarshift

//compats
table.getPos = table.find
doSetCreatureDropLoot = doCreatureSetDropLoot
doPlayerSay = doCreatureSay
doPlayerAddMana = doCreatureAddMana
playerLearnInstantSpell = doPlayerLearnInstantSpell
doPlayerRemOutfit = doPlayerRemoveOutfit
pay = doPlayerRemoveMoney
broadcastMessage = doBroadcastMessage
getPlayerName = getCreatureName
getPlayerPosition = getCreaturePosition
getCreaturePos = getCreaturePosition
creatureGetPosition = getCreaturePosition
getPlayerMana = getCreatureMana
getPlayerMaxMana = getCreatureMaxMana
hasCondition = getCreatureCondition
isMoveable = isMovable
isItemMoveable = isItemMovable
saveData = saveServer
savePlayers = saveServer
getPlayerSkill = getPlayerSkillLevel
getPlayerSkullType = getCreatureSkullType
getAccountNumberByName = getAccountIdByName
getIPByName = getIpByName
getPlayersByIP = getPlayersByIp
getThingfromPos = getThingFromPos
getPlayersByAccountNumber = getPlayersByAccountId
getIPByPlayerName = getIpByName
getPlayersByIPNumber = getPlayersByIp
getAccountNumberByPlayerName = getAccountIdByName
convertIntToIP = doConvertIntegerToIp
convertIPToInt = doConvertIpToInteger
queryTileAddThing = doTileQueryAdd
getTileHouseInfo = getHouseFromPos
executeRaid = doExecuteRaid
saveServer = doSaveServer
cleanHouse = doCleanHouse
cleanMap = doCleanMap
shutdown = doShutdown
mayNotMove = doCreatureSetNoMove
doPlayerSetNoMove = doCreatureSetNoMove
getPlayerNoMove = getCreatureNoMove
getConfigInfo = getConfigValue

//lua-made functions
doPlayerGiveItem(cid, itemid, amount, subType)
doPlayerTakeItem(cid, itemid, amount)
doPlayerBuyItem(cid, itemid, count, cost, charges)
doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
doPlayerSellItem(cid, itemid, count, cost)
isInRange(pos, fromPos, toPos)
isPremium(cid)
getMonthDayEnding(day)
getMonthString(m)
getArticle(str)
isNumber(str)
getDistanceBetween(firstPosition, secondPosition)
doPlayerAddAddons(cid, addon)
isSorcerer(cid)
isDruid(cid)
isPaladin(cid)
isKnight(cid)
isRookie(cid)
getDirectionTo(pos1, pos2)
getPlayerLookPos(cid)
getPosByDir(fromPosition, direction, size)
getPlayerMoney(cid)
doPlayerWithdrawAllMoney(cid)
doPlayerDepositAllMoney(cid)
doPlayerTransferAllMoneyTo(cid, target)
playerExists(name)
getTibiaTime()
doWriteLogFile(file, text)
isInArea(pos, fromPos, toPos)
getExperienceForLevel(lv)
doMutePlayer(cid, time)
getPlayerVocationName(cid)
getPromotedVocation(vid)
doPlayerRemovePremiumDays(cid, days)
getPlayerMasterPos(cid)
getItemNameById(itemid)
getItemPluralNameById(itemid)
getItemArticleById(itemid)
getItemName(uid)
getItemPluralName(uid)
getItemArticle(uid)
getItemText(uid)
getItemWriter(uid)
getItemDate(uid)
getTilePzInfo(pos)
getTileZoneInfo(pos)
debugPrint(text)
doShutdown()
doSummonCreature(name, pos)
getOnlinePlayers()
getPlayerByName(name)
isPlayerGhost(cid)
getPlayerFrags(cid)
getPartyLeader(cid)
isInParty(cid)
isPrivateChannel(channelId)
doConvertIntegerToIp(int, mask)
doConvertIpToInteger(int, mask)
getBooleanFromString(str)
doCopyItem(item, attributes)
exhaustion.check(cid, storage)
exhaustion.get(cid, storage)
exhaustion.set(cid, storage, time)
exhaustion.make(cid, storage, time)
table.find(table, value)
table.isStrIn(txt, str)
table.countElements(table, item)
table.getCombinations(table, num)
string.split(str)
string.trim(str)
string.explode(str, sep)
 
Last edited:
:thumbup: Always nice to have this. Altho, didn't you add the new functions to the FUNCTIONS_LIST file in 0.3? :p
 
I didn't, was too lazy. Also, would be cool if someone could write + example all of these to our docs.
 
Cleaned list:
Code:
// Get
getPlayerFood(cid)
getCreatureHealth(cid)
getCreatureMaxHealth(cid)
getCreatureMana(cid)
getCreatureMaxMana(cid)
getPlayerLevel(cid)
getPlayerExperience(cid)
getPlayerMagLevel(cid)
getPlayerSpentMana(cid)
getPlayerAccess(cid)
getPlayerSkillLevel(cid, skillid)
getPlayerSkillTries(cid, skillid)
getPlayerTown(cid)
getPlayerVocation(cid)
getPlayerRequiredMana(cid, magicLevel)
getPlayerRequiredSkillTries(cid, skillId, skillLevel)
getPlayerItemCount(cid, itemid)
getPlayerSoul(cid)
getPlayerFreeCap(cid)
getPlayerLight(cid)
getPlayerSlotItem(cid, slot)
getPlayerWeapon(cid, <optional> ignoreAmmo)
getPlayerItemById(cid, deepSearch, itemId, <optional> subType)
getPlayerDepotItems(cid, depotid)
getPlayerGuildId(cid)
getPlayerGuildName(cid)
getPlayerGuildRank(cid)
getPlayerGuildNick(cid)
getPlayerGuildLevel(cid)
getPlayerSex(cid)
getPlayerLookDir(cid)
getPlayerGUID(cid)
getPlayerFlagValue(cid, flag)
getPlayerCustomFlagValue(cid, flag)
getPlayerPromotionLevel(cid)
getPlayerGroupId(cid)
getPlayerLearnedInstantSpell(cid, name)
getPlayerInstantSpellCount(cid)
getPlayerInstantSpellInfo(cid, index)
getInstantSpellInfoByName(cid, name)
getInstantSpellWords(name)
getPlayerStorageValue(uid, valueid)
getGlobalStorageValue(valueid)
getOnlinePlayers()
getTilePzInfo(pos)
//1 is pz. 0 no pz.
getTileHouseInfo(pos)
//0 no house. != 0 house id
getItemRWInfo(uid)
getThingfromPos(pos)
getThing(uid)
getThingPos(uid)
getTileItemById(pos, itemId, <optional> subType)
getTileItemByType(pos, type)
getTileThingByPos(pos)
getTopCreature(pos)
getClosestFreeTile(cid, targetpos)
getMonsterTargetList(cid)
getMonsterFriendList(cid)
getCreatureCondition(cid, condition)
getPlayerLossSkill(cid)
getPlayerLossPercent(cid, lossType)
getCreatureByName(name)
getPlayerGUIDByName(name)
getPlayerNameByGUID(guid)
getContainerSize(uid)
getContainerCap(uid)
getContainerCapById(itemid)
getContainerItem(uid, slot)
getHouseOwner(houseid)
getHouseName(houseid)
getHouseEntry(houseid)
getHouseRent(houseid)
getHousePrice(houseid)
getHouseTown(houseid)
getHouseAccessList(houseid, listid)
getHouseByPlayerGUID(playerGUID)
getHouseTilesSize(houseid)
getDepotId(uid)
getWorldType()
getWorldTime()
getWorldLight()
getWorldCreatures(type)
//0 players, 1 monsters, 2 npcs, 3 all
getWorldUpTime()
getGuildId(guild_name)
getPlayerSex(cid)
getCreatureOutfit(cid)
getCreaturePosition(cid)
getCreatureName(cid)
getCreatureSpeed(cid)
getCreatureBaseSpeed(cid)
getCreatureTarget(cid)
getItemDescriptionsById(itemid)
getItemNameById(itemid)
getItemPluralNameById(itemid)
getItemIdArticleById(itemid)
getItemWeightById(itemid, count, <optional: default: 1> precise)
getItemDescriptions(uid)
getItemName(uid)
getItemPluralName(uid)
getItemIdArticle(uid)
getItemAttack(uid)
getItemExtraAttack(uid)
getItemDefense(uid)
getItemExtraDefense(uid)
getItemArmor(uid)
getItemAttackSpeed(uid)
getItemHitChance(uid)
getItemIdByName(name)
getPlayersByAccountNumber(accountNumber)
getAccountNumberByName(name)
getIPByName(name)
getPlayersByIP(ip[, mask = 0xFFFFFFFF])
getPlayerPremiumDays(cid)
getPlayerSkullType(cid)
getPlayerBalance(cid)
getPromotedVocation(vocation)
getPlayerBlessing(cid, blessing)
getPlayerStamina(cid)
getPlayerNoMove(cid)
getPlayerExtraExpRate(cid)
getPlayerPartner(cid)
getPlayerParty(cid)
getPartyMembers(lid)
getCreatureMaster(cid)
getCreatureSummons(cid)
getTemplePositionByName(townName)
getTemplePositionById(townId)
getTownName(townId)
getSpectators(centerPos, rangex, rangey, multifloor)
getVocationInfo(id)
getFluidSourceType(type)
getConfigFile()
//Set
setPlayerStorageValue(uid, valueid, newvalue)
setGlobalStorageValue(valueid, newvalue)
setPlayerGroupId(cid, newGroupId)
setPlayerPromotionLevel(cid, level)
setCreatureMaxHealth(cid, health)
setCreatureMaxMana(cid, mana)
setHouseOwner(houseid, ownerGUID)
setHouseAccessList(houseid, listid, listtext)
setCombatArea(combat, area)
setCombatCondition(combat, condition)
setCombatParam(combat, key, value)
setConditionParam(condition, key, value)
setCombatCallBack(combat, key, function_name)
setCombatFormula(combat, type, mina, minb, maxa, maxb)
setConditionFormula(combat, mina, minb, maxa, maxb)
setItemName(uid)
setItemPluralName(uid)
setItemIdArticle(uid)
setItemAttack(uid, attack)
setItemExtraAttack(uid, extraattack)
setItemDefense(uid, defense)
setItemArmor(uid, armor)
setItemExtraDefense(uid, extradefense)
setItemAttackSpeed(uid, attackspeed)
setItemHitChance(uid, hitChance)
setPlayerStamina(cid, minutes)
setPlayerExtraExpRate(cid, value)
setPlayerPartner(cid, guid)
setWorldType(type)
//Do
doPlayerLearnInstantSpell(cid, name)
doRemoveItem(uid, <optional> n)
doPlayerFeed(cid, food)
doPlayerSendCancel(cid, text)
doPlayerSendDefaultCancel(cid, ReturnValue)
doTeleportThing(cid, newpos, <optional> pushmove)
doTransformItem(uid, toitemid, <optional> count/subtype)
doCreatureSay(cid, text, type)
doSendMagicEffect(pos, type[, player])
doSendDistanceShoot(frompos, topos, type)
doChangeTypeItem(uid, newtype)
doSetItemActionId(uid, actionid)
doSetItemText(uid, text)
doSetItemSpecialDescription(uid, desc)
doSendAnimatedText(pos, text, color)
doPlayerAddSkillTry(cid, skillid, n)
doCreatureAddHealth(cid, health)
doCreatureAddMana(cid, mana)
doPlayerAddSpentMana(cid, amount)
doPlayerAddSoul(cid, soul)
doPlayerAddItem(uid, itemid, <optional> count/subtype, <optional: default: 1> canDropOnMap)
doPlayerAddItemEx(cid, uid, <optional: default: 0> canDropOnMap)
doPlayerSendTextMessage(cid, MessageClasses, message)
doPlayerAddMoney(cid, money)
doPlayerRemoveMoney(cid, money)
doPlayerWithdrawMoney(cid, money)
doPlayerDepositMoney(cid, money)
doPlayerTransferMoneyTo(cid, target, money)
doShowTextDialog(cid, itemid, text)
doDecayItem(uid)
doCreateItem(itemid, type/count, pos)
doCreateItemEx(itemid, <optional> count/subtype)
doTileAddItemEx(pos, uid)
doAddContainerItemEx(uid, virtuid)
doRelocate(pos, posTo)
//Moves all moveable objects from pos to posTo
doCreateTeleport(itemid, topos, createpos)
doSummonCreature(name, pos)
doConvinceCreature(cid, target)
doSetMonsterTarget(cid, target)
doMonsterChangeTarget(cid)
doAddCondition(cid, condition)
doRemoveCondition(cid, type)
doRemoveCreature(cid)
doMoveCreature(cid, direction)
doPlayerSetTown(cid, townid)
doPlayerSetVocation(cid,voc)
doPlayerRemoveItem(cid, itemid, count, <optional> subtype)
doPlayerAddExp(cid, exp)
doPlayerSetGuildId(cid, id)
doPlayerSetGuildRank(cid, rank)
doPlayerSetGuildNick(cid, nick)
doPlayerAddOutfit(cid,looktype,addons)
doPlayerRemoveOutfit(cid,looktype,addons)
doSetCreatureLight(cid, lightLevel, lightColor, time)
doCreatureSetDropLoot(cid, doDrop)
doPlayerSetLossPercent(cid, lossType, newPercent)
doPlayerSetLossSkill(cid, doLose)
doAddContainerItem(uid, itemid, <optional> count/subtype)
doBroadcastMessage(message, type)
doPlayerBroadcastMessage(cid, message, <optional> type)
doPlayerSetSex(cid, newSex)
doCombat(cid, combat, param)
doAreaCombatHealth(cid, type, pos, area, min, max, effect)
doTargetCombatHealth(cid, target, type, min, max, effect)
doAreaCombatMana(cid, pos, area, min, max, effect)
doTargetCombatMana(cid, target, min, max, effect)
doAreaCombatCondition(cid, pos, area, condition, effect)
doTargetCombatCondition(cid, target, condition, effect)
doAreaCombatDispel(cid, pos, area, type, effect)
doTargetCombatDispel(cid, target, type, effect)
doChallengeCreature(cid, target)
doChangeSpeed(cid, delta)
doCreatureChangeOutfit(cid, outfit)
doSetMonsterOutfit(cid, name, time)
doSetItemOutfit(cid, item, time)
doSetCreatureOutfit(cid, outfit, time)
doPlayerPopupFYI(cid, message)
doPlayerSendTutorial(cid, id)
doPlayerAddMapMark(cid, pos, type, <optional> description)
doPlayerAddPremiumDays(cid, days)
doPlayerAddBlessing(cid, blessing)
doPlayerAddStamina(cid, minutes)
doPlayerSetNoMove(cid, cannotMove)
doPlayerResetIdleTime(cid)
//Is
isPlayer(cid)
isPlayerPzLocked(cid)
isPlayerGhost(cid)
isCreature(cid)
isContainer(uid)
isCorpse(uid)
isMovable(uid)
isItemStackable(itemid)
isItemRune(itemid)
isItemDoor(itemid)
isItemLevelDoor(itemid)
isItemContainer(itemid)
isItemFluidContainer(itemid)
isItemMovable(itemid)
isSightClear(fromPos, toPos, floorCheck)
isInArray(array, value)
//Other
registerCreatureEvent(uid, eventName)
createCombatArea( {area}, <optional> {extArea} )
createConditionObject(type)
addDamageCondition(condition, rounds, time, value)
addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
createCombatObject()
numberToVariant(number)
stringToVariant(string)
positionToVariant(pos)
targetPositionToVariant(pos)
variantToNumber(var)
variantToString(var)
variantToPosition(var)
canPlayerLearnInstantSpell(cid, name)
queryTileAddThing(uid, pos, <optional> flags)
canPlayerWearOutfit(cid, looktype, addons)
executeRaid(name)
saveServer()
cleanMap()
shutdown()
addEvent(callback, delay, ...)
stopEvent(eventid)
debugPrint(text)
hasProperty(uid)
//db
db table
result table
bit table

db.executeQuery(query)
db.storeQuery(query)
db.escapeString(str)
db.escapeBlob(s, length)
db.stringComparisonOperator()

result.getDataInt(resId, s)
result.getDataLong(resId, s)
result.getDataString(resId, s)
result.getDataStream(resId, s, length)
result.next(resId)
result.free(resId)

const luaL_Reg LuaScriptInterface::luaBitReg[] =
{
//{"cast", LuaScriptInterface::luaBitCast},
{"bnot", LuaScriptInterface::luaBitNot},
{"band", LuaScriptInterface::luaBitAnd},
{"bor", LuaScriptInterface::luaBitOr},
{"bxor", LuaScriptInterface::luaBitXor},
{"lshift", LuaScriptInterface::luaBitLeftShift},
{"rshift", LuaScriptInterface::luaBitRightShift},
//{"arshift", LuaScriptInterface::luaBitArithmeticalRightShift},

//Unsigned
//{"ucast", LuaScriptInterface::luaBitUCast},
{"ubnot", LuaScriptInterface::luaBitUNot},
{"uband", LuaScriptInterface::luaBitUAnd},
{"ubor", LuaScriptInterface::luaBitUOr},
{"ubxor", LuaScriptInterface::luaBitUXor},
{"ulshift", LuaScriptInterface::luaBitULeftShift},
{"urshift", LuaScriptInterface::luaBitURightShift},
//{"uarshift", LuaScriptInterface::luaBitUArithmeticalRightShift} ,

{NULL,NULL}
};
 
Last edited:
Thank you guys. Hey, just a quick question - will you allow us to remove experience with the doPlayerAddExp function, as it currently does not work that way, or you could just make a new function for it. Anyways, if you would do that I'd be forever grateful!

Thanks.
 
Code:
setCombatParam(combat, key, value)

Well, I was wondering if someone know all the "keys"...

All the keys I can add to a CombatParam... :eek:


Please :p
 
I didn't, was too lazy. Also, would be cool if someone could write + example all of these to our docs.
It might be a project I'll start on some time when I'm bored enough :p
 
hello i just got a big question, how do i make mana/hp regenerate faster? I've tried with the manaticks and hpticks setting them to 5000 but it doesnt work =/ some1 cares to explain me pls?
 
hello i just got a big question, how do i make mana/hp regenerate faster? I've tried with the manaticks and hpticks setting them to 5000 but it doesnt work =/ some1 cares to explain me pls?

vocations.xml,
1.manaticks - time for mana regeneration, smaller this and mana will regain faster, for example, for druids it's like gainmanaticks="3"
2.gainmanaamount="2" - amount of mana which will be added to you.(so it's sets to 2 mana)

Im just new, but what does this do? what can I do with it?

It's for lua scripting, use search, maybe you will found something ;>
 
Back
Top