Postado Março 17, 2016 9 anos Mostrar conteúdo oculto Erro Golback.lua [17/03/2016 18:58:25] [Error - Action Interface] [17/03/2016 18:58:25] data/actions/scripts/goback.lua:onUse [17/03/2016 18:58:25] Description: [17/03/2016 18:58:25] (luaGetItemAttribute) Item not found ------------------------------------- Script \/ local EFFECTS = { --[OutfitID] = {Effect} ["Magmar"] = 35, ["Jynx"] = 17, --alterado v1.5 ["Shiny Jynx"] = 17, ["Piloswine"] = 205, --alterado v1.8 ["Swinub"] = 205, } function onUse(cid, item, frompos, item2, topos) if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1 then --alterado v1.9 << return true end local ballName = getItemAttribute(item.uid, "poke") local btype = getPokeballType(item.itemid) local usando = pokeballs[btype].use local effect = pokeballs[btype].effect if not effect then effect = 21 end unLock(item.uid) --alterado v1.8 if item.itemid == usando then if getPlayerStorageValue(cid, 990) == 1 then -- GYM doPlayerSendCancel(cid, "Você não pode retornar seu Pokémon durante uma batalha de ginásio.") return true end if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6 if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then BackTeam(cid) end end if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then doPlayerSendCancel(cid, "You can't do that while is controling a mind") return true --alterado v1.5 end if #getCreatureSummons(cid) <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "Seu Pokémon desmaiou.") return true end end local cd = getCD(item.uid, "blink", 30) if cd > 0 then setCD(item.uid, "blink", 0) end local z = getCreatureSummons(cid)[1] if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then return true end doReturnPokemon(cid, z, item, effect) elseif item.itemid == pokeballs[btype].on then if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then doPlayerSendCancel(cid, "Coloque a Pokébola no slot correto!") return TRUE end local thishp = getItemAttribute(item.uid, "hp") if thishp <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "Seu Pokémon desmaiou.") return true end end local pokemon = getItemAttribute(item.uid, "poke") if not pokes[pokemon] then return true end ----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto --------------------------------- if not isInArray({5, 6}, getPlayerGroupId(cid)) then local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) local low = {} local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"} if #balls >= 1 then for _, uid in ipairs(balls) do local nome = getItemAttribute(uid, "poke") if not isInArray(lowPokes, pokemon) and nome == pokemon then return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!") else if nome == pokemon then table.insert(low, nome) end end end end if #low >= 3 then return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!") end end --------------------------------------------------------------------------------------------------------------------------------------------------- local x = pokes[pokemon] local boost = getItemAttribute(item.uid, "boost") or 0 if getPlayerLevel(cid) < (x.level+boost) then doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.") return true end ---------------------------- Sistema pokes de clan -------------------------------------- local shinysClan = { ["Shiny Fearow"] = {4, "Wingeon"}, ["Shiny Flareon"] = {1, "Volcanic"}, ["Shiny Vaporeon"] = {2, "Seavel"}, ["Shiny Jolteon"] = {9, "Raibolt"}, ["Shiny Hypno"] = {7, "Psycraft"}, ["Shiny Golem"] = {3, "Orebound"}, ["Shiny Vileplume"] = {8, "Naturia"}, ["Shiny Nidoking"] = {5, "Malefic"}, ["Shiny Hitmontop"] = {6, "Gardestrike"}, --alterado v1.4 } if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then --alterado v1.9 \/ if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!") return true elseif getPlayerClanRank(cid) ~= 5 then doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!") return true end end -------------------------------------------------------------------------------------- doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end ------------------------passiva hitmonchan------------------------------ if isSummon(pk) then --alterado v1.8 \/ if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then if not getItemAttribute(item.uid, "hands") then doSetItemAttribute(item.uid, "hands", 0) end local hands = getItemAttribute(item.uid, "hands") doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1) end end ------------------------------------------------------------------------- ---------movement magmar, jynx------------- if EFFECTS[getCreatureName(pk)] then markPosEff(pk, getThingPos(pk)) sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk)) end -------------------------------------------------------------------------- if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited local left = getItemAttribute(item.uid, "transLeft") local name = getItemAttribute(item.uid, "transName") if left and left > 0 then setPlayerStorageValue(pk, 1010, name) doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1) addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn")) doItemSetAttribute(item.uid, "transBegin", os.clock()) else setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited end end if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end doCreatureSetLookDir(pk, 2) adjustStatus(pk, item.uid, true, true, true) doAddPokemonInOwnList(cid, pokemon) doTransformItem(item.uid, item.itemid+1) local pokename = getPokeName(pk) --alterado v1.7 local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename) doCreatureSay(cid, mgo, TALKTYPE_SAY) doSendMagicEffect(getCreaturePosition(pk), effect) if useOTClient then doPlayerSendCancel(cid, '12//,show') --alterado v1.7 end else doPlayerSendCancel(cid, "Seu Pokémon desmaiou.") end if useKpdoDlls then doUpdateMoves(cid) end return true end =========================================Fim======================================== Erro Heal.lua [17/03/2016 18:05:31] [Error - Npc interface] [17/03/2016 18:05:31] data/npc/scripts/heal.lua:onCreatureSay [17/03/2016 18:05:31] Description: [17/03/2016 18:05:31] (luaGetItemAttribute) Item not found ------------------------------------------------------- Script \/ local posis = { --[storage da city] = {pos da nurse na city}, [897530] = {x = 1038, y = 1033, z = 7}, --saffron --alterado v1.9 \/ [897531] = {x = 1044, y = 879, z = 7}, --cerulean [897532] = {x = 1189, y = 1021, z = 7}, --lavender [897533] = {x = 1199, y = 1475, z = 7}, --fuchsia [897534] = {x = 847, y = 1011, z = 6}, --celadon [897535] = {x = 689, y = 1065, z = 7}, --viridian [897536] = {x = 1029, y = 1224, z = 7}, --vermilion [897537] = {x = 703, y = 834, z = 7}, --pewter [897538] = {x = 744, y = 1324, z = 7}, --cinnabar [897539] = {x = 1429, y = 1597, z = 6}, --snow [897540] = {x = 542, y = 675, z = 7}, --golden [897541] = {x = 1520, y = 2502, z = 7}, --Black City [897542] = {x = 1491, y = 1817, z = 7}, --Sunshine [897543] = {x = 244, y = 1294, z = 7}, --Mahogany [897544] = {x = 1014, y = 1023, z = 3}, --Pvp } function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Ate mais treinador!') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid for a, b in pairs(gobackmsgs) do local gm = string.gsub(b.go, "doka!", "") local bm = string.gsub(b.back, "doka!", "") if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then return true end end if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then if exhaustion.get(cid, 9211) then selfSay('Please wait a few moment before asking me to heal your pokemons again!') return true end if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then selfSay("Please, get inside the pokémon center to heal your pokemons!") return true end if getPlayerStorageValue(cid, 52480) >= 1 then selfSay("You can't do that while in a Duel!") --alterado v1.6.1 return true end for e, f in pairs(posis) do local pos = getThingPos(getNpcCid()) if isPosEqual(pos, f) then if getPlayerStorageValue(cid, e) <= -1 then --alterado v1.7 setPlayerStorageValue(cid, e, 1) end end end exhaustion.set(cid, 9211, 5) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) doCureStatus(cid, "all", true) doSendMagicEffect(getThingPos(cid), 14) local mypb = getPlayerSlotItem(cid, 8) if #getCreatureSummons(cid) >= 1 then if not nurseHealsPokemonOut then selfSay("Please, return your pokemon to his ball!") return true end local s = getCreatureSummons(cid)[1] doCreatureAddHealth(s, getCreatureMaxHealth(s)) doSendMagicEffect(getThingPos(s), 14) doCureStatus(s, "all", false) if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then setPlayerStorageValue(s, 1008, baseNurseryHappiness) end if getPlayerStorageValue(s, 1009) > baseNurseryHunger then setPlayerStorageValue(s, 1009, baseNurseryHunger) end else if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then --alterado v1.3 doItemSetAttribute(mypb.uid, "hp", 1) if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger) end for c = 1, 15 do local str = "move"..c setCD(mypb.uid, str, 0) end if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness) end if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then for a, b in pairs (pokeballs) do if isInArray(b.all, mypb.itemid) then doTransformItem(mypb.uid, b.on) end end end end end local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local balls = getPokeballsInContainer(bp.uid) if #balls >= 1 then for _, uid in ipairs(balls) do doItemSetAttribute(uid, "hp", 1) for c = 1, 15 do local str = "move"..c setCD(uid, str, 0) end if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then doItemSetAttribute(uid, "hunger", baseNurseryHunger) end if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then doItemSetAttribute(uid, "happy", baseNurseryHappiness) end local this = getThing(uid) for a, b in pairs (pokeballs) do if isInArray(b.all, this.itemid) then doTransformItem(uid, b.on) end end end end selfSay('There you go! You and your pokemons are healthy again.') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end end end Editado Março 17, 2016 9 anos por eliaszinho Erros meu ao escrever (veja o histórico de edições)
Postado Março 18, 2016 9 anos no heal.lua lá no final do script, Troque: selfSay('There you go! You and your pokemons are healthy again.') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end end end Por: selfSay('There you go! You and your pokemons are healthy again.') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end if useOTClient then onPokeHealthChange(cid) --alterei aki end end end
Postado Março 18, 2016 9 anos Autor Em 18/03/2016 em 17:51, samlecter disse: no heal.lua lá no final do script, Troque: selfSay('There you go! You and your pokemons are healthy again.') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end end end Por: selfSay('There you go! You and your pokemons are healthy again.') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end if useOTClient then onPokeHealthChange(cid) --alterei aki end end end mano me passa o seu script heal.lua ? e o xml q ta no seu server e q esse heal.lua meu eu ja editei ele tanto q nem sei se ele ta certo mas
Postado Março 18, 2016 9 anos heal.lua Mostrar conteúdo oculto local posis = { --[storage da city] = {pos da nurse na city}, [897530] = {x = 1054, y = 1050, z = 7}, --saffron --alterado v1.9 \/ [897531] = {x = 1061, y = 900, z = 7}, --cerulean [897532] = {x = 1203, y = 1040, z = 7}, --lavender [897533] = {x = 1213, y = 1321, z = 7}, --fuchsia [897534] = {x = 860, y = 1094, z = 6}, --celadon [897535] = {x = 706, y = 1083, z = 7}, --viridian [897536] = {x = 1073, y = 1233, z = 7}, --vermilion [897537] = {x = 723, y = 844, z = 7}, --pewter [897538] = {x = 848, y = 1394, z = 7}, --cinnabar [897539] = {x = 1429, y = 1597, z = 6}, --snow [897540] = {x = 258, y = 429, z = 7}, --golden [897541] = {x = 243, y = 1028, z = 7}, -- Hammlin [897542] = {x = 268, y = 1163, z = 7}, -- Shamouti [897543] = {x = 252, y = 1260, z = 6}, -- Ascordbia [897544] = {x = 2612, y = 985, z = 7}, -- Vip 1 [897545] = {x = 2680, y = 675, z = 7}, -- Vip 2 [897546] = {x = 2559, y = 444, z = 5}, -- Vip 3 [897546] = {x = 2559, y = 444, z = 5}, -- Pallet [897546] = {x = 652, y = 1171, z = 7}, -- Coliseum [897546] = {x = 1163, y = 1450, z = 13}, -- Outland north [897546] = {x = 1509, y = 1290, z = 13}, -- outland west [897546] = {x = 1152, y = 1068, z = 13}, -- outland sul } function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye sir!') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid for a, b in pairs(gobackmsgs) do local gm = string.gsub(b.go, "doka!", "") local bm = string.gsub(b.back, "doka!", "") if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then return true end end if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then if exhaustion.get(cid, 9211) then selfSay('Por Favor espere um momento para eu por curar novamente seus Pokemons!') return true end if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then selfSay("Por Favor, entre no Centro Pokemon para eu poder curar seus Pokemons!") return true end if getPlayerStorageValue(cid, 52480) >= 1 then selfSay("Não possu curar seus Pokemons enquanto você está em Duel!") --alterado v1.6.1 return true end exhaustion.set(cid, 9211, 1) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) doCureStatus(cid, "all", true) doSendMagicEffect(getThingPos(cid), 103) local mypb = getPlayerSlotItem(cid, 8) if #getCreatureSummons(cid) >= 1 then if not nurseHealsPokemonOut then selfSay("Please, return your pokemon to his ball!") return true end local s = getCreatureSummons(cid)[1] doCreatureAddHealth(s, getCreatureMaxHealth(s)) doSendMagicEffect(getThingPos(s), 13) doCureStatus(s, "all", false) if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then setPlayerStorageValue(s, 1008, baseNurseryHappiness) end if getPlayerStorageValue(s, 1009) > baseNurseryHunger then setPlayerStorageValue(s, 1009, baseNurseryHunger) end else if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then --alterado v1.3 doItemSetAttribute(mypb.uid, "hp", 1) if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger) end for c = 1, 15 do local str = "move"..c setCD(mypb.uid, str, 0) end if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness) end if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then for a, b in pairs (pokeballs) do if isInArray(b.all, mypb.itemid) then doTransformItem(mypb.uid, b.on) end end end end end local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local balls = getPokeballsInContainer(bp.uid) if #balls >= 1 then for _, uid in ipairs(balls) do doItemSetAttribute(uid, "hp", 1) for c = 1, 15 do local str = "move"..c setCD(uid, str, 0) end if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then doItemSetAttribute(uid, "hunger", baseNurseryHunger) end if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then doItemSetAttribute(uid, "happy", baseNurseryHappiness) end local this = getThing(uid) for a, b in pairs (pokeballs) do if isInArray(b.all, this.itemid) then doTransformItem(uid, b.on) end end end end selfSay('Seus todos os seus Pokemons foram curados, Boa Sorte em sua jornada!') if useKpdoDlls then --alterado v1.7 doUpdateMoves(cid) end if useOTClient then onPokeHealthChange(cid) --alterei aki end end end Copia a partir de function onThingMove(creature, thing, oldpos, oldstackpos) end Pq em cima disso, é relativo as cidades do seu ot, o meu ta diferente do seu. ... Achei 2 diferenças só, aquele final que eu falei pra alterar, e o seu tem um pedaço que não tem no meu, esse aqui: for e, f in pairs(posis) do local pos = getThingPos(getNpcCid()) if isPosEqual(pos, f) then if getPlayerStorageValue(cid, e) <= -1 then --alterado v1.7 setPlayerStorageValue(cid, e, 1) end end end Isso /\ fica em cima dessa parte: -- ... exhaustion.set(cid, 9211, 5) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) doCureStatus(cid, "all", true) doSendMagicEffect(getThingPos(cid), 14) local mypb = getPlayerSlotItem(cid, 8) -- ... Editado Março 18, 2016 9 anos por samlecter (veja o histórico de edições)
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.