Jump to content

[TFS 1.0] Lua functions - funções


Danihcv
 Share

Recommended Posts

Olá, xTibianos. Hoje lhes trago uma lista com todas as funções (teoricamente) presentes no TFS 1.0. Pode ser que ainda estejam faltando algumas funções, pois não tive tempo para conferir, apenas trouxe o conteúdo para cá.

 

  • All functions, source and lua made - Todas as funções da source e feitas em lua (\lib)
   //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)

Créditos

Zonnebloem

Link to comment
Share on other sites

 Share

×
×
  • Create New...