Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''tfs 1.2''.

  • 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

  1. Olá galera, queria saber se alguém pode fazer ou me auxiliar a fazer uma magia de clone? Ela funcionará assim: Vai clonar a outfit, vida, e nome do personagem que a usar, o dano é baseado no skill do player que a usar, exemplo ele tem skill 100, o clone usa 50% do skill, ou seja, skill 50. Alguém tem ideia de como fazer isso?
  2. Olá amigos, eu preciso de sua ajuda, porque eu estou criando um servidor do TFS 1.2 e é mysql versão 10.76. Meu problema é que quando eu abri-lo e colocar o ip eu recebo: erro de conexão falhou e amigos se eles podem obter. Menos eu. Iria me ajudar por favor? Para este problema deveria? e como resolvido?
  3. Quero aprender Traduzir meu servidor 860 alguém ajuda pfv nunca consegui fazer essas coisas de sorce
  4. Olá galera, Vou ser o mais breve e específico em meu pedido. Estou criando um OT 8.6 com mapa próprio. Usei como base um Global 8.6 que encontrei. Eu estava conseguindo abrir e entrar no server normalmente, porém de uma hora pra outra começaram os debugs ao tentar logar (qualquer account). Problema: Eu ligo o server e ele carrega normal. Abro o Tibia e quando dou enter (para logar em qualquer account ou mesmo sem numeros) acontece o debug. O que já fiz: - Já verifiquei o config.lua - Já mexi na database - Mudei o mapa para outra base e o debug continuou. Segue o config.lua para verificarem -- Global Server Config-- Account manager accountManager = truenamelockManager = truenewPlayerChooseVoc = truenewPlayerSpawnPosX = 1126newPlayerSpawnPosY = 1090newPlayerSpawnPosZ = 8newPlayerTownId = 1newPlayerLevel = 8newPlayerMagicLevel = 1generateAccountNumber = false-- Unjustified kills useFragHandler = true redSkullLength = 30 * 24 * 60 * 60 blackSkullLength = 45 * 24 * 60 * 60 dailyFragsToRedSkull = 30 weeklyFragsToRedSkull = 150 monthlyFragsToRedSkull = 500 dailyFragsToBlackSkull = dailyFragsToRedSkull weeklyFragsToBlackSkull = weeklyFragsToRedSkull monthlyFragsToBlackSkull = monthlyFragsToRedSkull dailyFragsToBanishment = dailyFragsToRedSkull weeklyFragsToBanishment = weeklyFragsToRedSkull monthlyFragsToBanishment = monthlyFragsToRedSkull blackSkulledDeathHealth = 40 blackSkulledDeathMana = 0 useBlackSkull = true advancedFragList = false-- Banishments notationsToBan = 3 warningsToFinalBan = 4 warningsToDeletion = 5 banLength = 7 * 24 * 60 * 60 killsBanLength = 7 * 24 * 60 * 60 finalBanLength = 30 * 24 * 60 * 60 ipBanishmentLength = 1 * 24 * 60 * 60 broadcastBanishments = true maxViolationCommentSize = 200 violationNameReportActionType = 2 autoBanishUnknownBytes = false-- BattleworldType = "pvp" protectionLevel = 100 pvpTileIgnoreLevelAndVocationProtection = true pzLocked = 60 * 1000 huntingDuration = 60 * 1000 criticalHitChance = 7 criticalHitMultiplier = 1 displayCriticalHitNotify = false removeWeaponAmmunition = false removeWeaponCharges = falseremoveRuneCharges = false whiteSkullTime = 15 * 60 * 1000 noDamageToSameLookfeet = false showHealingDamage = false showHealingDamageForMonsters = falsefieldOwnershipDuration = 5 * 1000stopAttackingAtExit = falseloginProtectionPeriod = 10 * 1000deathLostPercent = 10 stairhopDelay = 2 * 1000 pushCreatureDelay = 2 * 1000 deathContainerId = 1987 gainExperienceColor = 215 addManaSpentInPvPZone = true squareColor = 0 allowFightback = true fistBaseAttack = 7 -- Connection config worldId = 0 ip = "192.168.0.17" loginPort = 7171 gamePort = 7172 loginTries = 10 retryTimeout = 5 * 1000 loginTimeout = 60 * 1000 maxPlayers = 1000 motd = "" displayOnOrOffAtCharlist = false onePlayerOnlinePerAccount = true allowClones = false serverName = "Draenor" loginMessage = "Welcome to the Draenor ATS." statusTimeout = 5 * 60 * 1000 replaceKickOnLogin = true forceSlowConnectionsToDisconnect = false loginOnlyWithLoginServer = false premiumPlayerSkipWaitList = false -- Database sqlType = "sqlite"sqlHost = "localhost"sqlPort = 3306sqlUser = "root"sqlPass = ""sqlDatabase = "realserver"sqlFile = "realserver.s3db"sqlKeepAlive = 0mysqlReadTimeout = 10mysqlWriteTimeout = 10encryptionType = "sha1" -- Deathlist deathListEnabled = false deathListRequiredTime = 1 * 60 * 1000 deathAssistCount = 19 maxDeathRecords = 5 -- Guilds ingameGuildManagement = true levelToFormGuild = 400 premiumDaysToFormGuild = 0 guildNameMinLength = 4 guildNameMaxLength = 20 -- Highscores highscoreDisplayPlayers = 15 updateHighscoresAfterMinutes = 60 -- Houses buyableAndSellableHouses = true houseNeedPremium = true bedsRequirePremium = true levelToBuyHouse = 400 housesPerAccount = 1houseRentAsPrice = false housePriceAsRent = false housePriceEachSquare = 100000 houseRentPeriod = "never" houseCleanOld = 0 guildHalls = false -- Item usage timeBetweenActions = 200 timeBetweenExActions = 1000 hotkeyAimbotEnabled = true -- Map mapName = "Draenor ATS" mapAuthor = "Felipe Lotz" randomizeTiles = true storeTrash = true cleanProtectedZones = true mailboxDisabledTowns = ""-- Process defaultPriority = "high" niceLevel = 5coresUsed = "-1" -- Startup startupDatabaseOptimization = true updatePremiumStateAtStartup = true confirmOutdatedVersion = false-- Spells formulaLevel = 5.0 formulaMagic = 1.0 bufferMutedOnSpellFailure = false spellNameInsteadOfWords = false emoteSpells = false-- Outfits allowChangeOutfit = true allowChangeColors = true allowChangeAddons = true disableOutfitsForPrivilegedPlayers = false addonsOnlyPremium = true-- Miscellaneous dataDirectory = "data/" logsDirectory = "data/logs/" bankSystem = true displaySkillLevelOnAdvance = false promptExceptionTracerErrorBox = true maximumDoorLevel = 500 maxMessageBuffer = 4 -- VIP list separateVipListPerCharacter = false vipListDefaultLimit = 20 vipListDefaultPremiumLimit = 100 -- Saving-related saveGlobalStorage = true useHouseDataStorage = false storePlayerDirection = false -- Loot checkCorpseOwner = true monsterLootMessage = 3 monsterLootMessageType = 25 -- Ghost mode ghostModeInvisibleEffect = false ghostModeSpellEffects = true-- Limits idleWarningTime = 59 * 60 * 1000 idleKickTime = 60 * 60 * 1000 reportsExpirationAfterReads = 1 playerQueryDeepness = 2 tileLimit = 0 protectionTileLimit = 0 houseTileLimit = 0 -- Premium-related freePremium = truepremiumForPromotion = true-- Blessings blessings = true blessingOnlyPremium = true blessingReductionBase = 30blessingReductionDecrement = 5 eachBlessReduction = 8 -- Rates experienceStages = true rateExperience = 1.0 rateExperienceFromPlayers = 0 rateSkill = 100.0rateMagic = 60.0 rateLoot = 3.0rateSpawn = 1.0 -- Monster rates rateMonsterHealth = 1.0 rateMonsterMana = 1.0 rateMonsterAttack = 1.0 rateMonsterDefense = 1.0 -- Experience from players minLevelThresholdForKilledPlayer = 0.9 maxLevelThresholdForKilledPlayer = 1.1 -- Stamina rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 staminaRatingLimitTop = 40 * 60 staminaRatingLimitBottom = 14 * 60 staminaLootLimit = 14 * 60 rateStaminaAboveNormal = 1.5 rateStaminaUnderNormal = 0.5 staminaThresholdOnlyPremium = true -- Party experienceShareRadiusX = 30 experienceShareRadiusY = 30 experienceShareRadiusZ = 1 experienceShareLevelDifference = 2 / 3 extraPartyExperienceLimit = 20 extraPartyExperiencePercent = 5 experienceShareActivity = 2 * 60 * 1000-- Global save globalSaveEnabled = false globalSaveHour = 8 globalSaveMinute = 0 shutdownAtGlobalSave = true cleanMapAtGlobalSave = false-- Spawns deSpawnRange = 2 deSpawnRadius = 50 -- Summons maxPlayerSummons = 2 teleportAllSummons = false teleportPlayerSummons = false-- Status statusPort = 7171 ownerName = "Felipe Lotz" ownerEmail = "felipe_lotz@hotmail.com" url = "" location = "CWB BR" displayGamemastersWithOnlineCommand = false-- Logs displayPlayersLogging = true prefixChannelLogs = "" runFile = "" outputLog = "" truncateLogsOnStartup = false -- ManagermanagerPort = 7171managerLogs = true managerPassword = "" managerLocalhostOnly = true managerConnectionsLimit = 1 -- Admin adminPort = 7171 adminLogs = true adminPassword = "" adminLocalhostOnly = true adminConnectionsLimit = 1 adminRequireLogin = true adminEncryption = "" adminEncryptionData = "" Galera ficaria muito grato se alguém pudesse me ajudar, obrigado!
  5. Olá fórum xtibia tem uma desvantagem não sei se você pode me ajudar porque eu estou preocupado sobre como resolver este problema. https://img42.com/vSXVP
  6. Gostaria que me dessem uma mão nesse código, estou adaptando para TFS 1.2 e algumas funções não ajudam rsrs. Vou postar os seguintes erros na imagem abaixo. Preciso trocar essa função "getItemInfo" do código por outra que existe no TFS 1.2 mas não tenho ideia qual eu posso usar. Código original: IMAGEM COM ERRO: Lembrando esse erro acontece após eu clicar no martelo e clicar no escudo como exemplo! Pode ser qualquer item com atributos ,todos dão o mesmo erro.
  7. Resumindo, eu queria adicionar uma nova skill para aparecer no client (as alterações no otclient já estão, prontas, eu creio). Eu fiz da seguinte maneira: 1 - Procure por "fish" na source e abaixo disso, eu ia adicionando o código referente a nova skill, que seria "mining" 2 - Fiz as alterações na database (tabela players, adicionei skill_mining e skill_mining_tries) 3 - Como eu disse, fiz as alterações no otclient pra aparecer a nova barra (veja a imagem). O valor inicial na barra está aparecendo corretamente (inicial 10), mas quando eu uso o item pra minerar, a barra não "sobe" 3.1 - Eu modifiquei a action que usa o pick, está parecido com o de fishing, a cada vez que ele usa, a função player:addSkillTries(SKILL_MINING, 1) é executada (com isso, a barra deveria subir) OBS: Mesmo executando a função que eu disse acima, não ocorre nenhuma alteração no banco de dados, em skill_mining_tries, o que deveria mudar, por isso, acho que o erro é na source, devo ter esquecido algo Imagem: http://i.imgur.com/pON4goT.jpg Source que eu editei: https://www.sendspace.com/file/m90nxg
  8. Queria Saber Como Faço pra adicionar pokemon des do portrait e pokebola na base cyan e como bota pro player poder usar sair da pokebola voltar etc...
  9. Olá gostaria de pedir uma força pra alguem ai. Eu gostaria que este script me envie uma BAG por cada boss do reward chest que o jogador matar, atualmente ele esta enviando os items normal so que se eu mato 2 bosses iguais ou diferentes os items fica um em cima do outro, gostaria de separar. Ex: matou um boss os items vai ser enviado dentro de uma bag ou backpack dependendo do id que colocar, quando eu matar o outro boss vou receber outra bag ou backpack e quando eu ir na ilha pegar os items do reward, lá vai esta 2 bag ou backpack e nao os items tudo juntos Eu tentei mais consegui apenas enviar 1 item por cada bag ou backpack, ou seja, se eu matar um boss e ganhar 10 item, vai ser enviado 10 bags :\ Por fim o scritp é este: function sort_descending(t) local tmp = {} for k, v in pairs(t) do table.insert(tmp, {k, v}) end table.sort(tmp, function(a, b) return a[2] > b[2] end) return tmpendfunction table.find(t, v) for i,x in pairs(t) do if x == v then return true end endendfunction Player:addItemRewardBag(itemid, count)local rewardbag = self:getDepotChest(99, true) return rewardbag:addItem(itemid, count)endfunction MonsterType:getBossReward(chance, unique) local ret = {} local function randomItem(lootBlock, chance) local randvalue = math.random(0, 100000) / (getConfigInfo("rateLoot") * chance) if randvalue < lootBlock.chance then if (ItemType(lootBlock.itemId):isStackable()) then return (randvalue%lootBlock.maxCount) + 0 else return 1 end end end local lootBlockList = self:getLoot() for _, loot in pairs(lootBlockList) do local rd = randomItem(loot, chance) if rd then if loot.uniquedrop then if unique then table.insert(ret, {loot, rd}) end else table.insert(ret, {loot, rd}) end end end return retendBossLoot = {}BossUids = {}function BossLoot:new(boss) if not table.find(BossUids, boss:getId()) then table.insert(BossUids, boss:getId()) return setmetatable({creature=boss}, {__index = BossLoot}) endendfunction BossLoot:updateDamage() if self.creature then local tmp = {} local totaldmg = 0 for killer, damage in pairs(self.creature:getDamageMap()) do totaldmg = totaldmg+damage.total tmp[killer] = damage.total end self.players = sort_descending(tmp) self.totaldmg = totaldmg else error("Creature not found.") endendfunction BossLoot:setRewards() if self.totaldmg and self.creature then if getConfigInfo("rateLoot") > 0 then local mt = MonsterType(self.creature:getName()) for i, playertab in ipairs(self.players) do local loot if i == 1 then loot = mt:getBossReward(playertab[2] / self.totaldmg, true) else loot = mt:getBossReward(playertab[2] / self.totaldmg, false) end table.insert(self.players[i], loot) end end else error("Error") endendfunction BossLoot:addRewards() if self.players and self.players[1] and self.players[1][3] then for i, playertab in ipairs(self.players) do local player = Player(playertab[1]) if player then local str = "The following items are available in your reward chest: " for i, lootTable in ipairs(playertab[3]) do local item = player:addItemRewardBag(lootTable[1].itemId, math.ceil(lootTable[2])) if item then str = str .. item:getNameDescription() .. ", " end end str = str:sub(1, #str-2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, str) end end else error("Error") endendfunction onKill(cid, target)target = Monster(target) if (target ~= nil) then local mt = MonsterType(target:getName()) if mt:useRewardChest() then local loot = BossLoot:new(target) if loot then local corpse = Item(doCreateItem(MonsterType(target:getName()):getCorpseId(), 1, target:getPosition())) doDecayItem() target:setDropLoot(false) loot:updateDamage() loot:setRewards() loot:addRewards() corpse:setAttribute('aid', 21584) end end end return trueend
  10. Estou com uma duvida relacionado ao molden ARRIS da net combo em termo de abrir portas 7171 ea 7172 ja vi diversos tutoriais no YOUTUBE e no proprio GOOGLE e nada nao consegui abrir as portas a unica coisa que consegui por deixa ip fixo porem nao consigo por online por ele pra galera joga so pra min sem hamachi sem mana so eu consigo joga por ele ja a galera ao consegui fala que ta offline quem puder me ajuda!!! Rep+++
  11. Gente alguém me socorre por favorrr Bom é o seguinte. Estou tentando implementar a acentuação ingame. O código é em python e sei que vcs scripters fodásticos podem entender. :v Seguinte: Eu já coloquei os acentos em palavras feitas pelo jogo, mas quando o player digita sua própria palavra com acento dá um return e a mensagem não é enviada e a caixa de diálogo é limpa. Aqui está o script: http://migre.me/uiGOI E aqui está a mensagem que vem no LOG quando envia a mensagem: :Loader: At end of block 'hood', expected 8, loaded 42, duration=8.55418648 otp\chat\WhiteList.py:23: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal return self.cleanText(text) in self.words
  12. ALGUEM PODE ME FALA COMO ABRO OT 8.60 SEM HAMACHI COM NET COMPARTILHADA URGENTE OBRIGADO !!! WIND7
  13. Créditos: Erinsx Um monk que marcará no mapa shops, depots, etc... E se você pedir ele vai te levar ao templo que você reside <?xml version="1.0" encoding="UTF-8"?> <npc name="Brevan" script="jorvikmark.lua" walkinterval="0" floorchange="0" speechbubble="1"> <health now="100" max="100"/> <look type="206" head="17" body="54" legs="114" feet="0" addons="0" /> <parameters> <parameter key="message_greet" value="Greetings |PLAYERNAME|! I can mark your {map} to help you find you way around! If you want this, just say {map}! I can also make Jorvik your {home} town. If you want this, say {home}."/> </parameters> </npc> local marks = { [1]={{x=0496,y=0172,z=7},"Temple",MAPMARK_TEMPLE}, [2]={{x=0408,y=0203,z=7},"Depot",MAPMARK_LOCK}, [3]={{x=0478,y=0148,z=7},"Weapons and Armor shops",MAPMARK_SWORD}, [4]={{x=0464,y=0208,z=7},"Magic shop",MAPMARK_STAR}, [5]={{x=0476,y=0201,z=7},"Potions shop",MAPMARK_STAR}, [6]={{x=0390,y=0202,z=7},"Bank",MAPMARK_DOLLAR}, [7]={{x=0433,y=0235,z=7},"Adventurer Supplies",MAPMARK_BAG}, [8]={{x=0480,y=0163,z=7},"Mount Seller",MAPMARK_EXCLAMATION}, [9]={{x=0430,y=0210,z=7},"Loot Buyer",MAPMARK_TICK}, } local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local player = Player(cid) if msg == "map" then for i = 1, #marks do player:addMapMark(marks[i][1],marks[i][3],marks[i][2]) end selfSay('I have marked your map for you, good luck!', cid) talkState[talkUser] = 0 elseif msg == "home" then player:setTown(Town(4)) selfSay('It is done! Goodbye.', cid) talkState[talkUser] = 0 else selfSay('Okay, goodbye.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  14. estou usando xampp no meu Ubuntu 16.04 e estou tendo esse erro STEP 1 Check server configuration Warning: file_put_contents(./config/config.php): failed to open stream: Permissão negada in /opt/lampp/htdocs/classes/website.php on line 103 Error occured! Error ID: More info: Website::putFileContents - Cannot write to: ./config/config.php File: /opt/lampp/htdocs/classes/website.php Line: 106 File: /opt/lampp/htdocs/install.php Line: 87 File: /opt/lampp/htdocs/install.php Line: 206 alguém sabe como resolver?
  15. Olá. Esse conteúdo foi desenvolvido pelo membro Non Sequitur, da Otland. Decidi trazer a vocês, então vamos lá. MODAL WINDOW A forma atual que podemos implementar Modal Windows é bastante complicada, de acordo com Non Sequitur. Ter de criá-la em algum lugar, registrar um evento, adicionar botões de alguma forma estranha para fazer funcionar, sem falar que tem que ter em conta ids de janelas, botões, ids de escolha em algum arquivo diferente, etc... O que você pode fazer com isto? -- The helper lib is used by passing a table value to the ModalWindow functionlocal window = ModalWindow { title = 'Title', message = 'Please, choose the lowest number and press [Ok]'}local lowestChoicefor i = 1, 5 do local value = math.random(1, 100) -- modalWindow:addChoice() returns the choice object that will be passed to the callbacks local choice = window:addChoice(value) -- This way we can pass extra information to the callback choice.value = value if not lowestChoice or lowestChoice.value > value then lowestChoice = choice endendlowestChoice.correct = true-- Add a button with a specific callbackwindow:addButton('Ok', function(button, choice) if choice.correct then print('Player selected the correct option.') else print('Player selected the incorrect option.') end end)-- Set this button as the default enter buttonwindow:setDefaultEnterButton('Ok')-- Add a button without a specific callbackwindow:addButton('Close')window:setDefaultEscapeButton('Close')-- If a button without a specific callback is pressed, this fucntion will be calledwindow:setDefaultCallback( function(button, choice) print('Default callback, button pressed: ' .. button.text .. ' player choice: ' .. choice.text) end)window:sendToPlayer(player) Você pode usar este exemplo em uma talkaction e testar por si mesmo. Diferente do que é mostrado no código acima, você também pode usar modalWindow: addbuttons (...) e modalWindow: addChoices (...) para adicionar vários botões / opções ao mesmo tempo. INSTALANDO Em data/lib/lib.lua dofile('data/lib/modalwindow.lua') Crie o arquivo data/lib/modalwindow.lua if not modalWindows then modalWindows = { modalWindowConstructor = ModalWindow, nextFreeId = 500, windows = {} }end local MT = {}MT.__index = MT function ModalWindow(...) local args = {...} if type(args[1]) == 'table' then local self = setmetatable(args[1], MT) local id = modalWindows.nextFreeId self.id = id self.buttons = {} self.choices = {} self.players = {} self.created = false modalWindows.nextFreeId = id + 1 table.insert(modalWindows.windows, self) return self end return modalWindows.modalWindowConstructor(...)end function MT:setDefaultCallback(callback) self.defaultCallback = callbackend function MT:addButton(text, callback) local button = {text = tostring(text), callback = callback} table.insert(self.buttons, button) return buttonend function MT:addButtons(...) for _, text in ipairs({...}) do table.insert(self.buttons, {text = tostring(text)}) endend function MT:addChoice(text) local choice = {text = tostring(text)} table.insert(self.choices, choice) return choiceend function MT:addChoices(...) for _, text in ipairs({...}) do table.insert(self.choices, {text = tostring(text)}) endend function MT:setDefaultEnterButton(text) self.defaultEnterButton = textend function MT:setDefaultEscapeButton(text) self.defaultEscapeButton = textend function MT:setTitle(title) self.title = tostring(title)end function MT:setMessage(message) self.message = tostring(message)end local buttonOrder = { [4] = {3, 4, 2, 1}, [3] = {2, 3, 1}, [2] = {1, 2}, [1] = {1}}function MT:create() local modalWindow = modalWindows.modalWindowConstructor(self.id, self.title, self.message) local order = buttonOrder[math.min(#self.buttons, 4)] if order then for _, i in ipairs(order) do local button = self.buttons[i] modalWindow:addButton(i, button.text) button.id = i if button.text == self.defaultEnterButton then modalWindow:setDefaultEnterButton(i) elseif button.text == self.defaultEscapeButton then modalWindow:setDefaultEscapeButton(i) end end end for _, choice in ipairs(self.choices) do modalWindow:addChoice(_, choice.text) choice.id = _ end self.modalWindow = modalWindowend function MT:sendToPlayer(player) if not self.modalWindow then self:create() end player:registerEvent('ModalWindowHelper') self.players[player:getId()] = true return self.modalWindow:sendToPlayer(player)end Em data/creaturescripts/creaturescripts.xml <event type="modalwindow" name="ModalWindowHelper" script="modalwindowhelper.lua" /> Crie o arquivo data/creaturescripts/scripts/modalwindowhelper.lua function onModalWindow(player, modalWindowId, buttonId, choiceId) local modalWindow for _, window in ipairs(modalWindows.windows) do if window.id == modalWindowId then modalWindow = window break end end if not modalWindow then return true end local playerId = player:getId() if not modalWindow.players[playerId] then return true end modalWindow.players[playerId] = nil local choice = modalWindow.choices[choiceId] for _, button in ipairs(modalWindow.buttons) do if button.id == buttonId then local callback = button.callback or modalWindow.defaultCallback if callback then callback(button, choice) break end end end return trueend
  16. Olá, vim trazer à comunidade esse código. Ele permite adicionar tempo para resetar a dh quest. Ele foi postado originalmente pelo membro Lundrial, da otland. Bem, não há mais o que dizer. DH LEVER TIME lever.lua local timetoreset = 5 -- Time to reset the quest in minutes.local objectid = xxxx -- Id of the item Blocking the pathlocal p = { Position(x, y, z), -- Position of the item blocking the path Position(x, y, z), -- Teleport Creation position Position(x, y, z) -- Position where it sends you}function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) local stone = Tile(p[1]) local tp = Tile(p[2]) if item.itemid == 1945 then cid:sendTextMessage(MESSAGE_EVENT_ORANGE, 'The object in your path has been removed for ' .. timetoreset .. ' minutes.') doCreateTeleport(1387, p[3], p[2]) stone:getItemById(objectid):remove() p[1]:sendMagicEffect(CONST_ME_POFF) p[2]:sendMagicEffect(CONST_ME_TELEPORT) Item(item.uid):transform(1946) addEvent(function(stonePos) Game.createItem(objectid, 1, stonePos) stonePos:sendMagicEffect(CONST_ME_TELEPORT) p[2]:sendMagicEffect(CONST_ME_POFF) tp:getItemById(1387):remove() Tile(toPosition):getItemById(1946):transform(1945) end, timetoreset * 60000, stone:getPosition()) elseif item.itemid == 1946 then return false end return trueend
  17. Para server 10.90 TFS-1.2 ? Gostaria que após usar um potion ou spells de MP ou HP mostrasse o quanto ele reala. Exemplo: Se o potion de HP ou MP reala 3000, eu queria que aparecesse 3000 visível! Com certeza deve ser dentro da sources. Edit# Lembrando, não funciona isso no config.lua showHealingDamage = true Creio que essa é uma dúvida de muitas pessoas que usam a versão 10.90. Obrigado e REP + pra quem ajudar!!!!!
  18. Então eu preciso de um Teleport que me leve para a coord {x = 1048, y = 1006, z = 7} , E ao mesmo tempo me de a vocation 3... Não achei no forum, e preciso para dar continuidade ao projeto
  19. local conf = {maxSlotCount=1,ignoredIds={}}function choose(...) local arg = {...} return arg[math.random(1,#arg)]endfunction onUse(cid, item, fromPosition, itemEx, toPosition)if isInArray({7410}, itemEx.itemid) then return false end if isCreature(itemEx.uid) then return false end local nam = Item(itemEx.uid):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION) function getSlotCount(nam) local c = 0 for _ in nam:gmatch('%[(.-)%]') do c = c+1 end return c end if getSlotCount(nam) < conf.maxSlotCount then local l = choose('supreme') local p = (30) local armors = {2463,2464,2465,2466,2467,2472,2476,2483,24841} if isInArray(armors, itemEx.itemid) then doSendMagicEffect(toPosition,30) nam = nam..' ['..l..'.+'..p..'%]' doPlayerSendTextMessage(cid, 20,l..'.+'..p..'%') doSetItemSpecialDescription(itemEx.uid, nam) doRemoveItem(item.uid,1) else doPlayerSendTextMessage(cid, 20,"Slot limit reached.") end end return true end ssalve galera queria um help nesse script acima quando o player usa ele em x item ele fica assim é pra tfs 1.2 You see a dragon scale mail (Arm:15). It can only be wielded properly by knights and paladins. It weighs 114.00 oz. [supreme.+30%] eu queria ajuda para que o script alem de adicionar o atributo e tambem adicione o nome da pessoa ficando assim segue o exemplo em negrito You see a SUPREME dragon scale mail (Arm:15). It can only be wielded properly by knights and paladins. Its Belong NOMEDOPLAYER It weighs 114.00 oz.
  20. Meu servidor não tem script no creaturescripts sobre realar toda vida e mana após matar um monstro e passar de level. Gostaria que alguém que saiba pudesse me ajudar. Existe alguma coisa na source sobre isso?? Lembrando TFS 1.2 Versão 10.90 Alguém sabe? REP+ por ajudar.
  21. fala pessoal, eu precisava de ajuda com essa spells pra colocar uma chance em % do condition Exhasted combat acertar o outro player sem que interfira no local combat local combat = Combat()combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_WEAPONTYPE)combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)combat:setParameter(COMBAT_PARAM_USECHARGES, 1)function onGetFormulaValues(player, skill, attack, factor) local skillTotal = skill * attack local levelTotal = player:getLevel() / 5 return -(((skillTotal * 0.01) + 1) + (levelTotal)), -(((skillTotal * 0.03) + 6) + (levelTotal))endlocal exhaust = Condition(CONDITION_EXHAUST_COMBAT)exhaust:setParameter(CONDITION_PARAM_TICKS, 1000)combat:setCondition(exhaust)local exhaustAttackGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN)exhaustAttackGroup:setParameter(CONDITION_PARAM_SUBID, 1)exhaustAttackGroup:setParameter(CONDITION_PARAM_TICKS, 1000)combat:setCondition(exhaustAttackGroup)combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")function onCastSpell(creature, var) return combat:execute(creature, var)end
  22. Olá estou tentando utilizar uma barra de ataque para tibia, encontrei esse: http://www.xtibia.com/forum/topic/212973-drakys-codes-tibia-spell-bar/ Porem ele não esta filtrando as spell pela vocação, estou utilizando o servidor 10.90 que seria automático o reconhecimento. Exemplo: Paladin com todas as spells , inclusive as que não são de sua classe. [spoiler]local spelllist = { ['Death Strike'] = {id = 87, words = 'exori mort', exhaustion = 2000, premium = true, type = 'Instant', icon = 'deathstrike', mana = 20, level = 16, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Flame Strike'] = {id = 89, words = 'exori flam', exhaustion = 2000, premium = true, type = 'Instant', icon = 'flamestrike', mana = 20, level = 14, soul = 0, group = {[1] = 2000}, vocations = {1, 2, 5, 6}}, ['Strong Flame Strike'] = {id = 150, words = 'exori gran flam', exhaustion = 8000, premium = true, type = 'Instant', icon = 'strongflamestrike', mana = 60, level = 70, soul = 0, group = {[1] = 2000, [4] = 8000}, vocations = {1, 5}}, ['Ultimate Flame Strike'] = {id = 154, words = 'exori max flam', exhaustion = 30000, premium = true, type = 'Instant', icon = 'ultimateflamestrike', mana = 100, level = 90, soul = 0, group = {[1] = 4000}, vocations = {1, 5}}, ['Energy Strike'] = {id = 88, words = 'exori vis', exhaustion = 2000, premium = true, type = 'Instant', icon = 'energystrike', mana = 20, level = 12, soul = 0, group = {[1] = 2000}, vocations = {1, 2, 5, 6}}, ['Strong Energy Strike'] = {id = 151, words = 'exori gran vis', exhaustion = 8000, premium = true, type = 'Instant', icon = 'strongenergystrike', mana = 60, level = 80, soul = 0, group = {[1] = 2000, [4] = 8000}, vocations = {1, 5}}, ['Ultimate Energy Strike'] = {id = 155, words = 'exori max vis', exhaustion = 30000, premium = true, type = 'Instant', icon = 'ultimateenergystrike', mana = 100, level = 100,soul = 0, group = {[1] = 4000}, vocations = {1, 5}}, ['Whirlwind Throw'] = {id = 107, words = 'exori hur', exhaustion = 6000, premium = true, type = 'Instant', icon = 'whirlwindthrow', mana = 40, level = 28, soul = 0, group = {[1] = 2000}, vocations = {4, 8}}, ['Fire Wave'] = {id = 19, words = 'exevo flam hur', exhaustion = 4000, premium = false, type = 'Instant', icon = 'firewave', mana = 25, level = 18, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Ethereal Spear'] = {id = 111, words = 'exori con', exhaustion = 2000, premium = true, type = 'Instant', icon = 'etherealspear', mana = 25, level = 23, soul = 0, group = {[1] = 2000}, vocations = {3, 7}}, ['Strong Ethereal Spear'] = {id = 57, words = 'exori gran con', exhaustion = 8000, premium = true, type = 'Instant', icon = 'strongetherealspear', mana = 55, level = 90, soul = 0, group = {[1] = 2000}, vocations = {3, 7}}, ['Energy Beam'] = {id = 22, words = 'exevo vis lux', exhaustion = 4000, premium = false, type = 'Instant', icon = 'energybeam', mana = 40, level = 23, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Great Energy Beam'] = {id = 23, words = 'exevo gran vis lux', exhaustion = 6000, premium = false, type = 'Instant', icon = 'greatenergybeam', mana = 110, level = 29, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Groundshaker'] = {id = 106, words = 'exori mas', exhaustion = 8000, premium = true, type = 'Instant', icon = 'groundshaker', mana = 160, level = 33, soul = 0, group = {[1] = 2000}, vocations = {4, 8}}, ['Berserk'] = {id = 80, words = 'exori', exhaustion = 4000, premium = true, type = 'Instant', icon = 'berserk', mana = 115, level = 35, soul = 0, group = {[1] = 2000}, vocations = {4, 8}}, ['Annihilation'] = {id = 62, words = 'exori gran ico', exhaustion = 30000, premium = true, type = 'Instant', icon = 'annihilation', mana = 300, level = 110,soul = 0, group = {[1] = 4000}, vocations = {4, 8}}, ['Brutal Strike'] = {id = 61, words = 'exori ico', exhaustion = 6000, premium = true, type = 'Instant', icon = 'brutalstrike', mana = 30, level = 16, soul = 0, group = {[1] = 2000}, vocations = {4, 8}}, ['Front Sweep'] = {id = 59, words = 'exori min', exhaustion = 6000, premium = true, type = 'Instant', icon = 'frontsweep', mana = 200, level = 70, soul = 0, group = {[1] = 2000}, vocations = {4, 8}}, ['Inflict Wound'] = {id = 141, words = 'utori kor', exhaustion = 30000, premium = true, type = 'Instant', icon = 'inflictwound', mana = 30, level = 40, soul = 0, group = {[1] = 2000}, vocations = {4, 8}}, ['Ignite'] = {id = 138, words = 'utori flam', exhaustion = 30000, premium = true, type = 'Instant', icon = 'ignite', mana = 30, level = 26, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Lightning'] = {id = 149, words = 'exori amp vis', exhaustion = 8000, premium = true, type = 'Instant', icon = 'lightning', mana = 60, level = 55, soul = 0, group = {[1] = 2000, [4] = 8000}, vocations = {1, 5}}, ['Curse'] = {id = 139, words = 'utori mort', exhaustion = 50000, premium = true, type = 'Instant', icon = 'curse', mana = 30, level = 75, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Electrify'] = {id = 140, words = 'utori vis', exhaustion = 30000, premium = true, type = 'Instant', icon = 'electrify', mana = 30, level = 34, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Energy Wave'] = {id = 13, words = 'exevo vis hur', exhaustion = 8000, premium = false, type = 'Instant', icon = 'energywave', mana = 170, level = 38, soul = 0, group = {[1] = 2000}, vocations = {1, 5}}, ['Rage of the Skies'] = {id = 119, words = 'exevo gran mas vis', exhaustion = 40000, premium = true, type = 'Instant', icon = 'rageoftheskies', mana = 600, level = 55, soul = 0, group = {[1] = 4000}, vocations = {1, 5}}, ['Fierce Berserk'] = {id = 105, words = 'exori gran', exhaustion = 6000, premium = true, type = 'Instant', icon = 'fierceberserk', mana = 340, level = 90, soul = 0, group = {[1] = 2000}, vocations = {4, 8}}, ['Hells Core'] = {id = 24, words = 'exevo gran mas flam', exhaustion = 40000, premium = true, type = 'Instant', icon = 'hellscore', mana = 1100, level = 60, soul = 0, group = {[1] = 4000}, vocations = {1, 5}}, ['Holy Flash'] = {id = 143, words = 'utori san', exhaustion = 40000, premium = true, type = 'Instant', icon = 'holyflash', mana = 30, level = 70, soul = 0, group = {[1] = 2000}, vocations = {3, 7}}, ['Divine Missile'] = {id = 122, words = 'exori san', exhaustion = 2000, premium = true, type = 'Instant', icon = 'divinemissile', mana = 20, level = 40, soul = 0, group = {[1] = 2000}, vocations = {3, 7}}, ['Divine Caldera'] = {id = 124, words = 'exevo mas san', exhaustion = 4000, premium = true, type = 'Instant', icon = 'divinecaldera', mana = 160, level = 50, soul = 0, group = {[1] = 2000}, vocations = {3, 7}}, ['Physical Strike'] = {id = 148, words = 'exori moe ico', exhaustion = 2000, premium = true, type = 'Instant', icon = 'physicalstrike', mana = 20, level = 16, soul = 0, group = {[1] = 2000}, vocations = {2, 6}}, ['Eternal Winter'] = {id = 118, words = 'exevo gran mas frigo', exhaustion = 40000, premium = true, type = 'Instant', icon = 'eternalwinter', mana = 1050, level = 60, soul = 0, group = {[1] = 4000}, vocations = {2, 6}}, ['Ice Strike'] = {id = 112, words = 'exori frigo', exhaustion = 2000, premium = true, type = 'Instant', icon = 'icestrike', mana = 20, level = 15, soul = 0, group = {[1] = 2000}, vocations = {1, 5, 2, 6}}, ['Strong Ice Strike'] = {id = 152, words = 'exori gran frigo', exhaustion = 8000, premium = true, type = 'Instant', icon = 'strongicestrike', mana = 60, level = 80, soul = 0, group = {[1] = 2000, [4] = 8000}, vocations = {2, 6}}, ['Ultimate Ice Strike'] = {id = 156, words = 'exori max frigo', exhaustion = 30000, premium = true, type = 'Instant', icon = 'ultimateicestrike', mana = 100, level = 100,soul = 0, group = {[1] = 4000}, vocations = {2, 6}}, ['Ice Wave'] = {id = 121, words = 'exevo frigo hur', exhaustion = 4000, premium = false, type = 'Instant', icon = 'icewave', mana = 25, level = 18, soul = 0, group = {[1] = 2000}, vocations = {2, 6}}, ['Strong Ice Wave'] = {id = 43, words = 'exevo gran frigo hur', exhaustion = 8000, premium = true, type = 'Instant', icon = 'strongicewave', mana = 170, level = 40, soul = 0, group = {[1] = 2000}, vocations = {2, 6}}, ['Envenom'] = {id = 142, words = 'utori pox', exhaustion = 40000, premium = true, type = 'Instant', icon = 'envenom', mana = 30, level = 50, soul = 0, group = {[1] = 2000}, vocations = {2, 6}}, ['Terra Strike'] = {id = 113, words = 'exori tera', exhaustion = 2000, premium = true, type = 'Instant', icon = 'terrastrike', mana = 20, level = 13, soul = 0, group = {[1] = 2000}, vocations = {1, 5, 2, 6}}, ['Strong Terra Strike'] = {id = 153, words = 'exori gran tera', exhaustion = 8000, premium = true, type = 'Instant', icon = 'strongterrastrike', mana = 60, level = 70, soul = 0, group = {[1] = 2000, [4] = 8000}, vocations = {2, 6}}, ['Ultimate Terra Strike'] = {id = 157, words = 'exori max tera', exhaustion = 30000, premium = true, type = 'Instant', icon = 'ultimateterrastrike', mana = 100, level = 90, soul = 0, group = {[1] = 4000}, vocations = {2, 6}}, ['Terra Wave'] = {id = 120, words = 'exevo tera hur', exhaustion = 4000, premium = false, type = 'Instant', icon = 'terrawave', mana = 210, level = 38, soul = 0, group = {[1] = 2000}, vocations = {2, 6}}, ['Wrath of Nature'] = {id = 56, words = 'exevo gran mas tera', exhaustion = 40000, premium = true, type = 'Instant', icon = 'wrathofnature', mana = 700, level = 55, soul = 0, group = {[1] = 4000}, vocations = {2, 6}}, ['Light Healing'] = {id = 1, words = 'exura', exhaustion = 1000, premium = false, type = 'Instant', icon = 'lighthealing', mana = 20, level = 9, soul = 0, group = {[2] = 1000}, vocations = {1, 2, 3, 5, 6, 7}}, ['Wound Cleansing'] = {id = 123, words = 'exura ico', exhaustion = 1000, premium = false, type = 'Instant', icon = 'woundcleansing', mana = 40, level = 10, soul = 0, group = {[2] = 1000}, vocations = {4, 8}}, ['Intense Wound Cleansing'] = {id = 158, words = 'exura gran ico', exhaustion = 600000,premium = true, type = 'Instant', icon = 'intensewoundcleansing', mana = 200, level = 80, soul = 0, group = {[2] = 1000}, vocations = {4, 8}}, ['Cure Bleeding'] = {id = 144, words = 'exana kor', exhaustion = 6000, premium = true, type = 'Instant', icon = 'curebleeding', mana = 30, level = 30, soul = 0, group = {[2] = 1000}, vocations = {4, 8}}, ['Cure Electrification'] = {id = 146, words = 'exana vis', exhaustion = 6000, premium = true, type = 'Instant', icon = 'curseelectrification', mana = 30, level = 22, soul = 0, group = {[2] = 1000}, vocations = {2, 6}}, ['Cure Poison'] = {id = 29, words = 'exana pox', exhaustion = 6000, premium = false, type = 'Instant', icon = 'curepoison', mana = 30, level = 10, soul = 0, group = {[2] = 1000}, vocations = {1, 2, 3, 4, 5, 6, 7, 8}}, ['Cure Burning'] = {id = 145, words = 'exana flam', exhaustion = 6000, premium = true, type = 'Instant', icon = 'cureburning', mana = 30, level = 30, soul = 0, group = {[2] = 1000}, vocations = {2, 6}}, ['Cure Curse'] = {id = 147, words = 'exana mort', exhaustion = 6000, premium = true, type = 'Instant', icon = 'curecurse', mana = 40, level = 80, soul = 0, group = {[2] = 1000}, vocations = {3, 7}}, ['Recovery'] = {id = 159, words = 'utura', exhaustion = 60000, premium = true, type = 'Instant', icon = 'recovery', mana = 75, level = 50, soul = 0, group = {[2] = 1000}, vocations = {4, 8, 3, 7}}, ['Intense Recovery'] = {id = 160, words = 'utura gran', exhaustion = 60000, premium = true, type = 'Instant', icon = 'intenserecovery', mana = 165, level = 100,soul = 0, group = {[2] = 1000}, vocations = {4, 8, 3, 7}}, ['Salvation'] = {id = 36, words = 'exura gran san', exhaustion = 1000, premium = true, type = 'Instant', icon = 'salvation', mana = 210, level = 60, soul = 0, group = {[2] = 1000}, vocations = {3, 7}}, ['Intense Healing'] = {id = 2, words = 'exura gran', exhaustion = 1000, premium = false, type = 'Instant', icon = 'intensehealing', mana = 70, level = 20, soul = 0, group = {[2] = 1000}, vocations = {1, 2, 3, 5, 6, 7}}, ['Heal Friend'] = {id = 84, words = 'exura sio', exhaustion = 1000, premium = true, type = 'Instant', icon = 'healfriend', mana = 140, level = 18, soul = 0, group = {[2] = 1000}, vocations = {2, 6}}, ['Ultimate Healing'] = {id = 3, words = 'exura vita', exhaustion = 1000, premium = false, type = 'Instant', icon = 'ultimatehealing', mana = 160, level = 30, soul = 0, group = {[2] = 1000}, vocations = {1, 2, 5, 6}}, ['Mass Healing'] = {id = 82, words = 'exura gran mas res', exhaustion = 2000, premium = true, type = 'Instant', icon = 'masshealing', mana = 150, level = 36, soul = 0, group = {[2] = 1000}, vocations = {2, 6}}, ['Divine Healing'] = {id = 125, words = 'exura san', exhaustion = 1000, premium = false, type = 'Instant', icon = 'divinehealing', mana = 160, level = 35, soul = 0, group = {[2] = 1000}, vocations = {3, 7}}, ['Light'] = {id = 10, words = 'utevo lux', exhaustion = 2000, premium = false, type = 'Instant', icon = 'light', mana = 20, level = 8, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 3, 4, 5, 6, 7, 8}}, ['Magic Rope'] = {id = 76, words = 'exani tera', exhaustion = 2000, premium = true, type = 'Instant', icon = 'magicrope', mana = 20, level = 9, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 3, 4, 5, 6, 7, 8}}, ['Levitate'] = {id = 81, words = 'exani hur', exhaustion = 2000, premium = true, type = 'Instant', icon = 'levitate', mana = 50, level = 12, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 3, 4, 5, 6, 7, 8}}, ['Great Light'] = {id = 11, words = 'utevo gran lux', exhaustion = 2000, premium = false, type = 'Instant', icon = 'greatlight', mana = 60, level = 13, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 3, 4, 5, 6, 7, 8}}, ['Magic Shield'] = {id = 44, words = 'utamo vita', exhaustion = 2000, premium = false, type = 'Instant', icon = 'magicshield', mana = 50, level = 14, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 5, 6}}, ['Haste'] = {id = 6, words = 'utani hur', exhaustion = 2000, premium = true, type = 'Instant', icon = 'haste', mana = 60, level = 14, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 3, 4, 5, 6, 7, 8}}, ['Charge'] = {id = 131, words = 'utani tempo hur', exhaustion = 2000, premium = true, type = 'Instant', icon = 'charge', mana = 100, level = 25, soul = 0, group = {[3] = 2000}, vocations = {4, 8}}, ['Swift Foot'] = {id = 134, words = 'utamo tempo san', exhaustion = 2000, premium = true, type = 'Instant', icon = 'swiftfoot', mana = 400, level = 55, soul = 0, group = {[1] = 10000, [3] = 2000}, vocations = {3, 7}}, ['Challenge'] = {id = 93, words = 'exeta res', exhaustion = 2000, premium = true, type = 'Instant', icon = 'challenge', mana = 30, level = 20, soul = 0, group = {[3] = 2000}, vocations = {8}}, ['Strong Haste'] = {id = 39, words = 'utani gran hur', exhaustion = 2000, premium = true, type = 'Instant', icon = 'stronghaste', mana = 100, level = 20, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 5, 6}}, ['Ultimate Light'] = {id = 75, words = 'utevo vis lux', exhaustion = 2000, premium = true, type = 'Instant', icon = 'ultimatelight', mana = 140, level = 26, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 5, 6}}, ['Cancel Invisibility'] = {id = 90, words = 'exana ina', exhaustion = 2000, premium = true, type = 'Instant', icon = 'cancelinvisibility', mana = 200, level = 26, soul = 0, group = {[3] = 2000}, vocations = {3, 7}}, ['Invisibility'] = {id = 45, words = 'utana vid', exhaustion = 2000, premium = false, type = 'Instant', icon = 'invisible', mana = 440, level = 35, soul = 0, group = {[3] = 2000}, vocations = {1, 2, 5, 6}}, ['Sharpshooter'] = {id = 135, words = 'utito tempo san', exhaustion = 2000, premium = true, type = 'Instant', icon = 'sharpshooter', mana = 450, level = 60, soul = 0, group = {[2] = 10000, [3] = 10000}, vocations = {3, 7}}, ['Protector'] = {id = 132, words = 'utamo tempo', exhaustion = 2000, premium = true, type = 'Instant', icon = 'protector', mana = 200, level = 55, soul = 0, group = {[1] = 10000, [3] = 2000}, vocations = {4, 8}}, ['Blood Rage'] = {id = 133, words = 'utito tempo', exhaustion = 2000, premium = true, type = 'Instant', icon = 'bloodrage', mana = 290, level = 60, soul = 0, group = {[3] = 2000}, vocations = {4, 8}}, ['Train Party'] = {id = 126, words = 'utito mas sio', exhaustion = 2000, premium = true, type = 'Instant', icon = 'trainparty', mana = 'Var.', level = 32, soul = 0, group = {[3] = 2000}, vocations = {8}}, ['Protect Party'] = {id = 127, words = 'utamo mas sio', exhaustion = 2000, premium = true, type = 'Instant', icon = 'protectparty', mana = 'Var.', level = 32, soul = 0, group = {[3] = 2000}, vocations = {7}}, ['Heal Party'] = {id = 128, words = 'utura mas sio', exhaustion = 2000, premium = true, type = 'Instant', icon = 'healparty', mana = 'Var.', level = 32, soul = 0, group = {[3] = 2000}, vocations = {6}}, ['Enchant Party'] = {id = 129, words = 'utori mas sio', exhaustion = 2000, premium = true, type = 'Instant', icon = 'enchantparty', mana = 'Var.', level = 32, soul = 0, group = {[3] = 2000}, vocations = {5}}, } local spells = {} local lado = 'vertical' local sbw -- window widget local sbb -- button ./\ widget local spellBarWindow -- UIWindow local exhsaustionTotal = 1100 local hideLevel = false -- os que nao tem level, vai mostrar? true = nao, false = sim function init() sbb = modules.client_topmenu.addRightGameToggleButton('sbb', 'Spell Bar' , 'SpellBar.png', toggle) sbw = g_ui.displayUI('SpellBar') sbw:move(10,50) g_mouse.bindPress(sbw, function() createMenu() end, MouseRightButton) sbw:hide() connect(g_game, 'onTalk', mensagemEnviada) connect(g_game, { onGameEnd = function() sbw:hide() sbb:setOn(false) end }) connect(LocalPlayer, { onLevelChange = onLevelChange }) for inst,values in pairs(spelllist) do if values.type == 'Instant' then -- depois vou fazer mais tipos.. if g_game.getProtocolVersion() >= 950 then -- Vocation is only send in newer clients if table.find(values.vocations, g_game.getLocalPlayer():getVocation()) then local inside = {instantName = inst, words = values.words, lvl = values.level, mana = values.mana, prem = values.premium, groups = values.group,icon = values.icon, vocations = values.vocations,exhaustion = values.exhaustion} table.insert(spells,inside) end else local inside = {instantName = inst, words = values.words, lvl = values.level, mana = values.mana, prem = values.premium, groups = values.group,icon = values.icon, vocations = values.vocations,exhaustion = values.exhaustion} table.insert(spells,inside) end end end table.sort(spells, function(a, b) return (a.lvl < b.lvl) end) end function onLevelChange(localPlayer, value, percent) getSpells(spells) end function mensagemEnviada(name, level, mode, text, channelId, pos) if not g_game.isOnline() then return end if g_game.getLocalPlayer():getName() ~= name then return end for i = 1,#spells do if spells[i].words:lower() == text:lower() then startDownDelay(i) break end end end function terminate() sbw:destroy() sbb:destroy() disconnect(g_game, { onGameEnd = function() sbw:hide() sbb:setOn(false) end }) disconnect(g_game, 'onTalk', mensagemEnviada) disconnect(LocalPlayer, { onLevelChange = onLevelChange }) end function toggle() if sbb:isOn() then sbw:hide() sbb:setOn(false) else sbw:show() getSpells(spells) sbb:setOn(true) level = g_game.getLocalPlayer():getLevel() end end function createMenu() local menu = g_ui.createWidget('PopupMenu') if lado == 'horizontal' then menu:addOption('Set Vertical', function() lado = 'vertical' getSpells(spells) end) else menu:addOption('Set Horizontal',function() lado = 'horizontal' getSpells(spells) end) end if hideLevel == false then menu:addOption('No Level Hide',function() hideLevel = true getSpells(spells) end) else menu:addOption('No Level Show',function() hideLevel = false getSpells(spells) end) end menu:display() end function destruirSpells() for i = 1,100 do if sbw:recursiveGetChildById('spell'..i) == nil then break end sbw:recursiveGetChildById('spell'..i):destroy() sbw:recursiveGetChildById('progress'..i):destroy() end end function getSpells(tabela) destruirSpells() spellBarWindow = sbw:recursiveGetChildById('mainWindow') local player = g_game.getLocalPlayer() local valor = #tabela local width = 38 local height = 38 if not player then return end for i = 1,#tabela do if (tabela[i].lvl > player:getLevel()) and hideLevel == true then valor = i - 1 break end if i == #tabela then valor = i end icon = g_ui.createWidget('SpellButton',spellBarWindow) progress = g_ui.createWidget('SpellProgressSpell',spellBarWindow) --icon: icon:setId('spell'..i) local spicon = Spells.getClientId(tabela[i].instantName) icon:setImageSource('/images/game/spells/defaultspells') icon:setImageClip((((spicon -1)%12)*32) .. ' ' .. ((math.ceil(spicon/12)-1)*32) .. ' 32 32') icon:setVisible(true) icon.words = tabela[i].words icon.instantName = tabela[i].instantName icon.lvl = tabela[i].lvl icon.mana = tabela[i].mana icon.exhaustion = tabela[i].exhaustion icon.exhaustionNeeded = 0 icon:setTooltip(tabela[i].words) if lado == 'horizontal' then icon:setMarginTop(3) height = 38 width = (i) * 32 + 2*(i) icon:setMarginLeft((i) * 32 + 2*(i) - 32) else icon:setMarginLeft(3) icon:setMarginTop((i) * 32 + 2*(i) - 32) width = 38 height = (i) * 32 + 2*(i) end --progress: progress:setId('progress'..i) progress:setVisible(true) progress:setPercent(100) progress:setMarginLeft(icon:getMarginLeft()) progress:setMarginTop(icon:getMarginTop()) if player:getLevel() < icon.lvl then progress:setText('L'..icon.lvl) progress:setColor('red') progress:setPercent(0) end if progress:getPercent() == 100 then progress:setText('OK') elseif icon.lvl < player:getLevel() then progress:setText(progress:getPercent()) end progress:setPhantom(true) icon.onClick = function() useSpell(i) end end sbw:setHeight(height) sbw:setWidth(width) spellBarWindow:setSize(sbw:getSize()) end function useSpell(i) local spell = sbw:recursiveGetChildById('spell'..i) if not spell then return end local progress = sbw:recursiveGetChildById('progress'..i) local player = g_game.getLocalPlayer() if not player then return end if progress:getPercent() < 100 then return modules.game_textmessage.displayFailureMessage('Wait your delay!') end g_game.talk(spell.words) end function startDownDelay(i) -- aqui vai ficar on onTalk, pra descer só realmente quando a spell sair local spell = sbw:recursiveGetChildById('spell'..i) if not spell then return end local progress = sbw:recursiveGetChildById('progress'..i) progress:setPercent(0) progress:setText('0%') progress:setColor('red') spell.exhaustionNeeded = 0 scheduleEvent(function() spellTimeleft(i) end,100) end function spellTimeleft(i) local spell = sbw:recursiveGetChildById('spell'..i) if not spell then return end local progress = sbw:recursiveGetChildById('progress'..i) spell.exhaustionNeeded = spell.exhaustionNeeded + 100 if spell.exhaustionNeeded < spell.exhaustion then progress:setPercent(math.ceil(((spell.exhaustionNeeded) * 100)/spell.exhaustion)) progress:setText(progress:getPercent()) progress:setColor('red') else progress:setPercent(100) progress:setText('OK') progress:setColor('green') spell.exhaustionNeeded = 0 return true end scheduleEvent(function() spellTimeleft(i) end,100) end[/spoiler]
  23. Boa noite, coloquei um sistema de task no meu servidor = global, tá tudo ok na parte do npc, o erro que tá dando é quando o player vai matar o BOSS, na hora que ele sai do teleport dá esse erro [Error - Moveevent::executestep] Call Stack Overflow. E logo em seguida o servidor cai. Segue o scripts.
  24. Boa tarde povo do tibia. Estou enfrentando problemas com a conexão local, explicando melhor: Eu abro o Global 10.91, e vai sem erro. no Config.lua eu deixei com o IP da internet, todos conseguem conectar... porém eu não consigo conectar pelo meu ip local que seria (192.168.25.10 ou localhost ou 127.0.0.1), nenhum desses funciona. E quando tento pelo IP da internet, seja pelo no-ip ou meu IP da internet mesmo, não funciona (de alguma forma meu roteador bloqueia, mas ok) Mas a questão é que com o servidor 8.6 eu conseguia conectar pelo ip local, e o global 1.2 não consigo... Alguem sabe a solução disso? Seria alguma diferença na distro do global?
  25. Fala galera, criei meu servidor aqui, mapa global, 10.92, em uma VM Linux... Porém eu não consigo conectar nele, e nem no site, mas as outas pessoas conseguem. Sei que isso é problema com o ip, acho que não tenho acesso ao ip lan, tentei conectar pelo ip de LAN, ele aparece a lista de char, porém não conecta no servidor. Se eu tentar conectar no IP da net , não aparece nem a lista de char. Se eu tento conectar pelo IP Local (192.168.1.5), aparece os chares mas não logam. As outas pessoas conseguem conectar pelo ip da net, e acessar o site tudo normal.
×
×
  • Criar Novo...