Postado Outubro 4, 2023 1 ano Estou com um problema e esse problema ocorre quando uso o ditto, eu coloco ele para fora e dou o f1 ate o f12 sendo que ele não deveria ter esses moves sendo q ele so tem o transforme. ---------------------------------- Arquivo move1 abaixo junto com o print do erro. move1.lua
Postado Outubro 6, 2023 1 ano local msgs = {"use ", ""} function doAlertReady(cid, id, movename, n, cd) if not isCreature(cid) then return true end local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) if not p or #p <= 0 then return true end for a = 1, #p do if getItemAttribute(p[a], cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!") return true end end end function onSay(cid, words, param, channel) if param ~= "" then return true end if string.len(words) > 3 then return true end if #getCreatureSummons(cid) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.") return true end local mypoke = getCreatureSummons(cid)[1] local name = getCreatureName(mypoke) local it = string.sub(words, 2, 3) local move = nil if it == "2" then move = movestable[name].move2 elseif it == "3" then move = movestable[name].move3 elseif it == "4" then move = movestable[name].move4 elseif it == "5" then move = movestable[name].move5 elseif it == "6" then move = movestable[name].move6 elseif it == "7" then move = movestable[name].move7 elseif it == "8" then move = movestable[name].move8 elseif it == "9" then move = movestable[name].move9 elseif it == "10" then move = movestable[name].move10 elseif it == "11" then move = movestable[name].move11 elseif it == "12" then move = movestable[name].move12 elseif it == "13" then move = movestable[name].move13 end if not move then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end if getPlayerLevel(cid) < move.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to be at least level "..move.level.." to use this move.") return true end local cdzin = "cm_move"..it.."" if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use "..move.name.." again.") return true end local newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd) doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY) local summons = getCreatureSummons(cid) addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin) end tentar!
Postado Outubro 7, 2023 1 ano Autor 13 horas atrás, GM Vortex disse: local msgs = {"use ", ""} function doAlertReady(cid, id, movename, n, cd) if not isCreature(cid) then return true end local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) if not p or #p <= 0 then return true end for a = 1, #p do if getItemAttribute(p[a], cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!") return true end end end function onSay(cid, words, param, channel) if param ~= "" then return true end if string.len(words) > 3 then return true end if #getCreatureSummons(cid) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.") return true end local mypoke = getCreatureSummons(cid)[1] local name = getCreatureName(mypoke) local it = string.sub(words, 2, 3) local move = nil if it == "2" then move = movestable[name].move2 elseif it == "3" then move = movestable[name].move3 elseif it == "4" then move = movestable[name].move4 elseif it == "5" then move = movestable[name].move5 elseif it == "6" then move = movestable[name].move6 elseif it == "7" then move = movestable[name].move7 elseif it == "8" then move = movestable[name].move8 elseif it == "9" then move = movestable[name].move9 elseif it == "10" then move = movestable[name].move10 elseif it == "11" then move = movestable[name].move11 elseif it == "12" then move = movestable[name].move12 elseif it == "13" then move = movestable[name].move13 end if not move then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end if getPlayerLevel(cid) < move.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to be at least level "..move.level.." to use this move.") return true end local cdzin = "cm_move"..it.."" if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use "..move.name.." again.") return true end local newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd) doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY) local summons = getCreatureSummons(cid) addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin) end tentar! o erro do ditto funcionou, quando dou do f1 ao f12 ele diz algo como se nao tivesse ataque, ate ai tudo bem e ta super certo, o problema e que todos os outros pokemons ficaram sem ataques, eu dou os ataques e so aparece o nome, do jeito q mostra na imagem abaixo, os ataques nao saem
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.