Ir para conteúdo

[TFS 0.2] Lua functions - funções


Danihcv

Posts Recomendados

Olá, xTibianos. Hoje lhes trago duas listas com todas as funções (teoricamente) do TFS 0.2.

 

  • Source functions - funções na source
   //get*
   
   getPlayerMasterPos(cid)
   getPlayerLossPercent(cid)
   getItemIdByName(name)
   getTownName(townId)
   getTownTemplePosition(townId)
   getPlayersByAccountNumber(accountNumber)
   getAccountNumberByPlayerName(name)
   getIPByPlayerName(name)
   getPlayersByIPAddress(ip[, mask = 0xFFFFFFFF])
   getFluidSourceType(type)
   getItemDescriptions(itemid)
   getItemWeightByUID(uid)
   getContainerCapById(itemid)
   getDepotId(uid)
   getHouseTilesSize(houseid)
   getHighscoreString(skillId)
   getPartyMembers(leaderId)
   getCreatureMaster(cid) - Returns: returns the creature's master or itself if the creature isn't a summon
   getMonsterTargetList(cid)
   getMonsterFriendList(cid)
   getPlayerByName(name)
   getPlayerGUIDByName(name)   
   getPlayerLearnedInstantSpell(cid, name)
   getPlayerInstantSpellCount(cid)
   getPlayerInstantSpellInfo(cid, index)
   getPlayerMount(cid, mountid)
   getWorldType()
   getWorldTime()
   getWorldLight()
   getWorldCreatures(type) - Types: 0 players, 1 monsters, 2 npcs, 3 all Returns: Amount
   getWorldUpTime()
   getGuildId(guild_name)
   getPlayerSex(cid)
   getContainerSize(uid)
   getContainerCap(uid)
   getContainerItem(uid, slot)
   getInstantSpellInfoByName(cid, name)
   getInstantSpellWords(name)
   getGlobalStorageValue(valueid)
   getHouseOwner(houseid)
   getHouseName(houseid)
   getHouseEntry(houseid)
   getHouseRent(houseid)
   getHouseTown(houseid)
   getHouseAccessList(houseid, listid)
   getHouseByPlayerGUID(playerGUID)
   getCreatureOutfit(cid)
   getCreaturePosition(cid)
   getCreatureName(cid)
   getCreatureSpeed(cid)
   getCreatureBaseSpeed(cid)
   getCreatureTarget(cid)
   getTilePzInfo(pos) - Returns: 1 is pz. 0 no pz.
   getTileHouseInfo(pos) - Returns: 0 no house. != 0 house id
        getItemRWInfo(uid)
   getThingfromPos(pos)
   getThing(uid)
   getCreatureCondition(cid, condition)
   getItemName(itemid)
   getItemWeight(itemid, count)
   getPlayerPremiumDays(cid)
   getPlayerSkullType(cid)
   getPromotedVocation(vocation)
   getPlayerBlessing(cid, blessing)
   getTileThingByTopOrder(pos, topOrder)
   getTileItemByType(pos, type)
   getTopCreature(pos)
   getTileThingByPos(pos)
   getTileItemById(pos, itemId, <optional> subType)
   getOnlinePlayers()
   getTileInfo(pos)
   getThingPos(uid)
   getSpectators(centerPos, rangex, rangey, multifloor)
   getPlayerStorageValue(uid, valueid)
   getPlayerItemById(cid, deepSearch, itemId, <optional> subType)
   getPlayerIp(cid)
   getPlayerGuildLevel(cid)
   getCreatureSummons(cid) - Returns: returns a table with all the summons of the creature
   getWaypointPosition(name)
   
   //do*
   
   doPlayerAddBlessing(cid, blessing)
   doPlayerPopupFYI(cid, message)
   doCombat(cid, combat, param)
   doPlayerRemovePremiumDays(cid, days)
   doPlayerAddPremiumDays(cid, days)
   doPlayerSetSex(cid, newSex)
   doSetCreatureOutfit(cid, outfit, time)
   doSetItemOutfit(cid, item, time)
   doSetMonsterOutfit(cid, name, time)
   doChangeSpeed(cid, delta)
   doAddContainerItem(uid, itemid, <optional> count/subtype)
   doChallengeCreature(cid, target)
   doTargetCombatDispel(cid, target, type, effect)
   doAreaCombatDispel(cid, pos, area, type, effect)
   doTargetCombatCondition(cid, target, condition, effect)
   doAreaCombatCondition(cid, pos, area, condition, effect)
   doTargetCombatMana(cid, target, min, max, effect)
   doAreaCombatMana(cid, pos, area, min, max, effect)
   doTargetCombatHealth(cid, target, type, min, max, effect)
   doAreaCombatHealth(cid, type, pos, area, min, max, effect)
   doSetCreatureDropLoot(cid, doDrop)
   doSetCreatureLight(cid, lightLevel, lightColor, time)
   doPlayerRemoveMount(cid, mountid)
   doPlayerAddMount(cid, mountid)
   doPlayerRemOutfit(cid,looktype,addons)
   doPlayerAddOutfit(cid,looktype,addons)
   doPlayerSetGuildNick(cid, nick)
   doPlayerSetGuildRank(cid, rank)
   doPlayerSetGuildId(cid, id)
   doPlayerAddExp(cid,exp)
   doPlayerRemoveItem(cid,itemid,count)
   doPlayerSetVocation(cid,voc)
   doPlayerSetTown(cid, townid)
   doMoveCreature(cid, direction)
   doRemoveCreature(cid)
   doConvinceCreature(cid, target)
   doSummonCreature(name, pos)
   doCreateTeleport(itemid, topos, createpos)
   doTileAddItemEx(pos, uid)
   doCreateItemEx(itemid, <optional> count/subtype) - Returns: Returns uid of the created item, only works on tiles.
   doCreateItem(itemid, type/count, pos) - Returns: Returns uid of the created item, only works on tiles.
   doDecayItem(uid)
   doShowTextDialog(cid, itemid, text)
   doPlayerRemoveMoney(cid, money)
   doPlayerSendTextMessage(cid, MessageClasses, message)
   doPlayerAddItemEx(cid, uid, <optional: default: 0> useCidPosOnFail)
   doPlayerAddItem(uid, itemid, <optional> count/subtype) - Returns: Returns uid of the created item
   doPlayerAddSoul(cid, soul)
   doPlayerAddManaSpent(cid, mana)
   doPlayerAddMana(cid, mana)
   doCreatureAddHealth(cid, health)
   doPlayerAddSkillTry(cid, skillid, n)
   doSendAnimatedText(pos, text, color)
   doSetItemSpecialDescription(uid, desc)
   doSetItemText(uid, text)
   doSetItemActionId(uid, actionid)
   doChangeTypeItem(uid, newtype)
   doSendDistanceShoot(frompos, topos, type)
   doSendMagicEffect(pos, type)
   doCreatureSay(cid, text, type)
   doTransformItem(uid, toitemid, <optional> count/subtype)
   doTeleportThing(cid, newpos, <optional> pushmove)
   doPlayerSendDefaultCancel(cid, ReturnValue)
   doRemoveCondition(cid, type)
   doAddCondition(cid, condition)
   doMonsterChangeTarget(cid)
   doSetMonsterTarget(cid, target)
   doCreatureChangeOutfit(cid, outfit)
   doCreateNpc(name, pos)
   doRelocate(pos, posTo) - Returns: Moves all moveable objects from pos to posTo
   doAddContainerItemEx(uid, virtuid)
   doSendTutorial(cid, tutorialid)
   doCreatureSetLookDir(cid, direction)      
   doPlayerFeed(cid, food)
   doRemoveItem(uid, <optional> n)
   doAddMapMark(cid, pos, type, <optional> description)   
   doPlayerAddMoney(cid, money)
   doPlayerChangeName(cid, newName)
   doSetCreatureDirection(cid, direction)
   doWaypointAddTemporial(name, pos)
   
   //set*
   
   setHouseAccessList(houseid, listid, listtext)
   setHouseOwner(houseid, ownerGUID)
   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)
   setPlayerGroupId(cid, newGroupId)
   setPlayerStorageValue(uid, valueid, newvalue)

   
   
   //is*
      
   isPlayer(cid)
   isCreature(cid)
   isContainer(uid)
   isMoveable(uid)
   isSightClear(fromPos, toPos, floorCheck)
   isValidUID(uid)
   isPlayerGhost(cid)
   isPlayerPzLocked(cid)
   isDepot(uid)
   isCorpse(uid)
   isMovable(uid)
   isItemMovable(itemid)
   isItemMoveable(itemid)
   isItemStackable(itemid)
   isItemRune(itemid)
   isItemDoor(itemid)
   isItemContainer(itemid)
   isItemFluidContainer(itemid)
   isInArray(array, value)
      
   //misc*
   
   broadcastMessage(message, type)
   createCombatArea( {area}, <optional> {extArea} )
   canPlayerWearOutfit(cid, looktype, addons)
   hasProperty(uid, prop)
   refreshMap()
   cleanMap()
   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)
   debugPrint(text)
   addEvent(callback, delay, parameter)
   stopEvent(eventid)
   mayNotLogout(cid, value)
   mayNotMove(cid, value)
   saveData()
   saveServer(), does the same thing as saveData()
   escapeString(str)
   registerCreatureEvent(uid, eventName)
   queryTileAddThing(uid, pos, <optional> flags)
   playerLearnInstantSpell(cid, name)
   canPlayerLearnInstantSpell(cid, name)
  • Lua made functions - funções feitas em LUA (data/global.lua)
   doPlayerGiveItem(cid, itemid, count, charges)
   doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
   doSummonCreatures(monsters, positions)
   doPlayerTakeItem(cid, itemid, count)
   doPlayerBuyItem(cid, itemid, count, cost, charges)
   doPlayerSellItem(cid, itemid, count, cost)
   doPlayerAddAddons(cid, addon)
   doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
   doCopyItem(item, attributes)
   doForceSummonCreature(name, pos)

   getMonthDayEnding(day)
   getMonthString(m)
   getArticle(str)
   getDistanceBetween(firstPosition, secondPosition)
   getConfigInfo(info)
   getDirectionTo(pos1, pos2)
   getPlayerLookPos(cid)
   getPosByDir(fromPosition, direction, size)
   getCreaturesInRange(position, radiusx, radiusy, showMonsters, showPlayers, showSummons)
   getCount(string)
   getTibianTime()
   
   setPlayerMultipleStorageValues(cid, storage, value)
   
   isInRange(pos, fromPos, toPos)
   isPremium(cid)
   isNumber(str)
   isSorcerer(cid)
   isDruid(cid)
   isPaladin(cid)
   isKnight(cid)
   isSummon(cid)
   isPlayerSummon(cid)
   isMonsterInRange(monsterName, fromPos, toPos)
   
   addContainerWithItems(cid, container, item, item_count, count)
   rows(result)
   numRows(result)
   tableToPos(t)
   positionExists(pos)
   warnPlayer(cid, msg)
   hasAddon(cid, looktype, addon)
   addAddon(cid, looktype, addon)
   playerExists(name)
   string.split(str)
   string.trim(str)
   string.explode(str, sep)
   table.find(table, value)
   table.isStrIn(txt, str)
   escapeString(str)
   createClass(parent)
   db.getResult(query)
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...