Se o Smeargle copiar 1 spell que eu criei, ele fica com a imagem dela na cd bar mas a spell não funciona, é só com as que criei, e da 1 erro na distro no move1 também, 1 pessoa ja postou o erro que da no move1 aqui, o meu é igual o dela. poderia dizer o que adicionar/alterar em cada script isso de "troque tudo por isto" é inviável, pois diversos outros sistemas que coloquei, teve que mexer nesses arquivos, se eu trocar pelo seu, perderei o que j adicionei ![]()
- Fórum
- OTServ
- Recursos
- Scripting
- Mods, funções e outros
- Smeargle System[PXG]
Smeargle System[PXG]
Por gabrielbsales, 12 de abr. de 2015 em Mods, funções e outros
info
Grupo: Visconde
Registrado: 08/12/15
Posts: 309
Reputação: +133
Gênero: Masculino

é o msm problema ![]()
info
Grupo: Visconde
Registrado: 08/12/15
Posts: 309
Reputação: +133
Gênero: Masculino

é o msm problema
Olá, consegui concertar e resolvi explicar aqui, vai ajudar caso alguém com a mesma dúvida veja esse tópico
As novas magias criadas provavelmente não foram adicionadas em um arquivo chamado moves
local do arquivo: data\lib\moves.lua
ao abrir é bem simples, você vai até a ultima spell , copia ela como base , cola embaixo e edita, só colocar o nome da spell,tipo e força.
As ultimas magias nesse arquivo do meu server eram essas:
["Signal Beam"] = {f = 80, t = "Bug"},
["Aqua Jet"] = {f = 80, t = "Water"},
["Protection"] = {f = 0, t = "normal"},
Adcionei uma spell de água, chamada Giant Water Gun, embaixo de protection eu coloquei isso:
["Giant Water Gun"] = {f = 80, t = "water"},
Pronto, essa spell já funciona caso o smeargle copie ela.
Olá, consegui concertar e resolvi explicar aqui, vai ajudar caso alguém com a mesma dúvida veja esse tópico
As novas magias criadas provavelmente não foram adicionadas em um arquivo chamado moves
local do arquivo: data\lib\moves.lua
ao abrir é bem simples, você vai até a ultima spell , copia ela como base , cola embaixo e edita, só colocar o nome da spell,tipo e força.
As ultimas magias nesse arquivo do meu server eram essas:
["Signal Beam"] = {f = 80, t = "Bug"}, ["Aqua Jet"] = {f = 80, t = "Water"}, ["Protection"] = {f = 0, t = "normal"},Adcionei uma spell de água, chamada Giant Water Gun, embaixo de protection eu coloquei isso:
["Giant Water Gun"] = {f = 80, t = "water"},Pronto, essa spell já funciona caso o smeargle copie ela.
reputado valeu
info
Grupo: Visconde
Registrado: 08/12/15
Posts: 309
Reputação: +133
Gênero: Masculino

Funciona no pda 1.9?
info
Grupo: Visconde
Registrado: 08/12/15
Posts: 309
Reputação: +133
Gênero: Masculino

EDITED: Perdão, eu lembrei que não funcionava no meu ot, dai eu peguei algumas partes daqui e outras de um outro ot que tinha o smeargle system funcionando, modifiquei algumas coisas e tal, agora funciona, mas sem o order (foi unico jeito que funcinou) eu só clico no pokemon adversário e dps no sketch e copia, para funcionar os atks e pokemons bloqueados eu criei 2 exceções no pokemon moves.lua e a tabela coloquei no configuration, agr funciona 100% (tirando a parte q tem q dar order, é só clicar no sketch com target q copia)
Funciona no pda 1.9?
Só testando para saber, recomendo fazer backup de tudo que for mexer, ou então da pasta inteira do server logo (mais prático)
e se funcionar, certifique-se que não comprometeu nada, aqui não funcionava, eu tive que pegar algumas partes daqui e outras de uma outra base que tinha um smeargle system um pouco diferente, funcionou com alguns "poréms" que dps fui arrumando, quando tentei trocar os arquivos do meu server mencionados aqui pelos de outra base que ja tinha esse system, funciou mas bugou varias coisas, dai voltei atrás e fui colocando um pouco de cada até funcionar sem problemas em outras coisas (eu acho, pq tenho alguns erros na distro que não sei se foram por causa disso ou não)
@@samlecter, consegui no meu aqui
info
Grupo: Campones
Registrado: 21/01/16
Posts: 39
Reputação: +2
Gênero: Masculino

