Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''funções''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 9 registros

  1. Olá, xTibianos. Hoje venho lhes trazer umas listas com todas (teoricamente, pois não pude conferir) as funções padrões dos TFS 0.3 e 0.4. Source functions - Funções feitas na source getCreatureHealth(cid) getCreatureMaxHealth(cid[, ignoreModifiers = false]) getCreatureMana(cid) getCreatureMaxMana(cid[, ignoreModifiers = false]) getCreatureHideHealth(cid) doCreatureSetHideHealth(cid, hide) getCreatureSpeakType(cid) doCreatureSetSpeakType(cid, type) getCreatureLookDirection(cid) getPlayerLevel(cid) getPlayerExperience(cid) getPlayerMagLevel(cid[, ignoreModifiers = false]) getPlayerSpentMana(cid) getPlayerFood(cid) getPlayerAccess(cid) getPlayerGhostAccess(cid) getPlayerSkillLevel(cid, skill[, ignoreModifiers = false]) getPlayerSkillTries(cid, skill) getPlayerTown(cid) getPlayerVocation(cid) getPlayerIp(cid) getPlayerRequiredMana(cid, magicLevel) getPlayerRequiredSkillTries(cid, skillId, skillLevel) getPlayerItemCount(cid, itemid[, subType = -1]) getPlayerMoney(cid) getPlayerSoul(cid[, ignoreModifiers = false]) getPlayerFreeCap(cid) getPlayerLight(cid) getPlayerSlotItem(cid, slot) getPlayerWeapon(cid[, ignoreAmmo = false]) getPlayerItemById(cid, deepSearch, itemId[, subType = -1]) getPlayerDepotItems(cid, depotid) getPlayerGuildId(cid) getPlayerGuildName(cid) getPlayerGuildRankId(cid) getPlayerGuildRank(cid) getPlayerGuildNick(cid) getPlayerGuildLevel(cid) getPlayerGUID(cid) getPlayerNameDescription(cid) doPlayerSetNameDescription(cid, desc) getPlayerSpecialDescription(cid) doPlayerSetSpecialDescription(cid, desc) getPlayerAccountId(cid) getPlayerAccount(cid) getPlayerFlagValue(cid, flag) getPlayerCustomFlagValue(cid, flag) getPlayerPromotionLevel(cid) doPlayerSetPromotionLevel(cid, level) getPlayerGroupId(cid) doPlayerSetGroupId(cid, newGroupId) doPlayerSendOutfitWindow(cid) doPlayerLearnInstantSpell(cid, name) doPlayerUnlearnInstantSpell(cid, name) getPlayerLearnedInstantSpell(cid, name) getPlayerInstantSpellCount(cid) getPlayerInstantSpellInfo(cid, index) getInstantSpellInfo(cid, name) getCreatureStorageList(cid) getCreatureStorage(uid, key) doCreatureSetStorage(uid, key, value) getStorageList() getStorage(key) doSetStorage(key, value) getChannelUsers(channelId) getPlayersOnline() getTileInfo(pos) getThingFromPos(pos[, displayError = true]) getThing(uid[, recursive = RECURSE _FIRST]) doTileQueryAdd(uid, pos[, flags[, displayError = true]]) doItemRaidUnref(uid) getThingPosition(uid) getTileItemById(pos, itemId[, subType = -1]) getTileItemByType(pos, type) getTileThingByPos(pos) getTopCreature(pos) doRemoveItem(uid[, count = -1]) doPlayerFeed(cid, food) doPlayerSendCancel(cid, text) doPlayerSendDefaultCancel(cid, ReturnValue) getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]]) getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]]) doTeleportThing(cid, newpos[, pushmove = true[, fullTeleport = true]]) doTransformItem(uid, newId[, count/subType]) doCreatureSay(uid, text[, type = SPEAK _SAY[, ghost = false[, cid = 0[, pos]]]]) doSendCreatureSquare(cid, color[, player]) doSendMagicEffect(pos, type[, player]) doSendDistanceShoot(fromPos, toPos, type[, player]) doSendAnimatedText(pos, text, color[, player]) doPlayerAddSkillTry(cid, skillid, n[, useMultiplier = true]) doCreatureAddHealth(cid, health[, hitEffect[, hitColor[, force]]]) doCreatureAddMana(cid, mana) setCreatureMaxHealth(cid, health) setCreatureMaxMana(cid, mana) doPlayerSetMaxCapacity(cid, cap) doPlayerAddSpentMana(cid, amount[, useMultiplier = true]) doPlayerAddSoul(cid, amount) doPlayerAddItem(cid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]]) doPlayerAddItem(cid, itemid[, count = 1[, canDropOnMap = true[, subtype = 1[, slot = 0]]]]) doPlayerAddItemEx(cid, uid[, canDropOnMap = false[, slot = 0]]) doPlayerSendTextMessage(cid, MessageClasses, message) doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel) doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time]) doPlayerOpenChannel(cid, channelId) doPlayerAddMoney(cid, money) doPlayerRemoveMoney(cid, money) doPlayerTransferMoneyTo(cid, target, money) doShowTextDialog(cid, itemid, text) doDecayItem(uid) doCreateItem(itemid[, type/count], pos) doCreateItemEx(itemid[, count/subType = -1]) doTileAddItemEx(pos, uid) doAddContainerItemEx(uid, virtuid) doRelocate(pos, posTo[, creatures = true[, unmovable = true]]) doCleanTile(pos[, forceMapLoaded = false]) doCreateTeleport(itemid, topos, createpos) doCreateMonster(name, pos[, extend = false[, force = false[, displayError = true]]]) doCreateNpc(name, pos[, displayError = true]) doSummonMonster(cid, name) doConvinceCreature(cid, target) getMonsterTargetList(cid) getMonsterFriendList(cid) doMonsterSetTarget(cid, target) doMonsterChangeTarget(cid) getMonsterInfo(name) doAddCondition(cid, condition) doRemoveCondition(cid, type[, subId]) doRemoveConditions(cid[, onlyPersistent]) doRemoveCreature(cid[, forceLogout = true]) doMoveCreature(cid, direction[, flag = FLAG _NOLIMIT]) doSteerCreature(cid, position) doPlayerSetPzLocked(cid, locked) doPlayerSetTown(cid, townid) doPlayerSetVocation(cid,voc) doPlayerRemoveItem(cid, itemid[, count[, subType = -1]]) doPlayerAddExperience(cid, amount) doPlayerSetGuildId(cid, id) doPlayerSetGuildLevel(cid, level[, rank]) doPlayerSetGuildNick(cid, nick) doPlayerAddOutfit(cid, looktype, addon) doPlayerRemoveOutfit(cid, looktype[, addon = 0]) doPlayerAddOutfitId(cid, outfitId, addon) doPlayerRemoveOutfitId(cid, outfitId[, addon = 0]) canPlayerWearOutfit(cid, looktype[, addon = 0]) canPlayerWearOutfitId(cid, outfitId[, addon = 0]) getCreatureCondition(cid, condition[, subId = 0]) doCreatureSetDropLoot(cid, doDrop) getPlayerLossPercent(cid, lossType) doPlayerSetLossPercent(cid, lossType, newPercent) doPlayerSetLossSkill(cid, doLose) getPlayerLossSkill(cid) doPlayerSwitchSaving(cid) doPlayerSave(cid[, shallow = false]) isPlayerPzLocked(cid) isPlayerSaving(cid) isCreature(cid) isMovable(uid) getCreatureByName(name) getPlayerByGUID(guid) getPlayerByNameWildcard(name~[, ret = false]) getPlayerGUIDByName(name[, multiworld = false]) getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]]) doPlayerChangeName(guid, oldName, newName) registerCreatureEvent(uid, eventName) unregisterCreatureEvent(uid, eventName) getContainerSize(uid) getContainerCap(uid) getContainerItem(uid, slot) doAddContainerItem(uid, itemid[, count/subType = 1]) getHouseInfo(houseId[, displayError = true]) getHouseAccessList(houseid, listId) getHouseByPlayerGUID(playerGUID) getHouseFromPos(pos) setHouseAccessList(houseid, listid, listtext) setHouseOwner(houseId, owner[, clean]) getWorldType() setWorldType(type) getWorldTime() getWorldLight() getWorldCreatures(type) getWorldUpTime() getGuildId(guildName) getGuildMotd(guildId) getPlayerSex(cid[, full = false]) doPlayerSetSex(cid, newSex) createCombatArea({area}[, {extArea}]) createConditionObject(type[, ticks[, buff[, subId]]]) setCombatArea(combat, area) setCombatCondition(combat, condition) setCombatParam(combat, key, value) setConditionParam(condition, key, value) addDamageCondition(condition, rounds, time, value) addOutfitCondition(condition, outfit) setCombatCallBack(combat, key, function_name) setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]]) setConditionFormula(combat, mina, minb, maxa, maxb) doCombat(cid, combat, param) createCombatObject() doCombatAreaHealth(cid, type, pos, area, min, max, effect) doTargetCombatHealth(cid, target, type, min, max, effect) doCombatAreaMana(cid, pos, area, min, max, effect) doTargetCombatMana(cid, target, min, max, effect) doCombatAreaCondition(cid, pos, area, condition, effect) doTargetCombatCondition(cid, target, condition, effect) doCombatAreaDispel(cid, pos, area, type, effect) doTargetCombatDispel(cid, target, type, effect) doChallengeCreature(cid, target) numberToVariant(number) stringToVariant(string) positionToVariant(pos) targetPositionToVariant(pos) variantToNumber(var) variantToString(var) variantToPosition(var) doChangeSpeed(cid, delta) doCreatureChangeOutfit(cid, outfit) doSetMonsterOutfit(cid, name[, time = -1]) doSetItemOutfit(cid, item[, time = -1]) doSetCreatureOutfit(cid, outfit[, time = -1]) getCreatureOutfit(cid) getCreatureLastPosition(cid) getCreatureName(cid) getCreatureSpeed(cid) getCreatureBaseSpeed(cid) getCreatureTarget(cid) isSightClear(fromPos, toPos, floorCheck) isInArray(array, value[, caseSensitive = false]) addEvent(callback, delay, ...) stopEvent(eventid) getPlayersByAccountId(accId) getAccountIdByName(name) getAccountByName(name) getAccountIdByAccount(accName) getAccountByAccountId(accId) getIpByName(name) getPlayersByIp(ip[, mask = 0xFFFFFFFF]) doPlayerPopupFYI(cid, message) doPlayerSendTutorial(cid, id) doPlayerSendMailByName(name, item[, town[, actor]]) doPlayerAddMapMark(cid, pos, type[, description]) doPlayerAddPremiumDays(cid, days) getPlayerPremiumDays(cid) doCreatureSetLookDirection(cid, dir) getCreatureGuildEmblem(cid[, target]) doCreatureSetGuildEmblem(cid, emblem) getCreaturePartyShield(cid[, target]) doCreatureSetPartyShield(cid, shield) getCreatureSkullType(cid[, target]) doCreatureSetSkullType(cid, skull) getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, time, type) getPlayerBlessing(cid, blessing) doPlayerAddBlessing(cid, blessing) getPlayerStamina(cid) doPlayerSetStamina(cid, minutes) getPlayerBalance(cid) doPlayerSetBalance(cid, balance) getCreatureNoMove(cid) doCreatureSetNoMove(cid, block) getPlayerIdleTime(cid) doPlayerSetIdleTime(cid, amount) getPlayerLastLoad(cid) getPlayerLastLogin(cid) getPlayerAccountManager(cid) getPlayerTradeState(cid) getPlayerModes(cid) getPlayerRates(cid) doPlayerSetRate(cid, type, value) getPlayerPartner(cid) doPlayerSetPartner(cid, guid) doPlayerFollowCreature(cid, target) getPlayerParty(cid) doPlayerJoinParty(cid, lid) doPlayerLeaveParty(cid[, forced = false]) doPlayerAddMount(cid, mountId) doPlayerRemoveMount(cid, mountId) getPlayerMount(cid, mountId) doPlayerSetMount(cid, mountId) doPlayerSetMountStatus(cid, mounted) getMountInfo([mountId]) getPartyMembers(lid) getCreatureMaster(cid) getCreatureSummons(cid) getTownId(townName) getTownName(townId) getTownTemplePosition(townId) getTownHouses(townId) getSpectators(centerPos, rangex, rangey[, multifloor = false]) getVocationInfo(id) getGroupInfo(id[, premium = false]) getVocationList() getGroupList() getChannelList() getTownList() getWaypointList() getTalkActionList() getExperienceStageList() getItemIdByName(name[, displayError = true]) getItemInfo(itemid) getItemAttribute(uid, key) doItemSetAttribute(uid, key, value) doItemEraseAttribute(uid, key) getItemWeight(uid[, precise = true]) getItemParent(uid) hasItemProperty(uid, prop) hasPlayerClient(cid) isIpBanished(ip[, mask]) isPlayerBanished(name/guid, type) isAccountBanished(accountId[, playerId]) doAddIpBanishment(...) doAddPlayerBanishment(...) doAddAccountBanishment(...) doAddNotation(...) doAddStatement(...) doRemoveIpBanishment(ip[, mask]) doRemovePlayerBanishment(name/guid, type) doRemoveAccountBanishment(accountId[, playerId]) doRemoveNotations(accountId[, playerId]) doRemoveStatements(name/guid[, channelId]) getNotationsCount(accountId[, playerId]) getStatementsCount(name/guid[, channelId]) getBanData(value[, type[, param]]) getBanReason(id) getBanAction(id[, ipBanishment = false]) getBanList(type[, value[, param]]) getExperienceStage(level) getDataDir() getLogsDir() getConfigFile() getConfigValue(key) getModList() getHighscoreString(skillId) getWaypointPosition(name) doWaypointAddTemporial(name, pos) getGameState() doSetGameState(id) doExecuteRaid(name) doCreatureExecuteTalkAction(cid, text[, ignoreAccess = false[, channelId = CHANNEL _DEFAULT]]) doReloadInfo(id[, cid]) doSaveServer([shallow = false]) doCleanHouse(houseId) doCleanMap() doRefreshMap() doGuildAddEnemy(guild, enemy, war, type) doGuildRemoveEnemy(guild, enemy) doUpdateHouseAuctions() loadmodlib(lib) domodlib(lib) dodirectory(dir[, recursively = false])getCreatureHealth(cid) getCreatureMaxHealth(cid[, ignoreModifiers = false]) getCreatureMana(cid) getCreatureMaxMana(cid[, ignoreModifiers = false]) getCreatureHideHealth(cid) doCreatureSetHideHealth(cid, hide) getCreatureSpeakType(cid) doCreatureSetSpeakType(cid, type) getCreatureLookDirection(cid) getPlayerLevel(cid) getPlayerExperience(cid) getPlayerMagLevel(cid[, ignoreModifiers = false]) getPlayerSpentMana(cid) getPlayerFood(cid) getPlayerAccess(cid) getPlayerGhostAccess(cid) getPlayerSkillLevel(cid, skill[, ignoreModifiers = false]) getPlayerSkillTries(cid, skill) getPlayerTown(cid) getPlayerVocation(cid) getPlayerIp(cid) getPlayerRequiredMana(cid, magicLevel) getPlayerRequiredSkillTries(cid, skillId, skillLevel) getPlayerItemCount(cid, itemid[, subType = -1]) getPlayerMoney(cid) getPlayerSoul(cid[, ignoreModifiers = false]) getPlayerFreeCap(cid) getPlayerLight(cid) getPlayerSlotItem(cid, slot) getPlayerWeapon(cid[, ignoreAmmo = false]) getPlayerItemById(cid, deepSearch, itemId[, subType = -1]) getPlayerDepotItems(cid, depotid) getPlayerGuildId(cid) getPlayerGuildName(cid) getPlayerGuildRankId(cid) getPlayerGuildRank(cid) getPlayerGuildNick(cid) getPlayerGuildLevel(cid) getPlayerGUID(cid) getPlayerNameDescription(cid) doPlayerSetNameDescription(cid, desc) getPlayerSpecialDescription(cid) doPlayerSetSpecialDescription(cid, desc) getPlayerAccountId(cid) getPlayerAccount(cid) getPlayerFlagValue(cid, flag) getPlayerCustomFlagValue(cid, flag) getPlayerPromotionLevel(cid) doPlayerSetPromotionLevel(cid, level) getPlayerGroupId(cid) doPlayerSetGroupId(cid, newGroupId) doPlayerSendOutfitWindow(cid) doPlayerLearnInstantSpell(cid, name) doPlayerUnlearnInstantSpell(cid, name) getPlayerLearnedInstantSpell(cid, name) getPlayerInstantSpellCount(cid) getPlayerInstantSpellInfo(cid, index) getInstantSpellInfo(cid, name) getCreatureStorageList(cid) getCreatureStorage(uid, key) doCreatureSetStorage(uid, key, value) getStorageList() getStorage(key) doSetStorage(key, value) getChannelUsers(channelId) getPlayersOnline() getTileInfo(pos) getThingFromPos(pos[, displayError = true]) getThing(uid[, recursive = RECURSE _FIRST]) doTileQueryAdd(uid, pos[, flags[, displayError = true]]) doItemRaidUnref(uid) getThingPosition(uid) getTileItemById(pos, itemId[, subType = -1]) getTileItemByType(pos, type) getTileThingByPos(pos) getTopCreature(pos) doRemoveItem(uid[, count = -1]) doPlayerFeed(cid, food) doPlayerSendCancel(cid, text) doPlayerSendDefaultCancel(cid, ReturnValue) getSearchString(fromPosition, toPosition[, fromIsCreature = false[, toIsCreature = false]]) getClosestFreeTile(cid, targetpos[, extended = false[, ignoreHouse = true]]) doTeleportThing(cid, newpos[, pushmove = true[, fullTeleport = true]]) doTransformItem(uid, newId[, count/subType]) doCreatureSay(uid, text[, type = SPEAK _SAY[, ghost = false[, cid = 0[, pos]]]]) doSendCreatureSquare(cid, color[, player]) doSendMagicEffect(pos, type[, player]) doSendDistanceShoot(fromPos, toPos, type[, player]) doSendAnimatedText(pos, text, color[, player]) doPlayerAddSkillTry(cid, skillid, n[, useMultiplier = true]) doCreatureAddHealth(cid, health[, hitEffect[, hitColor[, force]]]) doCreatureAddMana(cid, mana) setCreatureMaxHealth(cid, health) setCreatureMaxMana(cid, mana) doPlayerSetMaxCapacity(cid, cap) doPlayerAddSpentMana(cid, amount[, useMultiplier = true]) doPlayerAddSoul(cid, amount) doPlayerAddItem(cid, itemid[, count/subtype = 1[, canDropOnMap = true[, slot = 0]]]) doPlayerAddItem(cid, itemid[, count = 1[, canDropOnMap = true[, subtype = 1[, slot = 0]]]]) doPlayerAddItemEx(cid, uid[, canDropOnMap = false[, slot = 0]]) doPlayerSendTextMessage(cid, MessageClasses, message) doPlayerSendChannelMessage(cid, author, message, SpeakClasses, channel) doPlayerSendToChannel(cid, targetId, SpeakClasses, message, channel[, time]) doPlayerOpenChannel(cid, channelId) doPlayerAddMoney(cid, money) doPlayerRemoveMoney(cid, money) doPlayerTransferMoneyTo(cid, target, money) doShowTextDialog(cid, itemid, text) doDecayItem(uid) doCreateItem(itemid[, type/count], pos) doCreateItemEx(itemid[, count/subType = -1]) doTileAddItemEx(pos, uid) doAddContainerItemEx(uid, virtuid) doRelocate(pos, posTo[, creatures = true[, unmovable = true]]) doCleanTile(pos[, forceMapLoaded = false]) doCreateTeleport(itemid, topos, createpos) doCreateMonster(name, pos[, extend = false[, force = false[, displayError = true]]]) doCreateNpc(name, pos[, displayError = true]) doSummonMonster(cid, name) doConvinceCreature(cid, target) getMonsterTargetList(cid) getMonsterFriendList(cid) doMonsterSetTarget(cid, target) doMonsterChangeTarget(cid) getMonsterInfo(name) doAddCondition(cid, condition) doRemoveCondition(cid, type[, subId]) doRemoveConditions(cid[, onlyPersistent]) doRemoveCreature(cid[, forceLogout = true]) doMoveCreature(cid, direction[, flag = FLAG _NOLIMIT]) doSteerCreature(cid, position) doPlayerSetPzLocked(cid, locked) doPlayerSetTown(cid, townid) doPlayerSetVocation(cid,voc) doPlayerRemoveItem(cid, itemid[, count[, subType = -1]]) doPlayerAddExperience(cid, amount) doPlayerSetGuildId(cid, id) doPlayerSetGuildLevel(cid, level[, rank]) doPlayerSetGuildNick(cid, nick) doPlayerAddOutfit(cid, looktype, addon) doPlayerRemoveOutfit(cid, looktype[, addon = 0]) doPlayerAddOutfitId(cid, outfitId, addon) doPlayerRemoveOutfitId(cid, outfitId[, addon = 0]) canPlayerWearOutfit(cid, looktype[, addon = 0]) canPlayerWearOutfitId(cid, outfitId[, addon = 0]) getCreatureCondition(cid, condition[, subId = 0]) doCreatureSetDropLoot(cid, doDrop) getPlayerLossPercent(cid, lossType) doPlayerSetLossPercent(cid, lossType, newPercent) doPlayerSetLossSkill(cid, doLose) getPlayerLossSkill(cid) doPlayerSwitchSaving(cid) doPlayerSave(cid[, shallow = false]) isPlayerPzLocked(cid) isPlayerSaving(cid) isCreature(cid) isMovable(uid) getCreatureByName(name) getPlayerByGUID(guid) getPlayerByNameWildcard(name~[, ret = false]) getPlayerGUIDByName(name[, multiworld = false]) getPlayerNameByGUID(guid[, multiworld = false[, displayError = true]]) doPlayerChangeName(guid, oldName, newName) registerCreatureEvent(uid, eventName) unregisterCreatureEvent(uid, eventName) getContainerSize(uid) getContainerCap(uid) getContainerItem(uid, slot) doAddContainerItem(uid, itemid[, count/subType = 1]) getHouseInfo(houseId[, displayError = true]) getHouseAccessList(houseid, listId) getHouseByPlayerGUID(playerGUID) getHouseFromPos(pos) setHouseAccessList(houseid, listid, listtext) setHouseOwner(houseId, owner[, clean]) getWorldType() setWorldType(type) getWorldTime() getWorldLight() getWorldCreatures(type) getWorldUpTime() getGuildId(guildName) getGuildMotd(guildId) getPlayerSex(cid[, full = false]) doPlayerSetSex(cid, newSex) createCombatArea({area}[, {extArea}]) createConditionObject(type[, ticks[, buff[, subId]]]) setCombatArea(combat, area) setCombatCondition(combat, condition) setCombatParam(combat, key, value) setConditionParam(condition, key, value) addDamageCondition(condition, rounds, time, value) addOutfitCondition(condition, outfit) setCombatCallBack(combat, key, function_name) setCombatFormula(combat, type, mina, minb, maxa, maxb[, minl, maxl[, minm, maxm[, minc[, maxc]]]]) setConditionFormula(combat, mina, minb, maxa, maxb) doCombat(cid, combat, param) createCombatObject() doCombatAreaHealth(cid, type, pos, area, min, max, effect) doTargetCombatHealth(cid, target, type, min, max, effect) doCombatAreaMana(cid, pos, area, min, max, effect) doTargetCombatMana(cid, target, min, max, effect) doCombatAreaCondition(cid, pos, area, condition, effect) doTargetCombatCondition(cid, target, condition, effect) doCombatAreaDispel(cid, pos, area, type, effect) doTargetCombatDispel(cid, target, type, effect) doChallengeCreature(cid, target) numberToVariant(number) stringToVariant(string) positionToVariant(pos) targetPositionToVariant(pos) variantToNumber(var) variantToString(var) variantToPosition(var) doChangeSpeed(cid, delta) doCreatureChangeOutfit(cid, outfit) doSetMonsterOutfit(cid, name[, time = -1]) doSetItemOutfit(cid, item[, time = -1]) doSetCreatureOutfit(cid, outfit[, time = -1]) getCreatureOutfit(cid) getCreatureLastPosition(cid) getCreatureName(cid) getCreatureSpeed(cid) getCreatureBaseSpeed(cid) getCreatureTarget(cid) isSightClear(fromPos, toPos, floorCheck) isInArray(array, value[, caseSensitive = false]) addEvent(callback, delay, ...) stopEvent(eventid) getPlayersByAccountId(accId) getAccountIdByName(name) getAccountByName(name) getAccountIdByAccount(accName) getAccountByAccountId(accId) getIpByName(name) getPlayersByIp(ip[, mask = 0xFFFFFFFF]) doPlayerPopupFYI(cid, message) doPlayerSendTutorial(cid, id) doPlayerSendMailByName(name, item[, town[, actor]]) doPlayerAddMapMark(cid, pos, type[, description]) doPlayerAddPremiumDays(cid, days) getPlayerPremiumDays(cid) doCreatureSetLookDirection(cid, dir) getCreatureGuildEmblem(cid[, target]) doCreatureSetGuildEmblem(cid, emblem) getCreaturePartyShield(cid[, target]) doCreatureSetPartyShield(cid, shield) getCreatureSkullType(cid[, target]) doCreatureSetSkullType(cid, skull) getPlayerSkullEnd(cid) doPlayerSetSkullEnd(cid, time, type) getPlayerBlessing(cid, blessing) doPlayerAddBlessing(cid, blessing) getPlayerStamina(cid) doPlayerSetStamina(cid, minutes) getPlayerBalance(cid) doPlayerSetBalance(cid, balance) getCreatureNoMove(cid) doCreatureSetNoMove(cid, block) getPlayerIdleTime(cid) doPlayerSetIdleTime(cid, amount) getPlayerLastLoad(cid) getPlayerLastLogin(cid) getPlayerAccountManager(cid) getPlayerTradeState(cid) getPlayerModes(cid) getPlayerRates(cid) doPlayerSetRate(cid, type, value) getPlayerPartner(cid) doPlayerSetPartner(cid, guid) doPlayerFollowCreature(cid, target) getPlayerParty(cid) doPlayerJoinParty(cid, lid) doPlayerLeaveParty(cid[, forced = false]) doPlayerAddMount(cid, mountId) doPlayerRemoveMount(cid, mountId) getPlayerMount(cid, mountId) doPlayerSetMount(cid, mountId) doPlayerSetMountStatus(cid, mounted) getMountInfo([mountId]) getPartyMembers(lid) getCreatureMaster(cid) getCreatureSummons(cid) getTownId(townName) getTownName(townId) getTownTemplePosition(townId) getTownHouses(townId) getSpectators(centerPos, rangex, rangey[, multifloor = false]) getVocationInfo(id) getGroupInfo(id[, premium = false]) getVocationList() getGroupList() getChannelList() getTownList() getWaypointList() getTalkActionList() getExperienceStageList() getItemIdByName(name[, displayError = true]) getItemInfo(itemid) getItemAttribute(uid, key) doItemSetAttribute(uid, key, value) doItemEraseAttribute(uid, key) getItemWeight(uid[, precise = true]) getItemParent(uid) hasItemProperty(uid, prop) hasPlayerClient(cid) isIpBanished(ip[, mask]) isPlayerBanished(name/guid, type) isAccountBanished(accountId[, playerId]) doAddIpBanishment(...) doAddPlayerBanishment(...) doAddAccountBanishment(...) doAddNotation(...) doAddStatement(...) doRemoveIpBanishment(ip[, mask]) doRemovePlayerBanishment(name/guid, type) doRemoveAccountBanishment(accountId[, playerId]) doRemoveNotations(accountId[, playerId]) doRemoveStatements(name/guid[, channelId]) getNotationsCount(accountId[, playerId]) getStatementsCount(name/guid[, channelId]) getBanData(value[, type[, param]]) getBanReason(id) getBanAction(id[, ipBanishment = false]) getBanList(type[, value[, param]]) getExperienceStage(level) getDataDir() getLogsDir() getConfigFile() getConfigValue(key) getModList() getHighscoreString(skillId) getWaypointPosition(name) doWaypointAddTemporial(name, pos) getGameState() doSetGameState(id) doExecuteRaid(name) doCreatureExecuteTalkAction(cid, text[, ignoreAccess = false[, channelId = CHANNEL _DEFAULT]]) doReloadInfo(id[, cid]) doSaveServer([shallow = false]) doCleanHouse(houseId) doCleanMap() doRefreshMap() doGuildAddEnemy(guild, enemy, war, type) doGuildRemoveEnemy(guild, enemy) doUpdateHouseAuctions() loadmodlib(lib) domodlib(lib) dodirectory(dir[, recursively = false]) Lua made functions - Funções feitas em lua (data/lib) doPlayerGiveItem(cid, itemid, amount, subType) doPlayerGiveItemContainer(cid, containerid, 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, amount) doPlayerDepositMoney(cid, amount) doPlayerAddStamina(cid, minutes) isPremium(cid) getMonthDayEnding(day) getMonthString(m) getArticle(str) isNumeric(str) doNumberFormat(i) doPlayerAddAddons(cid, addon) doPlayerWithdrawAllMoney(cid) doPlayerDepositAllMoney(cid) doPlayerTransferAllMoneyTo(cid, target) playerExists(name) getTibiaTime() doWriteLogFile(file, text) 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) getHouseDoorsCount(houseId) getHouseBedsCount(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) doShutdown() doSummonCreature(name, pos, displayError) getOnlinePlayers() getPlayerByName(name) isPlayer(cid) isPlayerGhost(cid) isMonster(cid) isNpc(cid) doPlayerSetExperienceRate(cid, value) doPlayerSetMagicRate(cid, value) doPlayerAddLevel(cid, amount, round) doPlayerAddMagLevel(cid, amount) doPlayerAddSkill(cid, skill, amount, round) getPartyLeader(cid) isInParty(cid) isPrivateChannel(channelId) doPlayerResetIdleTime(cid) doBroadcastMessage(text, class) doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost) getBooleanFromString(input) doCopyItem(item, attributes) doRemoveThing(uid) setAttackFormula(combat, type, minl, maxl, minm, maxm, min, max) setHealingFormula(combat, type, minl, maxl, minm, maxm, min, max) doChangeTypeItem(uid, subtype) doSetItemText(uid, text, writer, date) doItemSetActionId(uid, aid) getFluidSourceType(itemid) getDepotId(uid) getItemDescriptions(uid) getItemWeightById(itemid, count, precision) getItemWeaponType(uid) getItemRWInfo(uid) getItemLevelDoor(itemid) isContainer(uid) isItemStackable(itemid) isItemRune(itemid) isItemDoor(itemid) isItemContainer(itemid) isItemFluidContainer(itemid) isItemMovable(itemid) isCorpse(uid) getContainerCapById(itemid) getMonsterAttackSpells(name) getMonsterHealingSpells(name) getMonsterLootList(name) getMonsterSummonList(name) choose(...) exhaustion.check(cid, storage) exhaustion.get(cid, storage) exhaustion.set(cid, storage, time) exhaustion.make(cid, storage, time) doConvertIntegerToIp(int, mask) doConvertIpToInteger(str) doRevertIp(str) isInRange(position, fromPosition, toPosition) getDistanceBetween(fromPosition, toPosition) getDirectionTo(pos1, pos2) getCreatureLookPosition(cid) getPositionByDirection(position, direction, size) doComparePositions(position, positionEx) getArea(position, x, y) Position(x, y, z, stackpos) isValidPosition(position) isSorcerer(cid) isDruid(cid) isPaladin(cid) isKnight(cid) isRookie(cid) string.split(str) string.trim(str) string.explode(str, sep, limit) string.expand(str) string.timediff(diff) Compats (data/lib/100-compat.lua) 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 = hasCreatureCondition getCreatureCondition = hasCreatureCondition isMoveable = isMovable isItemMoveable = isItemMovable saveData = saveServer savePlayers = saveServer getPlayerSkill = getPlayerSkillLevel getPlayerSkullType = getCreatureSkullType getCreatureSkull = getCreatureSkullType getAccountNumberByName = getAccountIdByName getIPByName = getIpByName getPlayersByIP = getPlayersByIp getThingFromPos = getThingFromPosition getThingfromPos = getThingFromPos getHouseFromPos = getHouseFromPosition 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 getTileItemsByType = getTileItemByType 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 getPlayerMount = canPlayerRideMount 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 isNumber = isNumeric doSetItemActionId = doItemSetActionId getOnlinePlayers = getPlayersOnlineEx addDialog = doPlayerAddDialog doSendPlayerExtendedOpcode = doPlayerSendExtendedOpcode Créditos: Zonnebloem
  2. Mostrarei aqui, Utilidades e funções para Monsters de Tibia. Exemplo de Script para Monster Looktypes Utilizaveis Efeitos de Spells que podem ser utilizados Shoots para Ataques em Distancias Flags para Monsters Cores para Monsters Loots Loots em Bags Loots com UniqueID e ActionID
  3. Olá, xTibianos. Hoje lhes trago mais uma lista de funções. Dessa vez é do TFS 1.1. Source functions - Funções da source addDamageCondition(condition, rounds, time, value) addEvent(callback, delay, ...) addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet) addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet[, lookAddons, lookMount]) canJoin(player) cleanMap() closeShopWindow(cid) Combat() combat:execute(creature, variant) combat:setArea(area) combat:setCallback(key, function) combat:setCondition(condition) combat:setFormula(type, mina, minb, maxa, maxb) combat:setOrigin(origin) combat:setParameter(key, value) Condition(conditionType[, conditionId = CONDITIONID_COMBAT]) condition:addDamage(rounds, time, value) condition:clone() condition:delete() condition:getEndTime() condition:getIcons() condition:getId() condition:getSubId() condition:getTicks() condition:getType() condition:setFormula(mina, minb, maxa, maxb) condition:setOutfit(lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet[, lookAddons[, lookMount]]) condition:setOutfit(outfit) condition:setParameter(key, value) condition:setTicks(ticks) Container(uid) container:addItem(itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]]) container:addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]]) container:getCapacity() container:getEmptySlots([recursive = false]) container:getItem(index) container:getItemCountById(itemId[, subType = -1]) container:getItemHoldingCount() container:getSize() container:hasItem(item) createCombatArea( {area}, <optional> {extArea} ) createCombatObject() createConditionObject(type) Creature(id or name or userdata) creature:addCondition(condition[, force = false]) creature:addHealth(healthChange) creature:addMana(manaChange[, animationOnLoss = false]) creature:canSee(position) creature:canSeeCreature(creature) creature:changeSpeed(delta) creature:getBaseSpeed() creature:getCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0]]) creature:getDamageMap() creature:getDescription(distance) creature:getDirection() creature:getFollowCreature() creature:getHealth() creature:getId() creature:getLight() creature:getMana() creature:getMaster() creature:getMaxHealth() creature:getMaxMana() creature:getName() creature:getOutfit() creature:getParent() creature:getPathTo(pos[, minTargetDist = 0[, maxTargetDist = 1[, fullPathSearch = true[, clearSight = true[, maxSearchDist = 0]]]]]) creature:getPosition() creature:getSkull() creature:getSpeed() creature:getSummons() creature:getTarget() creature:getTile() creature:isCreature() creature:isHealthHidden() creature:isInGhostMode() creature:isRemoved() Creature:onAreaCombat(tile, aggressive) or Creature.onAreaCombat(self, tile, aggressive) Creature:onChangeOutfit(outfit) or Creature.onChangeOutfit(self, outfit) Creature:onTargetCombat(target) or Creature.onTargetCombat(self, target) creature:registerEvent(name) creature:remove() creature:removeCondition(conditionType[, conditionId = CONDITIONID_COMBAT[, subId = 0[, force = false]]]) creature:say(text, type[, ghost = false[, target = nullptr[, position]]]) creature:setDirection(direction) creature:setDropLoot(doDrop) creature:setFollowCreature(followedCreature) creature:setHiddenHealth(hide) creature:setLight(color, level) creature:setMaster(master) creature:setMaxHealth(maxHealth) creature:setOutfit(outfit) creature:setSkull(skull) creature:setTarget(target) creature:teleportTo(position[, pushMovement = false]) creature:unregisterEvent(name) debugPrint(text) doAddContainerItem(uid, itemid, <optional> count/subtype) doAreaCombatCondition(cid, pos, area, condition, effect) doAreaCombatDispel(cid, pos, area, type, effect) doAreaCombatHealth(cid, type, pos, area, min, max, effect) doAreaCombatHealth(cid, type, pos, area, min, max, effect[, origin = ORIGIN_SPELL]) doAreaCombatMana(cid, pos, area, min, max, effect) doAreaCombatMana(cid, pos, area, min, max, effect[, origin = ORIGIN_SPELL]) doChallengeCreature(cid, target) doCombat(cid, combat, param) doCreateItem(itemid, <optional> type/count, pos) doCreateItem(itemid, type/count, pos) doCreateItemEx(itemid, <optional> count/subtype) doMoveCreature(cid, direction) doNpcSetCreatureFocus(cid) doPlayerAddItem(cid, itemid, <optional: default: 1> count, <optional: default: 1> canDropOnMap, <optional: default: 1>subtype) doPlayerAddItem(cid, itemid, <optional: default: 1> count/subtype, <optional: default: 1> canDropOnMap) doPlayerAddItem(uid, itemid, <optional: default: 1> count/subtype) doPlayerSetOfflineTrainingSkill(cid, skill) doPlayerSetOfflineTrainingSkill(cid, skillid) doSellItem(cid, itemid, amount, <optional> subtype, <optional> actionid, <optional: default: 1> canDropOnMap) doSetCreatureLight(cid, lightLevel, lightColor, time) doSetCreatureOutfit(cid, outfit, time) doSetItemOutfit(cid, item, time) doSetMonsterOutfit(cid, name, time) doTargetCombatCondition(cid, target, condition, effect) doTargetCombatDispel(cid, target, type, effect) doTargetCombatHealth(cid, target, type, min, max, effect) doTargetCombatHealth(cid, target, type, min, max, effect[, origin = ORIGIN_SPELL]) doTargetCombatMana(cid, target, min, max, effect) doTargetCombatMana(cid, target, min, max, effect[, origin = ORIGIN_SPELL) doTileAddItemEx(pos, uid) Game.createContainer(itemId, size[, position]) Game.createItem(itemId[, count[, position]]) Game.createMonster(monsterName, position[, extended = false[, force = false]]) Game.createNpc(npcName, position[, extended = false[, force = false]]) Game.createTile(position[, isDynamic = false]) Game.createTile(x, y, z[, isDynamic = false]) Game.getExperienceStage(level) Game.getGameState() Game.getHouses() Game.getMonsterCount() Game.getNpcCount() Game.getPlayerCount() Game.getPlayers() Game.getReturnMessage(value) Game.getSpectators(position[, multifloor = false[, onlyPlayer = false[, minRangeX = 0[, maxRangeX = 0[, minRangeY = 0[, maxRangeY = 0]]]]]]) Game.getTowns() Game.getWorldType() Game.loadMap(path) Game.setGameState(state) Game.setWorldType(type) Game.startRaid(raidName) getCreatureCondition(cid, condition[, subId]) getDepotId(uid) getDistanceTo(uid) getNpcCid() getNpcParameter(paramKey) getPlayerFlagValue(cid, flag) getPlayerInstantSpellCount(cid) getPlayerInstantSpellInfo(cid, index) getWaypointPosition(name) getWaypointPositionByName(name) getWorldLight() getWorldTime() getWorldUpTime() Group(id) group:getAccess() group:getFlags() group:getId() group:getMaxDepotItems() group:getMaxVipEntries() group:getName() Guild(id) guild:addMember(player) guild:addRank(id, name, level) guild:getId() guild:getMembersOnline() guild:getMotd() guild:getName() guild:getRankById(id) guild:getRankByLevel(level) guild:removeMember(player) guild:setMotd(motd) House(id) house:getAccessList(listId) house:getBedCount() house:getBeds() house:getDoorCount() house:getDoors() house:getExitPosition() house:getId() house:getName() house:getOwnerGuid() house:getRent() house:getTileCount() house:getTiles() house:getTown() house:setAccessList(listId, list) house:setOwnerGuid(guid[, updateDatabase = true]) isDepot(uid) isInArray(array, value) isInWar(cid, target) isMovable(uid) isMoveable(uid) isType(derived, base) isValidUID(uid) Item(uid) item:clone() item:decay() item:getActionId() item:getArticle() item:getAttribute(key) item:getCharges() item:getCount() item:getDescription(distance) item:getFluidType() item:getId() item:getName() item:getParent() item:getPluralName() item:getPosition() item:getSubType() item:getTile() item:getTopParent() item:getUniqueId() item:getWeight() item:hasAttribute(key) item:hasProperty(property) item:isItem() item:moveTo(position or cylinder) item:remove([count = -1]) item:removeAttribute(key) item:setActionId(actionId) item:setAttribute(key, value) item:split([count = 1]) item:transform(itemId[, count/subType = -1]) ItemType(id or name) itemType:getArmor() itemType:getArticle() itemType:getAttack() itemType:getCapacity() itemType:getCharges() itemType:getClientId() itemType:getDecayId() itemType:getDefense() itemType:getDescription() itemType:getElementDamage() itemType:getElementType() itemType:getExtraDefense() itemType:getFluidSource() itemType:getHitChance() itemType:getId() itemType:getName() itemType:getPluralName() itemType:getRequiredLevel() itemType:getShootRange() itemType:getSlotPosition() itemType:getTransformDeEquipId() itemType:getTransformEquipId() itemType:getType() itemType:getWeaponType() itemType:getWeight([count = 1]) itemType:hasSubType() itemType:isContainer() itemType:isCorpse() itemType:isDoor() itemType:isFluidContainer() itemType:isMovable() itemType:isReadable() itemType:isRune() itemType:isStackable() itemType:isWritable() ModalWindow(id, title, message) modalWindow:addButton(id, text) modalWindow:addChoice(id, text) modalWindow:getButtonCount() modalWindow:getChoiceCount() modalWindow:getDefaultEnterButton() modalWindow:getDefaultEscapeButton() modalWindow:getId() modalWindow:getMessage() modalWindow:getTitle() modalWindow:hasPriority() modalWindow:sendToPlayer(player) modalWindow:setDefaultEnterButton(buttonId) modalWindow:setDefaultEscapeButton(buttonId) modalWindow:setMessage(text) modalWindow:setPriority(priority) modalWindow:setTitle(text) Monster(id or userdata) monster:addFriend(creature) monster:addTarget(creature[, pushFront = false]) monster:getFriendCount() monster:getFriendList() monster:getSpawnPosition() monster:getTargetCount() monster:getTargetList() monster:getType() monster:isFriend(creature) monster:isIdle() monster:isInSpawnRange([position]) monster:isMonster() monster:isOpponent(creature) monster:isTarget(creature) monster:removeFriend(creature) monster:removeTarget(creature) monster:searchTarget([searchType = TARGETSEARCH_DEFAULT]) monster:selectTarget(creature) monster:setIdle(idle) MonsterType(id or name) monsterType:canPushCreatures() monsterType:canPushItems() monsterType:getArmor() monsterType:getAttackList() monsterType:getBaseSpeed() monsterType:getChangeTargetChance() monsterType:getChangeTargetSpeed() monsterType:getCombatImmunities() monsterType:getConditionImmunities() monsterType:getCorpseId() monsterType:getCreatureEvents() monsterType:getDefense() monsterType:getDefenseList() monsterType:getElementList() monsterType:getExperience() monsterType:getHealth() monsterType:getLight() monsterType:getLoot() monsterType:getManaCost() monsterType:getMaxHealth() monsterType:getMaxSummons() monsterType:getName() monsterType:getNameDescription() monsterType:getOutfit() monsterType:getRace() monsterType:getRunHealth() monsterType:getStaticAttackChance() monsterType:getSummonList() monsterType:getTargetDistance() monsterType:getVoices() monsterType:getYellChance() monsterType:getYellSpeedTicks() monsterType:isAttackable() monsterType:isConvinceable() monsterType:isHealthShown() monsterType:isHostile() monsterType:isIllusionable() monsterType:isPushable() monsterType:isSummonable() NetworkMessage() networkMessage:addByte(number) networkMessage:addDouble(number) networkMessage:addItem(item) networkMessage:addItemId(itemId) networkMessage:addPosition(position) networkMessage:addString(string) networkMessage:addU16(number) networkMessage:addU32(number) networkMessage:addU64(number) networkMessage:getByte() networkMessage:getPosition() networkMessage:getString() networkMessage:getU16() networkMessage:getU32() networkMessage:getU64() networkMessage:reset() networkMessage:sendToPlayer(player) networkMessage:skipBytes(number) Npc([id or name or userdata]) npc:closeShopWindow(player) npc:getParameter(key) npc:getSpeechBubble() npc:isNpc() npc:openShopWindow(cid, items, buyCallback, sellCallback) npc:setFocus(creature) npc:setMasterPos(pos[, radius]) npc:setSpeechBubble(speechBubble) onaddItem(moveitem, tileitem, pos) onAdvance(player, skill, oldLevel, newLevel) onBuy(player, itemid, count, amount, ignore, inbackpacks) onCastSpell(creature, var) onCastSpell(creature, var, isHotkey) onCreatureAppear(creature) onCreatureAppear(self, creature) onCreatureDisappear(creature) onCreatureDisappear(self, creature) onCreatureMove(creature, oldPos, newPos) onCreatureMove(self, creature, oldPosition, newPosition) onCreatureSay(creature, type, msg) onCreatureSay(self, creature, type, message) onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified) onDeEquip(player, item, slot) onEquip(player, item, slot) onExtendedOpcode(player, opcode, buffer) onGetPlayerMinMaxValues(...) onGetPlayerMinMaxValues(player, attackSkill, attackValue, attackFactor) onGetPlayerMinMaxValues(player, level, maglevel) onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) onJoin(player) onKill(creature, target) onLeave(player) onLogin(player) onLogout(player) onManaChange(creature, attacker, manaChange, origin) onModalWindow(player, modalWindowId, buttonId, choiceId) onPlayerCloseChannel(player) onPlayerEndTrade(player) onPrepareDeath(creature, killer) onRaid() onRecord(current, old) onRemoveItem(moveitem, tileitem, pos) onSay(player, words, param, type) onSpeak(player, type, message) onStepIn(creature, item, pos, fromPosition) onStepOut(creature, item, pos, fromPosition) onTargetCombat(creature, target) onTextEdit(player, item, text) onThink() onThink(creature, interval) onThink(self, interval) onTileCombat(creature, pos) onUse(player, item, fromPosition, target, toPosition, isHotkey) onUseWeapon(player, var) openShopWindow(cid, items, onBuy callback, onSell callback) os.mtime() party:addInvite(player) party:addMember(player) party:disband() party:getInviteeCount() party:getInvitees() party:getLeader() party:getMemberCount() party:getMembers() party:isSharedExperienceActive() party:isSharedExperienceEnabled() Party:onDisband() or Party.onDisband(self) Party:onJoin(player) or Party.onJoin(self, player) Party:onLeave(player) or Party.onLeave(self, player) party:removeInvite(player) party:removeMember(player) party:setLeader(player) party:setSharedExperience(active) party:shareExperience(experience) Player(id or name or userdata) player:addBlessing(blessing) player:addExperience(experience[, sendText = false]) player:addItem(itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]]) player:addItemEx(item[, canDropOnMap = false[, index = INDEX_WHEREEVER[, flags = 0]]]) player:addItemEx(item[, canDropOnMap = true[, slot = CONST_SLOT_WHEREEVER]]) player:addManaSpent(amount) player:addMapMark(position, type, description) player:addMoney(money) player:addMount(mountId) player:addOutfit(lookType) player:addOutfitAddon(lookType, addon) player:addPremiumDays(days) player:addSkillTries(skillType, tries) player:addSoul(soulChange) player:canLearnSpell(spellName) player:channelSay(speaker, type, text, channelId) player:forgetSpell(spellName) player:getAccountId() player:getAccountType() player:getBankBalance() player:getBaseMagicLevel() player:getCapacity() player:getClient() player:getContainerById(id) player:getContainerId(container) player:getContainerIndex(id) player:getDeathPenalty() player:getDepotChest(depotId[, autoCreate = false]) player:getEffectiveSkillLevel(skillType) player:getExperience() player:getFreeCapacity() player:getGroup() player:getGuid() player:getGuild() player:getGuildLevel() player:getGuildNick() player:getHouse() player:getInbox() player:getIp() player:getItemById(itemId, deepSearch[, subType = -1]) player:getItemCount(itemId[, subType = -1]) player:getLastLoginSaved() player:getLastLogout() player:getLevel() player:getMagicLevel() player:getManaSpent() player:getMaxSoul() player:getMoney() player:getParty() player:getPremiumDays() player:getSex() player:getSkillLevel(skillType) player:getSkillPercent(skillType) player:getSkillTries(skillType) player:getSkullTime() player:getSlotItem(slot) player:getSoul() player:getStamina() player:getStorageValue(key) player:getTown() player:getVocation() player:hasBlessing(blessing) player:hasLearnedSpell(spellName) player:hasMount(mountId) player:hasOutfit(lookType[, addon = 0]) player:isPlayer() player:isPzLocked() player:learnSpell(spellName) Player:onBrowseField(position) or Player.onBrowseField(self, position) Player:onGainExperience(source, exp, rawExp) Player:onGainSkillTries(skill, tries) Player:onLook(thing, position, distance) or Player.onLook(self, thing, position, distance) Player:onLookInBattleList(creature, position, distance) or Player.onLookInBattleList(self, creature, position, distance) Player:onLookInShop(itemType, count) or Player.onLookInShop(self, itemType, count) Player:onLookInTrade(partner, item, distance) or Player.onLookInTrade(self, partner, item, distance) Player:onLoseExperience(exp) Player:onMoveCreature(creature, fromPosition, toPosition) or Player.onMoveCreature(self, creature, fromPosition, toPosition) Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition) Player:onTradeAccept(target, item, targetItem) Player:onTradeRequest(target, item) Player:onTurn(direction) or Player.onTurn(self, direction) player:openChannel(channelId) player:popupFYI(message) player:removeBlessing(blessing) player:removeExperience(experience[, sendText = false]) player:removeItem(itemId, count[, subType = -1[, ignoreEquipped = false]]) player:removeMoney(money) player:removeMount(mountId) player:removeOutfit(lookType) player:removeOutfitAddon(lookType, addon) player:removePremiumDays(days) player:save() player:sendChannelMessage(author, text, type, channelId) player:sendOutfitWindow() player:sendPrivateMessage(speaker, text[, type]) player:sendTextMessage(type, text[, position, primaryValue = 0, primaryColor = TEXTCOLOR_NONE[, secondaryValue = 0, secondaryColor = TEXTCOLOR_NONE]]) player:sendTutorial(tutorialId) player:setAccountType(accountType) player:setBankBalance(bankBalance) player:setCapacity(capacity) player:setGhostMode(enabled) player:setGroup(group) player:setGuild(guild) player:setGuildLevel(level) player:setGuildNick(nick) player:setMaxMana(maxMana) player:setSex(newSex) player:setSkullTime(skullTime) player:setStamina(stamina) player:setStorageValue(key, value) player:setTown(town) player:setVocation(id or name or userdata) player:showTextDialog(itemId[, text[, canWrite[, length]]]) Position([position]) Position([x = 0[, y = 0[, z = 0[, stackpos = 0]]]]) position:getDistance(positionEx) position:isSightClear(positionEx[, sameFloor = true]) position:sendDistanceEffect(positionEx, distanceEffect[, player = nullptr]) position:sendMagicEffect(magicEffect[, player = nullptr]) rawgetmetatable(metatableName) registerClass(className, baseClass, newFunction) 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) saveServer() selfFollow(player) selfMove(direction) selfMoveTo(x,y,z) selfSay(words[, target]) selfTurn(direction) sendChannelMessage(channelId, type, message) sendGuildChannelMessage(guildId, type, message) 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) setConditionFormula(condition, mina, minb, maxa, maxb) setConditionParam(condition, key, value) setmetatable(className, methodsTable) stopEvent(eventid) table.create(arrayLength, keyLength) Teleport(uid) teleport:getDestination() teleport:setDestination(position) Tile(position) Tile(x, y, z) tile:getBottomCreature() tile:getBottomVisibleCreature(creature) tile:getCreatureCount() tile:getCreatures() tile:getDownItemCount() tile:getFieldItem() tile:getGround() tile:getHouse() tile:getItemById(itemId[, subType = -1]) tile:getItemByTopOrder(topOrder) tile:getItemByType(itemType) tile:getItemCount() tile:getItemCountById(itemId[, subType = -1]) tile:getItems() tile:getPosition() tile:getThing(index) tile:getThingCount() tile:getThingIndex(thing) tile:getTopCreature() tile:getTopDownItem() tile:getTopItemCount() tile:getTopTopItem() tile:getTopVisibleCreature(creature) tile:getTopVisibleThing(creature) tile:hasFlag(flag) tile:hasProperty(property[, item]) tile:queryAdd(thing[, flags]) Town(id or name) town:getId() town:getName() town:getTemplePosition() Variant(number or string or position or thing) Variant:getNumber() Variant:getPosition() Variant:getString() version(CLIENT_VERSION_MIN) Vocation(id or name) vocation:getAttackSpeed() vocation:getBaseSpeed() vocation:getCapacityGain() vocation:getClientId() vocation:getDemotion() vocation:getDescription() vocation:getHealthGain() vocation:getHealthGainAmount() vocation:getHealthGainTicks() vocation:getId() vocation:getManaGain() vocation:getManaGainAmount() vocation:getManaGainTicks() vocation:getMaxSoul() vocation:getName() vocation:getPromotion() vocation:getRequiredManaSpent(magicLevel) vocation:getRequiredSkillTries(skillType, skillLevel) vocation:getSoulGainTicks() Data functions - Funções pra LUA Container.isContainer(self) Creature.getClosestFreePosition(self, position, extended) Creature.getPlayer(self) Creature.isItem(self) Creature.isMonster(self) Creature.isNpc(self) Creature.isPlayer(self) Creature.isTile(self) Creature:onAreaCombat(tile, isAggressive) Creature:onChangeOutfit(outfit) Creature:onTargetCombat(target) CreatureIndex(self, key) FocusModule.messageMatcher(keywords, message) FocusModule.onFarewell(cid, message, keywords, parameters) FocusModule.onGreet(cid, message, keywords, parameters) FocusModule:init(handler) FocusModule:new() Game.broadcastMessage(message, messageType) Game.convertIpToString(ip) Game.getReverseDirection(direction) Game.getSkillType(weaponType) Game.getStorageValue(key) Game.setStorageValue(key, value) Item.getType(self) Item.isContainer(self) Item.isCreature(self) Item.isPlayer(self) Item.isTeleport(self) Item.isTile(self) ItemIndex(self, key) ItemType.usesSlot(self, slot) KeywordHandler:addKeyword(keys, callback, parameters) KeywordHandler:getLastNode(cid) KeywordHandler:getRoot() KeywordHandler:moveUp(cid, steps) KeywordHandler:new() KeywordHandler:processMessage(cid, message) KeywordHandler:processNodeMessage(node, cid, message) KeywordHandler:reset(cid) KeywordModule:addKeyword(keywords, reply) KeywordModule:init(handler) KeywordModule:new() KeywordModule:parseKeywords(data) KeywordModule:parseParameters() KeywordNode:addChildKeyword(keywords, callback, parameters) KeywordNode:addChildKeywordNode(childNode) KeywordNode:checkMessage(message) KeywordNode:getKeywords() KeywordNode:getParameters() KeywordNode:getParent() KeywordNode:new(keys, func, param) KeywordNode:processMessage(cid, message) NpcHandler:addFocus(newFocus) NpcHandler:addModule(module) NpcHandler:cancelNPCTalk(events) NpcHandler:doNPCTalkALot(msgs, interval, pcid) NpcHandler:getCallback(id) NpcHandler:getMessage(id) NpcHandler:greet(cid) NpcHandler:isFocused(focus) NpcHandler:isInRange(cid) NpcHandler:new(keywordHandler) NpcHandler:onBuy(creature, itemid, subType, amount, ignoreCap, inBackpacks) NpcHandler:onCreatureAppear(creature) NpcHandler:onCreatureDisappear(creature) NpcHandler:onCreatureSay(creature, msgtype, msg) NpcHandler:onFarewell(cid) NpcHandler:onGreet(cid) NpcHandler:onPlayerCloseChannel(creature) NpcHandler:onPlayerEndTrade(creature) NpcHandler:onSell(creature, itemid, subType, amount, ignoreCap, inBackpacks) NpcHandler:onThink() NpcHandler:onTradeRequest(cid) NpcHandler:onWalkAway(cid) NpcHandler:parseMessage(msg, parseInfo) NpcHandler:processModuleCallback(id, ...) NpcHandler:releaseFocus(focus) NpcHandler:resetNpc(cid) NpcHandler:say(message, focus, publicize, shallDelay, delay) NpcHandler:setCallback(id, callback) NpcHandler:setKeywordHandler(newHandler) NpcHandler:setMaxIdleTime(newTime) NpcHandler:setMessage(id, newMessage) NpcHandler:unGreet(cid) NpcHandler:updateFocus() NpcSystem.getParameter(key) NpcSystem.parseParameters(npcHandler) Party:onDisband() Party:onJoin(player) Party:onLeave(player) Player.addSkillTries(...) Player.feed(self, food) Player.getClosestFreePosition(self, position, extended) Player.getDepotItems(self, depotId) Player.getLossPercent(self) Player.isPremium(self) Player.isUsingOtClient(self) Player.sendCancelMessage(self, message) Player.sendExtendedOpcode(self, opcode, buffer) Player:isPremium() Player:onBrowseField(position) Player:onGainExperience(source, exp, rawExp) Player:onGainSkillTries(skill, tries) Player:onLook(thing, position, distance) Player:onLookInBattleList(creature, distance) Player:onLookInShop(itemType, count) Player:onLookInTrade(partner, item, distance) Player:onLoseExperience(exp) Player:onMoveCreature(creature, fromPosition, toPosition) Player:onMoveItem(item, count, fromPosition, toPosition) Player:onTradeAccept(target, item, targetItem) Player:onTradeRequest(target, item) Player:onTurn(direction) Position.getNextPosition(self, direction, steps) Position.getTile(self) Position:getNextPosition(direction, steps) Position:moveUpstairs() ShopModule.messageMatcher(keywords, message) ShopModule.onConfirm(cid, message, keywords, parameters, node) ShopModule.onDecline(cid, message, keywords, parameters, node) ShopModule.requestTrade(cid, message, keywords, parameters, node) ShopModule.tradeItem(cid, message, keywords, parameters, node) ShopModule:addBuyableItem(names, itemid, cost, itemSubType, realName) ShopModule:addBuyableItemContainer(names, container, itemid, cost, subType, realName) ShopModule:addSellableItem(names, itemid, cost, realName, itemSubType) ShopModule:callbackOnBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks) ShopModule:callbackOnModuleReset() ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreEquipped, _) ShopModule:getCount(message) ShopModule:getShopItem(itemId, itemSubType) ShopModule:init(handler) ShopModule:new() ShopModule:parseBuyable(data) ShopModule:parseBuyableContainers(data) ShopModule:parseParameters() ShopModule:parseSellable(data) ShopModule:reset() StdModule.bless(cid, message, keywords, parameters, node) StdModule.learnSpell(cid, message, keywords, parameters, node) StdModule.promotePlayer(cid, message, keywords, parameters, node) StdModule.say(cid, message, keywords, parameters, node) StdModule.travel(cid, message, keywords, parameters, node) Teleport.isTeleport(self) Tile.isCreature(self) Tile.isItem(self) Tile.isTile(self) TravelModule.bringMeTo(cid, message, keywords, parameters, node) TravelModule.listDestinations(cid, message, keywords, parameters, node) TravelModule.onConfirm(cid, message, keywords, parameters, node) TravelModule.onDecline(cid, message, keywords, parameters, node) TravelModule.travel(cid, message, keywords, parameters, node) TravelModule:addDestination(name, position, price, premium) TravelModule:init(handler) TravelModule:new() TravelModule:parseDestinations(data) TravelModule:parseParameters() broadcastMessage(message, messageType) canJoin(player) canPlayerLearnInstantSpell(cid, name) canPlayerWearOutfit(cid, lookType, addons) creatureSayCallback(cid, type, msg) destroyItem(cid, target, toPosition) doAddCondition(cid, conditionId) doAddContainerItemEx(uid, virtualId) doAddMapMark(cid, pos, type, description) doChangeSpeed(cid, delta) doChangeTypeItem(uid, newType) doConvinceCreature(cid, target) doCreateNpc(name, pos, ...) doCreateTeleport(itemId, destination, position) doCreatureAddHealth(cid, health) doCreatureChangeOutfit(cid, outfit) doCreatureSay(cid, text, type, ...) doCreatureSayWithDelay(cid, text, type, delay, e, pcid) doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position) doCreatureSetLookDir(cid, direction) doDecayItem(uid) doForceSummonCreature(name, pos) doMonsterChangeTarget(cid) doNpcSellItem(cid, itemid, amount, subType, ignoreCap, inBackpacks, backpack) doPlayerAddBlessing(cid, blessing) doPlayerAddExp(cid, exp, useMult, ...) 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) doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges) doPlayerFeed(cid, food) doPlayerJoinParty(cid, leaderId) doPlayerPopupFYI(cid, message) doPlayerRemOutfit(cid, lookType, addons) doPlayerRemoveItem(cid, itemid, count, ...) doPlayerRemoveMoney(cid, money) doPlayerRemoveMount(cid, mountId) doPlayerRemovePremiumDays(cid, days) doPlayerSellItem(cid, itemid, count, cost) doPlayerSendCancel(cid, text) doPlayerSendTextMessage(cid, type, text, ...) doPlayerSetBalance(cid, balance) doPlayerSetGuildLevel(cid, level) doPlayerSetGuildNick(cid, nick) doPlayerSetSex(cid, sex) doPlayerSetTown(cid, town) doPlayerSetVocation(cid, vocation) doPlayerTakeItem(cid, itemid, count) doRelocate(fromPos, toPos) doRemoveCondition(cid, conditionType, subId) doRemoveCreature(cid) doRemoveItem(uid, ...) doSendAnimatedText() doSendDistanceShoot(fromPos, toPos, distanceEffect, ...) doSendMagicEffect(pos, magicEffect, ...) doSendTutorial(cid, tutorialId) doSetCreatureDropLoot(cid, doDrop) doSetItemActionId(uid, actionId) doSetItemSpecialDescription(uid, desc) doSetItemText(uid, text) doSetMonsterTarget(cid, target) doShowTextDialog(cid, itemId, text) doSummonCreature(name, pos, ...) doTeleportThing(uid, dest, pushMovement) doTransformItem(uid, newItemId, ...) firstServerSaveWarning() getAccountNumberByPlayerName(name) getArticle(str) getBlessingsCost(level) getConfigInfo(info) getContainerCap(uid) getContainerCapById(itemId) getContainerItem(uid, slot) getContainerSize(uid) getCount(string) getCreatureBaseSpeed(cid) getCreatureHealth(cid) getCreatureMaster(cid) getCreatureMaxHealth(cid) getCreatureName(cid) getCreatureOutfit(cid) getCreaturePosition(cid) getCreatureSpeed(cid) getCreatureSummons(cid) getCreatureTarget(cid) getDistanceBetween(firstPosition, secondPosition) getExpForLevel(level) getFluidSourceType(itemId) getFormattedWorldTime() getGlobalStorageValue(key) getGuildId(guildName) getHouseAccessList(id, listId) getHouseByPlayerGUID(playerGUID) getHouseEntry(houseId) getHouseName(houseId) getHouseOwner(houseId) getHouseRent(id) getHouseTilesSize(houseId) getHouseTown(houseId) getIPByPlayerName(name) getItemDescriptions(itemId) getItemIdByName(name) getItemName(itemId) getItemRWInfo(uid) getItemWeight(itemId, ...) getItemWeightByUID(uid, ...) getMonsterFriendList(cid) getMonsterTargetList(cid) getMonthDayEnding(day) getMonthString(m) getOnlinePlayers() getPartyMembers(cid) getPlayerAccess(cid) getPlayerAccountType(cid) getPlayerBalance(cid) getPlayerBlessing(cid, blessing) getPlayerByName(name) getPlayerDepotItems(cid, depotId) getPlayerFood(cid) getPlayerFreeCap(cid) getPlayerGUID(cid) getPlayerGUIDByName(name) getPlayerGroupId(cid) getPlayerGuildId(cid) getPlayerGuildLevel(cid) getPlayerGuildName(cid) getPlayerGuildNick(cid) getPlayerGuildRank(cid) 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) getPlayerSex(cid) getPlayerSkill(cid, skillId) getPlayerSkullType(cid) getPlayerSlotItem(cid, slot) getPlayerSoul(cid) getPlayerStorageValue(cid, key) getPlayerTown(cid) getPlayerVocation(cid) getPlayersByAccountNumber(accountNumber) getPlayersByIPAddress(ip, mask) getPromotedVocation(vocationId) getPvpBlessingCost(level) getSkillId(skillName) getSpectators(centerPos, rangex, rangey, multifloor, onlyPlayers) getThing(uid) getThingPos(uid) getThingfromPos(pos) 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) getWorldCreatures(type) greetCallback(cid) hasProperty(uid, prop) internalBedTransform(item, targetItem, toPosition, ids) isContainer(uid) isCorpse(uid) isCreature(cid) isDruid(cid) isInRange(pos, fromPos, toPos) isItem(uid) isItemContainer(itemId) isItemDoor(itemId) isItemFluidContainer(itemId) isItemMovable(itemId) isItemRune(itemId) isItemStackable(itemId) isKnight(cid) isMonster(cid) isNpc(cid) isNumber(str) isPaladin(cid) isPlayer(cid) isPlayerGhost(cid) isPlayerPzLocked(cid) isPremium(cid) isSightClear(fromPos, toPos, floorCheck) isSorcerer(cid) isSummon(cid) msgcontains(message, keyword) onAddFocus(cid) onAddItem(moveitem, tileitem, position) onCastSpell(cid, var) onCastSpell(cid, var, isHotkey) onCastSpell(creature, var) onCastSpell(creature, var, isHotkey) onCastSpell(creature, variant, isHotkey) onCreatureAppear(cid) onCreatureDisappear(cid) onCreatureSay(cid, type, msg) onDeath(player, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) onDeath(player, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified) onExtendedOpcode(player, opcode, buffer) onGetFormulaValues(cid, level, maglevel) onGetFormulaValues(cid, skill, attack, factor) onGetFormulaValues(player, level, attack, factor) onLogin(player) onLogout(player) onRecord(current, old) onReleaseFocus(cid) onRemoveItem(item, tile, position) onSay(player, words, param) onSpeak(player, type, message) onStartup() onStepIn(creature, item, position, fromPosition) onStepOut(creature, item, position, fromPosition) onTargetCreature(creature, target) onTargetTile(creature, pos) onThink() onTime(interval) onUpdateDatabase() onUse(cid, item, fromPosition, target, toPosition, isHotkey) onUse(player, item, fromPosition, target, toPosition, isHotkey) onUseWeapon(player, var) playerLearnInstantSpell(cid, name) pushThing(thing) queryTileAddThing(thing, position, ...) registerCreatureEvent(cid, name) secondServerSaveWarning() serverSave() setGlobalStorageValue(key, value) setHouseAccessList(id, listId, listText) setHouseOwner(id, guid) setPlayerGroupId(cid, groupId) setPlayerStorageValue(cid, key, value) spellCallback(param) targetPositionToVariant(position) unregisterCreatureEvent(cid, name) useStamina(player) Créditos felzan
  4. Pessoal meu script não está muito certo só funciona a função de baixo. function onUse(cid, item, fromPosition, itemEx, toPosition) if itemEx.itemid == 2782 then doTransformItem(itemEx.uid, 2781) doDecayItem(itemEx.uid) return TRUE end return destroyItem(cid, itemEx, toPosition) end function onUse(cid, item, fromPosition, itemEx, toPosition) local id = 1499 -- ida da runa if(itemEx.itemid == id) then doSendMagicEffect(toPosition, CONST_ME_POFF) doRemoveItem(itemEx.uid) return true end return destroyItem(cid, itemEx, toPosition) end Que pode ser? :v.v: um amigo meu resolveu o credito é dele! function onUse(cid, item, fromPosition, itemEx, toPosition) local id = 1499 -- ida da runa if itemEx.itemid == 2782 then doTransformItem(itemEx.uid, 2781) doDecayItem(itemEx.uid) return TRUE end if(itemEx.itemid == id) then doSendMagicEffect(toPosition, CONST_ME_POFF) doRemoveItem(itemEx.uid) return true end return destroyItem(cid, itemEx, toPosition) end Tiago Oliveira ( Vulgo nerd dos script)
  5. 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)
  6. 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
  7. kttallan

    Funções ?

    Olá amigos sé eu me lembre antigamente aqui no xtibia tinha um tutorial monstrando todas funções em lua e pra que elas serviam porem não consegui achar resolver criar um topico para pedir ajuda a vocês obrigado. rep+ pela ajuda.
  8. Essa função é muito útil pra scripters, ela cria um arquivo .txt na pasta do ot (onde fica o .exe) com TODAS funções da distro, TODAS mesmo. function onUse(cid, item) local k = getLuaFunctions() --- Create file content your server function list local file__ = io.open('Your Server Function List.txt','w') table.sort(k) for i=1,#k do if k[i] ~= "" then file__:write((i-1)..' - '..k[i]..'\n') end end file__:close() return true end function getLuaFunctions()-- by Mock local str = "" for f,k in pairs(_G) do if type(k) == 'function' then str = str..f..',' elseif type(k) == 'table' then for d,o in pairs(k) do if type(o) == 'function' then if f ~= '_G' and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..',' end elseif type(o) == 'table' then for m,n in pairs(o) do if type(n) == 'function' then if d == "_M" and m ~= "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..m.."," elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..m..',' end elseif type(n) == 'table' then for x,p in pairs(n) do if type(p) == 'function' then if m == "_M" and d ~= "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..x..',' elseif m == "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then str = str..f.."."..x..',' elseif m ~= "_M" and d == "_M" and f ~= "_G" and f ~= 'package' then str = str..f..'.'..m..'.'..x..',' elseif f ~= '_G' and m ~= "_G" and d ~= "_G" and f ~= 'package' then str = str..f.."."..d..'.'..m..'.'..x..',' end end end end end end end end end return string.explode(str,',') end É só criar uma tag de um item qualquer e dar use nele e pronto, a lista está pronta. OBS: Acho que não tem necessidade de explicar como instala. Créditos: Mock e iuniX
  9. Informações Gerais: Server: OTServ 0.6.3 Versão: 8.60 Erro: "attempt to call global 'drainSpell'(a nil value)" Introdução: Bom eu sou programador C++ e C#, iniciei há pouco tempo com LUA, então estou tendo alguns probleminhas. Eu desenvolvi uma Spell que funciona perfeitamente. O Código está abaixo: spellCompleta.lua -- Arquivo spells/scripts/spellCompleta.lua - funcionando - OK. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(cid, var) if getPlayerStorageValue(cid, 11000) == 1 then stopSpell(cid) end addEvent(startSpell, 3000, cid) setPlayerStorageValue(cid, 11000, 1) drainSpell(cid) return doCombat(cid, combat, var) end function startSpell(cid) doSendMagicEffect(getCreaturePosition(cid), 2) doCreatureChangeOutfit(cid, {lookType = 28}) end function stopSpell(cid) setPlayerStorageValue(cid, 11000, 0) doRemoveCondition(cid, CONDITION_OUTFIT) doCreatureChangeOutfit(cid, {lookType = 29}) end function drainSpell(cid) if isPlayer(cid) then if getPlayerStorageValue(cid, 11000) == 1 and getPlayerMana(cid) > 0 then doPlayerAddMana(cid, -1) addEvent(drainSpell, 3000, cid) elseif getPlayerMana(cid) == 0 then doSendMagicEffect(getCreaturePosition(cid), 2) stopSpell(cid) doPlayerSendCancel(cid, "Spell has been interrupted. You're out of mana.") end end end Situação: Eu pretendo desenvolver a Spell1, Spell2, Spell3 e assim por diante, e todas elas são no mesmo modelo, pois todas elas precisam ter o mesmo: startSpell, StopSpell e drainSpell. Então por lógica, criei um Script separado para deixar tais funções, ele se chama standardSpell. Neste exemplo eu removo a function "drainSpell" do arquivo "spell1.lua", e coloco ela somente no arquivo standardSpell. spell1.lua -- Arquivo spells/scripts/spell1.lua local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(cid, var) if getPlayerStorageValue(cid, 11000) == 1 then stopSpell(cid) end addEvent(startSpell, 3000, cid) setPlayerStorageValue(cid, 11000, 1) drainSpell(cid) return doCombat(cid, combat, var) end function startSpell(cid) doSendMagicEffect(getCreaturePosition(cid), 2) doCreatureChangeOutfit(cid, {lookType = 28}) end function stopSpell(cid) setPlayerStorageValue(cid, 11000, 0) doRemoveCondition(cid, CONDITION_OUTFIT) doCreatureChangeOutfit(cid, {lookType = 29}) end standardSpell.lua -- Arquivo spells/scripts/standardSpell.lua function drainSpell(cid) if isPlayer(cid) then if getPlayerStorageValue(cid, 11000) == 1 and getPlayerMana(cid) > 0 then doPlayerAddMana(cid, -1) addEvent(drainSpell, 3000, cid) elseif getPlayerMana(cid) == 0 then doSendMagicEffect(getCreaturePosition(cid), 2) stopSpell(cid) doPlayerSendCancel(cid, "Spell has been interrupted. You're out of mana.") end end end Ao remover o drainSpell do arquivo "spell1.lua" e adicioná-lo no "standardSpell.lua" eu passo a receber o seguinte erro: "attempt to call global 'drainSpell'(a nil value)". Conclusão: Gostaria de saber o porquê deste erro e como fazer para criar e utilizar funções "genéricas", que serão chamados/utilizadas por diversos scripts. Obs: O código está um pouco menor e simplificado por Spell1, Spell2 para ser mais prático e objetivo. Obs2: Coloquei em anexo o código com a spell normal funcionando, e o código com ela dividida em "spell1.lua" e "standardSpell.lua". Obg e att, Luís.
×
×
  • Criar Novo...