Oi galera, eu fiz um script faz muito tempo para autoMegaEvolve um pokemon com opçao de ativar ou desativar, nao e a gran coisa mais pode ser de ajuda para muitos.
PD: sou spanhol e meu portuguesse não e o mais bom do mundo.
Vamo lá:
___________________ TALKACTIONS
● Cria um arquivo chamado autoMegaEvolve.lua em talkactions/script cole o script
-- AutoMegaEvolve 1.0 -- Created by @Michyaraque -- -- Consider to use as free use, dont sell this. -- Actually i do not provide help to PokeTibia users because all they are selling stuff that they are not ownes. -- Consider being community friendly --- function onSay(cid, words, param) local wordON, wordOFF = "on", "off" local split = param:split(",") if param == "" then doPlayerSendCancel(cid, '[Mega Service] Command needs parameters, function structure: "!autoMegaEvolve on | off".') return 0 end if split[1] == wordON then if getPlayerStorageValue(cid, storages.MegaAutoEvolve) == 0 then setPlayerStorageValue(cid, storages.MegaAutoEvolve, 1) doSendMsg(cid, "[Mega Service] Now you have auto mega evolve "..wordON:upper()..".") else doSendMsg(cid, "[Mega Service] Your auto mega evolve is actually "..wordON:upper()..".") end elseif split[1] == wordOFF then if getPlayerStorageValue(cid, storages.MegaAutoEvolve) == 1 then setPlayerStorageValue(cid, storages.MegaAutoEvolve, 0) doSendMsg(cid, "[Mega Service] Now you have auto mega evolve "..wordOFF:upper()..".") else doSendMsg(cid, "[Mega Service] Your auto mega evolve is actually "..wordOFF:upper()..".") end else doSendMsg(cid, "[Mega Service] Sorry this parameter is not allowed, only allowed "..wordON:upper().." or "..wordOFF:upper()..".") end return 1 end
● Depois adiciona em talkactions.xml
<talkaction words="!autoMegaEvolve" hide="yes" case-sensitive="no" event="script" value="automegaevolve.lua"/>
___________________ ACTIONS
● Vai para actions/scripts/basic/goback.lua e pesquise por
doCreatureSetLookDir(pk, 2)
● Acima dele cole o seguente
if getPlayerStorageValue(cid, storages.MegaAutoEvolve) == 1 then goBackToMega(pk) end
___________________ LIBS
● Vai para data/libs/106-main functions.lua e no final cole o seguente
function goBackToMega(cid) local name, chance = doCorrectString(getCreatureName(cid)), math.random(0.1, 100.9) local megaID = "" if name == "Charizard" then megaID = math.random(1, 100) < 51 and "Y" or "X" end local megaName = "Mega " .. name .. (megaID ~= "" and " " .. megaID or "") if megasConf[megaName] and not isMega(cid) then setPlayerStorageValue(cid, storages.isMegaID, megaID) doTransformMega(cid) end end
● Vai para ~main tables.lua e pesquise por
storages = {
● Adicione o seguente no final do Json
MegaAutoEvolve = 20010
Citar
O uso do comando e simple !autoMegaEvolve on para ativar automaticamente o megaevolve do seu pokemon no Go/back.
PD: Espero que nenhum venda isso pq atualmente tudo mundo esta vendendo coisa que nao e dono dele. PFVOR... E seja amigavel com a comunidade nao arrume e faça coisa para vender ou aproveitar. Os arquivos e as coisas que vc tem e por causa da comunidade, não tire proveito das coisas de outras pessoas
Créditos 100% para mim~ Hail Open Source ~