cara eu tentei 5 vezes e as 5 deu erros na distro, eu n entendi nada do tópico vc n explicava direito mano, a hora que você falou, não esqueça de adicionar no spells.xml cara tu n explico nada e eu já sou lerdo ai eu me fodi, será que teria como tu me ajudar mais detalhadamente?
info
Grupo: Visconde
Registrado: 22/11/12
Posts: 267
Reputação: +26
Gênero: Masculino
Char no Tibia: ADM Kabo

Dxp ta testado?
Em 12/04/2015 at 18:53, gabrielbsales disse:
16:42 Adm [1010]: Smeargle, Sketch 4!
16:42 Adm [1010]: m4
Entao acontece isso e o attack nao vai
[26/11/2016 16:42:04] [Error - Spell Interface]
[26/11/2016 16:42:04] data/spells/scripts/ps/Poison Powder.lua:onCastSpell
[26/11/2016 16:42:04] Description:
[26/11/2016 16:42:04] data/lib/pokemon moves.lua:83: attempt to perform arithmetic on global 'const_distance_delay' (a nil value)
[26/11/2016 16:42:04] stack traceback:
[26/11/2016 16:42:04] data/lib/pokemon moves.lua:83: in function 'docastspell'
[26/11/2016 16:42:04] data/spells/scripts/ps/Poison Powder.lua:5: in function <data/spells/scripts/ps/Poison Powder.lu
Em 17/01/2016 at 19:02, samlecter disse:é o msm problema
Olá, consegui concertar e resolvi explicar aqui, vai ajudar caso alguém com a mesma dúvida veja esse tópico
As novas magias criadas provavelmente não foram adicionadas em um arquivo chamado moves
local do arquivo: data\lib\moves.lua
ao abrir é bem simples, você vai até a ultima spell , copia ela como base , cola embaixo e edita, só colocar o nome da spell,tipo e força.
As ultimas magias nesse arquivo do meu server eram essas:
["Signal Beam"] = {f = 80, t = "Bug"}, ["Aqua Jet"] = {f = 80, t = "Water"}, ["Protection"] = {f = 0, t = "normal"},
Adcionei uma spell de água, chamada Giant Water Gun, embaixo de protection eu coloquei isso:
["Giant Water Gun"] = {f = 80, t = "water"},
Pronto, essa spell já funciona caso o smeargle copie ela.
Entao mesmo q o attack ja esteja ai em data\lib\moves1.lua nao funciona poderia me ajudar e isso so acontece quando foca o outro pokemon
Editado Novembro 26 por Nikolass
esqueci de emplementar uma coisa
Em 12/04/2015 em 6:53 PM, gabrielbsales disse:Bom, como um individuo(Vudi) não sabe cumprir o que fala, vou postar o sistema aqui.(não cabe ao post explicar aqui)
Bom, aqui está o smeargle system, igual o da PxG. Vamos lá.
1 - Vá na pasta Lib, substitua seu cooldown bar.lua por isso:
function getPlayerPokeballs(cid) --alterado v1.9 \/ local ret = {} local container = 0 if isCreature(cid) then container = getPlayerSlotItem(cid, 3).uid local myball = getPlayerSlotItem(cid, 8) if myball.uid > 0 then table.insert(ret, myball) end else container = cid end if isContainer(container) and getContainerSize(container) > 0 then for slot = 0, (getContainerSize(container) - 1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getPlayerPokeballs(item.uid) if itemsbag and #itemsbag > 0 then for i = 0, #itemsbag do table.insert(ret, itemsbag[i]) end end elseif isPokeball(item.itemid) then table.insert(ret, item) end end end return ret end function doUpdatePokemonsBar(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 656494) > 0 then return true end setPlayerStorageValue(cid, 656494, 1000) addEvent(setPlayerStorageValue, 100, cid, 656494, -1) local ret = {} table.insert(ret, "p#,") local balls = getPlayerPokeballs(cid) local times = 0 for a = 1, #balls do local item = balls[a] local hp = math.ceil(getItemAttribute(item.uid, "hp") * 100) local name = getItemAttribute(item.uid, "poke") local port = getPlayerSlotItem(cid, CONST_SLOT_LEGS) if fotos[name] >= 11137 and fotos[name] <= 11387 then times = times + 1 local foto = fotos[name] - 911 doItemSetAttribute(item.uid, "ballorder", times) table.insert(ret, foto..","..name..""..times..","..hp..",") elseif fotos[name] >= 12605 then times = times + 1 local foto = fotos[name] - 1178 --alterado v1.9 doItemSetAttribute(item.uid, "ballorder", times) table.insert(ret, foto..","..name..""..times..","..hp..",") else times = times + 1 local foto = fotos[name] - 928 doItemSetAttribute(item.uid, "ballorder", times) table.insert(ret, foto..","..name..""..times..","..hp..",") end end doPlayerSendCancel(cid, table.concat(ret)) end function getNewMoveTable(table, n) if table == nil or not n then return false end local moves = {table.move1, table.move2, table.move3, table.move4, table.move5, table.move6, table.move7, table.move8, table.move9, table.move10, table.move11, table.move12} return moves[n] or false end function doUpdateMoves(cid) if not isCreature(cid) then return true end local summon = getCreatureSummons(cid)[1] local ret = {} table.insert(ret, "12&,") if not summon then for a = 1, 12 do table.insert(ret, "n/n,") end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) return true end if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = getCreatureName(summon) == "Smeargle" and getSmeargleMoveTable(cid) or movestable[getCreatureName(summon)] end for a = 1, 12 do local b = getNewMoveTable(moves, a) if b then table.insert(ret, (b.name:find("Sketch") and "Sketch" or b.name)..",") else table.insert(ret, "n/n,") end end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) end function doUpdateCooldowns(cid) if not isCreature(cid) then return true end local a = getPlayerSlotItem(cid, 8) local ret = {} table.insert(ret, "12|,") if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then for cds = 1, 12 do if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end end doPlayerSendCancel(cid, table.concat(ret)) return true end for cds = 1, 12 do ---- local summon = getCreatureSummons(cid)[1] if summon and getPlayerStorageValue(summon, 212123) >= 1 then cdzin = "cm_move"..cds else cdzin = "move"..cds end ---- if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = movestable[getCreatureName(summon)] end local b = getNewMoveTable(moves, cds) if not b then for cds = 1, 12 do if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end --alterado v1.9 end doPlayerSendCancel(cid, table.concat(ret)) return true end ---- if getCD(a.uid, cdzin) > 0 then if (useOTClient and b) then table.insert(ret, (getCD(a.uid, cdzin)).."|"..(1)..",") else table.insert(ret, (getCD(a.uid, cdzin))..",") end else if (useOTClient and b) then table.insert(ret, "0|"..(1)..",") else table.insert(ret, "0,") end end end doPlayerSendCancel(cid, table.concat(ret)) end function getBallsAttributes(item) local t = {"poke", "gender", "nick", "boost", "happy", "hp", "description", "transBegin", "hunger", "transLeft", "transTurn", "transOutfit", "transName", "trans", "light", "blink", "move1", "move2", "move3", "move4", "move5", "move6", "move7", "move8", "move9", "move10", "move11", "move12", "ballorder", "hands", "aura", "burn", "burndmg", "poison", "poisondmg", "confuse", "sleep", "miss", "missSpell", "missEff", "fear", "fearSkill", "silence", "silenceEff", "stun", "stunEff", "stunSpell", "paralyze", "paralyzeEff", "slow", "slowEff", "leech", "leechdmg", "Buff1", "Buff2", "Buff3", "Buff1skill", "Buff2skill", "Buff3skill", "control", "unique", "task", "lock"} local ret = {} for a = 1, #t do if getItemAttribute(item, t[a]) == "hands" then return end ret[t[a]] = getItemAttribute(item, t[a]) or false end return ret end function doChangeBalls(cid, item1, item2) if not isCreature(cid) then return true end if item1.uid == item2.uid then if #getCreatureSummons(cid) <= 0 then doGoPokemon(cid, getPlayerSlotItem(cid, 8)) else doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect) end return true end if item1.uid > 0 and item2.uid > 0 then local io = getBallsAttributes(item1.uid) local it = getBallsAttributes(item2.uid) for a, b in pairs (io) do if b then doItemSetAttribute(item2.uid, a, b) else doItemEraseAttribute(item2.uid, a) end end for a, b in pairs (it) do if b then doItemSetAttribute(item1.uid, a, b) else doItemEraseAttribute(item1.uid, a) end end local id = item2.itemid doTransformItem(item2.uid, item1.itemid) doTransformItem(item1.uid, id) doGoPokemon(cid, getPlayerSlotItem(cid, 8)) else local id = item2.itemid local b = getBallsAttributes(item2.uid) local a = doPlayerAddItem(cid, 2643, false) for c, d in pairs (b) do if d then doItemSetAttribute(a, c, d) else doItemEraseAttribute(a, c) end end doRemoveItem(item2.uid, 1) doTransformItem(a, id) doGoPokemon(cid, getPlayerSlotItem(cid, 8)) end end
2 - Ainda no Lib, no fim(depois do ultimo end) do Some Functions.lua, adicione isso:
function getSmeargleMoveTable(master) local ball = getPlayerSlotItem(master, 8).uid local moves = {} local skts = {"skt1", "skt2", "skt3", "skt4", "skt5", "skt6", "skt7", "skt8"} for x=1, #skts do moves["move"..x] = getItemAttribute(ball, skts[x]) and movestable[getItemAttribute(ball, skts[x])]["move"..x] and movestable[getItemAttribute(ball, skts[x])]["move"..x] ~= -1 and movestable[getItemAttribute(ball, skts[x])]["move"..x] or movestable["Smeargle"]["move"..x] end return moves end function smeargleHaveSpell(cid, spellname) local has = false local moves = getSmeargleMoveTable(cid) local ball = getPlayerSlotItem(cid, 8).uid local skts = {"skt1", "skt2", "skt3", "skt4", "skt5", "skt6", "skt7", "skt8"} for x=1, #skts do if getItemAttribute(ball, skts[x]) and moves["move"..x].name == spellname then has = true break end end return has end
3 - Agora no order.lua, do Actions, em baixo de:
Adicione:
--------SKETCH---------------local lockedpokes = {"Mew", "Mewtwo", "Unown Legion", "Entei", "Raikou", "Suicune", "Zapdos", "Moltres", "Articuno", "Rocket Team", "Unown", "Lugia", "Celebi", "Ho-oh", "Mew_", "Mewtwo_"}if isPlayer(cid) and #getCreatureSummons(cid) > 0 and getCreatureName(getCreatureSummons(cid)[1]) == "Smeargle" and getPlayerStorageValue(getCreatureSummons(cid)[1], 18554) > 0 thenif isMonster(item2.uid) and isInArray(lockedpokes, getCreatureName(item2.uid)) thendoPlayerSendTextMessage(cid, 20, "You can't copy this move.")return trueendlocal lockedcds = {"Divine Punishment", "Unown Rush", "Unown Help", "Mysterious Power", "Power Wave", "Shredder Team", "Double Team", "Team Slice", "Ancient Fury", "Camouflage", "Future Sight", "Acid Armor", "Rollout", "Flame Wheel", "Elemental Hands", "Super Vines", "ExplodeAll", "Aerial Ace", "Stampage", "Iron Defense", "Minimize", "Team Claw", ""}for x=1, 8 dotable.insert(lockedcds, "Sketch "..x)endlocal canShiny = truelocal smeargle = getCreatureSummons(cid)[1]local tocopy = item2.uidlocal selfball = getPlayerSlotItem(cid, 8).uidif (isShinyName(getCreatureName(item2.uid)) and canShiny) or not isShinyName(getCreatureName(item2.uid)) thenif getPlayerStorageValue(smeargle, 18554) thenfor x=1, 8 doif getPlayerStorageValue(smeargle, 18554) == x and movestable[getCreatureName(tocopy)] and movestable[getCreatureName(tocopy)]["move"..(x)] and not isInArray(lockedcds, movestable[getCreatureName(tocopy)]["move"..(x)].name) thenif not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)]["move"..(x)].name) thendoItemSetAttribute(selfball, "skt"..(x), getCreatureName(tocopy))elsedoPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")endendendsetPlayerStorageValue(smeargle, 18554, -1)enddoUpdateMoves(cid)return trueelsedoPlayerSendTextMessage(cid, 20, "You can't copy moves of shinyes pokemons.")endend
4 - Se seu servidor ja tiver os spells, sketch 1, sketch 2... Substitua por esses(data/lib/pokemon moves.lua):
elseif spell == "Sketch 1" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 1) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Psy Pulse", "Shadow Ball", "Thunder Bolt", "Ember", "Rock Throw", "Razor Leaf", "Bubbles", "Ice Shards", "Egg Bomb", "Poison Bomb"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 2" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 2) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Mud Bomb", "Cyber Pulse", "Dark Pulse", "Rock Slide", "Magical Leaf", "Fireball", "Waterball", "Feather Dance"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 3" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 3) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Poison Gas", "Earthquake", "Petal Tornado", "Electro Field", "Flame Circle"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 4" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 4) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Thunder", "Night Slash", "Confusion", "Air Slash", "Confusion", "Night Shade"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 5" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 5) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Solar Beam", "Bullet Seed", "Raging Blast", "Fire Blast", "Bubble Blast", "Hydro Cannon", "Pin Missile"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 6" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 6) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Shockwave", "Petal Dance", "Hyper Beam", "Zap Cannon", "Aurora Beam", "Ice Beam", "Ground Chop"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 7" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 7) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Fear", "Sunny Day", "Scary Face", "Skull Bash", "Cotton Spore", "Sleep Powder"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 8" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 8) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Reflect", "Charm", "Agility", "Safeguard", "Synthesis", "Emergency Call", "Healarea", "Sing"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end
Se não, use os mesmos acima, não esqueça de adicionar no spells.xml.
5 - Agora, vá em talkactions/scripst, abra o move1.lua e substitua:
Por
local idd = getPlayerSlotItem(cid, 8).uid local move = getCreatureName(mypoke) == "Smeargle" and getItemAttribute(idd, "skt1") and movestable[getItemAttribute(idd, "skt1")].move1 or movestable[name].move1
Depois:
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
Por:
if it == "2" then if getItemAttribute(idd, "skt2") then move = movestable[getItemAttribute(idd, "skt2")].move2 else move = movestable[name].move2 end elseif it == "3" then if getItemAttribute(idd, "skt3") then move = movestable[getItemAttribute(idd, "skt3")].move3 else move = movestable[name].move3 end elseif it == "4" then if getItemAttribute(idd, "skt4") then move = movestable[getItemAttribute(idd, "skt4")].move4 else move = movestable[name].move4 end elseif it == "4" then if getItemAttribute(idd, "skt4") then move = movestable[getItemAttribute(idd, "skt4")].move4 else move = movestable[name].move4 end elseif it == "5" then if getItemAttribute(idd, "skt5") then move = movestable[getItemAttribute(idd, "skt5")].move5 else move = movestable[name].move5 end elseif it == "6" then if getItemAttribute(idd, "skt6") then move = movestable[getItemAttribute(idd, "skt6")].move6 else move = movestable[name].move6 end elseif it == "7" then if getItemAttribute(idd, "skt7") then move = movestable[getItemAttribute(idd, "skt7")].move7 else move = movestable[name].move7 end elseif it == "8" then if getItemAttribute(idd, "skt8") then move = movestable[getItemAttribute(idd, "skt8")].move8 else move = movestable[name].move8 end 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
Pronto, se tiver feito tudo certo, funcionará.
Como ficará:
Como usar:
Créditos: Eu(Todo o script)
2 minutos atrás, delcinei disse:
eu fiz todo o procedimento porém ao adicionar a 2 parte do move1.lua deu os seguintes erros...
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/move1.lua)
[16/05/2018 19:19:29] data/talkactions/scripts/move1.lua:54: 'then' expected near 'ï'
[16/05/2018 19:19:29] Reloaded talk actions.
[16/05/2018 19:19:29] [Lua Error]
[16/05/2018 19:19:29] (luaAddEvent) No valid script interface!
ajuda system pra DXP
Em 12/04/2015 em 16:53, gabrielbsales disse:Bom, como um individuo(Vudi) não sabe cumprir o que fala, vou postar o sistema aqui.(não cabe ao post explicar aqui)
Bom, aqui está o smeargle system, igual o da PxG. Vamos lá.
1 - Vá na pasta Lib, substitua seu cooldown bar.lua por isso:
function getPlayerPokeballs(cid) --alterado v1.9 \/ local ret = {} local container = 0 if isCreature(cid) then container = getPlayerSlotItem(cid, 3).uid local myball = getPlayerSlotItem(cid, 8) if myball.uid > 0 then table.insert(ret, myball) end else container = cid end if isContainer(container) and getContainerSize(container) > 0 then for slot = 0, (getContainerSize(container) - 1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getPlayerPokeballs(item.uid) if itemsbag and #itemsbag > 0 then for i = 0, #itemsbag do table.insert(ret, itemsbag[i]) end end elseif isPokeball(item.itemid) then table.insert(ret, item) end end end return ret end function doUpdatePokemonsBar(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 656494) > 0 then return true end setPlayerStorageValue(cid, 656494, 1000) addEvent(setPlayerStorageValue, 100, cid, 656494, -1) local ret = {} table.insert(ret, "p#,") local balls = getPlayerPokeballs(cid) local times = 0 for a = 1, #balls do local item = balls[a] local hp = math.ceil(getItemAttribute(item.uid, "hp") * 100) local name = getItemAttribute(item.uid, "poke") local port = getPlayerSlotItem(cid, CONST_SLOT_LEGS) if fotos[name] >= 11137 and fotos[name] <= 11387 then times = times + 1 local foto = fotos[name] - 911 doItemSetAttribute(item.uid, "ballorder", times) table.insert(ret, foto..","..name..""..times..","..hp..",") elseif fotos[name] >= 12605 then times = times + 1 local foto = fotos[name] - 1178 --alterado v1.9 doItemSetAttribute(item.uid, "ballorder", times) table.insert(ret, foto..","..name..""..times..","..hp..",") else times = times + 1 local foto = fotos[name] - 928 doItemSetAttribute(item.uid, "ballorder", times) table.insert(ret, foto..","..name..""..times..","..hp..",") end end doPlayerSendCancel(cid, table.concat(ret)) end function getNewMoveTable(table, n) if table == nil or not n then return false end local moves = {table.move1, table.move2, table.move3, table.move4, table.move5, table.move6, table.move7, table.move8, table.move9, table.move10, table.move11, table.move12} return moves[n] or false end function doUpdateMoves(cid) if not isCreature(cid) then return true end local summon = getCreatureSummons(cid)[1] local ret = {} table.insert(ret, "12&,") if not summon then for a = 1, 12 do table.insert(ret, "n/n,") end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) return true end if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = getCreatureName(summon) == "Smeargle" and getSmeargleMoveTable(cid) or movestable[getCreatureName(summon)] end for a = 1, 12 do local b = getNewMoveTable(moves, a) if b then table.insert(ret, (b.name:find("Sketch") and "Sketch" or b.name)..",") else table.insert(ret, "n/n,") end end doPlayerSendCancel(cid, table.concat(ret)) addEvent(doUpdateCooldowns, 100, cid) end function doUpdateCooldowns(cid) if not isCreature(cid) then return true end local a = getPlayerSlotItem(cid, 8) local ret = {} table.insert(ret, "12|,") if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then for cds = 1, 12 do if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end end doPlayerSendCancel(cid, table.concat(ret)) return true end for cds = 1, 12 do ---- local summon = getCreatureSummons(cid)[1] if summon and getPlayerStorageValue(summon, 212123) >= 1 then cdzin = "cm_move"..cds else cdzin = "move"..cds end ---- if isTransformed(summon) then --alterado v1.9 moves = movestable[getPlayerStorageValue(summon, 1010)] else moves = movestable[getCreatureName(summon)] end local b = getNewMoveTable(moves, cds) if not b then for cds = 1, 12 do if useOTClient then table.insert(ret, "-1|0,") else table.insert(ret, "-1,") end --alterado v1.9 end doPlayerSendCancel(cid, table.concat(ret)) return true end ---- if getCD(a.uid, cdzin) > 0 then if (useOTClient and b) then table.insert(ret, (getCD(a.uid, cdzin)).."|"..(1)..",") else table.insert(ret, (getCD(a.uid, cdzin))..",") end else if (useOTClient and b) then table.insert(ret, "0|"..(1)..",") else table.insert(ret, "0,") end end end doPlayerSendCancel(cid, table.concat(ret)) end function getBallsAttributes(item) local t = {"poke", "gender", "nick", "boost", "happy", "hp", "description", "transBegin", "hunger", "transLeft", "transTurn", "transOutfit", "transName", "trans", "light", "blink", "move1", "move2", "move3", "move4", "move5", "move6", "move7", "move8", "move9", "move10", "move11", "move12", "ballorder", "hands", "aura", "burn", "burndmg", "poison", "poisondmg", "confuse", "sleep", "miss", "missSpell", "missEff", "fear", "fearSkill", "silence", "silenceEff", "stun", "stunEff", "stunSpell", "paralyze", "paralyzeEff", "slow", "slowEff", "leech", "leechdmg", "Buff1", "Buff2", "Buff3", "Buff1skill", "Buff2skill", "Buff3skill", "control", "unique", "task", "lock"} local ret = {} for a = 1, #t do if getItemAttribute(item, t[a]) == "hands" then return end ret[t[a]] = getItemAttribute(item, t[a]) or false end return ret end function doChangeBalls(cid, item1, item2) if not isCreature(cid) then return true end if item1.uid == item2.uid then if #getCreatureSummons(cid) <= 0 then doGoPokemon(cid, getPlayerSlotItem(cid, 8)) else doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect) end return true end if item1.uid > 0 and item2.uid > 0 then local io = getBallsAttributes(item1.uid) local it = getBallsAttributes(item2.uid) for a, b in pairs (io) do if b then doItemSetAttribute(item2.uid, a, b) else doItemEraseAttribute(item2.uid, a) end end for a, b in pairs (it) do if b then doItemSetAttribute(item1.uid, a, b) else doItemEraseAttribute(item1.uid, a) end end local id = item2.itemid doTransformItem(item2.uid, item1.itemid) doTransformItem(item1.uid, id) doGoPokemon(cid, getPlayerSlotItem(cid, 8)) else local id = item2.itemid local b = getBallsAttributes(item2.uid) local a = doPlayerAddItem(cid, 2643, false) for c, d in pairs (b) do if d then doItemSetAttribute(a, c, d) else doItemEraseAttribute(a, c) end end doRemoveItem(item2.uid, 1) doTransformItem(a, id) doGoPokemon(cid, getPlayerSlotItem(cid, 8)) end end
2 - Ainda no Lib, no fim(depois do ultimo end) do Some Functions.lua, adicione isso:
function getSmeargleMoveTable(master) local ball = getPlayerSlotItem(master, 8).uid local moves = {} local skts = {"skt1", "skt2", "skt3", "skt4", "skt5", "skt6", "skt7", "skt8"} for x=1, #skts do moves["move"..x] = getItemAttribute(ball, skts[x]) and movestable[getItemAttribute(ball, skts[x])]["move"..x] and movestable[getItemAttribute(ball, skts[x])]["move"..x] ~= -1 and movestable[getItemAttribute(ball, skts[x])]["move"..x] or movestable["Smeargle"]["move"..x] end return moves end function smeargleHaveSpell(cid, spellname) local has = false local moves = getSmeargleMoveTable(cid) local ball = getPlayerSlotItem(cid, 8).uid local skts = {"skt1", "skt2", "skt3", "skt4", "skt5", "skt6", "skt7", "skt8"} for x=1, #skts do if getItemAttribute(ball, skts[x]) and moves["move"..x].name == spellname then has = true break end end return has end
3 - Agora no order.lua, do Actions, em baixo de:
Adicione:
--------SKETCH---------------local lockedpokes = {"Mew", "Mewtwo", "Unown Legion", "Entei", "Raikou", "Suicune", "Zapdos", "Moltres", "Articuno", "Rocket Team", "Unown", "Lugia", "Celebi", "Ho-oh", "Mew_", "Mewtwo_"}if isPlayer(cid) and #getCreatureSummons(cid) > 0 and getCreatureName(getCreatureSummons(cid)[1]) == "Smeargle" and getPlayerStorageValue(getCreatureSummons(cid)[1], 18554) > 0 thenif isMonster(item2.uid) and isInArray(lockedpokes, getCreatureName(item2.uid)) thendoPlayerSendTextMessage(cid, 20, "You can't copy this move.")return trueendlocal lockedcds = {"Divine Punishment", "Unown Rush", "Unown Help", "Mysterious Power", "Power Wave", "Shredder Team", "Double Team", "Team Slice", "Ancient Fury", "Camouflage", "Future Sight", "Acid Armor", "Rollout", "Flame Wheel", "Elemental Hands", "Super Vines", "ExplodeAll", "Aerial Ace", "Stampage", "Iron Defense", "Minimize", "Team Claw", ""}for x=1, 8 dotable.insert(lockedcds, "Sketch "..x)endlocal canShiny = truelocal smeargle = getCreatureSummons(cid)[1]local tocopy = item2.uidlocal selfball = getPlayerSlotItem(cid, 8).uidif (isShinyName(getCreatureName(item2.uid)) and canShiny) or not isShinyName(getCreatureName(item2.uid)) thenif getPlayerStorageValue(smeargle, 18554) thenfor x=1, 8 doif getPlayerStorageValue(smeargle, 18554) == x and movestable[getCreatureName(tocopy)] and movestable[getCreatureName(tocopy)]["move"..(x)] and not isInArray(lockedcds, movestable[getCreatureName(tocopy)]["move"..(x)].name) thenif not smeargleHaveSpell(cid, movestable[getCreatureName(tocopy)]["move"..(x)].name) thendoItemSetAttribute(selfball, "skt"..(x), getCreatureName(tocopy))elsedoPlayerSendTextMessage(cid, 20, "You smeargle already have this move.")endendendsetPlayerStorageValue(smeargle, 18554, -1)enddoUpdateMoves(cid)return trueelsedoPlayerSendTextMessage(cid, 20, "You can't copy moves of shinyes pokemons.")endend
4 - Se seu servidor ja tiver os spells, sketch 1, sketch 2... Substitua por esses(data/lib/pokemon moves.lua):
elseif spell == "Sketch 1" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 1) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Psy Pulse", "Shadow Ball", "Thunder Bolt", "Ember", "Rock Throw", "Razor Leaf", "Bubbles", "Ice Shards", "Egg Bomb", "Poison Bomb"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 2" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 2) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Mud Bomb", "Cyber Pulse", "Dark Pulse", "Rock Slide", "Magical Leaf", "Fireball", "Waterball", "Feather Dance"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 3" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 3) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Poison Gas", "Earthquake", "Petal Tornado", "Electro Field", "Flame Circle"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 4" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 4) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Thunder", "Night Slash", "Confusion", "Air Slash", "Confusion", "Night Shade"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 5" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 5) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Solar Beam", "Bullet Seed", "Raging Blast", "Fire Blast", "Bubble Blast", "Hydro Cannon", "Pin Missile"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 6" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 6) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Shockwave", "Petal Dance", "Hyper Beam", "Zap Cannon", "Aurora Beam", "Ice Beam", "Ground Chop"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 7" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 7) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Fear", "Sunny Day", "Scary Face", "Skull Bash", "Cotton Spore", "Sleep Powder"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end elseif spell == "Sketch 8" then if isSummon(cid) and isPlayer(getCreatureMaster(cid)) then setPlayerStorageValue(cid, 18554, 8) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 18554, -1) end end, 3000) else local spells = {"Reflect", "Charm", "Agility", "Safeguard", "Synthesis", "Emergency Call", "Healarea", "Sing"} local random = math.random(1, #spells) local randommove = spells[random] local pos = getThingPosWithDebug(cid) pos.y = pos.y - 1 doSendMagicEffect(pos, 0) local function doMetronome(cid, skill) if not isCreature(cid) then return true end docastspell(cid, skill) end addEvent(doMetronome, 200, cid, randommove) end
Se não, use os mesmos acima, não esqueça de adicionar no spells.xml.
5 - Agora, vá em talkactions/scripst, abra o move1.lua e substitua:
Por
local idd = getPlayerSlotItem(cid, 8).uid local move = getCreatureName(mypoke) == "Smeargle" and getItemAttribute(idd, "skt1") and movestable[getItemAttribute(idd, "skt1")].move1 or movestable[name].move1
Depois:
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
Por:
if it == "2" then if getItemAttribute(idd, "skt2") then move = movestable[getItemAttribute(idd, "skt2")].move2 else move = movestable[name].move2 end elseif it == "3" then if getItemAttribute(idd, "skt3") then move = movestable[getItemAttribute(idd, "skt3")].move3 else move = movestable[name].move3 end elseif it == "4" then if getItemAttribute(idd, "skt4") then move = movestable[getItemAttribute(idd, "skt4")].move4 else move = movestable[name].move4 end elseif it == "4" then if getItemAttribute(idd, "skt4") then move = movestable[getItemAttribute(idd, "skt4")].move4 else move = movestable[name].move4 end elseif it == "5" then if getItemAttribute(idd, "skt5") then move = movestable[getItemAttribute(idd, "skt5")].move5 else move = movestable[name].move5 end elseif it == "6" then if getItemAttribute(idd, "skt6") then move = movestable[getItemAttribute(idd, "skt6")].move6 else move = movestable[name].move6 end elseif it == "7" then if getItemAttribute(idd, "skt7") then move = movestable[getItemAttribute(idd, "skt7")].move7 else move = movestable[name].move7 end elseif it == "8" then if getItemAttribute(idd, "skt8") then move = movestable[getItemAttribute(idd, "skt8")].move8 else move = movestable[name].move8 end 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
Pronto, se tiver feito tudo certo, funcionará.
Como ficará:
Como usar:
Créditos: Eu(Todo o script)
[25/01/2020 20:39:21] [Error - Spell Interface]
[25/01/2020 20:39:21] data/spells/scripts/ps/Inferno.lua:onCastSpell
[25/01/2020 20:39:21] Description:
[25/01/2020 20:39:21] (luaGetThingFromPos) Tile not found
[25/01/2020 20:41:10] [Error - TalkAction Interface]
[25/01/2020 20:41:10] In a timer event called from:
[25/01/2020 20:41:10] data/talkactions/scripts/move1.lua:onSay
[25/01/2020 20:41:10] Description:
[25/01/2020 20:41:10] (luaGetThingFromPos) Tile not found









info
Grupo: Marquês
Registrado: 23/09/12
Posts: 1k
Reputação: +87
Gênero: Masculino
Ola, desculpa de for flood
o sistema esta optimo porem eu fui la pegar o Healing Wish (m7) e Moonblast (m8) da gardevoir (que foram adicionados recentemente por min) e quando fui usar no smeargle nada acontece só fala assim:
01:53 [ADM] Evary [501]: Smeargle, use Healing Wish!
01:53 [ADM] Evary [501]: m7
01:53 [ADM] Evary [501]: Smeargle, Moonblast!
01:53 [ADM] Evary [501]: m8
e no log aparesce
alguem?
Editado Dezembro 29 por josegvb