Ir para conteúdo

luanluciano93

Héroi
  • Registro em

  • Última visita

Tudo que luanluciano93 postou

  1. Alunia Ot
  2. Como eu disse, eu não testei, coloquei para não dar nada errado.
  3. Não testei function onCastSpell(cid, var) local summons = getCreatureSummons(cid) -- verificando se tem summon if table.maxn(summons) < 1 then doPlayerSendCalcel(cid, "You don't have any summons.") return false end -- escolhendo um dos summons por random local random = math.random(1, table.maxn(summons)) local summon = summons[random].uid if not summon then return false end -- pegando a posição do player e do summon local position_player = getCreaturePosition(cid) local position_summon = getCreaturePosition(summon) -- trocando de posição o player e o summon escolhido doSendMagicEffect(position_player, CONST_ME_TELEPORT) doTeleportThing(cid, position_summon) doSendMagicEffect(position_summon, CONST_ME_TELEPORT) doTeleportThing(summon, position_player) return true end
  4. Em "data/talkactions/talkactions.xml" adicione essa tag: <talkaction words="!bank" separator=" " script="bank.lua"/> Crie um arquivo em "data/talkactions/scripts" com o nome de "bank.lua" e coloque esse código dentro: function Player.deposit(self, amount) if not self:removeMoney(amount) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You dont have money with you.") return false end self:setBankBalance(self:getBankBalance() + amount) return true end function Player.withdraw(self, amount) local balance = self:getBankBalance() if amount > balance or not self:addMoney(amount) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You dont have money in your bank account.") return false end self:setBankBalance(balance - amount) return true end function Player.depositMoney(self, amount) if not self:removeMoney(amount) then return false end self:setBankBalance(self:getBankBalance() + amount) return true end function onSay(player, words, param) local split = param:split(",") local balance = player:getBankBalance() if split[1] == nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: the commands are:\n !bank balance.\n !bank deposit, XXXX.\n!bank depositall.\n!bank transfer, amount, toPlayer.") return end --------------------------- Balance --------------------------- if split[1] == 'balance' then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: Your account balance is " .. balance .. ".") --------------------------- Deposit --------------------------- elseif split[1] == 'deposit' then local amount = tonumber(split[2]) if not amount then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You need to put the amount of money to add.") return false end local amount = math.abs(amount) if amount > 0 and amount <= player:getMoney() then player:deposit(amount) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You added " .. amount .. " to your account, You can withdraw your money anytime you want to.\nYour account balance is " .. player:getBankBalance() .. ".") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You do not have enough money to deposit.") end --------------------------- Depositall --------------------------- elseif split[1] == 'depositall' then local amount = player:getMoney() local amount = math.abs(amount) if amount > 0 and amount == player:getMoney() then player:deposit(amount) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You added " .. amount .. " to your account, You can withdraw your money anytime you want to.\nYour account balance is " .. player:getBankBalance() .. ".") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You do not have enough money to deposit.") end --------------------------- Withdraw --------------------------- elseif split[1] == 'withdraw' then local amount = tonumber(split[2]) if not amount then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You need to put the amount of money to withdraw.") return false end local amount = math.abs(amount) if amount > 0 and amount <= player:getBankBalance() then player:withdraw(amount) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: Here you are " .. amount .. " of your account, You can deposit your money anytime you want.\nYour account balance is " .. player:getBankBalance() .. ".") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You do not have enough money on your bank account.") end --------------------------- Withdrawall --------------------------- elseif split[1] == 'withdrawall' then local amount = player:getBankBalance() local amount = math.abs(amount) if amount > 0 and amount <= player:getBankBalance() then player:withdraw(amount) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: Here you are all your money on your account, You can deposit your money anytime you want.\nYour account balance is " .. player:getBankBalance() .. ".") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You do not have enough money on your bank account.") end --------------------------- Transfer --------------------------- elseif split[1] == 'transfer' then local data = param local s = data:split(", ") if s[2] == nil then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You need to put the amount of money") return false else if not tonumber(s[2]) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You need to put the amount in numbers only.") return end end if s[3] == nill then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You need to put the player name") return false end local a = tonumber(s[2]) local amount = math.abs(a) local getPlayer = Player(s[3]) if getPlayer then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You seccesfully transferred " .. s[2] .. "\n to " .. s[3] .. " bank account.") player:transferMoneyTo(s[3], amount) else if not playerExists(s[3]) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: A player with name: " .. s[3] .. " does not exists.") return false end if playerExists(s[3]) and player:transferMoneyTo(s[3], amount) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: You seccesfully transferred " .. s[2] .. "\n to " .. s[3] .. " bank account.") end end else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "[BankSystem]: Invalid param.") end return false end Créditos: lokolokio
  5. luanluciano93 postou uma resposta no tópico em Suporte Tibia OTServer
    talkactions
  6. luanluciano93 postou uma resposta no tópico em Suporte & Pedidos
    Ultimo que to mexendo é esse:
  7. Ele monstra naquele rank o rank de frags dos membros da guild.
  8. Poste o código da sua página inicial.
  9. luanluciano93 postou uma resposta no tópico em Suporte & Pedidos
    Eai pessoal, to fazendo aqui um layout pra um amigo .. o que acharam? LOGIN: ACCOUNT: RANK: FÓRUM: DONATE: Críticas plx!
  10. Execute aquele comando que eu mandei no seu phpmyadmin.
  11. https://github.com/otland/forgottenserver/blob/master/data/npc/lib/npcsystem/modules.lua#L914-L1127 https://github.com/otland/forgottenserver/blob/master/data/npc/lib/npcsystem/modules.lua#L1041
  12. qual a versão do seu TFS? Tente mudar: function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey) Por: function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey) local player = Player(cid)
  13. Posta o arquivo layout.php
  14. Vá na sua database e execute este comando sql: ALTER TABLE `players` ADD `frags` INT NOT NULL DEFAULT '0' O erro é que em sua database na tabela PLAYERS não existe a coluna FRAGS.
  15. Tutorial de como desativar a mensagem do cliente de atualização que aparece no cliente Tibia 10, habilitar a opção MC para o seu cliente e modificar o cliente para o IP do seu servidor de versão Tibia 10. • Desativando a mensagem de atualização: 1 - Você precisa baixar HexEditor XVI32 anexado a este tópico. 2 - Descompacte e abra Tibia.exe do seu diretório Tibia 10 com HexEditor XVI32. 3 - Substitua as próximas coisas por isso: Procure: 13EF52 Troque: E8 D6 A2 24 00 Por: B8 00 00 00 00 Procure: 27A94 Troque: 6A 00 6a 00 6A 4D EB 26 Por: 90 90 90 90 90 90 EB 2B Procure: 29700 Troque: 6A 00 6A 01 6A 4D E8 C3 9F 18 00 Por: 90 90 90 90 90 90 90 90 90 90 90 • Ativando Multi-clienting (MC): 1 - Usando o HexEditor XVI32, substitua as seguintes coisas: Procure: 1CD310 Troque: FD FF FF 00 75 40 68 Por: FD FF FF 00 EB 40 68 • Colocando meu IP no Tibia Cliente: 1 - Usando o HexEditor XVI32, substitua as seguintes coisas: Procure: 48B8DC -48B920 Troque: login01.tibia.com login02.tibia.com login03.tibia.com login04.tibia.com Por: Your 17 letters domain. ex: thebest.no-ip.org Procure: 48B920-48B986 Troque: tibia01.cipsoft.com tibia02.cipsoft.com tibia03.cipsoft.com tibia04.cipsoft.com Por: Your 19 letters domain. ex: imthebest.no-ip.org 2 - Alterar a chave de inclusão: Procure: 48C712 Troque: 132127743205872284062295099082293384952776326496165507967876361843343953435544496682053323833394351797728954155097012103928360786959821132214473291575712138800495033169914814069637740318278150290733684032524174782740134357629699062987023311132821016569775488792221429527047321331896351555606801473202394175817 Por: 109120132967399429278860960508995541528237502902798129123468757937266291492576446330739696001110603907230888610072655818825358503429057592827629436413108566029093628212635953836686562675849720620786279431090218017681061521755056710823876476444260558147179707119674283982419152118103759076030616683978566631413 Todos os créditos neste tópico são: • Shadow Dan • Madzix • Gesior.pl • José Rondon HexEditor XVI32 anexado ao tópico. HexEditorXVI32.rar
  16. Link, imagens e download atualizados no tópico!
  17. function Player.getAllItemsById(self, id) local containers = {} local items = {} for i = CONST_SLOT_HEAD, CONST_SLOT_AMMO do local item = self:getSlotItem(i) if item then if item:isContainer() then table.insert(containers, item:getUniqueId()) elseif not id or id == item:getId() then table.insert(items, item:getUniqueId()) end end end while #containers > 0 do for k = (Container(containers[1]):getSize() - 1), 0, -1 do local tmp = Container(containers[1]):getItem(k) if tmp:isContainer() then table.insert(containers, tmp:getUniqueId()) elseif not id or id == tmp:getId() then table.insert(items, tmp:getUniqueId()) end end table.remove(containers, 1) end return items end
  18. Change: print(os.time() .." >= .. "timerOnExp) for: print(os.time() .." >= ".. timerOnExp) Are you going to use this script? onLogin? I think if this is it, the player will be offline on verification.
  19. function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`sid`, CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local attr = result.getStream(resultId, "attr") local timerOnExp = tonumber(string.sub(attr, 25, 34)) if timerOnExp then if os.time() >= timerOnExp then print(os.time() .." >= .. "timerOnExp) local player_id = result.getNumber(resultId, "player_id") local sid = result.getNumber(resultId, "sid") db.query("DELETE FROM `player_items` WHERE `player_id`=".. player_id .." AND `sid` = ".. sid) end end until not result.next(resultId) end return false end
  20. -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`sid`, CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local attr = result.getStream(resultId, "attr") local timerOnExp = tonumber(string.sub(attr, 25, 34)) if os.time() >= timerOnExp then local player_id = result.getNumber(resultId, "player_id") local sid = result.getNumber(resultId, "sid") db.query("DELETE FROM `player_items` WHERE `player_id`=".. player_id .." AND `sid` = ".. sid) print("deleted!") end until not result.next(resultId) end return false end
  21. -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`sid`, CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local attr = result.getStream(resultId, "attr") local timerOnExp = tonumber(string.sub(attr, 25, 34)) if os.time() >= timerOnExp then local player_id = result.getNumber(resultId, "player_id") local sid = result.getNumber(resultId, "sid") db.storeQuery("DELETE FROM `player_items` WHERE `player_id`=".. player_id .." AND `sid` = ".. sid) print("deleted!") end until not result.next(resultId) end return false end
  22. -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local attr = result.getStream(resultId, "attr") local timerOnExp = tonumber(string.sub(attr, 25, 34)) if os.time() >= timerOnExp then local sid = result.getNumber(resultId, "sid") db.storeQuery("DELETE FROM `player_items` WHERE `sid` = ".. sid) print("deleted!") end until not result.next(resultId) end return false end

Informação Importante

Confirmação de Termo