Postado Abril 28, 2015 10 anos Ola, gostaria de um Script que quando eu usar o comando !fly o personagem sai andando sozinho e se eu aperta as setas < \/ /\ > ele continuar andando pro lado que eu aperta, so para se eu usar o comando !Fly novamente É um servidor de poketibia ele vai esta voando quando usar o comando, e so deve poder usar o comando se ele estiver Voando. Agradeço dez de ja quem poder me ajudar. Darei 5+rep . Editado Abril 28, 2015 10 anos por CarlosHenrique7457 (veja o histórico de edições) Ajudei? da um Rep+, não custa nada. Servidor de PokeTibia ja online. Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks Grupo: https://www.facebook.com/groups/257989224406246/ Site: http://pokexstore.wix.com/pokexstore
Postado Abril 28, 2015 10 anos Solução local configuration = { storage = 918311, fly_storage = 17000, --Storage do Fly no seu servidor. } function isWalkable(pos, creature, proj, pz)-- by Nord if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function autoWalk(cid, id) if not isCreature(cid) then if id then return db.executeQuery("UPDATE player_storage SET value = -1 WHERE key = 918311 AND player_id = "..id) end elseif getPlayerStorageValue(cid, configuration.storage) < 1 then return true end local topos = getPosByDir(getThingPos(cid), getCreatureLookDir(cid)) if topos then if getPlayerStorageValue(cid, configuration.storage) < 1 or getPlayerStorageValue(cid, configuration.fly_storage) < 1 then if getPlayerStorageValue(cid, configuration.fly_storage) < 1 then setPlayerStorageValue(cid, configuration.storage, -1) end return true elseif isWalkable(topos) then if getTileThingByPos({x = topos.x, y = topos.y, z = topos.z, stackpos = 0}).itemid == 0 then doCombatAreaHealth(cid, 0, topos, 0, 0, 0, CONST_ME_NONE) doCreateItem(11676, 1, topos) end doTeleportThing(cid, topos) else setPlayerStorageValue(cid, configuration.storage, -1) doPlayerSendTextMessage(cid, 27, "Há algum objeto à sua frente impedindo a passagem.") doPlayerSetNoMove(cid, false) return true end else doPlayerSendCancel(cid, "Sorry, not possible.") setPlayerStorageValue(cid, configuration.storage, -1) doPlayerSetNoMove(cid, false) return true end addEvent(autoWalk, 500, cid, id) end function onSay(cid, words) if getPlayerStorageValue(cid, configuration.fly_storage) < 1 then doPlayerSendCancel(cid, "Para usar este comando, você deve estar em Fly.") elseif getPlayerStorageValue(cid, configuration.storage) >= 1 then setPlayerStorageValue(cid, configuration.storage, -1) doPlayerSendTextMessage(cid, 27, "Comando !fly desativado.") doPlayerSetNoMove(cid, false) else doPlayerSendTextMessage(cid, 27, "Comando !fly ativado.") setPlayerStorageValue(cid, configuration.storage, 1) doPlayerSetNoMove(cid, true) autoWalk(cid, getPlayerGUID(cid)) end return true end Em data/actions/scripts, order.lua: Abaixo de: doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", let me get down!", 1) adicione: doPlayerSetNoMove(cid, false) Escrevi este código há mais de 1 ano, mas suponho que ainda funcione como deve. Editado Maio 1, 2015 10 anos por zipter98 (veja o histórico de edições) não respondo pms solicitando suporte em programação/scripting
Postado Abril 28, 2015 10 anos Autor talkactions certo? Poderia me informa como devo colocar em talkactions.xml Ajudei? da um Rep+, não custa nada. Servidor de PokeTibia ja online. Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks Grupo: https://www.facebook.com/groups/257989224406246/ Site: http://pokexstore.wix.com/pokexstore
Postado Abril 28, 2015 10 anos <talkaction log="yes" words="!fly" event="script" value="nome_do_arquivo.lua"/> Sim. não respondo pms solicitando suporte em programação/scripting
Postado Abril 30, 2015 10 anos Autor Esta dando erro @Up . Editado Abril 30, 2015 10 anos por CarlosHenrique7457 (veja o histórico de edições) Ajudei? da um Rep+, não custa nada. Servidor de PokeTibia ja online. Pagina: https://www.facebook.com/PokemonxStore?ref=bookmarks Grupo: https://www.facebook.com/groups/257989224406246/ Site: http://pokexstore.wix.com/pokexstore
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.