[TFS 1.0 / 1.2] LUA Functions

Discussion in 'Programming & Scripting' started by cbrm, Aug 11, 2013.

  1. hellboy

    hellboy Active Member

    Joined:
    Apr 6, 2008
    Messages:
    350
    Likes Received:
    46
    Best Answers:
    1
    Global storage is removed from TFS?
    I don't see here any function similar too getGlobalStorageValue or setGlobalStorageValue, what's more I don't see any similar table in mysql schema.
     
  2. Ninja

    Ninja 「Speedwagon Foundation」 Staff Member Global Moderator

    Joined:
    Apr 6, 2010
    Messages:
    5,876
    Likes Received:
    1,479
    Best Answers:
    12
    compat.lua#L747-754
     
    Evil Puncker likes this.
  3. hellboy

    hellboy Active Member

    Joined:
    Apr 6, 2008
    Messages:
    350
    Likes Received:
    46
    Best Answers:
    1
    Thanks
     
  4. Saintsbr

    Saintsbr New Member

    Joined:
    Jul 10, 2014
    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    hello,
    you know how to create " goplayeraddpremiumpoint " ?
     
  5. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,523
    Likes Received:
    789
    Best Answers:
    0
  6. Jetro

    Jetro jangeldev

    Joined:
    Aug 1, 2011
    Messages:
    452
    Likes Received:
    67
    Best Answers:
    0
    pastebin is not working for me :/
    edit:
    ready, thanks for sharing :)
     
    Last edited: Sep 2, 2014
  7. xenaron

    xenaron New Member

    Joined:
    Oct 6, 2014
    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    hello a question a little bonus new addon exists for tfs 1.0?
     
  8. Cronox

    Cronox www.Retro-Tibia.com | www.Searz-Online.com

    Joined:
    Jul 5, 2011
    Messages:
    1,807
    Likes Received:
    119
    Best Answers:
    0
    fix*
     
    Last edited: Nov 21, 2014
  9. Caio Cesar

    Caio Cesar Member

    Joined:
    Nov 23, 2014
    Messages:
    60
    Likes Received:
    6
    Best Answers:
    0
    Is this list updated or outdated?
    Last edited by a moderator: Jul 13, 2014
     
  10. whitevo

    whitevo Feeling good, thats what I do.

    Joined:
    Jan 2, 2015
    Messages:
    3,226
    Likes Received:
    550
    Best Answers:
    1
    outdated, but still using this as fast check for new things i want to do
     
  11. Zothion

    Zothion Well-Known Member

    Joined:
    Apr 28, 2014
    Messages:
    1,085
    Likes Received:
    377
    Best Answers:
    0
    Code (Text):
    1.  
    2. addEvent(callback, delay, ...)
    3. cleanMap()
    4. createCombatArea( {area}, <optional> {extArea} )
    5. debugPrint(text)
    6. doAddContainerItem(uid, itemid, <optional> count/subtype)
    7. doAreaCombatCondition(cid, pos, area, condition, effect)
    8. doAreaCombatDispel(cid, pos, area, type, effect)
    9. doAreaCombatHealth(cid, type, pos, area, min, max, effect[, origin = ORIGIN_SPELL])
    10. doAreaCombatMana(cid, pos, area, min, max, effect[, origin = ORIGIN_SPELL])
    11. doChallengeCreature(cid, target)
    12. doCreateItem(itemid, <optional> type/count, pos)
    13.     Returns uid of the created item, only works on tiles.  
    14. doCreateItemEx(itemid, <optional> count/subtype)
    15. doMoveCreature(cid, direction)
    16. doPlayerAddItem(cid, itemid, <optional: default: 1> count, <optional: default: 1> canDropOnMap, <optional: default: 1>subtype)
    17.     Returns uid of the created item      
    18. doSetCreatureLight(cid, lightLevel, lightColor, time)
    19. doSetCreatureOutfit(cid, outfit, time)
    20. doSetItemOutfit(cid, item, time)
    21. doSetMonsterOutfit(cid, name, time)
    22. doTargetCombatCondition(cid, target, condition, effect)
    23. doTargetCombatDispel(cid, target, type, effect)
    24. doTargetCombatHealth(cid, target, type, min, max, effect[, origin = ORIGIN_SPELL])
    25. doTargetCombatMana(cid, target, min, max, effect[, origin = ORIGIN_SPELL)
    26. doTileAddItemEx(pos, uid)
    27. getCreatureCondition(cid, condition[, subId])
    28. getDepotId(uid)
    29. getPlayerFlagValue(cid, flag)
    30. getPlayerInstantSpellCount(cid)
    31. getPlayerInstantSpellInfo(cid, index)
    32. getWaypointPosition(name)
    33. getWorldLight()
    34. getWorldTime()
    35. getWorldUpTime()
    36. isDepot(uid)
    37. isInArray(array, value)
    38. isInWar(cid, target)
    39. isMovable(uid)
    40. isMoveable(uid)
    41. isValidUID(uid)
    42. saveServer()
    43. sendChannelMessage(channelId, type, message)
    44. sendGuildChannelMessage(guildId, type, message)
    45. stopEvent(eventid)
    most relevant luascript.cpp non methamethod functions (i scraped luascript.cpp and then removed things relating to _G, enums etc, all normal functions should be there)

    metamethod functions:
    http://pastebin.com/wrnD8jHH
    Code (Text):
    1.  
    2. Game
    3.     Game.createContainer(itemId, size[, position])
    4.     Game.createItem(itemId[, count[, position]])
    5.     Game.createMonster(monsterName, position[, extended = false[, force = false]])
    6.     Game.createNpc(npcName, position[, extended = false[, force = false]])
    7.     Game.createTile(position[, isDynamic = false])
    8.     Game.createTile(x, y, z[, isDynamic = false])
    9.     Game.getExperienceStage(level)
    10.     Game.getGameState()
    11.     Game.getHouses()
    12.     Game.getMonsterCount()
    13.     Game.getNpcCount()
    14.     Game.getPlayerCount()
    15.     Game.getPlayers()
    16.     Game.getReturnMessage(value)
    17.     Game.getSpectators(position[, multifloor = false[, onlyPlayer = false[, minRangeX = 0[, maxRangeX = 0[, minRangeY = 0[, maxRangeY = 0]]]]]])
    18.     Game.getTowns()
    19.     Game.getWorldType()
    20.     Game.loadMap(path)
    21.     Game.setGameState(state)
    22.     Game.setWorldType(type)  
    23.     Game.startRaid(raidName)
    24.  
    25. Combat
    26.     Combat()  
    27.     combat:execute(creature, variant)
    28.     combat:setArea(area)
    29.     combat:setCallback(key, function)
    30.     combat:setCondition(condition)
    31.     combat:setFormula(type, mina, minb, maxa, maxb)
    32.     combat:setOrigin(origin)
    33.     combat:setParameter(key, value)
    34.  
    35. Condition
    36.     Condition(conditionType[, conditionId = CONDITIONID_COMBAT])  
    37.     condition:addDamage(rounds, time, value)
    38.     condition:clone()
    39.     condition:delete()
    40.     condition:getEndTime()
    41.     condition:getIcons()
    42.     condition:getId()
    43.     condition:getSubId()
    44.     condition:getTicks()
    45.     condition:getType()
    46.     condition:setFormula(mina, minb, maxa, maxb)
    47.     condition:setOutfit(lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet[, lookAddons[, lookMount]])
    48.     condition:setOutfit(outfit)
    49.     condition:setParameter(key, value)
    50.     condition:setTicks(ticks)
    51.  
    52. Container
    53.     Container(uid)  
    54.     container:addItem(itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]])
    55.     container:addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]])
    56.     container:getCapacity()
    57.     container:getEmptySlots([recursive = false])
    58.     container:getItem(index)
    59.     container:getItemCountById(itemId[, subType = -1])
    60.     container:getItemHoldingCount()
    61.     container:getSize()
    62.     container:hasItem(item)
    63.  
    64. Creature
    65.     Creature(id or name or userdata)
    66.     creature:addCondition(condition[, force = false])
    67.     creature:addHealth(healthChange)
    68.     creature:addMana(manaChange[, animationOnLoss = false])
    69.     creature:canSee(position)
    70.     creature:canSeeCreature(creature)
    71.     creature:changeSpeed(delta)
    72.     creature:getBaseSpeed()
    73.     creature:getCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0]])
    74.     creature:getDamageMap()
    75.     creature:getDescription(distance)
    76.     creature:getDirection()
    77.     creature:getFollowCreature()
    78.     creature:getHealth()
    79.     creature:getId()
    80.     creature:getLight()
    81.     creature:getMana()
    82.     creature:getMaster()
    83.     creature:getMaxHealth()
    84.     creature:getMaxMana()
    85.     creature:getName()
    86.     creature:getOutfit()
    87.     creature:getParent()
    88.     creature:getPathTo(pos[, minTargetDist = 0[, maxTargetDist = 1[, fullPathSearch = true[, clearSight = true[, maxSearchDist = 0]]]]])
    89.     creature:getPosition()
    90.     creature:getSkull()
    91.     creature:getSpeed()
    92.     creature:getSummons()
    93.     creature:getTarget()
    94.     creature:getTile()
    95.     creature:isCreature()
    96.     creature:isHealthHidden()
    97.     creature:isInGhostMode()
    98.     creature:isRemoved()
    99.     creature:registerEvent(name)
    100.     creature:remove()
    101.     creature:removeCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0[, force = false]]])
    102.     creature:say(text, type[, ghost = false[, target = nullptr[, position]]])
    103.     creature:setDirection(direction)
    104.     creature:setDropLoot(doDrop)
    105.     creature:setFollowCreature(followedCreature)
    106.     creature:setHiddenHealth(hide)
    107.     creature:setLight(color, level)
    108.     creature:setMaster(master)
    109.     creature:setMaxHealth(maxHealth)
    110.     creature:setOutfit(outfit)
    111.     creature:setSkull(skull)
    112.     creature:setTarget(target)
    113.     creature:teleportTo(position[, pushMovement = false])
    114.     creature:unregisterEvent(name)
    115.  
    116. Group
    117.     Group(id)  
    118.     group:getAccess()
    119.     group:getFlags()
    120.     group:getId()
    121.     group:getMaxDepotItems()
    122.     group:getMaxVipEntries()
    123.     group:getName()
    124.  
    125. Guild
    126.     Guild(id)  
    127.     guild:addRank(id, name, level)
    128.     guild:getId()
    129.     guild:getMembersOnline()
    130.     guild:getMotd()
    131.     guild:getName()
    132.     guild:getRankById(id)
    133.     guild:getRankByLevel(level)
    134.     guild:setMotd(motd)
    135.  
    136. House
    137.     House(id)  
    138.     house:getAccessList(listId)
    139.     house:getBedCount()
    140.     house:getBeds()
    141.     house:getDoorCount()
    142.     house:getDoors()
    143.     house:getExitPosition()
    144.     house:getId()
    145.     house:getName()
    146.     house:getOwnerGuid()
    147.     house:getRent()
    148.     house:getTileCount()
    149.     house:getTiles()
    150.     house:getTown()
    151.     house:setAccessList(listId, list)
    152.     house:setOwnerGuid(guid[, updateDatabase = true])
    153.  
    154. Item
    155.     Item(uid)  
    156.     item:clone()
    157.     item:decay()
    158.     item:getActionId()
    159.     item:getArticle()
    160.     item:getAttribute(key)
    161.     item:getCharges()
    162.     item:getCount()
    163.     item:getDescription(distance)
    164.     item:getFluidType()
    165.     item:getId()
    166.     item:getName()
    167.     item:getParent()
    168.     item:getPluralName()
    169.     item:getPosition()
    170.     item:getSubType()
    171.     item:getTile()
    172.     item:getTopParent()
    173.     item:getUniqueId()
    174.     item:getWeight()
    175.     item:hasAttribute(key)
    176.     item:hasProperty(property)
    177.     item:moveTo(position or cylinder)
    178.     item:remove([count = -1])
    179.     item:removeAttribute(key)
    180.     item:setActionId(actionId)
    181.     item:setAttribute(key, value)
    182.     item:split([count = 1])
    183.     item:transform(itemId[, count/subType = -1])
    184.  
    185. ItemType
    186.     ItemType(id or name)  
    187.     itemType:getArmor()
    188.     itemType:getArticle()
    189.     itemType:getAttack()
    190.     itemType:getCapacity()
    191.     itemType:getCharges()
    192.     itemType:getClientId()
    193.     itemType:getDecayId()
    194.     itemType:getDefense()
    195.     itemType:getDescription()
    196.     itemType:getDestroyId()
    197.     itemType:getElementDamage()
    198.     itemType:getElementType()
    199.     itemType:getExtraDefense()
    200.     itemType:getFluidSource()
    201.     itemType:getHitChance()
    202.     itemType:getId()
    203.     itemType:getName()
    204.     itemType:getPluralName()
    205.     itemType:getRequiredLevel()
    206.     itemType:getShootRange()
    207.     itemType:getSlotPosition()
    208.     itemType:getTransformDeEquipId()
    209.     itemType:getTransformEquipId()
    210.     itemType:getType()
    211.     itemType:getWeaponType()
    212.     itemType:getWeight([count = 1])
    213.     itemType:hasSubType()
    214.     itemType:isContainer()
    215.     itemType:isFluidContainer()
    216.     itemType:isMovable()
    217.     itemType:isReadable()
    218.     itemType:isRune()
    219.     itemType:isStackable()
    220.     itemType:isWritable()
    221.  
    222. ModalWindow
    223.     ModalWindow(id, title, message)  
    224.     modalWindow:addButton(id, text)
    225.     modalWindow:addChoice(id, text)
    226.     modalWindow:getButtonCount()
    227.     modalWindow:getChoiceCount()
    228.     modalWindow:getDefaultEnterButton()
    229.     modalWindow:getDefaultEscapeButton()
    230.     modalWindow:getId()
    231.     modalWindow:getMessage()
    232.     modalWindow:getTitle()
    233.     modalWindow:hasPriority()
    234.     modalWindow:sendToPlayer(player)    item:isItem()
    235.     modalWindow:setDefaultEnterButton(buttonId)
    236.     modalWindow:setDefaultEscapeButton(buttonId)
    237.     modalWindow:setMessage(text)
    238.     modalWindow:setPriority(priority)
    239.     modalWindow:setTitle(text)
    240.  
    241. Monster
    242.     Monster(id or userdata)  
    243.     monster:addFriend(creature)
    244.     monster:addTarget(creature[, pushFront = false])
    245.     monster:getFriendCount()
    246.     monster:getFriendList()
    247.     monster:getSpawnPosition()
    248.     monster:getTargetCount()
    249.     monster:getTargetList()
    250.     monster:getType()
    251.     monster:isFriend(creature)
    252.     monster:isIdle()
    253.     monster:isInSpawnRange([position])
    254.     monster:isMonster()
    255.     monster:isOpponent(creature)
    256.     monster:isTarget(creature)
    257.     monster:removeFriend(creature)
    258.     monster:removeTarget(creature)
    259.     monster:searchTarget([searchType = TARGETSEARCH_DEFAULT])
    260.     monster:selectTarget(creature)
    261.     monster:setIdle(idle)
    262.     monsterType:canPushCreatures()
    263.     monsterType:canPushItems()
    264.     monsterType:getArmor()
    265.     monsterType:getAttackList()
    266.     monsterType:getBaseSpeed()
    267.     monsterType:getChangeTargetChance()
    268.     monsterType:getChangeTargetSpeed()
    269.     monsterType:getCombatImmunities()
    270.     monsterType:getConditionImmunities()
    271.     monsterType:getCorpseId()
    272.     monsterType:getCreatureEvents()
    273.     monsterType:getDefense()
    274.     monsterType:getDefenseList()
    275.     monsterType:getElementList()
    276.     monsterType:getExperience()
    277.     monsterType:getHealth()
    278.     monsterType:getLight()
    279.     monsterType:getLoot()
    280.     monsterType:getManaCost()
    281.     monsterType:getMaxHealth()
    282.     monsterType:getMaxSummons()
    283.     monsterType:getName()
    284.     monsterType:getNameDescription()
    285.     monsterType:getOutfit()
    286.     monsterType:getRace()
    287.     monsterType:getRunHealth()
    288.     monsterType:getStaticAttackChance()
    289.     monsterType:getSummonList()
    290.     monsterType:getTargetDistance()
    291.     monsterType:getVoices()
    292.     monsterType:getYellChance()
    293.     monsterType:getYellSpeedTicks()
    294.     monsterType:isAttackable()
    295.     monsterType:isConvinceable()
    296.     monsterType:isHealthShown()
    297.     monsterType:isHostile()
    298.     monsterType:isIllusionable()
    299.     monsterType:isPushable()
    300.     monsterType:isSummonable()
    301.  
    302. NetworkMessage
    303.     NetworkMessage()  
    304.     networkMessage:addByte(number)
    305.     networkMessage:addDouble(number)
    306.     networkMessage:addItem(item)
    307.     networkMessage:addItemId(itemId)
    308.     networkMessage:addPosition(position)
    309.     networkMessage:addString(string)
    310.     networkMessage:addU16(number)
    311.     networkMessage:addU32(number)
    312.     networkMessage:addU64(number)
    313.     networkMessage:getByte()
    314.     networkMessage:getPosition()
    315.     networkMessage:getString()
    316.     networkMessage:getU16()
    317.     networkMessage:getU32()
    318.     networkMessage:getU64()
    319.     networkMessage:reset()
    320.     networkMessage:sendToPlayer(player)
    321.     networkMessage:skipBytes(number)
    322.  
    323. Npc
    324.     Npc([id or name or userdata])  
    325.     npc:getSpeechBubble()
    326.     npc:isNpc()
    327.     npc:setMasterPos(pos[, radius])
    328.     npc:setSpeechBubble(speechBubble)
    329.  
    330. Party  
    331.     party:addInvite(player)
    332.     party:addMember(player)
    333.     party:disband()
    334.     party:getInviteeCount()
    335.     party:getInvitees()
    336.     party:getLeader()
    337.     party:getMemberCount()
    338.     party:getMembers()
    339.     party:isSharedExperienceActive()
    340.     party:isSharedExperienceEnabled()
    341.     party:removeInvite(player)
    342.     party:removeMember(player)
    343.     party:setLeader(player)
    344.     party:setSharedExperience(active)
    345.     party:shareExperience(experience)
    346.  
    347. Player
    348.     Player(id or name or userdata)  
    349.     player:addBlessing(blessing)
    350.     player:addExperience(experience[, sendText = false])
    351.     player:addItem(itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]])
    352.     player:addItemEx(item[, canDropOnMap = false[, index = INDEX_WHEREEVER[, flags = 0]]])
    353.     player:addItemEx(item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]])
    354.     player:addManaSpent(amount)
    355.     player:addMapMark(position, type, description)
    356.     player:addMoney(money)
    357.     player:addMount(mountId)
    358.     player:addOfflineTrainingTime(time)
    359.     player:addOfflineTrainingTries(skillType, tries)
    360.     player:addOutfit(lookType)
    361.     player:addOutfitAddon(lookType, addon)
    362.     player:addPremiumDays(days)
    363.     player:addSkillTries(skillType, tries)
    364.     player:addSoul(soulChange)
    365.     player:canLearnSpell(spellName)
    366.     player:channelSay(speaker, type, text, channelId)
    367.     player:forgetSpell(spellName)
    368.     player:getAccountId()
    369.     player:getAccountType()
    370.     player:getBankBalance()
    371.     player:getBaseMagicLevel()
    372.     player:getCapacity()
    373.     player:getClient()
    374.     player:getContainerById(id)
    375.     player:getContainerId(container)
    376.     player:getContainerIndex(id)
    377.     player:getDeathPenalty()
    378.     player:getDepotChest(depotId[, autoCreate = false])
    379.     player:getEffectiveSkillLevel(skillType)
    380.     player:getExperience()
    381.     player:getFreeCapacity()
    382.     player:getGroup()
    383.     player:getGuid()
    384.     player:getGuild()
    385.     player:getGuildLevel()
    386.     player:getGuildNick()
    387.     player:getHouse()
    388.     player:getInbox()
    389.     player:getIp()
    390.     player:getItemById(itemId, deepSearch[, subType = -1])
    391.     player:getItemCount(itemId[, subType = -1])
    392.     player:getLastLoginSaved()
    393.     player:getLastLogout()
    394.     player:getLevel()
    395.     player:getMagicLevel()
    396.     player:getManaSpent()
    397.     player:getMaxSoul()
    398.     player:getMoney()
    399.     player:getOfflineTrainingSkill()
    400.     player:getOfflineTrainingTime()
    401.     player:getParty()
    402.     player:getPremiumDays()
    403.     player:getSex()
    404.     player:getSkillLevel(skillType)
    405.     player:getSkillPercent(skillType)
    406.     player:getSkillTries(skillType)
    407.     player:getSkullTime()
    408.     player:getSlotItem(slot)
    409.     player:getSoul()
    410.     player:getStamina()
    411.     player:getStorageValue(key)
    412.     player:getTown()
    413.     player:getVocation()
    414.     player:hasBlessing(blessing)
    415.     player:hasLearnedSpell(spellName)
    416.     player:hasMount(mountId)
    417.     player:hasOutfit(lookType[, addon = 0])
    418.     player:isPlayer()
    419.     player:isPzLocked()
    420.     player:learnSpell(spellName)
    421.     player:openChannel(channelId)
    422.     player:popupFYI(message)
    423.     player:removeBlessing(blessing)
    424.     player:removeExperience(experience[, sendText = false])
    425.     player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]])
    426.     player:removeMoney(money)
    427.     player:removeMount(mountId)
    428.     player:removeOfflineTrainingTime(time)
    429.     player:removeOutfit(lookType)
    430.     player:removeOutfitAddon(lookType, addon)
    431.     player:removePremiumDays(days)
    432.     player:save()
    433.     player:sendChannelMessage(author, text, type, channelId)
    434.     player:sendOutfitWindow()
    435.     player:sendPrivateMessage(speaker, text[, type])
    436.     player:sendTextMessage(type, text[, position, primaryValue = 0, primaryColor = TEXTCOLOR_NONE[, secondaryValue = 0, secondaryColor = TEXTCOLOR_NONE]])
    437.     player:sendTutorial(tutorialId)
    438.     player:setAccountType(accountType)
    439.     player:setBankBalance(bankBalance)
    440.     player:setCapacity(capacity)
    441.     player:setGhostMode(enabled)
    442.     player:setGroup(group)
    443.     player:setGuild(guild)
    444.     player:setGuildLevel(level)
    445.     player:setGuildNick(nick)
    446.     player:setMaxMana(maxMana)
    447.     player:setOfflineTrainingSkill(skillId)
    448.     player:setSex(newSex)
    449.     player:setSkullTime(skullTime)
    450.     player:setStamina(stamina)
    451.     player:setStorageValue(key, value)
    452.     player:setTown(town)
    453.     player:setVocation(id or name or userdata)
    454.     player:showTextDialog(itemId[, text[, canWrite[, length]]])
    455.  
    456. Position
    457.     Position([x = 0[, y = 0[, z = 0[, stackpos = 0]]]])
    458.     Position([position])
    459.     positionValue = position + positionEx
    460.     positionValue = position - positionEx
    461.     position == positionEx  
    462.     position:getDistance(positionEx)
    463.     position:isSightClear(positionEx[, sameFloor = true])
    464.     position:sendDistanceEffect(positionEx, distanceEffect[, player = nullptr])
    465.     position:sendMagicEffect(magicEffect[, player = nullptr])
    466.  
    467. Teleport
    468.     Teleport(uid)  
    469.     teleport:getDestination()
    470.     teleport:setDestination(position)
    471.  
    472. Tile
    473.     Tile(x, y, z)
    474.     Tile(position)  
    475.     tile:getBottomCreature()
    476.     tile:getBottomVisibleCreature(creature)
    477.     tile:getCreatureCount()
    478.     tile:getCreatures()
    479.     tile:getDownItemCount()
    480.     tile:getFieldItem()
    481.     tile:getGround()
    482.     tile:getHouse()  
    483.     tile:getItemById(itemId[, subType = -1])
    484.     tile:getItemByTopOrder(topOrder)
    485.     tile:getItemByType(itemType)
    486.     tile:getItemCount()
    487.     tile:getItemCountById(itemId[, subType = -1])
    488.     tile:getItems()
    489.     tile:getPosition()
    490.     tile:getThing(index)
    491.     tile:getThingCount()
    492.     tile:getThingIndex(thing)
    493.     tile:getTopCreature()
    494.     tile:getTopDownItem()
    495.     tile:getTopItemCount()
    496.     tile:getTopTopItem()
    497.     tile:getTopVisibleCreature(creature)
    498.     tile:getTopVisibleThing(creature)
    499.     tile:hasFlag(flag)
    500.     tile:hasProperty(property[, item])
    501.     tile:queryAdd(thing[, flags])
    502.  
    503. Town
    504.     Town(id or name)  
    505.     town:getId()
    506.     town:getName()
    507.     town:getTemplePosition()
    508.  
    509. Variant
    510.     Variant(number or string or position or thing)
    511.     Variant:getNumber()
    512.     Variant:getPosition()
    513.     Variant:getString()
    514.  
    515. Vocation
    516.     Vocation(id or name)  
    517.     vocation:getAttackSpeed()
    518.     vocation:getBaseSpeed()
    519.     vocation:getCapacityGain()
    520.     vocation:getClientId()
    521.     vocation:getDemotion()
    522.     vocation:getDescription()
    523.     vocation:getHealthGain()
    524.     vocation:getHealthGainAmount()
    525.     vocation:getHealthGainTicks()
    526.     vocation:getId()
    527.     vocation:getManaGain()
    528.     vocation:getManaGainAmount()
    529.     vocation:getManaGainTicks()
    530.     vocation:getMaxSoul()
    531.     vocation:getName()
    532.     vocation:getPromotion()
    533.     vocation:getRequiredManaSpent(magicLevel)
    534.     vocation:getRequiredSkillTries(skillType, skillLevel)
    535.     vocation:getSoulGainTicks()
    536.  

    from what i could see everything from first post is in here pretty much, just that most functions are now metamethod functions instead of standalone :)
     
  12. Xeraphus

    Xeraphus Premium User Premium User

    Joined:
    Feb 14, 2015
    Messages:
    2,349
    Likes Received:
    921
    Best Answers:
    99
    updated (tfs 1.3)
    http://pastebin.com/3j9nk5gD

    new: (not necessarily new, some just left out)
    Code (Text):
    1.  
    2. creature:getEvents()
    3. creature:isTile()
    4. player:getLossPercent()
    5. item:isTile()
    6. item:isTeleport()
    7. position:moveUpstairs()
    8. teleport:isTeleport()
    9. itemType:isDoor()
    10. itemtype:usesSlot(slot)
    11.  
     
  13. Verdoom

    Verdoom New Member

    Joined:
    Jul 10, 2016
    Messages:
    8
    Likes Received:
    1
    Best Answers:
    0
    thx bro !
     
  14. Firoxis

    Firoxis New Member

    Joined:
    Dec 28, 2016
    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    what about vocation:getAttackSpeed()? how can i use it?
     
  15. Xeraphus

    Xeraphus Premium User Premium User

    Joined:
    Feb 14, 2015
    Messages:
    2,349
    Likes Received:
    921
    Best Answers:
    99
    you use it if you want to get the vocation's attack speed
    ._.
     
  16. Firoxis

    Firoxis New Member

    Joined:
    Dec 28, 2016
    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    But what if i want to make an item that brings you attack speed?
     
  17. Xeraphus

    Xeraphus Premium User Premium User

    Joined:
    Feb 14, 2015
    Messages:
    2,349
    Likes Received:
    921
    Best Answers:
    99
    you cant edit it ingame but you can edit it in items.xml with attribute key "attack speed"
     
  18. Firoxis

    Firoxis New Member

    Joined:
    Dec 28, 2016
    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    can you help me with the script?
     
  19. Doomdice

    Doomdice The N00betarian

    Joined:
    Jul 20, 2009
    Messages:
    621
    Likes Received:
    102
    Best Answers:
    0
    I cant remember the name of what has all the script lines in it at something with .cpp in sources can someone help me out on what its call?
     
  20. Xeraphus

    Xeraphus Premium User Premium User

    Joined:
    Feb 14, 2015
    Messages:
    2,349
    Likes Received:
    921
    Best Answers:
    99
    ??
    luascript.cpp?
     

Share This Page

Loading...