Postado Março 19, 2014 11 anos Resumindo é um script bem simples, porém que muitos procuram, e é bem legal também, encontrei no tibiaking, e resolvi trazer para cá, dei uma editada nos textos e alterei algumas funções para ficar mais moderno e mais bonitinho. É um script de "!go", mais conhecido como "!fly" por muitos. Você fala !go nome da cidade (configurável), e você será teleportado para a cidade, só pode ser usado em Protection Zone, opção para apenas vips (ou premium) usarem, com opção de tirar dinheiro por uso do comando (ou não). Lá vai o script. Se tiverem dúvidas comentar aqui, que eu tentarei ajudar. function onSay(cid, words, param) local config = { pz = true, -- players precisam estar em protection zone para usar? (true or false) battle = false, -- players deve estar sem battle? (true or false) custo = true, -- precisa de dinheiro para teleportar? (true or false) need_level = false, -- nível necessario para usar o comando (true or false) vip = true -- se precisa ser vip account ou premium account (true or false) } --[[ Config lugares]]-- level é o nivel necessario para usar o comando, e price é o dinheiro necessario para usar o comando local lugar = { ["carlin"] = { -- nome do lugar pos = {x= 32360, y= 31782, z= 7},level = 5,price = 1000}, ["thais"] = { -- nome do lugar pos = {x= 32369, y= 32241, z= 7},level = 10, price = 1000}, ["venore"] = { -- nome do lugar pos = {x= 32957, y= 32076, z= 7},level = 15,price = 1000}, ["area vip"] ={ -- nome do lugar pos = {x=305, y=934, z=7},level = 20,price = 1000} } --[[ Lista de Viagem (Não mexa) ]]-- if (param == "list") then local str = "" str = str .. "Citys list:\n\n" for name, pos in pairs(lugar) do str = str..name.."\n" end str = str .. "" doShowTextDialog(cid, 6579, str) return TRUE end local a = lugar[param] if not(a) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, this city does not exist.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You must be in the protection zone.") return TRUE elseif config.vip == true and isPremium(cid) == false then -- Se você tiver um sistema de VIP, pegar o comando isVip, ou algo semelhante e trocar por isPremium doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Only VIP players can telepot.") return TRUE elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need no battle for teleport.") return TRUE elseif config.need_level == true and getPlayerLevel(cid) < a.level then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have level, you need a "..a.level.." level for teleport.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have suficiently money, you need of "..a.price.." gp's for teleport.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You is teleported for " .. param .. ".") return TRUE end Colar linha em talkactions.xml: <talkaction words="!go" event="script" value="go.lua"/> Créditos; Barão (Por criar o script) Eu (por fazer algumas pequenas melhorias nele e trazer ao TibiaKing) Editado Março 20, 2014 11 anos por Eduardo Dantas (veja o histórico de edições)
Postado Março 20, 2014 11 anos Autor Ainda não, não está funcionando? #Edit Acabei de testar, tá funcionando normal aqui. :v Editado Março 20, 2014 11 anos por Eduardo Dantas (veja o histórico de edições)
Postado Março 20, 2014 11 anos Algo me pareceu errado quando li o script, mas se está funcionando, erro meu. XD
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.