
Tudo que lordzetros postou
-
addEvent OTC?
@Jeanzeraa Não precisa 'chamar' o evento, quando você adicione o evento, o código já será executado futuramente. Você tá passando um argumento para função sem nem mesmo utilizá-lo, entende? E quando você utiliza este tipo de addEvent (múltiplas linhas), o argumento é passado no final, após o tempo (500000). Veja um exemplo de como seria sua função: addEvent(function() musicChannel:enqueue(musicFilename, 3) end, 500000) Se mesmo assim entrar em um loop, o problema não está nesta parte de AddEvent.
-
(Resolvido)Box ajudinha e alguem
Em data/actions/scripts/ crie um arquivo chamado boxPremiada.lua local config = { {item = 2160, qntd = 100, chance = 65}, -- Segue a ordem: ID_do_item, quantidade_do_item, chance_do_item {item = 7417, qntd = 1, chance = 10}, {item = 9969, qntd = 1, chance = 20}, -- para adicionar um novo, copie esta linha e adicione abaixo desta. } local msg_sucesso = "Parabens! Voce ganhou um item premiado." -- Caso o player ganhe local msg_falha = "Nao foi desta vez, quem sabe na proxima, certo?" -- caso ele perca function onUse(cid, item, fromPos, itemEx, toPos) local c = config[math.random(1, #config)] if (c.chance >= math.random(1,100)) then doSendMagicEffect(fromPos, 49) doPlayerSendCancel(cid, msg_sucesso) doPlayerAddItem(cid, c.item, c.qntd) doRemoveItem(item.uid, 1) else doSendMagicEffect(fromPos, 3) doPlayerSendCancel(cid, msg_falha) doRemoveItem(item.uid, 1) end return true end Em data/actions/actions.xml adicione este código abaixo de uma semelhante: <action itemid="2331" event="script" value="boxPremiada.lua"/> Faz o teste e depois me dá um feedback se funcionou ou não, infelizmente ainda não testei.
-
(Resolvido)Box ajudinha e alguem
Olá, Colega, fala a versão de sua base e o ID da box que deseja.
-
Mapper King 2018
Mapa 01. Gostei de ambos, os dois estão com ótimos detalhes e é totalmente fiel ao tema. Não escolhi o 02 por conta dessas paredes que dão impressão que estão flutuando na água ou que sai do terreno firme, então, como os dois inicialmente estavam empatados para mim, isso mudou minha opinião. Em relação ao 01, eu só tiraria essa árvore da entrada. ?
-
Nao consigo abrir o otserver o exe abre e ja fecha.
Verifique se o arquivo config está como .lua e não .txt
-
Dúvida sobre tfs 0.4 e tfs 1+
@maicao22 compat.lua Créditos: Ninjalulz
-
Dúvida sobre tfs 0.4 e tfs 1+
Depende do script, pode ser que sim, CASO você tenha o compat.lua. Ele é um arquivo onde tem funções de versões anteriores e retornam em formato de funções de TFS 1.X. Para uma melhor explicação: A função em TFS 0.4: function doCreateItem(itemid, type/count, pos) Você utilizando no TFS 1.X sem o arquivo de compatibilidade (que faz as mesmas ações que tal função executava em 0.4), provavelmente iria dá erro falando que a função não existia. Mas quando você tem ela no arquivo que faz essa "conversão", você consegue utilizar ela chamando no modelo antigo, porém, internamente ela trabalha no modelo novo (TFS 1.X). Veja o exemplo da função acima em TFS 1.X: function doCreateItem(itemid, count, pos) local tile = Tile(pos) if not tile then return false end local item = Game.createItem(itemid, count, pos) if item then return item:getUniqueId() end return false end ?
- [TFS 1.3] Teleport com janela
-
[TFS 1.3] Teleport com janela
TFS 1.3 - TESTADO EM VERSÃO 10.98 * Introdução * Bom, estive navegando no Fórum e vi que o usuário @Cleiton Felipi pediu um script que ao player entrasse no teleport de um X monstro, um Demon por exemplo, listasse qual hunt o jogador queria entrar. Achei interessante, e resolvi desenvolver e postar no TK, já que não tinha ainda, :). * Sobre o sistema * Você utiliza diversas hunts com vários tps criados no mapa no seu servidor do mesmo monstro? Bom, este script será muito útil para você! Pois ele permitirá que você habilite ao jogador em qual hunt ele quer caçar, por exemplo, se tiver Demon 01, Demon 02, Demon 03, Demon X, basta apenas você criar um tp indicando o monstro e que uma janela irá aparecer com a lista de opções de hunts, prático, né? Segue imagens de demonstração: OBS¹.: Você pode colocar TODOS OS MONSTROS neste script, contando que tenha o actionID que ficará no teleporte, não é de uma quantidade limitada, em outras palavras, você pode adicionar as hunts de Demon, Frost Dragon, Dragon, ..., tudo aqui, apenas mudando o actionID (tudo configurável, não se preocupe). * Instalação * Em data/movements/scripts/ crie um arquivo chamado mov_janela_hunts.lua e adicione dentro: --[[ Script - Lordzetros Fórum Tibia King ]] local config = { titulo = "BEM VINDO(A) A JANELA DE HUNTS!", -- Título da Janela mensagem = "Selecione qual hunt voce deseja ir:", -- Mensagem abaixo do título da janela } CONFIG_TPS_JANELA = { [19090] = { -- ID do action que ficará no portal da hunt {nome = "Demon 01", pos = {x = 98, y = 139, z = 7}}, -- Segue padrão, nome da cave e posição que o player será teleportado {nome = "Demon 02", pos = {x = 93, y = 144, z = 7}}, {nome = "Demon 03", pos = {x = 91, y = 140, z = 7}}, {nome = "Demon 04", pos = {x = 94, y = 138, z = 7}}, {nome = "Demon 05", pos = {x = 95, y = 136, z = 7}}, }, [19091] = { {nome = "Frost 01", pos = {x = 98, y = 140, z = 7}}, {nome = "Frost 02", pos = {x = 93, y = 145, z = 7}}, {nome = "Frost 03", pos = {x = 91, y = 141, z = 7}}, {nome = "Frost 04", pos = {x = 94, y = 139, z = 7}}, {nome = "Frost 05", pos = {x = 95, y = 137, z = 7}}, }, } function onStepIn(creature, item, pos, fromPosition) if ((CONFIG_TPS_JANELA[item:getActionId()]) and creature:isPlayer()) then JANELA_TP_ACTION = item:getActionId() creature:teleportTo(fromPosition, true) creature:registerEvent("janela hunts") local janela = ModalWindow(1000, config.titulo, config.mensagem) for i, v in ipairs(CONFIG_TPS_JANELA[JANELA_TP_ACTION]) do janela:addChoice(i, v.nome) end janela:addButton(100, "Confirmar") janela:addButton(101, "Fechar") janela:setDefaultEnterButton(100) janela:setDefaultEscapeButton(101) janela:sendToPlayer(creature) end return true end Em data/movements/movements.xml adicione o seguinte código abaixo de um semelhante: <movevent event="StepIn" itemid="5023" script="mov_janela_hunts.lua" /> Agora em data/creaturescripts/scripts/ crie um arquivo chamado creature_janela_hunts.lua e adicione dentro: function onModalWindow(player, modalWindowId, buttonId, choiceId) player:unregisterEvent("janela hunts") if (modalWindowId == 1000) then if (buttonId == 100) then local tele_pos = CONFIG_TPS_JANELA[JANELA_TP_ACTION][choiceId].pos player:teleportTo(tele_pos) local pos_t = Position(tele_pos) pos_t:sendMagicEffect(CONST_ME_MAGIC_BLUE) end end return true end Em data/creaturescripts/creaturescripts.xml adicione o seguinte código abaixo de um semelhante: <event type="ModalWindow" name="janela hunts" script="creature_janela_hunts.lua"/> * Configuração * Bom, apesar de que não seja difícil de configurar, é necessário uma explicação, vamos lá... 1 - [19090] = { -- ID do action que ficará no portal da hunt {nome = "Demon 01", pos = {x = 98, y = 139, z = 7}}, -- Segue padrão, nome da cave e posição que o player será teleportado {nome = "Demon 02", pos = {x = 93, y = 144, z = 7}}, {nome = "Demon 03", pos = {x = 91, y = 140, z = 7}}, {nome = "Demon 04", pos = {x = 94, y = 138, z = 7}}, {nome = "Demon 05", pos = {x = 95, y = 136, z = 7}}, }, Em [19090] este número de dentro é o actionID que ficará no portal. Com ele será identificado de qual monstro se trata, bastando apenas configurar este número e o nome das opções de monstros que você quer aparecendo na janela, em seguida, a posição na qual o jogador será teleportado, seguindo a ordem. Segue imagem de como deve ficar o seu portal: OBS²: VOCÊ EDITA O ACTIONID NO SEU EDITOR DE MAPA COLOCANDO NO ID DO ITEM DE TELEPORTE. OBS³: PARA ADICIONAR NOVAS HUNTS NO SCRIPT, BASTA SEGUIR O PADRÃO QUE ESTÁ NO CÓDIGO, DO 19090 PARA O 19091. 2 - (por fim) Em data/movements/movements.xml <movevent event="StepIn" itemid="5023" script="mov_janela_hunts.lua" /> itemID = Id do item que o player andará para abrir a janela de hunt Está como 5023 por conta que o magic forcefield é 5023, no qual utilizei para teste, aconselho você deixar da mesma forma (caso seja o mesmo id no seu servidor), ou mude, mas cuidado para não cometer algum erro. Enfim, algo simples, porém não encontrei no TK. Abraços.
-
(Resolvido)Adicionando LvL Max Pra usa a talkaction reset
@Black Fenix Testa ae, ;). --[[ SCRIPTING> MarcelloMkez <scriptING ]] --[[ [supreme Reset System] Autor: rafhael Versión: 1.0 TFS: 0.3.6 Testeado en: 8.60 Fórum: [Características] ~ Versión 1.0 ~ - Resets no Look; - Premium Account ou nao; - Mudar Vocação; - Limite de Resets; - Opções para Abilitar e Desabilitar Condições; [Em Construção] - Stages Free e Premium; - 'Talvez' um novo sistema de mudar Vocação; sem data para postagem. ]] function onSay(cid, words, param) --[Configurações de Condição]__ config = { --[[verdadeiro / Falso]] needPa = false, -- Precisa de Premium Account? [true / false] needPz = true, -- Precisa estar em Protection Zone? [true / false] battle = true, -- Precisa estar sem Batlle para Resetar? [true / false] withe = false, -- Players PK Withe pode Resetar? [true / false] red = false, -- Players PK Red pode Resetar? [true / false] tp = true, -- Teleportar para o Templo após o reset? [true / false] look = true, -- Mostrar Resets no Look do Player? [true / false] addLimite = true, -- Abilitar Limite de Resets? [true / false] setClasse = false, -- Mudar Vocação do player quando resetar? [true / false] storage = 100023, -- Storage [valor] --[Configurações do Reset]__ resetStatus = { player = getPlayerGUID(cid), -- nao Mude. lvl = 796 , -- Level Necessário para Resetar. [valor] lvl_max = 1000, -- Level máximo para usar o comando lvlreset = 100, -- Level que retornará após o Reset. [valor] limite = 1, -- Máximo de resets que um player pode chegar. [valor] newClasse = 0, -- Id da Nova Vocação após o Reset. [valor] tempo= 5, -- Tempo para o Player deslogar para Resetar. Em segundos. [valor] storageNec = 58888, -- Storage necessário para utilizar o reset }, } --[Funções]__ function Reseting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function noAll(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noTeleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noLook(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function setClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function look(cid) resets = getResets(cid) if (resets == 0) then resets = 1 end setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function teleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid,config.storage) if resets < 0 then resets = 0 end return resets end local resets = getResets(cid) local needLvl ="voce precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar." local lvlMax = string.format("voce ja passou do level maximo [%s] de reset!", config.resetStatus.lvl_max) local msg ="~~[Reset: "..getResets(cid).."]~~ 'Sucesso ao Resetar! voce sera deslogado em "..config.resetStatus.tempo.." Segundos." local msgStorage = "Voce nao esta autorizado a utilizar o !reset" local s_nec = getPlayerStorageValue(cid,config.resetStatus.storageNec) --[Condiçoes]__ if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"voce Precisa estar em Protection Zone Para Resetar.") return TRUE elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then doPlayerSendTextMessage(cid, 22, "voce ja e Reset!.") return TRUE elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid,22,"voce ta PK White, por isso nao pode resetar.") return TRUE elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"voce ta PK Red, por isso nao pode resetar.") return TRUE elseif(config.needPa == true) and not isPremium(cid) then doPlayerSendTextMessage(cid,22,"voce Precisa ser Premium Account para Resetar.") return TRUE elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"voce Precisa estar sem Battle para Resetar.") return TRUE elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == true) and (config.setClasse == true) then addEvent(Reseting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == false) and (config.setClasse == false) then addEvent(noAll, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == true) and (config.setClasse == true) then addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == false) and (config.setClasse == true) then addEvent(noLook, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == true) and (config.setClasse == false) then addEvent(noClasse, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == false) and (config.setClasse == true) then addEvent(setClasse, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == true) and (config.setClasse == false) then addEvent(look, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == false) and (config.setClasse == false) then addEvent(teleporting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) < config.resetStatus.lvl) then doPlayerSendCancel(cid, needLvl) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif (getPlayerLevel(cid) > config.resetStatus.lvl_max) then doPlayerSendCancel(cid, lvlMax) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif (s_nec == -1) then doPlayerSendCancel(cid, msgStorage) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end if doPlayerPopupFYI(cid, msg) then end return TRUE end
-
(Resolvido)Adicionando LvL Max Pra usa a talkaction reset
--[[ SCRIPTING> MarcelloMkez <scriptING ]] --[[ [supreme Reset System] Autor: rafhael Versión: 1.0 TFS: 0.3.6 Testeado en: 8.60 Fórum: [Características] ~ Versión 1.0 ~ - Resets no Look; - Premium Account ou nao; - Mudar Vocação; - Limite de Resets; - Opções para Abilitar e Desabilitar Condições; [Em Construção] - Stages Free e Premium; - 'Talvez' um novo sistema de mudar Vocação; sem data para postagem. ]] function onSay(cid, words, param) --[Configurações de Condição]__ config = { --[[verdadeiro / Falso]] needPa = false, -- Precisa de Premium Account? [true / false] needPz = true, -- Precisa estar em Protection Zone? [true / false] battle = true, -- Precisa estar sem Batlle para Resetar? [true / false] withe = false, -- Players PK Withe pode Resetar? [true / false] red = false, -- Players PK Red pode Resetar? [true / false] tp = true, -- Teleportar para o Templo após o reset? [true / false] look = true, -- Mostrar Resets no Look do Player? [true / false] addLimite = true, -- Abilitar Limite de Resets? [true / false] setClasse = false, -- Mudar Vocação do player quando resetar? [true / false] storage = 100023, -- Storage [valor] --[Configurações do Reset]__ resetStatus = { player = getPlayerGUID(cid), -- nao Mude. lvl = 796 , -- Level Necessário para Resetar. [valor] lvl_max = 1000, -- Level máximo para usar o comando lvlreset = 100, -- Level que retornará após o Reset. [valor] limite = 1, -- Máximo de resets que um player pode chegar. [valor] newClasse = 0, -- Id da Nova Vocação após o Reset. [valor] tempo= 5, -- Tempo para o Player deslogar para Resetar. Em segundos. [valor] storageNec = 58888, -- Storage necessário para utilizar o reset }, } --[Funções]__ function Reseting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function noAll(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noTeleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noLook(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function setClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function look(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function teleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid,config.storage) if resets < 0 then resets = 0 end return resets end local resets = getResets(cid) local needLvl ="voce precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar." local lvlMax = string.format("voce ja passou do level maximo [%s] de reset!", config.resetStatus.lvl_max) local msg ="~~[Reset: "..getResets(cid).."]~~ 'Sucesso ao Resetar! voce sera deslogado em "..config.resetStatus.tempo.." Segundos." local msgStorage = "Voce nao esta autorizado a utilizar o !reset" local s_nec = getPlayerStorageValue(cid,config.resetStatus.storageNec) --[Condiçoes]__ if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"voce Precisa estar em Protection Zone Para Resetar.") return TRUE elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then doPlayerSendTextMessage(cid, 22, "voce ja e Reset!.") return TRUE elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid,22,"voce ta PK White, por isso nao pode resetar.") return TRUE elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"voce ta PK Red, por isso nao pode resetar.") return TRUE elseif(config.needPa == true) and not isPremium(cid) then doPlayerSendTextMessage(cid,22,"voce Precisa ser Premium Account para Resetar.") return TRUE elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"voce Precisa estar sem Battle para Resetar.") return TRUE elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == true) and (config.setClasse == true) then addEvent(Reseting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == false) and (config.setClasse == false) then addEvent(noAll, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == true) and (config.setClasse == true) then addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == false) and (config.setClasse == true) then addEvent(noLook, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == true) and (config.setClasse == false) then addEvent(noClasse, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == false) and (config.setClasse == true) then addEvent(setClasse, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == false) and (config.look == true) and (config.setClasse == false) then addEvent(look, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max and s_nec ~= -1) and (config.tp == true) and (config.look == false) and (config.setClasse == false) then addEvent(teleporting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) < config.resetStatus.lvl) then doPlayerSendCancel(cid, needLvl) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif (getPlayerLevel(cid) > config.resetStatus.lvl_max) then doPlayerSendCancel(cid, lvlMax) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif (s_nec == -1) then doPlayerSendCancel(cid, msgStorage) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end if doPlayerPopupFYI(cid, msg) then end return TRUE end Olá, tem sim: O storage necessário é abaixo do 'tempo', onde está escrito 'storageNec', tá comentado lá na config.
-
Como adicionar um atributo de look nos players
Seria bom você explicar de uma forma resumida como você conseguiu resolver, assim futuramente alguém que tenha o mesmo interesse, possa está sendo ajudado.
-
(Resolvido)Adicionando LvL Max Pra usa a talkaction reset
Faz o teste, só alterar abaixo do lvl mínimo de reset, onde tem escrita 'lvl_max = ' (coloquei como 1000). --[[ SCRIPTING> MarcelloMkez <scriptING ]] --[[ [supreme Reset System] Autor: rafhael Versión: 1.0 TFS: 0.3.6 Testeado en: 8.60 Fórum: [Características] ~ Versión 1.0 ~ - Resets no Look; - Premium Account ou nao; - Mudar Vocação; - Limite de Resets; - Opções para Abilitar e Desabilitar Condições; [Em Construção] - Stages Free e Premium; - 'Talvez' um novo sistema de mudar Vocação; sem data para postagem. ]] function onSay(cid, words, param) --[Configurações de Condição]__ config = { --[[verdadeiro / Falso]] needPa = false, -- Precisa de Premium Account? [true / false] needPz = true, -- Precisa estar em Protection Zone? [true / false] battle = true, -- Precisa estar sem Batlle para Resetar? [true / false] withe = false, -- Players PK Withe pode Resetar? [true / false] red = false, -- Players PK Red pode Resetar? [true / false] tp = true, -- Teleportar para o Templo após o reset? [true / false] look = true, -- Mostrar Resets no Look do Player? [true / false] addLimite = true, -- Abilitar Limite de Resets? [true / false] setClasse = false, -- Mudar Vocação do player quando resetar? [true / false] storage = 100023, -- Storage [valor] --[Configurações do Reset]__ resetStatus = { player = getPlayerGUID(cid), -- nao Mude. lvl = 796 , -- Level Necessário para Resetar. [valor] lvl_max = 1000, -- Level máximo para usar o comando lvlreset = 100, -- Level que retornará após o Reset. [valor] limite = 1, -- Máximo de resets que um player pode chegar. [valor] newClasse = 0, -- Id da Nova Vocação após o Reset. [valor] tempo= 5 -- Tempo para o Player deslogar para Resetar. Em segundos. [valor] }, } --[Funções]__ function Reseting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function noAll(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noTeleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noLook(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doPlayerSetVocation(cid, config.resetStatus.newClasse) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) return TRUE end function noClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function setClasse(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function look(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function teleporting(cid) resets = getResets(cid) setPlayerStorageValue(cid,config.storage,resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.query("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player) db.query("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player) return TRUE end function getResets(cid) resets = getPlayerStorageValue(cid,config.storage) if resets < 0 then resets = 0 end return resets end local resets = getResets(cid) local needLvl ="voce precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar." local lvlMax = string.format("voce ja passou do level maximo [%s] de reset!", config.resetStatus.lvl_max) local msg ="~~[Reset: "..getResets(cid).."]~~ 'Sucesso ao Resetar! voce sera deslogado em "..config.resetStatus.tempo.." Segundos." --[Condiçoes]__ if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"voce Precisa estar em Protection Zone Para Resetar.") return TRUE elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then doPlayerSendTextMessage(cid, 22, "voce ja e Reset!.") return TRUE elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid,22,"voce ta PK White, por isso nao pode resetar.") return TRUE elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"voce ta PK Red, por isso nao pode resetar.") return TRUE elseif(config.needPa == true) and not isPremium(cid) then doPlayerSendTextMessage(cid,22,"voce Precisa ser Premium Account para Resetar.") return TRUE elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"voce Precisa estar sem Battle para Resetar.") return TRUE elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == true) and (config.look == true) and (config.setClasse == true) then addEvent(Reseting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == false) and (config.look == false) and (config.setClasse == false) then addEvent(noAll, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == false) and (config.look == true) and (config.setClasse == true) then addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == true) and (config.look == false) and (config.setClasse == true) then addEvent(noLook, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == true) and (config.look == true) and (config.setClasse == false) then addEvent(noClasse, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == false) and (config.look == false) and (config.setClasse == true) then addEvent(setClasse, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == false) and (config.look == true) and (config.setClasse == false) then addEvent(look, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) >= config.resetStatus.lvl and getPlayerLevel(cid) <= config.resetStatus.lvl_max) and (config.tp == true) and (config.look == false) and (config.setClasse == false) then addEvent(teleporting, config.resetStatus.tempo* 1000, cid) elseif (getPlayerLevel(cid) < config.resetStatus.lvl) then doPlayerSendCancel(cid, needLvl) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) elseif (getPlayerLevel(cid) > config.resetStatus.lvl_max) then doPlayerSendCancel(cid, lvlMax) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end if doPlayerPopupFYI(cid, msg) then end return TRUE end
-
Erro First Items
Bom, me parece tudo ok, mas provavelmente isso solucione o erro: local firstItems = {} firstItems[0] = { 2173, 12605, 7424, 2124, 12606, 12604, 12607 } firstItems[1] = { 2173, 12605, 7424, 2124, 12606, 12604, 12607 } firstItems[2] = { 2173, 12605, 7424, 2124, 12606, 12604, 12607 } firstItems[3] = { 2173, 12605, 7367, 2124, 12606, 12604, 12607 } firstItems[4] = { 2173, 12605, 7417, 2124, 12606, 12604, 12607 } function onLogin(cid) if getPlayerStorageValue(cid, 30001) == -1 then if (firstItems[getPlayerVocation(cid)]) then for i = 1, table.maxn(firstItems[getPlayerVocation(cid)]) do doPlayerAddItem(cid, firstItems[getPlayerVocation(cid)], 1) end if getPlayerSex(cid) == 0 then doPlayerAddItem(cid, 12603, 1) else doPlayerAddItem(cid, 12603, 1) end local bag = doPlayerAddItem(cid, 10518, 1) doAddContainerItem(bag, 2160, 100) doAddContainerItem(bag, 2554, 1) doAddContainerItem(bag, 2120, 1) doAddContainerItem(bag, 9693, 2) doAddContainerItem(bag, 8926, 1) setPlayerStorageValue(cid, 30001, 1) end end return true end
-
Erro First Items
Olá, The Ripper. 1 - Se puder comentar sobre os comandos que executou na db, fica até mais fácil de achar o problema. 2 - Posta seu vocation.xml ou o id com seu respectivo nome.
-
(Resolvido)(Summon) Não se atacar e nem o dono, dono não atacar sumon
Em data/creaturescripts/scripts/ adicione no arquivo chamado SummonAntKillSummon function onCombat(cid, target) if (isMonster(cid) and isMonster(target)) then if ((getCreatureMaster(cid)) == getCreatureMaster(target)) then return false end end return true end Em data/creaturescripts/creaturescripts.xml adicione esta linha abaixo de uma semelhante: <event type="combat" name="AntiSummon" event="script" value="SummonAntKillSummon.lua"/> E no login.lua localizado em data/creaturescripts/scripts/ registerCreatureEvent(cid, "AntiSummon") Não cheguei a testar, qualquer coisa manda o retorno pra gente, \o.
-
(Resolvido)Quest Com Storage Libera Acesso Para Uma Sala
Em data/movements/scripts/ crie um arquivo chamado tileBau.lua, adicione dentro: local config = { storage = 88888, -- storage, coloquei o mesmo do post msgFalha = "Voce nao tem acesso ao VIP IV!", -- Caso o usuário não tenha o storage, esta mensagem será enviada para ele. } function onStepIn(cid, item, position, fromPosition) if not (isPlayer(cid)) then return false end if (item.actionid == 31531) then if (getPlayerStorageValue(cid,config.storage) == -1) then doPlayerSendCancel(cid,config.msgFalha) doTeleportThing(cid, fromPosition, true) doSendMagicEffect(fromPosition, CONST_ME_POFF) else doSendMagicEffect(position, CONST_ME_MAGIC_BLUE) end end return true end Em data/movements/movements.xml adicione esta linha de código abaixo de uma semelhante: <movevent type="StepIn" actionid="31531" event="script" value="tileBau.lua"/> Obs.: Não esqueça de colocar no mapa o actionid (31531) no piso que quer bloquear a passagem! Segue imagem de exemplo:
-
(Resolvido)verificar storage pra usar comando de afk
local FRASES = {"Ja Volto!", "Saindo!", "Afk!", "Ja Volto!", "AFK!"} -- Auto-Mensagens. local TEMPO = 2 -- Intervalo de Tempo em segundos. local storage = 123456 -- Storage para verificar do player local function doSendAutoMessage(cid, pos) if (isCreature(cid)) then npos = getThingPos(cid) if (pos.x == npos.x) and (pos.y == npos.y) and (pos.z == npos.z) then doSendAnimatedText(pos, FRASES[math.random(#FRASES)], math.random(255)) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) addEvent(doSendAutoMessage, TEMPO*1000, cid, npos) end end end function onSay(cid, words, param) if (getPlayerStorageValue(cid, storage) == -1) then return doPlayerSendCancelMessage(cid, "Voce nao pode utilizar este comando!") end pos = getThingPos(cid) doSendAnimatedText(pos, FRASES[math.random(#FRASES)], math.random(255)) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doCreatureSay(cid, "Vo Ficar Afk, Perae Beleza ?!.", TALKTYPE_ORANGE_1) doPlayerPopupFYI(cid, "Voce ficou AFK, Para sair do AFK, Ande.") addEvent(doSendAutoMessage, TEMPO*1000, cid, pos) return true end Olá, Não cheguei a testar, mas basicamente ele vai checar se o player tem o storage, se tiver, ele vai executar o código, caso contrário, vai devolver a mensagem 'Voce nao pode utilizar este comando!'.
-
(Resolvido)[AJUDA - SCRIPT] Bug no Target 8.60 + Auto Stack Item
É muito complicado seu problema, pois uma mudança de 'distro' nem sempre resolve o problema, por conta de que ela é a source do seu servidor compilada, e se a source compilada que resultou nessa distro tiver alterações nos arquivos do servidor, na qual os seus scripts giram em torno disso, vai gerar diversos erros, problemas como você citou, etc. Você tem as sources da distro anterior? Se tiver, procura mais sobre esses erros e como corrigi-los diretamente lá, isso com certeza vai resolver estes bugs.
-
[AJUDA] Efeito Drop Stone em cima do pokemon!!
local effect = 169 --by brun123 --alterado v1.9 \/ local function func(cid, position, corpseid, effect) if not (isCreature(cid)) then return true end local corpse = getTileItemById(position, corpseid).uid if corpse <= 1 then return true end if not (isContainer(corpse)) then return true end for slot = 0, (getContainerSize(corpse)-1) do local item = getContainerItem(corpse, slot) if (item.uid <= 1) then return true end if isStone(item.itemid) then return doSendMagicEffect(getThingPos(cid), effect) end end end function onKill(cid, target, lastHit) if not (ehMonstro(target)) then return true end local corpse = getMonsterInfo(getCreatureName(target)).lookCorpse addEvent(func, 5, getCreatureSummons(cid)[1], getThingPos(target), corpse, effect) return true end @Vanne Bonser Sim, faça o teste no dropStone.lua
-
Erro script autoloot
Cara, testei no server de testes aqui e está tudo ok... Não ocorreu nenhum erro na distro, script funcionou perfeitamente. Segue imagens:
-
(Resolvido)Ajustar Script ! #pls
@leozincorsair Vish, é mesmo, nem prestei atenção quando alterei do invited (estava fazendo testes). Pega aê: local a = { remove = 2596, -- Item que vai ser removido. add = 1476 -- Item que vai ser adicionado. } function onUse(cid, item, frompos, item2, topos) if (getPlayerItemCount(cid, a.remove) >= 1) then local house = getHouseByPlayerGUID(getPlayerGUID(cid)) if (not house or not getTileHouseInfo(getPlayerPosition(cid))) then doPlayerSendCancel(cid, "Voce precisa esta dentro de sua house!") doSendMagicEffect(frompos, 2) return 1 end doPlayerRemoveItem(cid, a.remove, 1) doPlayerAddItem(cid, a.add, 1) doSendMagicEffect(frompos, 28) doPlayerSendCancel(cid, "Você transformou sua "..getItemNameById(a.remove).." em uma "..getItemNameById(a.add).."!") else doPlayerSendCancel(cid, "Sua "..getItemNameById(a.remove).." deve estar dentro da backpack para transformala!") doSendMagicEffect(frompos, 2) end return 1 end
-
Quests
Segue links:
-
(Resolvido)Ajustar Script ! #pls
local a = { remove = 2596, -- Item que vai ser removido. add = 1476 -- Item que vai ser adicionado. } function onUse(cid, item, frompos, item2, topos) if getPlayerItemCount(cid, a.remove) >= 1 then local house = getHouseByPlayerGUID(getPlayerGUID(cid)) if not (house) then doPlayerSendCancel(cid, "Voce precisa esta dentro de sua house!") doSendMagicEffect(frompos, 2) return 1 end doPlayerRemoveItem(cid, a.remove, 1) doPlayerAddItem(cid, a.add, 1) doSendMagicEffect(frompos, 28) doPlayerSendCancel(cid, "Você transformou sua "..getItemNameById(a.remove).." em uma "..getItemNameById(a.add).."!") else doPlayerSendCancel(cid, "Sua "..getItemNameById(a.remove).." deve estar dentro da backpack para transformala!") doSendMagicEffect(frompos, 2) end return true end Cara, tentei por player invitado também, mas não estava conseguindo, se alguém quiser aê se manifestar e colocar as duas opções... Por enquanto o player só consegue usar o item se ele estiver dentro de SUA house.
-
(Resolvido)Tiler que diminuem dano
@DouglasVinicius Nenhum erro? Tipo, se tu achar que não mudou porque o cara tá tirando o mesmo dano, isso é normal, porque com esse script ele não 'reduz o dano' diretamente, tipo, o cara tira 600 de dano, se eu configurar para 'reduzir' 10%, então ele depois de tirar 600 de dano, o script vai dá 10% de vida para o usuário que sofreu o dano. Tecnicamente se o player não morrer, o atacante tirou 540 de dano.