• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    Guia Basica De lua funtions

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1Guia Basica De lua funtions Empty Guia Basica De lua funtions Lun Dic 21, 2015 1:38 pm

    Krapula

    Krapula
    Miembro
    Miembro
    TFS 0.3/0.4

    Source functions

    Código:
      //get*
      getCreatureHealth(cid)
      getCreatureMaxHealth(cid)
      getCreatureHideHealth(cid)
      getCreatureMana(cid)
      getCreatureMaxMana(cid)
      getCreatureSpeakType(cid)
      getCreatureMaster(cid)
      getCreatureSummons(cid)
      getCreatureOutfit(cid)
      getCreaturePosition(cid)
      getCreatureLookDirection(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)
      getMonsterSummonList(name)
      getMonsterTargetList(cid)
      getMonsterFriendList(cid)
      getPlayerByNameWildcard(name~[, ret = false])
      getPlayerLossSkill(cid)
      getPlayerLossPercent(cid, lossType)
      getPlayerGUIDByName(name[, multiworld = false])
      getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]])
      getPlayerFood(cid)
      getPlayerLevel(cid)
      getPlayerExperience(cid)
      getPlayerMagLevel(cid[, ignoreBuffs = false])
      getPlayerSpentMana(cid)
      getPlayerAccess(cid)
      getPlayerGhostAccess(cid)
      getPlayerSkillLevel(cid, skillId)
      getPlayerSkillTries(cid, skillId)
      getPlayerTown(cid)
      getPlayerVocation(cid)
      getPlayerRequiredMana(cid, magicLevel)
      getPlayerRequiredSkillTries(cid, skillId, skillLevel)
      getPlayerItemCount(cid, itemid[, subType = -1])
      getPlayerSoul(cid)
      getPlayerAccountId(cid)
      getPlayerAccount(cid)
      getPlayerIp(cid)
      getPlayerFreeCap(cid)
      getPlayerLight(cid)
      getPlayerSlotItem(cid, slot)
      getPlayerWeapon(cid[, ignoreAmmo = false])
      getPlayerItemById(cid, deepSearch, itemId[, subType = -1])
      getPlayerDepotItems(cid, depotid)
      getPlayerGuildId(cid)
      getPlayerGuildName(cid)
      getPlayerGuildRank(cid)
      getPlayerGuildNick(cid)
      getPlayerGuildLevel(cid)
      getPlayerSex(cid)
      getPlayerStorageValue(uid, key)
      getPlayerGUID(cid)
      getPlayerFlagValue(cid, flag)
      getPlayerCustomFlagValue(cid, flag)
      getPlayerPromotionLevel(cid)
      getPlayerGroupId(cid)
      getPlayerLearnedInstantSpell(cid, name)
      getPlayerInstantSpellCount(cid)
      getPlayerInstantSpellInfo(cid, index)
      getPlayerBlessing(cid, blessing)
      getPlayerStamina(cid)
      getPlayerExtraExpRate(cid)
      getPlayerPartner(cid)
      getPlayerParty(cid)
      getPlayerPremiumDays(cid)
      getPlayerBalance(cid)
      getPlayerMoney(cid)
      getPlayerSkullTicks(cid, type)
      getPlayerRates(cid)
      getPlayerLastLogin(cid)
      getPlayerLastLoginSaved(cid)
      getPlayerAccountManager(cid)
      getInstantSpellInfo(cid, name)
      getPlayersByAccountId(accountNumber)
      getPlayersByIp(ip[, mask = 0xFFFFFFFF])
      getChannelUsers(channelId)
      getPlayersOnline()
      getPartyMembers(lid)
      getAccountIdByName(name)
      getAccountByName(name)
      getAccountIdByAccount(accName)
      getAccountByAccountId(accId)
      getIpByName(name)
      getItemRWInfo(uid)
      getItemProtection(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[, displayError = true])
      getItemLevelDoor(itemid)
      getItemWeaponType(uid)
      getFluidSourceType(type)
      getContainerSize(uid)
      getContainerCap(uid)
      getContainerCapById(itemid)
      getContainerItem(uid, slot)
      getDepotId(uid)
      getTileItemById(pos, itemId[, subType = -1])
      getTileItemByType(pos, type)
      getTileThingByPos(pos)
      getTileInfo(pos)
      getTopCreature(pos)
      getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]])
      getThingFromPos(pos)
      getThing(uid)
      getThingPos(uid)
      getHouseInfo(id)
      getHouseAccessList(houseid, listid)
      getHouseByPlayerGUID(playerGUID)
      getHouseFromPos(pos)
      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 = false])
      getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]])
      getWaypointPosition(name)
      getGameState()
      getNotationsCount(accId)
      getBanData(value)
      getBanList(type[, value])
      getBanReason(id)
      getBanAction(id[, ipBanishment])
      getGlobalStorageValue(valueid)
      getExperienceStage(level)
      getConfigFile()
      getConfigValue(key)
      getModList()
      loadmodlib(libName)
      domodlib(libName)
      getLogsDir()
      getDataDir()
      getWaypointList()
      getTalkActionList()
      getExperienceStageList()

      //set*
      setCreatureMaxHealth(cid, health)
      setCreatureMaxMana(cid, mana)
      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(key, newValue)
      setWorldType(type)

      //do*
      doCreatureAddHealth(cid, health[, force])
      doCreatureAddMana(cid, mana)
      doCreatureSetDropLoot(cid, doDrop)
      doCreatureSetSkullType(cid, skull)
      doCreatureSetSpeakType
      doCreatureSetLookDirection(cid, dir)
      doPlayerSetMaxCapacity(cid, cap)
      doCreatureChangeOutfit(cid, outfit)
      doCreatureSay(uid, text, type[, ghost = false[, cid = 0[, pos]]])
      doCreatureSetNoMove(cid, cannotMove)
      doSetCreatureLight(cid, lightLevel, lightColor, time)
      doSetCreatureOutfit(cid, outfit, time)
      doRemoveCreature(cid[, executeLogout = true])
      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)
      doPlayerSetStorageValue(uid, key, newValue)
      doPlayerSetGroupId(cid, newGroupId)
      doPlayerSetPromotionLevel(cid, level)
      doPlayerSetStamina(cid, minutes)
      doPlayerSetBalance(cid, balance)
      doPlayerSetExtraExpRate(cid, value)
      doPlayerSetPartner(cid, guid)
      doPlayerRemoveItem(cid, itemid, count[, subtype])
      doPlayerAddExperience(cid, amount)
      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 = true]])
      doPlayerAddItemEx(cid, uid[, canDropOnMap = false])
      doPlayerSendTextMessage(cid, MessageClasses, message)
      doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel)
      doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time])
      doPlayerAddMoney(cid, money)
      doPlayerRemoveMoney(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)
      doPlayerSetRate(cid, type, value)
      doPlayerJoinParty(cid, lid)
      doPlayerSendOutfitWindow(cid)
      doPlayerSave(cid[, shallow = false])
      doCreateItem(itemid, type/count, pos)
      doCreateItemEx(itemid[, count/subtype])
      doAddContainerItemEx(uid, virtuid)
      doAddContainerItem(uid, itemid[, count/subtype])
      doChangeTypeItem(uid, newtype)
      doDecayItem(uid)
      doRemoveItem(uid[, count])
      doTransformItem(uid, toitemid[, count/subtype])
      doSetItemActionId(uid, actionid)
      doSetItemText(uid, text[, writer[, date]])
      doSetItemSpecialDescription(uid, desc)
      doSetItemOutfit(cid, item, time)
      doSetItemProtection(uid, value)
      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 = true])
      doCreateTeleport(itemid, topos, createpos)
      doSendMagicEffect(pos, type[, player])
      doSendDistanceShoot(frompos, topos, type[, player])
      doSendAnimatedText(pos, text, color[, player])
      doShowTextDialog(cid, itemid, text)
      doRelocate(pos, toPos[, creatures = true])
      doBroadcastMessage(message, type)
      doWaypointAddTemporial(name, pos)
      doSetGameState(stateId)
      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(id[, cid])
      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[, lower = true])

      //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)

      md5(str)
      sha1(str)

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

      //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

    Lua made functions (data/lib)

    Código:
      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)
      doPlayerWithdrawMoney(cid, money)
      doPlayerDepositMoney(cid, money)
      comparePos(pos, posEx)
      isInRange(pos, fromPos, toPos)
      getArea(pos, rangeX, rangeY)
      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(pos, posEx)
      getCreatureLookPosition(cid)
      getPosByDir(fromPosition, direction, size)
      doPlayerWithdrawAllMoney(cid)
      doPlayerDepositAllMoney(cid)
      doPlayerTransferAllMoneyTo(cid, target)
      doPlayerAddLevel(cid, amount, round)
      doPlayerAddMagLevel(cid, amount)
      doPlayerAddSkill(cid, amount)
      playerExists(name)
      getTibiaTime()
      doWriteLogFile(file, text)
      isInArea(pos, fromPos, toPos)
      getExperienceForLevel(lv)
      doMutePlayer(cid, time)
      getPlayerGroupName(cid)
      getPlayerVocationName(cid)
      getPromotedVocation(vid)
      doPlayerRemovePremiumDays(cid, days)
      getPlayerMasterPos(cid)
      getHouseOwner(houseId)
      getHouseName(houseId)
      getHouseEntry(houseId)
      getHouseRent(houseId)
      getHousePrice(houseId)
      getHouseTown(houseId)
      getHouseTilesCount(houseId)
      getItemNameById(itemid)
      getItemPluralNameById(itemid)
      getItemArticleById(itemid)
      getItemName(uid)
      getItemPluralName(uid)
      getItemArticle(uid)
      getItemText(uid)
      getItemSpecialDescription(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)

    Compats (data/lib/100-compat.lua)

    Código:
      table.getPos = table.find
      doSetCreatureDropLoot = doCreatureSetDropLoot
      doPlayerSay = doCreatureSay
      doPlayerAddMana = doCreatureAddMana
      playerLearnInstantSpell = doPlayerLearnInstantSpell
      doPlayerRemOutfit = doPlayerRemoveOutfit
      pay = doPlayerRemoveMoney
      broadcastMessage = doBroadcastMessage
      getPlayerName = getCreatureName
      getCreaturePosition = getThingPosition
      getPlayerPosition = getCreaturePosition
      getCreaturePos = getCreaturePosition
      creatureGetPosition = getCreaturePosition
      getPlayerMana = getCreatureMana
      getPlayerMaxMana = getCreatureMaxMana
      hasCondition = getCreatureCondition
      isMoveable = isMovable
      isItemMoveable = isItemMovable
      saveData = saveServer
      savePlayers = saveServer
      getPlayerSkill = getPlayerSkillLevel
      getPlayerSkullType = getCreatureSkullType
      getCreatureSkull = 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
      doPlayerAddExp = doPlayerAddExperience
      isInArea = isInRange
      doPlayerSetSkillRate = doPlayerSetRate
      getCreatureLookDir = getCreatureLookDirection
      getPlayerLookDir = getCreatureLookDirection
      getPlayerLookDirection = getCreatureLookDirection
      doCreatureSetLookDir = doCreatureSetLookDirection
      getPlayerLookPos = getCreatureLookPosition
      setPlayerStamina = doPlayerSetStamina
      setPlayerPromotionLevel = doPlayerSetPromotionLevel
      setPlayerGroupId = doPlayerSetGroupId
      setPlayerPartner = doPlayerSetPartner
      doPlayerSetStorageValue = doCreatureSetStorage
      setPlayerStorageValue = doPlayerSetStorageValue
      getPlayerStorageValue = getCreatureStorage
      getGlobalStorageValue = getStorage
      setGlobalStorageValue = doSetStorage
      setPlayerBalance = doPlayerSetBalance
      doAddMapMark = doPlayerAddMapMark
      doSendTutorial = doPlayerSendTutorial
      getWaypointsList = getWaypointList
      getPlayerLastLoginSaved = getPlayerLastLogin
      getThingPos = getThingPosition
      doAreaCombatHealth = doCombatAreaHealth
      doAreaCombatMana = doCombatAreaMana
      doAreaCombatCondition = doCombatAreaCondition
      doAreaCombatDispel = doCombatAreaDispel
      getItemDescriptionsById = getItemInfo
      hasProperty = hasItemProperty
      hasClient = hasPlayerClient
      print = std.cout
      getPosByDir = getPositionByDirection
      db.updateQueryLimitOperator = db.updateLimiter
      db.stringComparisonOperator = db.stringComparison


    TFS 1.0
    All functions, source and lua made

    Código:
      //do*
      doAddCondition(cid, condition)
      doAddContainerItem(uid, itemid, <optional> count/subtype)
      doAddContainerItemEx(uid, virtualId)
      doAddMapMark(cid, pos, type, description)
      doAreaCombatCondition(cid, pos, area, condition, effect)
      doAreaCombatDispel(cid, pos, area, type, effect)
      doAreaCombatHealth(cid, type, pos, area, min, max, effect)
      doAreaCombatMana(cid, pos, area, min, max, effect)
      doChallengeCreature(cid, target)
      doChangeSpeed(cid, delta)
      doChangeTypeItem(uid, newtype)
      doCombat(cid, combat, param)
      doConvinceCreature(cid, target)
      doCreateItem(itemid, type/count, pos)
      doCreateItemEx(itemid, <optional> count/subtype)
      doCreateNpc(name, pos)
      doCreateTeleport(itemid, topos, createpos)
      doCreatureAddHealth(cid, health)
      doCreatureChangeOutfit(cid, outfit)
      doCreatureSay(cid, text, type, ...)
      doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
      doCreatureSetLookDir(cid, direction)
      doDecayItem(uid)
      doForceSummonCreature(name, pos)
      doMonsterChangeTarget(cid)
      doMoveCreature(cid, direction)
      doPlayerAddBlessing(cid, blessing)
      doPlayerAddExp(cid, exp, useMult, ...)
      doPlayerAddItem(cid, itemid, <optional: default: 1> count, <optional: default: 1> canDropOnMap, <optional: default: 1>subtype)
      doPlayerAddItem(uid, itemid, <optional: default: 1> count/subtype)
      doPlayerAddItemEx(cid, uid, ...)
      doPlayerAddMana(cid, mana, ...)
      doPlayerAddManaSpent(cid, mana)
      doPlayerAddMoney(cid, money)
      doPlayerAddMount(cid, mountId)
      doPlayerAddOutfit(cid, lookType, addons)
      doPlayerAddPremiumDays(cid, days)
      doPlayerAddSkillTry(cid, skillid, n)
      doPlayerAddSoul(cid, soul)
      doPlayerFeed(cid, food)
      doPlayerJoinParty(cid, leaderId)
      doPlayerPopupFYI(cid, message)
      doPlayerRemOutfit(cid, lookType, addons)
      doPlayerRemoveItem(cid, itemid, count, <optional> subtype, <optional> ignoreEquipped)
      doPlayerRemoveMoney(cid, money)
      doPlayerRemoveMount(cid, mountId)
      doPlayerRemovePremiumDays(cid, days)
      doPlayerSendCancel(cid, text)
      doPlayerSendTextMessage(cid, type, text, ...)
      doPlayerSetBalance(cid, balance)
      doPlayerSetGuildLevel(cid, level)
      doPlayerSetGuildNick(cid, nick)
      doPlayerSetOfflineTrainingSkill(cid, skill)
      doPlayerSetSex(cid, sex)
      doPlayerSetTown(cid, town)
      doPlayerSetVocation(cid, vocation)
      doRelocate(pos, posTo)
      doRemoveCondition(cid, type[, subId])
      doRemoveCreature(cid)
      doRemoveItem(uid, ...)
      doSendDistanceShoot(fromPos, toPos, distanceEffect, ...)
      doSendMagicEffect(pos, magicEffect, ...)
      doSendTutorial(cid, tutorialId)
      doSetCreatureDropLoot(cid, doDrop)
      doSetCreatureLight(cid, lightLevel, lightColor, time)
      doSetCreatureOutfit(cid, outfit, time)
      doSetItemActionId(uid, actionId)
      doSetItemOutfit(cid, item, time)
      doSetItemSpecialDescription(uid, desc)
      doSetItemText(uid, text)
      doSetMonsterOutfit(cid, name, time)
      doSetMonsterTarget(cid, target)
      doShowTextDialog(cid, itemId, text)
      doSummonCreature(name, pos)
      doTargetCombatCondition(cid, target, condition, effect)
      doTargetCombatDispel(cid, target, type, effect)
      doTargetCombatHealth(cid, target, type, min, max, effect)
      doTargetCombatMana(cid, target, min, max, effect)
      doTeleportThing(uid, dest, pushMovement)
      doTileAddItemEx(pos, uid)
      doTransformItem(uid, newItemId, ...)


      //get*
      getAccountNumberByPlayerName(name)
      getBlessingsCost(level)
      getConfigInfo(info)
      getContainerCap(uid)
      getContainerCapById(itemId)
      getContainerItem(uid, slot)
      getContainerSize(uid)
      getCreatureBaseSpeed(cid)
      getCreatureCondition(cid, condition[, subId])
      getCreatureHealth(cid)
      getCreatureMaster(cid)
      getCreatureMaxHealth(cid)
      getCreatureName(cid)
      getCreatureOutfit(cid)
      getCreaturePosition(cid)
      getCreatureSpeed(cid)
      getCreatureSummons(cid)
      getCreatureTarget(cid)
      getDepotId(uid)
      getDistanceBetween(firstPosition, secondPosition)
      getFluidSourceType(itemId)
      getGlobalStorageValue(key)
      getGuildId(guildName)
      getHouseAccessList(id, listId)
      getHouseByPlayerGUID(playerGUID)
      getHouseEntry(houseId)
      getHouseName(houseId)
      getHouseOwner(houseId)
      getHouseRent(id)
      getHouseTilesSize(houseId)
      getHouseTown(houseId)
      getInstantSpellInfoByName(cid, name)
      getInstantSpellWords(name)
      getIPByPlayerName(name)
      getItemDescriptions(itemId)
      getItemIdByName(name)
      getItemName(itemId)
      getItemRWInfo(uid)
      getItemWeight(itemId, ...)
      getItemWeightByUID(uid, ...)
      getMonsterFriendList(cid)
      getMonsterTargetList(cid)
      getOnlinePlayers()
      getPartyMembers(cid)
      getPlayerAccess(cid)
      getPlayerAccountType(cid)
      getPlayerBalance(cid)
      getPlayerBlessing(cid, blessing)
      getPlayerByName(name)
      getPlayerDepotItems(cid, depotId)
      getPlayerFlagValue(cid, flag)
      getPlayerFood(cid)
      getPlayerFreeCap(cid)
      getPlayerGroupId(cid)
      getPlayerGUID(cid)
      getPlayerGUIDByName(name)
      getPlayerGuildId(cid)
      getPlayerGuildLevel(cid)
      getPlayerGuildName(cid)
      getPlayerGuildNick(cid)
      getPlayerGuildRank(cid)
      getPlayerInstantSpellCount(cid)
      getPlayerInstantSpellInfo(cid, index)
      getPlayerIp(cid)
      getPlayerItemById(cid, deepSearch, itemId, ...)
      getPlayerItemCount(cid, itemId, ...)
      getPlayerLastLoginSaved(cid)
      getPlayerLearnedInstantSpell(cid, name)
      getPlayerLevel(cid)
      getPlayerLight(cid)
      getPlayerLookDir(cid)
      getPlayerLossPercent(cid)
      getPlayerMagLevel(cid)
      getPlayerMana(cid)
      getPlayerMasterPos(cid)
      getPlayerMaxMana(cid)
      getPlayerMoney(cid)
      getPlayerMount(cid, mountId)
      getPlayerName(cid)
      getPlayerParty(cid)
      getPlayerPosition(cid)
      getPlayerPremiumDays(cid)
      getPlayersByAccountNumber(accountNumber)
      getPlayersByIPAddress(ip, mask)
      getPlayerSex(cid)
      getPlayerSkill(cid, skillId)
      getPlayerSkullType(cid)
      getPlayerSlotItem(cid, slot)
      getPlayerSoul(cid)
      getPlayerStorageValue(cid, key)
      getPlayerTown(cid)
      getPlayerVocation(cid)
      getPromotedVocation(vocationId)
      getPvpBlessingCost(level)
      getSpectators(centerPos, rangex, rangey, multifloor, onlyPlayers)
      getThing(uid)
      getThingfromPos(pos)
      getThingPos(uid)
      getTibianTime()
      getTileHouseInfo(pos)
      getTileInfo(position)
      getTileItemById(position, itemId, ...)
      getTileItemByType(position, itemType)
      getTilePzInfo(position)
      getTileThingByPos(position)
      getTileThingByTopOrder(position, topOrder)
      getTopCreature(position)
      getTownId(townName)
      getTownName(townId)
      getTownTemplePosition(townId)
      getWaypointPosition(name)
      getWorldCreatures(type)
      getWorldLight()
      getWorldTime()
      getWorldUpTime()


      //set*
      setCombatArea(combat, area)
      setCombatCallBack(combat, key, function_name)
      setCombatCondition(combat, condition)
      setCombatFormula(combat, type, mina, minb, maxa, maxb)
      setCombatParam(combat, key, value)
      setConditionFormula(combat, mina, minb, maxa, maxb)
      setConditionParam(condition, key, value)
      setGlobalStorageValue(key, value)
      setHouseAccessList(id, listId, listText)
      setHouseOwner(id, guid)
      setPlayerGroupId(cid, groupId)
      setPlayerStorageValue(cid, key, value)


      //is*
      isContainer(uid)
      isCorpse(uid)
      isCreature(cid)
      isDepot(uid)
      isDruid(cid)
      isInArray(array, value)
      isInRange(pos, fromPos, toPos)
      isInWar(cid, target)
      isItem(uid)
      isItemContainer(itemId)
      isItemDoor(itemId)
      isItemFluidContainer(itemId)
      isItemMovable(itemId)
      isItemRune(itemId)
      isItemStackable(itemId)
      isKnight(cid)
      isMonster(cid)
      isMovable(uid)
      isNpc(cid)
      isNumber(str)
      isPaladin(cid)
      isPlayer(cid)
      isPlayerGhost(cid)
      isPlayerPzLocked(cid)
      isPremium(cid)
      isSightClear(fromPos, toPos, floorCheck)
      isSorcerer(cid)
      isSummon(cid)
      isValidUID(uid)


      mayNotMove(cid, value)
      numberToVariant(number)
      positionToVariant(pos)
      variantToNumber(var)
      variantToPosition(var)
      variantToString(var)
      pushThing(thing)
      queryTileAddThing(thing, position, ...)
      saveServer()
      sendChannelMessage(channelId, type, message)
      sendGuildChannelMessage(guildId, type, message)
      stopEvent(eventid)
      string.split(str, sep)
      stringToVariant(string)
      targetPositionToVariant(pos)
      unregisterCreatureEvent(cid, name)
      hasProperty(uid, prop)
      addDamageCondition(condition, rounds, time, value)
      addEvent(callback, delay, ...)
      addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
      broadcastMessage(message, type)
      canPlayerLearnInstantSpell(cid, name)
      canPlayerWearOutfit(cid, lookType, addons)
      cleanMap()
      createCombatArea( {area}, <optional> {extArea} )
      createCombatObject()
      createConditionObject(type)
      debugPrint(text)


      Player.feed(self, food)
      Player.isUsingOtClient(self)
      Player.sendCancelMessage(self, message)
      Player.sendExtendedOpcode(self, opcode, buffer)
      playerLearnInstantSpell(cid, name)
      Position.getNextPosition(self, direction, steps)
      Game.convertIpToString(ip)
      Game.getStorageValue(key)
      Game.setStorageValue(key, value)
      Creature.getClosestFreePosition(self, position, extended)


      registerClass(className, baseClass, newFunction)
      registerCreatureEvent(cid, name)
      registerEnum(value)
      registerEnumIn(tableName, value)
      registerGlobalMethod(functionName, function)
      registerGlobalVariable(name, value)
      registerMetaMethod(className, functionName, function)
      registerMethod(className, functionName, function)
      registerTable(tableName)
      registerVariable(tableName, name, value)

    2 participantes
    https://www.facebook.com

    2Guia Basica De lua funtions Empty Re: Guia Basica De lua funtions Lun Dic 21, 2015 6:08 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    buen aporte +1 :(MG):



    Guia Basica De lua funtions YNU5B25
    2 participantes
    http://www.tibiaface.com

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).