Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Olá, gostaria de uma ajuda para resolver esses bugs da distro do meu Server. É o pokexcyan.
Dou rep++ quem me ajudar a resolve-los;
Vou agradecer muito.

1º - CREATEPOKEBALL.LUA + SCRIPT -  [CRÉDITOS POR CONCERTAR - ANNAFEEH]
ERROR

[22/08/2014 01:09:04] [Error - TalkAction Interface]


[22/08/2014 01:09:04] data/talkactions/scripts/createpokeball.lua:onSay
[22/08/2014 01:09:04] Description:
[22/08/2014 01:09:04] data/talkactions/scripts/createpokeball.lua:98: attempt to index local 'x' (a nil value)
[22/08/2014 01:09:04] stack traceback:
[22/08/2014 01:09:04] data/talkactions/scripts/createpokeball.lua:98: in function
[22/08/2014 01:09:04]


SCRIPT

function onSay(cid, words, param)



local typess = {
[1] = "normal",
[2] = "great",
[3] = "super",
[4] = "ultra"
}

if param == "" then
doPlayerSendCancel(cid, 'Command needs parameters, function structure: "/cb [Pokemon Name], [boost], [Gender]".')
return 0
end

local t = string.explode(param, ",")

local name = ""
local gender = 0
local btype = typess[math.random(1, 4)] --"normal"
local typeee = typess[math.random(1, 4)]

if t[1] then
local n = string.explode(t[1], " ")
local str = string.sub(n[1], 1, 1)
local sta = string.sub(n[1], 2, string.len(n[1]))
name = ""..string.upper(str)..""..string.lower(sta)..""
if n[2] then
str = string.sub(n[2], 1, 1)
sta = string.sub(n[2], 2, string.len(n[2]))
name = name.." "..string.upper(str)..""..string.lower(sta)..""
end
if not pokes[name] then
doPlayerSendCancel(cid, "Sorry, a pokemon with the name "..name.." doesn't exists.")
return true
end
print(""..name.." ball has been created by "..getPlayerName(cid)..".")
end

local genders = {
["male"] = 4,
["female"] = 3,
["1"] = 4,
["0"] = 3}

if t[3] then
if genders[t[3]] then
gender = genders[t[3]]
else
local rate = newpokedex[name].gender
if rate == 0 then
gender = 3
elseif rate == 1000 then
gender = 4
elseif rate == -1 then
gender = 0
elseif math.random(1, 1000) <= rate then
gender = 4
else
gender = 3
end
end
else
local rate = newpokedex[name].gender
if rate == 0 then
gender = 3
elseif rate == 1000 then
gender = 4
elseif rate == -1 then
gender = 0
elseif math.random(1, 1000) <= rate then
gender = 4
else
gender = 3
end
end

local mypoke = pokes[name]
local happy = 255

local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", name)
doItemSetAttribute(item, "hp", 1)
if t[2] and tonumber(t[2]) > 0 and tonumber(t[2]) <= 50 then
doItemSetAttribute(item, "boost", tonumber(t[2]))
end
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
if name == "Shiny Hitmonchan" or name == "Hitmonchan" then
doItemSetAttribute(item, "hands", 0)
end
doItemSetAttribute(item, "description", "Contains a "..name..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..name..".")
local x = icons[getItemAttribute(item, "poke")]
doPlayerAddItemEx(cid, item, true)
doItemSetAttribute(item, "ball", "Icone")
doItemSetAttribute(item, "icon", "yes")
doItemSetAttribute(item, "morta", "no")
doTransformItem(item, x.on)
return 1
end



2º - NPC DALK + SCRIPT [CRÉDITOS POR CONCERTAR - ANNAFEEH]
ERROR

[22/08/2014 01:05:29] [Error - Npc interface]


[22/08/2014 01:05:29] data/npc/scripts/dalk.lua:onCreatureSay
[22/08/2014 01:05:29] Description:
[22/08/2014 01:05:29] data/npc/scripts/dalk.lua:68: attempt to index global 'places' (a nil value)
[22/08/2014 01:05:29] stack traceback:
[22/08/2014 01:05:29] data/npc/scripts/dalk.lua:68: in function 'callback'
[22/08/2014 01:05:29] data/npc/lib/npcsystem/npchandler.lua:391: in function 'onCreatureSay'
[22/08/2014 01:05:29] data/npc/scripts/dalk.lua:7: in function


SCRIPT

local keywordHandler = KeywordHandler:new()


local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
msg = string.lower(msg)
---------
local configs = {
diamondsID = 2145, --id do diamond no items.xml/otb... (achu q vais ter q criar, ou pegar algum item q ja tenha ae...)
VIP = {days = 30, cost = 10}, --days = qnts dias de VIP o player compra por vez.... cost = custo para virar VIP...
SEX = {cost = 3}, --cost = custo para trocar de sexo...
}



if (msgcontains(msg, 'diamond account') or msgcontains(msg, 'diamond')) then
selfSay("You want to buy a diamond account and be VIP for "..configs.VIP.days.." days? It will cost "..configs.VIP.cost.." diamonds!", cid)
talkState[talkUser] = 2
return true

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then
if getPlayerItemCount(cid, configs.diamondsID) >= configs.VIP.cost then
selfSay("Ok then, now you have "..configs.VIP.days.." days of VIP! Enjoy!", cid)
doPlayerAddPremiumDays(cid, configs.VIP.days)
doPlayerRemoveItem(cid, configs.diamondsID, configs.VIP.cost)
talkState[talkUser] = 0
return true
else
selfSay("You need atleast "..configs.VIP.cost.." diamonds to do that!", cid)
talkState[talkUser] = 0
return true
end

elseif (msgcontains(msg, 'sex change') or msgcontains(msg, 'sex')) then
selfSay("So you want to change of sex? It will cost "..configs.SEX.cost.." diamonds", cid)
talkState[talkUser] = 3
return true

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then
if getPlayerItemCount(cid, configs.diamondsID) >= configs.SEX.cost then
local sex = getPlayerSex(cid)
selfSay("Ok then, now you are of the sex "..(sex == 0 and "female" or "male")..". Enjoy!", cid)
doPlayerSetSex(cid, (sex == 0 and 1 or 0))
doPlayerRemoveItem(cid, configs.diamondsID, configs.SEX.cost)
talkState[talkUser] = 0
return true
else
selfSay("You need atleast "..configs.SEX.cost.." diamonds to do that!", cid)
talkState[talkUser] = 0
return true
end


elseif msgcontains(msg, 'yes') and talkState[talkUser] == 4 then
selfSay("Ok then, tell me what city do you want?", cid)
talkState[talkUser] = 5
return true

elseif places[msg] and talkState[talkUser] == 5 then
if getPlayerItemCount(cid, configs.diamondsID) >= configs.TOWN.cost then
selfSay("Done, enjoy your new city!", cid)
doPlayerSetTown(cid, places[msg])
doPlayerRemoveItem(cid, configs.diamondsID, configs.TOWN.cost)
talkState[talkUser] = 0
return true
else
selfSay("You need atleast "..configs.TOWN.cost.." diamonds to do that!", cid)
talkState[talkUser] = 0
return true
end

elseif msgcontains(msg, 'no') then
selfSay("Ok then, tell me again what you want...", cid)
talkState[talkUser] = 0
return true
end

return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())



3º - ERROS DE MOVES – SE PRECISAR DE ALGUM SCRIPT FAVOR PEDIR, QUE EU ANEXO. [PROCURANDO RESOLVER PELO CONFIGURATION.LUA OU XML DO POKE]
ERROR

[22/08/2014 03:17:49] Error trying to use move Bubbles, move not specified in the pokemon table.


[22/08/2014 03:17:51] Error trying to use move Psywave, move not specified in the pokemon table.
[22/08/2014 03:17:52] Error trying to use move Psy Pulse, move not specified in the pokemon table.
[22/08/2014 03:18:19] Error trying to use move Acid, move not specified in the pokemon table.
[22/08/2014 03:18:27] Error trying to use move Mud Shot, move not specified in the pokemon table.
[22/08/2014 03:18:29] Error trying to use move Poison Sting, move not specified in the pokemon table.
[22/08/2014 03:18:59] Error trying to use move Waterball, move not specified in the pokemon table.
[22/08/2014 03:19:00] Error trying to use move Hydropump, move not specified in the pokemon table.
[22/08/2014 03:19:07] Error trying to use move Super Sonic, move not specified in the pokemon table.
[22/08/2014 03:19:39] Error trying to use move Poison Bomb, move not specified in the pokemon table.



4º - BOX + SCRIPT  CRÉDITOS POR CONCERTAR - ANNAFEEH]
ERROR

[22/08/2014 01:59:59] [Error - Action Interface]


[22/08/2014 01:59:59] data/actions/scripts/box.lua:onUse
[22/08/2014 01:59:59] Description:
[22/08/2014 01:59:59] (luaDoTransformItem) Item not found


SCRIPT

local a = {



[11638] = {pokemons = {"Slowpoke", "Magnemite", "Doduo", "Seel", "Grimer", "Gastly", "Drowzee", "Voltorb", "Cubone", "Koffing", "Cyndaquil", "Pidgeotto", "Weepinbell", "Wooper", "Dratini", "Dunsparce", "Pichu", "Slugma", "Remoraid", "Ledyba", "Goldeen", "Vulpix", "Tentacool", "Bulbasaur", "Charmander", "Squirtle", "Metapod", "Kakuna", "Teddiursa", "Chikorita", "Chinchou", "Cleffa", "Marill", "Natu", "Smoochum", "Phanpy", "Slugma", "Ekans", "Abra", "Mankey", "Psyduck", "Sandshrew", "Kabuto", "Beedrill", "Omanyte", "Butterfree", "Snubbul", "Togepi", "Zubat", "Diglett", "Venonat", "Shuckle", "Mareep", "Meowth", "Poliwag", "Growlithe", "Machop", "Ponyta", "Geodude", "Hoothoot", "Pineco", "Sentret", "Swinub", "Totodile"}},

[11639] = {pokemons = {"Skiploom", "Raticate", "Ariados", "Flaffy", "Delibird", "Fearow", "Clefairy", "Arbok", "Nidorino", "Nidorina", "Elekid", "Magby", "Ledian", "Dodrio", "Golbat", "Gloom", "Parasect", "Venomoth", "Dugtrio", "Persian", "Poliwhirl", "Machoke", "Quilava", "Yanma", "Graveler", "Slowbro", "Magneton", "Farfetch'd", "Haunter", "Kingler", "Electrode", "Weezing", "Seadra", "Bayleef", "Croconaw", "Qwilfish", "Tyrogue", "Jigglypuff", "Seaking", "Tauros", "Starmie", "Eevee", "Charmeleon", "Wartortle", "Ivysaur", "Pikachu"}},

[11640] = {pokemons = {"Politoed", "Magcargo", "Noctowl", "Poliwrath", "Nidoking", "Pidgeot", "Sandslash", "Ninetales", "Vileplume", "Primeape", "Nidoqueen", "Granbull", "Jumpluff", "Golduck", "Kadabra", "Rapidash", "Azumarill", "Murkrow", "Clefable", "Wigglytuff", "Dewgong", "Onix", "Cloyster", "Hypno", "Exeggutor", "Marowak", "Hitmonchan", "Quagsire", "Stantler", "Xatu", "Hitmonlee", "Bellossom", "Lanturn", "Pupitar", "Smeargle", "Lickitung", "Golem", "Chansey", "Tangela", "Mr. Mime", "Pinsir", "Espeon", "Umbreon", "Vaporeon", "Jolteon", "Flareon", "Porygon", "Dragonair", "Hitmontop", "Octillery", "Sneasel"}},

[11641] = {pokemons = {"Shiny Hitmonlee", "Shiny Hitmonchan", "Dragonite", "Snorlax", "Kabutops", "Omastar", "Kingdra", "Ampharos", "Blissey", "Donphan", "Girafarig", "Mantine", "Miltank", "Porygon2", "Skarmory", "Lapras", "Gyarados", "Magmar", "Electabuzz", "Jynx", "Scyther", "Kangaskhan", "Venusaur", "Crobat", "Heracross", "Meganium", "Piloswine", "Scizor", "Machamp", "Arcanine", "Charizard", "Blastoise", "Tentacruel", "Alakazam", "Feraligatr", "Houndoom", "Gengar", "Rhydon", "Misdreavus", "Wobbuffet", "Raichu", "Slowking", "Steelix", "Sudowoodo", "Typhlosion", "Tyranitar", "Ursaring"}},

[12331] = {pokemons = {"Shiny Abra"}},

[12227] = {pokemons = {"Shiny Crobat", "Shiny Magmar", "Shiny Giant Magikarp", "Shiny Venusaur", "Shiny Charizard", "Shiny Blastoise", "Shiny Arcanine", "Shiny Alakazam", "Shiny Ninetales", "Shiny Gengar", "Shiny Scyther", "Shiny Rhydon", "Shiny Umbreon", "Shiny Pidgeot", "Shiny Raichu", "Shiny Tentacruel", "Shiny Ampharos", "Shiny Feraligatr", "Shiny Meganium", "Shiny Jynx", "Shiny Electabuzz", "Shiny Gyarados", "Shiny Snorlax", "Shiny Tangela", "Shiny Ariados", "Shiny Politoed", "Shiny Typhlosion", "Shiny Tauros", "Shiny Butterfree", "Shiny Beedrill", "Shiny Venomoth", "Shiny Espeon", "Shiny Magneton", "Shiny Onix", "Shiny Larvitar", "Shiny Pupitar", "Shiny Machamp", "Shiny Golbat", "Shiny Kingler", "Shiny Dodrio", "Shiny Farfetch'd", "Shiny Parasect", "Shiny Pinsir", "Shiny Zubat", "Shiny Dratini", "Shiny Venonat", "Shiny Electrode", "Shiny Muk", "Shiny Stantler", "Shiny Marowak", "Shiny Seadra", "Shiny Dragonair", "Shiny Mr. Mime"}}
}

local happy = 1000

function onUse(cid, item, frompos, item2, topos)
local b = a[item.itemid]
if not b then return true end
local pokemon = b.pokemons[math.random(#b.pokemons)]
if not pokes[pokemon] then return true end

doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!")
doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon..", congratulations!")
doSendMagicEffect(getThingPos(cid), 29)

addPokeToPlayer(cid, pokemon, 0, nil, btype) --alterado v1.9
doRemoveItem(item.uid, 1)
if useOTClient then
doCreatureExecuteTalkAction(cid, "/salvar")
end

return true
end



5º - DUPLICATE UNIQUEID  [RME - Exclui o UniqueID 3544 que está duplicado]
ERROR

[22/08/2014 00:35:35] Duplicate uniqueId 3544



6º - ORDER.LUA
ERROR

[21/08/2014 23:40:28] [Error - Action Interface]


[21/08/2014 23:40:28] In a timer event called from:
[21/08/2014 23:40:28] data/actions/scripts/order.lua:onUse
[21/08/2014 23:40:28] Description:
[21/08/2014 23:40:28] (luaDoCreateMonster) Cannot create monster: Noctowl

[21/08/2014 23:40:28] [Error - Action Interface]
[21/08/2014 23:40:28] In a timer event called from:
[21/08/2014 23:40:28] data/actions/scripts/order.lua:onUse
[21/08/2014 23:40:28] Description:
[21/08/2014 23:40:28] (luadoSetMonsterPassive) Creature not found

[21/08/2014 23:41:02] [Error - Action Interface]
[21/08/2014 23:41:02] In a timer event called from:
[21/08/2014 23:41:02] data/actions/scripts/order.lua:onUse
[21/08/2014 23:41:02] Description:
[21/08/2014 23:41:02] (luaDoCreateMonster) Cannot create monster: Pinsir

[21/08/2014 23:43:36] [Error - Action Interface]
[21/08/2014 23:43:36] In a timer event called from:
[21/08/2014 23:43:36] data/actions/scripts/order.lua:onUse
[21/08/2014 23:43:36] Description:
[21/08/2014 23:43:36] (luaDoCreateMonster) Cannot create monster: Butterfree

[21/08/2014 23:43:56] [Error - Action Interface]
[21/08/2014 23:43:56] In a timer event called from:
[21/08/2014 23:43:56] data/actions/scripts/order.lua:onUse
[21/08/2014 23:43:56] Description:
[21/08/2014 23:43:56] (luaDoCreateMonster) Cannot create monster: Yanma

[21/08/2014 23:44:23] [Error - Action Interface]
[21/08/2014 23:44:23] In a timer event called from:
[21/08/2014 23:44:23] data/actions/scripts/order.lua:onUse
[21/08/2014 23:44:24] Description:
[21/08/2014 23:44:24] (luaDoCreateMonster) Cannot create monster: Xatu


SCRIPT

local skills = specialabilities


local surfborders = {4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663}
local storages = {17000, 63215, 17001, 13008, 5700} --alterado v1.9 \/
local unfix = {x = 1, y = 1, z = 1}

local txt = {
["rock smash"] = {"break that rock!", "smash that rock!", "destroy that rock!", "smash it!", "break it!", "destroy it!"},
["cut"] = {"cut that bush!", "cut it down!", "cut it off!", "cut off that bush!", "cut down that bush!", "cut that bush down!"},
["move"] = {"move!", "move there!", "go there!", "walk there!"},
["light"] = {"flash!", "light!", "flash this place!", "light up this place!"},
["dig"] = {"open that hole!", "dig that hole!", "open it!", "dig it!"},
["blink"] = {"teleport there!", "blink there!", "blink!", "teleport!"},
["ride"] = {"let me ride you!", "let's ride!", "let me mount you!", "let me get on you!"},
["fly"] = {"let's fly!", "let me get on you!"} ,
["untransform"] = {"go back to normal!", "transform into yourself again!", "stop transformation!"},
["headbutt"] = {"headbutt on three", "headbutt that three!", "headbutt it off"},
["levitate_fly"] = {"let's levitate!", "let me get on you!", "let's scary someone!"}, --alterado v1.8
}

function onUse(cid, item, frompos, item2, topos)
local checkpos = topos
checkpos.stackpos = 0

if getPlayerStorageValue(cid, 75846) >= 1 then return true end --alterado v1.9

if getTileThingByPos(checkpos).uid <= 0 then return true end

--------END FLY/RIDE --------
if getCreatureCondition(cid, CONDITION_OUTFIT) and (item2.uid == cid or getRecorderPlayer(topos) == cid) and (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1) then

if isInArray({460, 11675, 11676, 11677}, getTileInfo(getThingPos(cid)).itemid) then
doPlayerSendCancel(cid, "You can\'t stop flying at this height!")
return true
end

local item = getPlayerSlotItem(cid, 8)
local pokemon = getItemAttribute(item.uid, "poke")
local x = pokes[pokemon]

if getTileInfo(getThingPos(cid)).itemid >= 4820 and getTileInfo(getThingPos(cid)).itemid <= 4825 then
doPlayerSendCancel(cid, "You can\'t stop flying above the water!")
return true
end

doSummonMonster(cid, pokemon)

local pk = getCreatureSummons(cid)[1]

if not isCreature(pk) then
pk = doCreateMonster(pokemon, backupPos)
if not isCreature(pk) then
doPlayerSendCancel(cid, "You can't stop flying/riding here.")
return true
end
doConvinceCreature(cid, pk)
end

doTeleportThing(pk, getThingPos(cid), false)
doCreatureSetLookDir(pk, getCreatureLookDir(cid))

adjustStatus(pk, item.uid, true, false, true)

doPlayerSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", let me get down!", 1)

doRegainSpeed(cid)

doRemoveCondition(cid, CONDITION_OUTFIT)
setPlayerStorageValue(cid, 17000, -1)
setPlayerStorageValue(cid, 17001, -1)

if useOTClient then
doUpdateMoves(cid)
doPlayerSendCancel(cid, '12//,show') --alterado aki
end

return true
end
-----------------------------
local player = getRecorderPlayer(topos) --alterado v1.8 \/
-------- DUEL SYSTEM ------------------------
if isPlayer(player) and player ~= cid and getPlayerStorageValue(player, 6598754) <= -1 and getPlayerStorageValue(player, 52480) <= -1 then
if getPlayerStorageValue(cid, 52480) <= -1 or (getPlayerStorageValue(cid, 52481) >= 1 and getPlayerStorageValue(cid, 52482) ~= -1) then
---
for s = 1, #storages do
if getPlayerStorageValue(cid, storages) >= 1 then
return doPlayerSendTextMessage(cid, 20, "You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!")
end
end
if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then
return doPlayerSendTextMessage(cid, 20, "You can't do that while in PVP zone!")
end
if #getCreatureSummons(cid) < 1 then
return doPlayerSendTextMessage(cid, 20, "You need a pokemon to invit someone to duel!")
end
---
if getPlayerStorageValue(cid, 52480) <= -1 then
doPlayerSetVocation(cid, 7)
openChannelDialog(cid)
setPlayerStorageValue(cid, 52480, 1)
setPlayerStorageValue(cid, 6598754, 5)
setPlayerStorageValue(cid, 52482, getCreatureName(cid)..",")
setPlayerStorageValue(cid, 52483, getCreatureName(player)..",")
doCreatureSetSkullType(cid, 2)
doSendAnimatedText(getThingPosWithDebug(cid), "FIRST TEAM", 215)
return true
elseif getPlayerStorageValue(cid, 52481) >= 1 and getPlayerStorageValue(cid, 52482) ~= -1 then
local t1 = string.explode(getPlayerStorageValue(cid, 52482), ",")
local t2 = string.explode(getPlayerStorageValue(cid, 52483), ",")

if (#t1 >= getPlayerStorageValue(cid, 52480) and #t2 >= getPlayerStorageValue(cid, 52480)) or (isInArray(t1, getCreatureName(player)) or isInArray(t2, getCreatureName(player))) then
return true
end

local sto2, sto3, name = getPlayerStorageValue(cid, 52482), getPlayerStorageValue(cid, 52483), getCreatureName(player)
if getPlayerStorageValue(cid, 52480) == 2 then
setPlayerStorageValue(cid, 52483, sto3.. name..",") --time adversario
doSendAnimatedText(getThingPosWithDebug(player), "SECOND TEAM", 215)
elseif getPlayerStorageValue(cid, 52480) == 3 and #t1 < 3 then
setPlayerStorageValue(cid, 52482, sto2.. name..",") --time aliado
doSendAnimatedText(getThingPosWithDebug(player), "FIRST TEAM", 215)
elseif getPlayerStorageValue(cid, 52480) == 3 and #t1 >= 3 then
setPlayerStorageValue(cid, 52483, sto3.. name..",") --time adversario
doSendAnimatedText(getThingPosWithDebug(player), "SECOND TEAM", 215)
end

setPlayerStorageValue(player, 52481, getPlayerStorageValue(cid, 52481))
setPlayerStorageValue(player, 52485, getCreatureName(cid))

local players, pokes = getPlayerStorageValue(cid, 52480), getPlayerStorageValue(cid, 52481)

local str = {}
table.insert(str, getCreatureName(cid).." is inviting you to a duel! Use order in him to accept it!\n")
table.insert(str, "Info Battle: Duel "..players.."x"..players.." - "..pokes.." pokes.") --alterado aki

doPlayerSendTextMessage(player, 20, table.concat(str))
return true
end
end
---
elseif isPlayer(player) and player ~= cid and getPlayerStorageValue(player, 6598754) == 5 and getPlayerStorageValue(player, 52481) >= 1 then

local t1 = string.explode(getPlayerStorageValue(player, 52482), ",")
local t2 = string.explode(getPlayerStorageValue(player, 52483), ",")
---
if not isInArray(t1, getCreatureName(cid)) and not isInArray(t2, getCreatureName(cid)) then
return true
end
---
for s = 1, #storages do
if getPlayerStorageValue(cid, storages) >= 1 then
return doPlayerSendTextMessage(cid, 20, "You can't do that while is Flying, Riding, Surfing, Diving or mount a bike!")
end
end
if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then
return doPlayerSendTextMessage(cid, 20, "You can't do that while in PVP zone!")
end
local pokes = getLivePokeballs(cid, getPlayerSlotItem(cid, 3).uid, true)
if #pokes < getPlayerStorageValue(player, 52481) then
return doPlayerSendTextMessage(cid, 20, "You need atleast ".. getPlayerStorageValue(player, 52481).." pokemons to duel with this person!")
end
if getPlayerStorageValue(cid, 52482) ~= -1 then
return doPlayerSendTextMessage(cid, 20, "You already invit someone to duel!")
end
if #getCreatureSummons(cid) < 1 then
return doPlayerSendTextMessage(cid, 20, "You need a pokemon to accept a duel!")
end
---
setPlayerStorageValue(cid, 52480, getPlayerStorageValue(player, 52480))
setPlayerStorageValue(player, 52484, getPlayerStorageValue(player, 52484)-1)
if getPlayerStorageValue(player, 52484) == 0 then
for a = 1, #t1 do
local pid, sid = getPlayerByName(t1[a]), getPlayerByName(t2[a])
if not isCreature(pid) or getPlayerStorageValue(pid, 52480) <= -1 then
removeFromTableDuel(player, t1[a])
else
doCreatureSetSkullType(pid, 1)
end
if not isCreature(sid) or getPlayerStorageValue(sid, 52480) <= -1 then
removeFromTableDuel(player, t2[a])
else
doCreatureSetSkullType(sid, 1)
end
end
beginDuel(player, 6)
else
doCreatureSetSkullType(cid, 2)
end
doSendAnimatedText(getThingPos(cid), "BATTLE", COLOR_ELECTRIC)
return true

elseif isPlayer(player) and player == cid and getPlayerStorageValue(player, 52480) >= 1 then
doEndDuel(cid, true)
return true
end
------------------------------------------------------------------------------------

if #getCreatureSummons(cid) == 0 then return doPlayerSendCancel(cid, "You need a pokemon to use order!") end
if getCreatureNoMove(getCreatureSummons(cid)[1]) then return true end
markLP(getCreatureSummons(cid)[1], -1)

local marked = getMarkedPos(getCreatureSummons(cid)[1]) --alterado v1.8 \/

if type(marked) == "table" and marked.x == topos.x and marked.y == topos.y then
return true
end

local thisball = getPlayerSlotItem(cid, 8)
local mysum = getCreatureSummons(cid)[1]
local sid = mysum or cid
local maxMoveDist = getDistanceBetween(getThingPos(sid), topos) * 2 + 1

markPos(mysum, topos)
markOwnerPos(mysum, getThingPos(cid))

-------- ROCK SMASH ---------
if item2.itemid == 1285 and isInArray(skills["rock smash"], getPokemonName(mysum)) then

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["rock smash"][math.random(1, #txt["rock smash"])].."", 1)
addEvent(goThere, 500, mysum, topos, "rock smash", isCreature(getCreatureTarget(cid)))

return true
end
-----------------------------

-------- HEADBUTT -----------
if item2.itemid == 12591 and getPokemonLevel(mysum) >= 15 then --alterado v1.6
--id do item arvore normal
doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["headbutt"][math.random(1, #txt["headbutt"])].."", 1)
addEvent(goThere, 500, mysum, topos, "headbutt", isCreature(getCreatureTarget(cid)))

return true
end
-----------------------------

-------- CUT ----------------
if item2.itemid == 2767 and isInArray(skills["cut"], getPokemonName(mysum)) then

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["cut"][math.random(1, #txt["cut"])].."", 1)
addEvent(goThere, 500, mysum, topos, "cut", isCreature(getCreatureTarget(cid)))

return true
end
-----------------------------

-------- TRANSFORM ---------- --alterado v1.7
if (getCreatureName(mysum) == "Ditto") and getItemAttribute(thisball.uid, "ehditto") ~= -1 and isMonster(item2.uid) and pokes[getCreatureName(item2.uid)] then
local m = getCreatureMaster(cid)
local p = getPlayerSlotItem(m, 8)
local proibidossempre = {"Celebi", "Moltres", "Zapdos", "Suicune", "Entei", "Raikou", "Suicune", "Lugia", "Mewtwo", "Mew", "Shiny Rhydon", "Shiny Ariados", "Shiny Magneton", "Shiny Ninetales", "Shiny Politoed", "Shiny Stantler", "Shiny Dodrio", "Shiny Espeon", "Shiny Umbreon"} -- Nunca permitir
local proibidosboost = {"Shiny Dragonite", "Shiny Snorlax", "Shiny Gyarados", "Shiny Scyther"} -- Permitir se ditto for +50
local boost = getItemAttribute(thisball.uid, "boost") or 0
if getCreatureName(item2.uid) == "Ditto" or getCreatureName(item2.uid) == "Shiny Ditto" then
doPlayerSendCancel(cid, "Your ditto can't transform into another ditto.")
markPos(mysum, unfix)
return true
end
if isInArray(proibidossempre, getCreatureName(item2.uid)) then --Checa a lista
doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.")
markPos(mysum, unfix)
return true
end
if isInArray(proibidosboost, getCreatureName(item2.uid)) and boost < 50 then --Checa a lista
doPlayerSendCancel(cid, "Your ditto can't transform into that pokemon.")
markPos(mysum, unfix)
return true
end

if getCreatureName(item2.uid) == getPlayerStorageValue(mysum, 1010) then
doPlayerSendCancel(cid, "Your ditto is already transformed into that pokemon.")
markPos(mysum, unfix)
return true
end
markPos(mysum, unfix)
local name = getCreatureName(item2.uid)
setPlayerStorageValue(mysum, 1010, getCreatureName(item2.uid))
doItemSetAttribute(thisball.uid, "ehditto", 1)
doItemSetAttribute(thisball.uid, "poke", getCreatureName(item2.uid))
doUpdateMoves(cid)
doSetCreatureOutfit(mysum, getCreatureOutfit(item2.uid), -1)
doCreatureSay(mysum, "TRANSFORM!", TALKTYPE_MONSTER)
doFaceCreature(mysum, getThingPos(item2.uid))
doSendMagicEffect(getThingPos(mysum), 184)
doPlayerSay(cid, ""..getPokeName(mysum)..", transform into "..getArticle(name).." "..name.."!", 1)
return true
end
-----------------------------

-------- LIGHT --------------
if isMonster(item2.uid) and getCreatureMaster(item2.uid) == cid then

markPos(mysum, unfix)

if not isInArray(skills["light"], getPokemonName(item2.uid)) then
doPlayerSendCancel(cid, "Your pokemon can't use flash.")
return true
end

local cd = getCD(thisball.uid, "light", 30)

if cd > 0 then
doPlayerSendCancel(cid, "Your pokemon is too tired to use flash. Cooldown: ("..getStringmytempo(cd)..")")
return true
end

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["light"][math.random(1, #txt["light"])].."", 1)
doCreatureSay(mysum, "FLASH!", TALKTYPE_MONSTER)
doSendMagicEffect(getThingPos(mysum), 28)

local size = 5
size = size + math.floor(getSpecialAttack(mysum) / 60)
size = size + math.ceil(getPokemonLevel(mysum) / 60)

if size > 11 then
size = 11
end

doSetCreatureLight(mysum, size, 215, 600*1000)

local delay = math.floor(30 - getPokemonLevel(mysum) / 4)
if delay > 0 then
setCD(thisball.uid, "light", delay)
end

return true
end
-----------------------------


-------- DIG ----------------
if isInArray(skills["digholes"], item2.itemid) and isInArray(skills["dig"], getPokemonName(mysum)) then

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["dig"][math.random(1, #txt["dig"])].."", 1)
addEvent(goThere, 500, mysum, topos, "dig", isCreature(getCreatureTarget(cid)))

return true
end
-----------------------------


-------- BLINK / MOVE -------
if not isCreature(item2.uid) and isInArray(skills["blink"], getPokemonName(mysum)) then

local cd = getCD(thisball.uid, "blink", 30)

if getPlayerStorageValue(mysum, 2365487) == 1 then
return true --alterado v1.4
end

if cd > 0 or not canWalkOnPos(topos, false, false, true, true, true) then

doPlayerSendCancel(cid, "Blink cooldown: ("..getStringmytempo(cd)..")")
doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["move"][math.random(1, #txt["move"])].."", 1)
addEvent(goThere, 500, mysum, topos, "move", isCreature(getCreatureTarget(cid)), maxMoveDist)

return true
end

local CD = isShinyName(getCreatureName(mysum)) and 20 or 30 --edited blink

markPos(mysum, topos)
markOwnerPos(mysum, getThingPos(cid))
setCD(thisball.uid, "blink", CD)
doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["blink"][math.random(1, #txt["blink"])].."", 1)
doSendDistanceShoot(getThingPos(mysum), topos, 39)
doSendMagicEffect(getThingPos(mysum), 211)
doTeleportThing(mysum, topos, false)
doSendMagicEffect(topos, 134)
doCreatureSay(mysum, "BLINK!", TALKTYPE_MONSTER)
goThere(mysum, topos, "blink", isCreature(getCreatureTarget(cid))) --edited blink

return true
end
-----------------------------


----START FLY or RIDE or LEVITATE ---------
if (item2.uid == cid or getRecorderPlayer(topos) == cid) and (isInArray(skills["fly"], getPokemonName(mysum)) or isInArray(skills["ride"], getPokemonName(mysum)) or isInArray(skills["levitate_fly"], getPokemonName(mysum))) then
--alterado v1.8 >>
if getPlayerStorageValue(cid, 6598754) == 1 or getPlayerStorageValue(cid, 6598755) == 1 then
return doPlayerSendCancel(cid, "You can't do it while in the PVP Zone!") --alterado v1.7
end

if #getCreatureSummons(cid) > 1 then --alterado v1.9
return doPlayerSendCancel(cid, "You can't do it right now!")
end

if getPlayerStorageValue(cid, 52480) >= 1 then
return doPlayerSendCancel(cid, "You can't do it while a duel!") --alterado v1.6
end

if getPlayerStorageValue(cid, 5700) >= 1 then --alterado v1.9
doPlayerSendCancel(cid, "You can't do that while is mount in a bike!")
return true
end

if getPlayerStorageValue(cid, 22545) >= 1 and (isInArray(skills["fly"], getPokemonName(mysum)) or isInArray(skills["levitate_fly"], getPokemonName(mysum))) then
return doPlayerSendCancel(cid, "You can't do that while in the Golden Arena!") --alterado v1.8
end

local pct = getCreatureHealth(mysum) / getCreatureMaxHealth(mysum)
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", 1 - pct)

if isInArray(skills["fly"], getPokemonName(mysum)) then
doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["fly"][math.random(1, #txt["fly"])].."", 1)
addEvent(goThere, 500, mysum, topos, "fly", isCreature(getCreatureTarget(cid)))
elseif isInArray(skills["levitate_fly"], getPokemonName(mysum)) then
doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["levitate_fly"][math.random(1, #txt["levitate_fly"])].."", 1) --alterado v1.8
addEvent(goThere, 500, mysum, topos, "fly", isCreature(getCreatureTarget(cid)))
else
doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["ride"][math.random(1, #txt["ride"])].."", 1)
addEvent(goThere, 500, mysum, topos, "ride", isCreature(getCreatureTarget(cid)))
end

return true
end
-----------------------------
----------------------------------Control Mind-------------------------------------------- alterado v1.5
if isCreature(item2.uid) and ehMonstro(item2.uid) and isInArray(skills["control mind"], getCreatureName(mysum)) and item2.uid ~= mysum then
if not isCreature(item2.uid) then
return true
end

if isSleeping(mysum) then
return doPlayerSendCancel(cid, "Your pokemon is sleeping...zZzZ")
end

if getTileInfo(getThingPos(cid)).protection or getTileInfo(getThingPos(getCreatureSummons(cid)[1])).protection then
return doPlayerSendCancel(cid, "You or your pokemon are in Pz zone!")
end

if #getCreatureSummons(cid) == 2 then
return doPlayerSendCancel(cid, "You only can control one Pokemon!")
end

local cd = getCD(thisball.uid, "control", 120)

if cd > 0 then
doPlayerSendCancel(cid, "You have to wait "..cd.." segs to use Control Mind again!")
return true
end

if getPokemonLevel(item2.uid) >= getPokemonLevel(mysum) then
return doPlayerSendCancel(cid, "Your pokemon can't control this mind!")
end

if getPlayerStorageValue(cid, 22545) >= 1 then --alterado v1.7
return doPlayerSendCancel(cid, "You can't do that while in the Golden Arena!")
end

local cmed = item2.uid
setCD(thisball.uid, "control", 120)
local gender = getPokemonGender(cmed)
doSendDistanceShoot(getThingPos(mysum), getThingPos(cmed), 39)
--------------
setPlayerStorageValue(cid, 212124, 1)
doConvinceCreature(cid, cmed)
setPlayerStorageValue(cmed, 212123, 1)
doCreatureSay(cid, ""..getCreatureName(mysum)..", control "..string.lower(getCreatureName(cmed)).."'s mind!", 1)

local cmname = getCreatureName(mysum)
local cmpos = getThingPos(mysum)
local pokelife = (getCreatureHealth(mysum) / getCreatureMaxHealth(mysum))
doItemSetAttribute(thisball.uid, "hp", pokelife)
doRemoveCreature(mysum)
local cmzao = doSummonCreature(""..cmname.." cm", cmpos)
doConvinceCreature(cid, cmzao)
setPlayerStorageValue(cid, 888, 1)
if useKpdoDlls then
doUpdateMoves(cid)
end

local function check(cid, controled, rod)
if isCreature(cid) then
ball2 = getPlayerSlotItem(cid, 8)
if getPlayerStorageValue(cid, 888) <= 0 then
return true
end
if not isCreature(controled) then
setPlayerStorageValue(cid, 212124, 0)
local sum = isCreature(getCreatureSummons(cid)[1]) and getCreatureSummons(cid)[1] or getCreatureSummons(cid)[2]
local pkcmpos = getThingPos(sum)
doRemoveCreature(sum)
local item = getPlayerSlotItem(cid, 8)
local pk = doSummonCreature(getItemAttribute(item.uid, "poke"), pkcmpos)
doConvinceCreature(cid, pk)
doCreatureSetLookDir(getCreatureSummons(cid)[1], 2)
addEvent(doAdjustWithDelay, 100, cid, pk, true, true, false)
setPlayerStorageValue(cid, 888, -1) --alterado v1.7
cleanCMcds(item.uid)
registerCreatureEvent(pk, "SummonDeath") --alterado v1.6
if useKpdoDlls then
doUpdateMoves(cid)
end
return true
end

if rod <= 0 then
--Pokemon controlado
local cmed2 = getCreatureSummons(cid)[1]
local poscmed = getThingPos(cmed2)
local cmeddir = getCreatureLookDir(cmed2)
local namecmed = getCreatureName(cmed2)
local gender = getPokemonGender(cmed2)
local hp, maxHp = getCreatureHealth(getCreatureSummons(cid)[1]), getCreatureMaxHealth(getCreatureSummons(cid)[1])
doRemoveCreature(getCreatureSummons(cid)[1])
local back = doCreateMonster(namecmed, poscmed)
addEvent(doCreatureSetSkullType, 150, back, gender)
doWildAttackPlayer(back, cid)
doCreatureSetLookDir(back, cmeddir)
addEvent(doCreatureAddHealth, 100, back, hp-maxHp)

-- pokemon controlador
local mynewpos = getThingPos(getCreatureSummons(cid)[1])
doRemoveCreature(getCreatureSummons(cid)[1])
local pk2 = doSummonCreature(getItemAttribute(ball2.uid, "poke"), mynewpos)
doConvinceCreature(cid, pk2)
addEvent(doAdjustWithDelay, 100, cid, pk2, true, true, false)
setPlayerStorageValue(cid, 888, -1) --alterado v1.7
doCreatureSetLookDir(getCreatureSummons(cid)[1], 2)
setPlayerStorageValue(cid, 212124, 0)
cleanCMcds(ball2.uid)
registerCreatureEvent(pk2, "SummonDeath") --alterado v1.6
if useKpdoDlls then
doUpdateMoves(cid)
end
else
if isInArray({"Haunter", "Gengar", "Shiny Gengar"}, cmname) then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 214)
else
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 220)
end
end
end
addEvent(check, 500, cid, controled, rod-1)
end

check(cid, cmed, 40)
return true
end
---------------------------------------------------------------------
-------- MOVE / END ---------

local onlyWater = false

if isWater(getTileThingByPos(checkpos).itemid) then
onlyWater = true
for checkwater = 0, 7 do
if not isWater(getTileThingByPos(getPosByDir(checkpos, checkwater)).itemid) then
onlyWater = false
end
end
end

if onlyWater then
doPlayerSendCancel(cid, "Destination is not reachable.")
return true
end

doPlayerSay(cid, ""..getPokeName(mysum)..", "..txt["move"][math.random(1, #txt["move"])].."", 1)

if isCreature(getCreatureTarget(cid)) then
goThere(mysum, topos, "move", isCreature(getCreatureTarget(cid)), maxMoveDist)
else
addEvent(goThere, 500, mysum, topos, "move", isCreature(getCreatureTarget(cid)), maxMoveDist)
end
-----------------------------

return true
end



7º - ALGUNS SPELLS DE POKES + SCRIPTS
ERROR

[21/08/2014 23:10:48] [Error - Spell Interface]


[21/08/2014 23:10:48] data/spells/scripts/ps/Ice Wind.lua:onCastSpell
[21/08/2014 23:10:48] Description:
[21/08/2014 23:10:48] data/lib/pokemon moves.lua:123: attempt to index local 'table' (a nil value)
[21/08/2014 23:10:48] stack traceback:
[21/08/2014 23:10:48] data/lib/pokemon moves.lua:123: in function 'docastspell'
[21/08/2014 23:10:48] data/spells/scripts/ps/Ice Wind.lua:5: in function

[22/08/2014 01:30:21] [Error - Spell Interface]
[22/08/2014 01:30:21] data/spells/scripts/ps/Leech Seed.lua:onCastSpell
[22/08/2014 01:30:21] Description:
[22/08/2014 01:30:21] (luaGetCreatureStorage) Creature not found

[21/08/2014 22:47:17] [Error - Spell Interface]
[21/08/2014 22:47:17] data/spells/scripts/ps/Giga Drain.lua:onCastSpell
[21/08/2014 22:47:17] Description:
[21/08/2014 22:47:17] (luaGetCreatureHealth) Creature not found

[21/08/2014 22:47:17] [Error - Spell Interface]
[21/08/2014 22:47:17] data/spells/scripts/ps/Giga Drain.lua:onCastSpell
[21/08/2014 22:47:17] Description:
[21/08/2014 22:47:17] data/lib/pokemon moves.lua:3998: attempt to perform arithmetic on local 'life' (a boolean value)
[21/08/2014 22:47:17] stack traceback:
[21/08/2014 22:47:17] data/lib/pokemon moves.lua:3998: in function 'docastspell'
[21/08/2014 22:47:17] data/spells/scripts/ps/Giga Drain.lua:5: in function

[22/08/2014 02:14:21] [Error - Spell Interface]
[22/08/2014 02:14:21] data/spells/scripts/ps/Fury Swipes.lua:onCastSpell
[22/08/2014 02:14:21] Description:
[22/08/2014 02:14:22] data/lib/pokemon moves.lua:123: attempt to index local 'table' (a nil value)
[22/08/2014 02:14:22] stack traceback:
[22/08/2014 02:14:22] data/lib/pokemon moves.lua:123: in function 'docastspell'
[22/08/2014 02:14:22] data/spells/scripts/ps/Fury Swipes.lua:5: in function

[22/08/2014 03:10:37] [Error - Spell Interface]
[22/08/2014 03:10:37] data/spells/scripts/ps/Waterfall.lua:onCastSpell
[22/08/2014 03:10:37] Description:
[22/08/2014 03:10:37] data/lib/pokemon moves.lua:123: attempt to index local 'table' (a nil value)
[22/08/2014 03:10:37] stack traceback:
[22/08/2014 03:10:37] data/lib/pokemon moves.lua:123: in function 'docastspell'
[22/08/2014 03:10:37] data/spells/scripts/ps/Waterfall.lua:5: in function


SCRIPT ICE WIND

function onCastSpell(cid, var)



if isSummon(cid) then return true end

docastspell(cid, "Ice Wind")

return true
end



LEECH SEED

function onCastSpell(cid, var)



if isSummon(cid) then return true end

docastspell(cid, "Leech Seed")

return true
end


GIGA DRAIN

function onCastSpell(cid, var)



if isSummon(cid) then return true end

docastspell(cid, "Giga Drain")

return true
end


FURY SWIPES

function onCastSpell(cid, var)



if isSummon(cid) then return true end

docastspell(cid, "Fury Swipes")

return true
end


WATERFALL

function onCastSpell(cid, var)



if isSummon(cid) then return true end

docastspell(cid, "Waterfall")

return true
end



8º - FLY
ERROR

[21/08/2014 23:54:44] [Error - MoveEvents Interface]


[21/08/2014 23:54:44] data/movements/scripts/fly.lua:onStepIn
[21/08/2014 23:54:44] Description:
[21/08/2014 23:54:44] (luaDoRemoveItem) Item not found


SCRIPT

local del = {'460', '1022', '1023', '1024'}



function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

position.stackpos = 0

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

if getPlayerStorageValue(cid, 17000) <= 0 then
doTeleportThing(cid, fromPosition, false)
doRemoveItem(getTileThingByPos(position).uid, 1)
doPlayerSendCancel(cid, "You can't fly.")
return true
end

doAreaCombatHealth(cid, FLYSYSTEMDAMAGE, getThingPos(cid), splash, 0, 0, 255)

local pos = getThingPos(cid)
if pos.z == 7 then return true end
pos.z = pos.z + 1

for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, 3) or hasProperty(tile.uid, 7) or tile.itemid == 919 then
doTransformItem(item.uid, 11677)
end
end
end

return true
end

function onStepOut(cid, item, position, lastPosition, fromPosition, toPosition, actor)

if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV

local effect = 2

if toPosition.z == fromPosition.z and getCreatureOutfit(cid).lookType ~= 316 and getCreatureOutfit(cid).lookType ~= 648 then
doSendMagicEffect(fromPosition, effect)
end

local oldtpos = fromPosition
oldtpos.stackpos = STACKPOS_GROUND


if getTileThingByPos(oldtpos).itemid >= 1 then
doRemoveItem(getTileThingByPos(oldtpos).uid, 1)
end

return true
end



9º - NPC ROCKET E COMMANDER ROCKET + SCRIPTS
ERROR

[22/08/2014 00:06:59] [Error - NpcScript::onCreatureMove] NPC Name: Rocket - Call stack overflow


[22/08/2014 00:06:59] [Error - NpcScript::onCreatureMove] NPC Name: Commander Rocket - Call stack overflow
[22/08/2014 00:06:59] [Error - CreatureEvent::executeWalk] Call stack overflow.
[22/08/2014 00:06:59] [Error - NpcScript::onCreatureMove] NPC Name: Commander Rocket - Call stack overflow


SCRIPT ROCKET

local target = 0


local prevTarget = 0
local origPos = 0
local max_distance = 12
local fighting = false
local challenger = 0
local battle_turn = 1 -- don't change
local challenger_turn = 0 -- don't change
---
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
local function doSummonGymPokemon(npc)
local this = npc
if not isCreature(this) or not ehNPC(this) then return true end --alterado v1.6
if #getCreatureSummons(this) >= 1 or target == 0 then return true end
local it = wildRocket[getPlayerStorageValue(this, 665451)][battle_turn]
if not it then return true end
doSummonMonster(this, it.name)
local summon = getCreatureSummons(this)[1]
if not summon then --alterado v1.6
print("Error in npc: "..getCreatureName(this)..", tring to execute function 'doSummonGymPokemon', poke: "..it.name)
battle_turn = battle_turn+1
return true
end
local balleffect = pokeballs["normal"].effect
if it.ball and pokeballs[it.ball] then
balleffect = pokeballs[it.ball].effect
end
doSendMagicEffect(getThingPos(summon), balleffect)
setPlayerStorageValue(summon, 10000, balleffect)
setPlayerStorageValue(summon, 10001, gobackmsgs[math.random(#gobackmsgs)].back:gsub("doka", it.nick ~= "" and it.nick or it.name))
setPlayerStorageValue(summon, 1007, it.nick ~= "" and it.nick or it.name)
doSetMonsterGym(summon, target)
addEvent(adjustWildPoke, 15, summon, it.optionalLevel)
if it.nick ~= "" then doCreatureSetNick(summon, it.nick) end
local name = it.nick ~= "" and it.nick or getCreatureName(this).."s "..it.name --alterado v1.3
doCreatureSay(this, gobackmsgs[math.random(#gobackmsgs)].go:gsub("doka", getPlayerStorageValue(summon, 1007)), 1)
fighting = true
battle_turn = battle_turn + 1
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
local function goToOrigPos()
target = 0
selfFollow(0)
fighting = false
challenger = 0
challenger_turn = 0
if #getCreatureSummons(getNpcCid()) >= 1 then
setPlayerStorageValue(getCreatureSummons(getNpcCid())[1], 1006, 0)
doCreatureAddHealth(getCreatureSummons(getNpcCid())[1], -getCreatureMaxHealth(getCreatureSummons(getNpcCid())[1]))
end
doChangeSpeed(getNpcCid(), -getCreatureSpeed(getNpcCid()))
doTeleportThing(getNpcCid(), origPos)
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
local function updateTarget()
if(target == 0) then
local list = getSpectators(getNpcPos(), 9, 9, false)
for i = 1, table.getn(list) do
local _target = list
if(_target ~= 0) then
if isPlayer(_target) and isOfficer(_target) and not getTileInfo(getThingPos(_target)).protection then --alterado v1.8
selfSay(rocketTalks[math.random(#rocketTalks)])
doNpcSetCreatureFocus(_target)
target = _target
prevTarget = target
break
end
end
end
end
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
function onCreatureAppear(cid)
end

function onCreatureDisappear(cid)
end

function onCreatureMove(creature, oldPos, newPos)
--
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
function onThink()
if not isCreature(getNpcCid()) then return false end --alterado v1.6
if origPos == 0 then
origPos = getNpcPos()
end
if getPlayerStorageValue(getNpcCid(), 665451) <= 0 then
setPlayerStorageValue(getNpcCid(), 665451, math.random(1, 5))
randOutfit(getNpcCid())
end
updateTarget()
------------------------------------------------------
if getDistanceBetween(getNpcPos(), origPos) >= max_distance or (isCreature(target) and getTileInfo(getThingPos(target)).protection) or getTileInfo(getThingPos(getNpcCid())).protection then
goToOrigPos() --alterado v1.9
end
------------------------------------------------------
if(target == 0) then
if getPlayerStorageValue(getNpcCid(), 154788) <= 0 then
setPlayerStorageValue(getNpcCid(), 154788, 1)
doChangeSpeed(getNpcCid(), -getCreatureSpeed(getNpcCid()))
addEvent(randWalk, 2000, getNpcCid(), 1000, getPlayerStorageValue(getNpcCid(), 154788), target)
end
return true
end
------------------------------------------------------
local playerPos = getThingPosWithDebug(target) --alterado v1.6
local myPos = getNpcPos()
------------------------------------------------------
if(myPos.z ~= playerPos.z) then
goToOrigPos()
battle_turn = battle_turn == 1 and battle_turn or battle_turn-1
return true
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) > max_distance then
goToOrigPos()
battle_turn = battle_turn == 1 and battle_turn or battle_turn-1
return true
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) >= 5 then
if getPlayerStorageValue(getNpcCid(), 154788) >= 1 then
setPlayerStorageValue(getNpcCid(), 154788, -1)
doRegainSpeed(getNpcCid())
if isCreature(target) then
selfFollow(target)
end
end
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) <= 3 then
if getPlayerStorageValue(getNpcCid(), 154788) <= 0 then
setPlayerStorageValue(getNpcCid(), 154788, 1)
doChangeSpeed(getNpcCid(), -getCreatureSpeed(getNpcCid()))
addEvent(randWalk, 2000, getNpcCid(), 1000, getPlayerStorageValue(getNpcCid(), 154788), target)
end
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) <= 5 then
challenger = target
addEvent(doSummonGymPokemon, 850, getNpcCid())

local change = false

if not isCreature(target) then
target = 0
battle_turn = battle_turn == 1 and battle_turn or battle_turn-1
return true
end

if fighting then

if not isCreature(getCreatureTarget(getNpcCid())) then
if #getCreatureSummons(challenger) >= 1 then
selfAttackCreature(getCreatureSummons(challenger)[1])
change = true
else
if change then
change = false
challenger_turn = challenger_turn + 1
end
end
end

if #getCreatureSummons(getNpcCid()) == 0 and isCreature(target) then
if battle_turn > #wildRocket[getPlayerStorageValue(getNpcCid(), 665451)] then
addEvent(doCreateNpc, 300000, ".aRocket", myPos) --alterado v1.5
local outfit = getCreatureOutfit(getNpcCid())
doRemoveCreature(getNpcCid())
----------------------------------------
if outfit.lookType == 605 then --verifica se o npc eh female.. ;p
monster = doCreateMonster("aRocketFemale", myPos)
else
monster = doCreateMonster("aRocket", myPos)
end
----------------------------------------
doCloneOut(monster, outfit)
addEvent(beDrunk, 100, monster)
end
addEvent(doSummonGymPokemon, 1000, getNpcCid())
end

if #getCreatureSummons(challenger) <= 0 then
selfAttackCreature(challenger)
end
end
end
end



SCRIPT COMMANDER ROCKET

local target = 0


local prevTarget = 0
local origPos = 0
local max_distance = 12
local fighting = false
local challenger = 0
local battle_turn = 1 -- don't change
local challenger_turn = 0 -- don't change
---
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
local function doSummonGymPokemon(npc)
local this = npc
if not isCreature(this) or not ehNPC(this) then return true end --alterado v1.6
if #getCreatureSummons(this) >= 1 or target == 0 then return true end
local it = wildCommanderRocket[getPlayerStorageValue(this, 665451)][battle_turn]
if not it then return true end
doSummonMonster(this, it.name)
local summon = getCreatureSummons(this)[1]
if not summon then --alterado v1.6
print("Error in npc: "..getCreatureName(this)..", tring to execute function 'doSummonGymPokemon', poke: "..it.name)
battle_turn = battle_turn+1
return true
end
local balleffect = pokeballs["normal"].effect
if it.ball and pokeballs[it.ball] then
balleffect = pokeballs[it.ball].effect
end
doSendMagicEffect(getThingPos(summon), balleffect)
setPlayerStorageValue(summon, 10000, balleffect)
setPlayerStorageValue(summon, 10001, gobackmsgs[math.random(#gobackmsgs)].back:gsub("doka", it.nick ~= "" and it.nick or it.name))
setPlayerStorageValue(summon, 1007, it.nick ~= "" and it.nick or it.name)
doSetMonsterGym(summon, target)
addEvent(adjustWildPoke, 15, summon, it.optionalLevel)
if it.nick ~= "" then doCreatureSetNick(summon, it.nick) end
local name = it.nick ~= "" and it.nick or getCreatureName(this).."s "..it.name --alterado v1.3
doCreatureSay(this, gobackmsgs[math.random(#gobackmsgs)].go:gsub("doka", getPlayerStorageValue(summon, 1007)), 1)
fighting = true
battle_turn = battle_turn + 1
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
local function goToOrigPos()
target = 0
selfFollow(0)
fighting = false
challenger = 0
challenger_turn = 0
if #getCreatureSummons(getNpcCid()) >= 1 then
setPlayerStorageValue(getCreatureSummons(getNpcCid())[1], 1006, 0)
doCreatureAddHealth(getCreatureSummons(getNpcCid())[1], -getCreatureMaxHealth(getCreatureSummons(getNpcCid())[1]))
end
doChangeSpeed(getNpcCid(), -getCreatureSpeed(getNpcCid()))
doTeleportThing(getNpcCid(), origPos)
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
local function updateTarget()
if(target == 0) then
local list = getSpectators(getNpcPos(), 9, 9, false)
for i = 1, table.getn(list) do
local _target = list
if(_target ~= 0) then
if isPlayer(_target) and isOfficer(_target) and not getTileInfo(getThingPos(_target)).protection then --alterado v1.8
selfSay(rocketTalks[math.random(#rocketTalks)])
doNpcSetCreatureFocus(_target)
target = _target
prevTarget = target
break
end
end
end
end
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
function onCreatureAppear(cid)
end

function onCreatureDisappear(cid)
end

function onCreatureMove(creature, oldPos, newPos)
--
end
--/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////--
function onThink()
if not isCreature(getNpcCid()) then return false end --alterado v1.6
if origPos == 0 then
origPos = getNpcPos()
end
if getPlayerStorageValue(getNpcCid(), 665451) <= 0 then
setPlayerStorageValue(getNpcCid(), 665451, math.random(1, 5))
randOutfit(getNpcCid())
end
updateTarget()
------------------------------------------------------
if getDistanceBetween(getNpcPos(), origPos) >= max_distance or (isCreature(target) and getTileInfo(getThingPos(target)).protection) or getTileInfo(getThingPos(getNpcCid())).protection then
goToOrigPos() --alterado v1.9
end
------------------------------------------------------
if(target == 0) then
if getPlayerStorageValue(getNpcCid(), 154788) <= 0 then
setPlayerStorageValue(getNpcCid(), 154788, 1)
doChangeSpeed(getNpcCid(), -getCreatureSpeed(getNpcCid()))
addEvent(randWalk, 2000, getNpcCid(), 1000, getPlayerStorageValue(getNpcCid(), 154788), target)
end
return true
end
------------------------------------------------------
local playerPos = getThingPosWithDebug(target) --alterado v1.6
local myPos = getNpcPos()
------------------------------------------------------
if(myPos.z ~= playerPos.z) then
goToOrigPos()
battle_turn = battle_turn == 1 and battle_turn or battle_turn-1
return true
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) > max_distance then
goToOrigPos()
battle_turn = battle_turn == 1 and battle_turn or battle_turn-1
return true
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) >= 5 then
if getPlayerStorageValue(getNpcCid(), 154788) >= 1 then
setPlayerStorageValue(getNpcCid(), 154788, -1)
doRegainSpeed(getNpcCid())
if isCreature(target) then
selfFollow(target)
end
end
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) <= 3 then
if getPlayerStorageValue(getNpcCid(), 154788) <= 0 then
setPlayerStorageValue(getNpcCid(), 154788, 1)
doChangeSpeed(getNpcCid(), -getCreatureSpeed(getNpcCid()))
addEvent(randWalk, 2000, getNpcCid(), 1000, getPlayerStorageValue(getNpcCid(), 154788), target)
end
end
------------------------------------------------------
if getDistanceBetween(playerPos, myPos) <= 5 then
challenger = target
addEvent(doSummonGymPokemon, 850, getNpcCid())

local change = false

if not isCreature(target) then
target = 0
battle_turn = battle_turn == 1 and battle_turn or battle_turn-1
return true
end

if fighting then

if not isCreature(getCreatureTarget(getNpcCid())) then
if #getCreatureSummons(challenger) >= 1 then
selfAttackCreature(getCreatureSummons(challenger)[1])
change = true
else
if change then
change = false
challenger_turn = challenger_turn + 1
end
end
end

if #getCreatureSummons(getNpcCid()) == 0 and isCreature(target) then
if battle_turn > #wildCommanderRocket[getPlayerStorageValue(getNpcCid(), 665451)] then
addEvent(doCreateNpc, 300000, ".aCommanderRocket", myPos) --alterado v1.5
local outfit = getCreatureOutfit(getNpcCid())
doRemoveCreature(getNpcCid())
----------------------------------------
if outfit.lookType == 605 then --verifica se o npc eh female.. ;p
monster = doCreateMonster("aCommanderRocketFemale", myPos)
else
monster = doCreateMonster("aCommanderRocket", myPos)
end
----------------------------------------
doCloneOut(monster, outfit)
addEvent(beDrunk, 100, monster)
end
addEvent(doSummonGymPokemon, 1000, getNpcCid())
end

if #getCreatureSummons(challenger) <= 0 then
selfAttackCreature(challenger)
end
end
end
end



10º - ICONE DO SHINY ZUBAT E DO SHINY GOLBAT - TROCAR ID DO ICONE DO SHINY ZUBAT
11º - SHINY HITMONCHAN QUANDO MORRE, NÃO DA PRA SUBSTITUIR POKEMON NO SLOT [OBJECT BUILDER E ITEM EDITOR, E DESMARCAR A OPÇÃO NÃO MOVER, IR NO ICONE.]
12º - AUMENTAR TEMPO DE LEADER DE GINASIO PARA DUEL
13º - CONSIGO DAR CATCH NOS POKEMONS DE NPC – [OBS: NÃO QUERO RETIRAR OS COPSES DELES, PQ SÃO DA OUTLAND]
14º - DA PRA PASSAR DA MASTER BALL PUXANDO ALAVANCAS [TROQUEI ALAVANCAS POR PORTAL - O PORTAL SÓ ABRE QUANDO MATA O NPC]
15º - QUANDO DAR CATCH OU ABRE UMA BOX, JÁ DIZ QUE TEM 6 POKEMONS E O POKE E TELETRANSPORTADO PARA CP, SENDO QUE MESMO O PLAYER COM 1 POKE, ELE VAI PRO CP. [Tá funcionando normalmente agora.]
16º - PLAYER QUANDO ASSISTE TV, FICA VAGANDO PELA CITY (VIRA UM NPC)
17º - [14/08/2014 23:04:50] data/actions/scripts/starter2.lua:onUse

local starterpokes = {


-- Terceira Gerção
["Treecko"] = {x = 47, y = 55, z = 7},
["Mudkip"] = {x = 49, y = 55, z = 7},
["Torchic"] = {x = 51, y = 55, z = 7},
}

local btype = "Icone"

function onUse(cid, item, frompos, item2, topos)


local pokemon = ""

for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
if pokemon == "" then return true end

doPlayerSendTextMessage(cid, 27, "Você recebeu seu primeiro pokemon e um kit inicial...Boa Sorte em sua Jornada.")

addPokeToPlayer(cid, pokemon, 0, nil, btype, true)
doPlayerAddItem(cid, 2392, 30)
doPlayerAddItem(cid, 12349, 100)
doPlayerAddItem(cid, 12347, 30)
doPlayerAddItem(cid, 12344, 10)
doPlayerAddItem(cid, 2160, 1)
setPlayerStorageValue(cid, 8955, 1)

doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)


return TRUE
end


18º - ICON SYSTEM [YOU SEE A ICONE..](ALTERAR PARA - YOU SEE A POKEBALL)
19º - NÃO CONSIGO INVITAR NINGUEM NA HOUSE NENHUM COMANDO FUNCIONA
20º - ICONE DO SHINY DRATINI E DO SHINY DRAGONAIR - TROCAR ID DO ICONE DO SHINY DRATINI
21º - M12 FICA FORA DA BARRA DE COOLDOWN, E NÃO CONSIGO CLICA NELE. A BARRA TA PEQUENA, COMO AUMENTA?

22º - MOVE1.LUA - FAVOR PEDIR O SCRIPT PORQUE E MUUUUUUUUUITO GRANDE, ENTÃO PEDE A PARTE QUE TA DANDO ERRO E QUAL SCRIPTS
ERROR

[22/08/2014 03:38:43] [Error - TalkAction Interface]


[22/08/2014 03:38:43] data/talkactions/scripts/move1.lua:onSay
[22/08/2014 03:38:43] Description:
[22/08/2014 03:38:43] data/lib/newStatusSyst.lua:650: attempt to index field '?' (a nil value)
[22/08/2014 03:38:43] stack traceback:
[22/08/2014 03:38:43] data/lib/newStatusSyst.lua:650: in function 'doBuff2'
[22/08/2014 03:38:43] data/lib/newStatusSyst.lua:683: in function 'doCondition2'
[22/08/2014 03:38:43] data/lib/pokemon moves.lua:3239: in function 'docastspell'
[22/08/2014 03:38:43] data/talkactions/scripts/move1.lua:173: in function

[22/08/2014 08:45:46] [Error - TalkAction Interface]
[22/08/2014 08:45:46] In a timer event called from:
[22/08/2014 08:45:46] data/talkactions/scripts/move1.lua:onSay
[22/08/2014 08:45:46] Description:
[22/08/2014 08:45:46] data/lib/pokemon moves.lua:123: attempt to index local 'table' (a nil value)
[22/08/2014 08:45:46] stack traceback:
[22/08/2014 08:45:46] data/lib/pokemon moves.lua:123: in function 'docastspell'
[22/08/2014 08:45:46] data/lib/pokemon moves.lua:1404: in function



23º - CREATEITEM + SCRIPT
ERROR

[22/08/2014 04:22:44] [Error - TalkAction Interface]


[22/08/2014 04:22:44] data/talkactions/scripts/createitem.lua:onSay
[22/08/2014 04:22:44] Description:
[22/08/2014 04:22:44] (luaDoCreateItemEx) Item not found

[22/08/2014 04:22:44] [Error - TalkAction Interface]
[22/08/2014 04:22:44] data/talkactions/scripts/createitem.lua:onSay
[22/08/2014 04:22:44] Description:
[22/08/2014 04:22:44] (luaDoPlayerAddItemEx) Item not found


SCRIPT

function onSay(cid, words, param, channel)


if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end

local t = string.explode(param, ",")
local ret = RETURNVALUE_NOERROR
local pos = getCreaturePosition(cid)

local id = tonumber(t[1])
if(not id) then
id = getItemIdByName(t[1], false)
if(not id) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
return true
end
end

local amount = 100
if(t[2]) then
amount = t[2]
end

local item = doCreateItemEx(id, amount)
if(t[3] and getBooleanFromString(t[3])) then
if(t[4] and getBooleanFromString(t[4])) then
pos = getCreatureLookPosition(cid)
end

ret = doTileAddItemEx(pos, item)
else
ret = doPlayerAddItemEx(cid, item, true)
end

if(ret ~= RETURNVALUE_NOERROR) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Couldn't add item: " .. t[1])
return true
end

doDecayItem(item)
if(not isPlayerGhost(cid)) then
doSendMagicEffect(pos, CONST_ME_MAGIC_RED)
end

return true
end



24º - GOBACK.LUA
ERROR

[21/08/2014 22:27:27] [Error - Action Interface]


[21/08/2014 22:27:27] In a timer event called from:
[21/08/2014 22:27:27] data/actions/scripts/goback.lua:onUse
[21/08/2014 22:27:27] Description:
[21/08/2014 22:27:27] (luaDoCreatureAddHealth) Creature not found

[22/08/2014 01:51:04] [Error - Action Interface]
[22/08/2014 01:51:04] In a timer event called from:
[22/08/2014 01:51:04] data/actions/scripts/goback.lua:onUse
[22/08/2014 01:51:04] Description:
[22/08/2014 01:51:04] (luaGetCreatureHealth) Creature not found

[22/08/2014 01:51:35] [Error - Action Interface]
[22/08/2014 01:51:35] In a timer event called from:
[22/08/2014 01:51:35] data/actions/scripts/goback.lua:onUse
[22/08/2014 01:51:35] Description:
[22/08/2014 01:51:35] (luaGetCreatureMaxHealth) Creature not found

[21/08/2014 22:27:27] [Error - Action Interface]
[21/08/2014 22:27:27] In a timer event called from:
[21/08/2014 22:27:27] data/actions/scripts/goback.lua:onUse
[21/08/2014 22:27:27] Description:
[21/08/2014 22:27:27] (luaGetThingPosition) Thing not found

[22/08/2014 01:51:04] [Error - Action Interface]
[22/08/2014 01:51:04] In a timer event called from:
[22/08/2014 01:51:04] data/actions/scripts/goback.lua:onUse
[22/08/2014 01:51:04] Description:
[22/08/2014 01:51:04] data/lib/some functions.lua:1706: attempt to compare two boolean values
[22/08/2014 01:51:04] stack traceback:
[22/08/2014 01:51:04] data/lib/some functions.lua:1706: in function



local EFFECTS = {


--[OutfitID] = {Effect}
["Magmar"] = 35,
["Shiny Magmar"] = 35,
["Shiny Magmortar"] = 35,
["Shiny Electivire"] = 48,
["Magmortar"] = 35,
["Electivire"] = 48,
["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, "You can't return your pokemon during gym battles.")
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, "This pokemon is fainted.")
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, "You must put your pokeball in the correct place!")
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, "This pokemon is fainted.")
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)
doRegenerateWithY(getCreatureMaster(pk), pk)
doCureWithY(getCreatureMaster(pk), pk)

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, "This pokemon is fainted.")

end

if useKpdoDlls then
doUpdateMoves(cid)
end
return true
end



25º - CATCH.LUA
ERROR

[21/08/2014 22:27:36] [Error - Action Interface]


[21/08/2014 22:27:36] In a timer event called from:
[21/08/2014 22:27:36] data/actions/scripts/catch.lua:onUse
[21/08/2014 22:27:36] Description:
[21/08/2014 22:27:36] (luaDoItemSetAttribute) Invalid data type


SCRIPT

local ballcatch = { --id normal, id da ball shiy


[2394] = {cr = 4, on = 193, off = 192, ball = {11826, 11737}, send = 47, typeee = "normal", boost = "0"}, --alterado v1.9 \/
[2391] = {cr = 8, on = 198, off = 197, ball = {11832, 11740}, send = 48, typeee = "great", boost = "0"},
[2393] = {cr = 12, on = 202, off = 201, ball = {11835, 11743}, send = 46, typeee = "super", boost = "0"},
[2392] = {cr = 17000000, on = 200, off = 199, ball = {11829, 11746}, send = 49, typeee = "ultra", boost = "0"},
[12617] = {cr = 14, on = 204, off = 203, ball = {10975, 12621}, send = 35, typeee = "saffari", boost = "0"},
[12832] = {cr = 100000, on = 23, off = 24, ball = {12826, 12829}, send = 181, typeee = "dark", boost = "50"},
}

function onUse(cid, item, frompos, item3, topos)

local item2 = getTopCorpse(topos)
if item2 == null then
return true
end

if getItemAttribute(item2.uid, "catching") == 1 then
return true
end

if getItemAttribute(item2.uid, "golden") and getItemAttribute(item2.uid, "golden") == 1 then
return doPlayerSendCancel(cid, "You can't try to catch a pokemon in the Golden Arena!")
end

local name = string.lower(getItemNameById(item2.itemid))
name = string.gsub(name, "fainted ", "")
name = string.gsub(name, "defeated ", "")
name = doCorrectPokemonName(name)
local x = pokecatches[name]

if not x then return true end

local shinys = {"Shiny Alakazam", "Shiny Scyther", "Shiny Electivire", "Shiny Blaziken", "Shiny Magmortar", "Shiny Salamence", "Shiny Magmar", "Shiny Mantine", "Shiny Gyarados", "Shiny Snorlax", "Shiny Onix", "Shiny Electabuzz", "Shiny Pidgeot", "Aerodactyl", "Ditto", "Shiny Gengar"}
if item.itemid == 12832 and isInArray(shinys, name) then
doPlayerSendCancel(cid, "Você não pode catar esse pokemon com a master ball!")
return true
end

local storage = newpokedex[name].stoCatch
if getPlayerStorageValue(cid, storage) == -1 or not string.find(getPlayerStorageValue(cid, storage), ";") then --alterado v1.9
setPlayerStorageValue(cid, storage, "normal = 0, great = 0, super = 0, ultra = 0, saffari = 0, dark = 0;") --alterado v1.9
end

local owner = getItemAttribute(item2.uid, "corpseowner")

if owner and isCreature(owner) and isPlayer(owner) and cid ~= owner then
doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.")
return true
end

local newidd = isShinyName(name) and ballcatch[item.itemid].ball[2] or ballcatch[item.itemid].ball[1] --alterado v1.9
local typeee = ballcatch[item.itemid].typeee
local boost = ballcatch[item.itemid].boost


local catchinfo = {}
catchinfo.rate = ballcatch[item.itemid].cr
catchinfo.catch = ballcatch[item.itemid].on
catchinfo.fail = ballcatch[item.itemid].off
catchinfo.newid = newidd
catchinfo.name = doCorrectPokemonName(name)
catchinfo.topos = topos
catchinfo.chance = x.chance

doSendDistanceShoot(getThingPos(cid), topos, ballcatch[item.itemid].send)
doRemoveItem(item.uid, 1)

local d = getDistanceBetween(getThingPos(cid), topos)

if getPlayerStorageValue(cid, 98796) >= 1 and getPlayerItemCount(cid, 12617) <= 0 then --alterado v1.9
setPlayerStorageValue(cid, 98796, -1)
setPlayerStorageValue(cid, 98797, -1)
doTeleportThing(cid, SafariOut, false)
doSendMagicEffect(getThingPos(cid), 21)
doPlayerSendTextMessage(cid, 27, "You spend all your saffari balls, good luck in the next time...")
end

addEvent(doSendPokeBall, d * 70 + 100 - (d * 14) , cid, catchinfo, false, false, typeee)
addEvent(doSendMagicEffect, (d * 70 + 100 - (d * 14)) - 100, topos, 3)
return true
end



26º - LOGIN
ERROR

[21/08/2014 22:42:05] [Error - CreatureScript Interface]


[21/08/2014 22:42:05] data/creaturescripts/scripts/login.lua:onLogin
[21/08/2014 22:42:05] Description:
[21/08/2014 22:42:05] (luaGetItemAttribute) Item not found


SCRIPT

local config = {


loginMessage = getConfigValue('loginMessage'),
useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)

local accountManager = getPlayerAccountManager(cid)
if getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 80 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 90)
doCreatureSetDropLoot(cid, false)
end
if getPlayerLevel(cid) >= 81 and getPlayerLevel(cid) <= 149 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 80)
doCreatureSetDropLoot(cid, false)
end
if getPlayerLevel(cid) >= 150 then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 75)
doCreatureSetDropLoot(cid, false)
end

if(accountManager == MANAGER_NONE) then
local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
if(lastLogin > 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
else
str = str
end

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

elseif(accountManager == MANAGER_NAMELOCK) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
elseif(accountManager == MANAGER_ACCOUNT) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
end

if getCreatureName(cid) == "Account Manager" then
local outfit = {}
if accountManagerRandomPokemonOutfit then
outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])}
else
outfit = accountManagerOutfit
end

doSetCreatureOutfit(cid, outfit, -1)
return true
end

if(not isPlayerGhost(cid)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
end

local outfit = {}

if getPlayerVocation(cid) == 0 then
doPlayerSetMaxCapacity(cid, 0)
doPlayerSetVocation(cid, 1)
setCreatureMaxMana(cid, 6)
doPlayerAddSoul(cid, -getPlayerSoul(cid))
setPlayerStorageValue(cid, 19898, 0)
if getCreatureOutfit(cid).lookType == 128 then
outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
elseif getCreatureOutfit(cid).lookType == 136 then
outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)}
end
doCreatureChangeOutfit(cid, outfit)
end

registerCreatureEvent(cid, "dropStone")
registerCreatureEvent(cid, "ShowPokedex") --alterado v1.6
registerCreatureEvent(cid, "ClosePokedex") --alterado v1.6
registerCreatureEvent(cid, "WatchTv")
registerCreatureEvent(cid, "StopWatchingTv")
registerCreatureEvent(cid, "WalkTv")
registerCreatureEvent(cid, "RecordTv")
registerCreatureEvent(cid, "PlayerLogout")
registerCreatureEvent(cid, "WildAttack")
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "PokemonIdle")
registerCreatureEvent(cid, "EffectOnAdvance")
registerCreatureEvent(cid, "GeneralConfiguration")
registerCreatureEvent(cid, "ReportBug")
registerCreatureEvent(cid, "LookSystem")
registerCreatureEvent(cid, "T1")
registerCreatureEvent(cid, "T2")
registerCreatureEvent(cid, "task_count")
registerCreatureEvent(cid, "pokemons")


addEvent(doSendAnimatedText, 500, getThingPosWithDebug(cid), "Bem Vindo!!", COLOR_BURN)

if getPlayerStorageValue(cid, 99284) == 1 then
setPlayerStorageValue(cid, 99284, -1)
end

if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then
setPlayerStorageValue(cid, 6598754, -1)
setPlayerStorageValue(cid, 6598755, -1)
doRemoveCondition(cid, CONDITION_OUTFIT) --alterado v1.9 \/
doTeleportThing(cid, posBackPVP, false)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
end

doChangeSpeed(cid, -(getCreatureSpeed(cid)))

--///////////////////////////////////////////////////////////////////////////--
local storages = {17000, 63215, 17001, 13008, 5700}
for s = 1, #storages do
if not tonumber(getPlayerStorageValue(cid, storages)) then
if s == 3 then
setPlayerStorageValue(cid, storages, 1)
elseif s == 4 then
setPlayerStorageValue(cid, storages, -1)
else
if isBeingUsed(getPlayerSlotItem(cid, 8).itemid) then
setPlayerStorageValue(cid, storages, 1)
else
setPlayerStorageValue(cid, storages, -1)
end
end
doPlayerSendTextMessage(cid, 27, "Sorry, but a problem occurred on the server, but now it's alright")
end
end
--/////////////////////////////////////////////////////////////////////////--
if getPlayerStorageValue(cid, 17000) >= 1 then -- fly

local item = getPlayerSlotItem(cid, 8)
local poke = getItemAttribute(item.uid, "poke")
doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
doRemoveCondition(cid, CONDITION_OUTFIT)
doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1)

local apos = getFlyingMarkedPos(cid)
apos.stackpos = 0

if getTileThingByPos(apos).itemid <= 2 then
doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE)
doCreateItem(460, 1, getFlyingMarkedPos(cid))
end

doTeleportThing(cid, apos, false)
if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then
sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8
end

local posicao = getTownTemplePosition(getPlayerTown(cid))
markFlyingPos(cid, posicao)

elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf

local item = getPlayerSlotItem(cid, 8)
local poke = getItemAttribute(item.uid, "poke")
doSetCreatureOutfit(cid, {lookType = surfs[poke].lookType + 351}, -1) --alterado v1.6
doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then
sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8
end

elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride

local item = getPlayerSlotItem(cid, 8)
local poke = getItemAttribute(item.uid, "poke")


if rides[poke] then
doChangeSpeed(cid, getPlayerStorageValue(cid, 54844))
doRemoveCondition(cid, CONDITION_OUTFIT)
doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1)
if getItemAttribute(item.uid, "boost") and getItemAttribute(item.uid, "boost") >= 50 and getPlayerStorageValue(cid, 42368) >= 1 then
sendAuraEffect(cid, auraSyst[getItemAttribute(item.uid, "aura")]) --alterado v1.8
end
else
setPlayerStorageValue(cid, 17001, -1)
doRegainSpeed(cid)
end

local posicao2 = getTownTemplePosition(getPlayerTown(cid))
markFlyingPos(cid, posicao2)

elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive
if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then
setPlayerStorageValue(cid, 13008, 0)
doRegainSpeed(cid)
doRemoveCondition(cid, CONDITION_OUTFIT)
return true
end

if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1)
end
doChangeSpeed(cid, 800)

elseif getPlayerStorageValue(cid, 5700) > 0 then --bike
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, getPlayerStorageValue(cid, 5700)) --alterado v1.8
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1394}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1393}, -1)
end

elseif getPlayerStorageValue(cid, 75846) >= 1 then --alterado v1.9 \/
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false)
setPlayerStorageValue(cid, 75846, -1)
sendMsgToPlayer(cid, 20, "You have been moved to your town!")
else
doRegainSpeed(cid)
end

if getPlayerStorageValue(cid, 22545) >= 1 then
setPlayerStorageValue(cid, 22545, -1)
doTeleportThing(cid, getClosestFreeTile(cid, posBackGolden), false)
setPlayerRecordWaves(cid)
end

if useKpdoDlls then
doUpdateMoves(cid)
doUpdatePokemonsBar(cid)
onPokeHealthChange(cid)
end
doPlayerChangeModeIcon(cid)
return true
end

Editado por Fortrek (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Erro Nº 3 = Os pokemons selvagens estao usando Movementos (ataques) que nao esta na tabela de movementos.. Entao para concertar, voce tem que verificar quais pokemons estao com ataques que nao tem na tabela movestable no configuration.lua e remover os ataques que eles nao tem no xml dele (pasta data/monsters/pokes...)

 

Ficou meio confuso '-'

 

Erro 22º = O pokemon que você usou os ataques, nao esta adicionado na tabela de movementos no configuration.lua, Adicione ele la que estara concertado.

 

Erro 15 = Isso é normal, se o player ja tem 6 pokemons na bag, que é o limite, os que ele conseguir serao mandados para o Cp

 

Erro 5 = Os UniqueIDs nao podem se repetir quando colocados em algo no mapa, entao vc so pode colocar um uniqueid em um unico item no mapa. Para concertar, ache esses itens em que os ids estao duplicados e troque eles

 

 

Espero ajudar vc ... So isso que consegui resolver pelo que vi, qualquer coisa ajudo mais. Boa Sorte :3

Ajudei ?? Clique em Gostei  ^^

 

↓ Meus Trabalhos

 

PokeZot

Galaxy PokeOT

Bau que dá Pokémon

 

3rkmt.jpg2mxpw2h.jpgw1fxpk.jpg

Página no Facebook: facebook.com/pokerush1

 

Link para o post
Compartilhar em outros sites

1° troque o createpokeball por esse;

local typess = {       --alterado v2.9 \/  TUDO!!
[1] = "normal",
[2] = "great",
[3] = "super",
[4] = "ultra",
[5] = "saffari",
}
function onSay(cid, words, param)
 
if param == "" or param == " " then
   doPlayerSendCancel(cid, 'Command needs parameters, function structure: "/cb [Pokemon Name], [boost], [Gender], [ball type]".')
   return false
end
 
local t = string.explode(param, ",")
--
local name = ""
local btype = (tostring(t[4]) and pokeballs[t[4]]) and t[4] or typess[math.random(1, #typess)] 
local gender = (t[3] and tonumber(t[3])) and tonumber(t[3]) or t[3] and t[3] or nil              
 
if tostring(t[1]) then
name = doCorrectString(t[1])   
if not pokes[name] then
  doPlayerSendCancel(cid, "Sorry, a pokemon with the name "..name.." doesn't exists.")
  return true
end
print(""..name.." ball has been created by "..getPlayerName(cid)..".")
end
 
addPokeToPlayer(cid, name, (t[2] and tonumber(t[2]) or 0), gender, btype)
 
return true
end

 

teste e fale se funcionou, vou ajuda de 1 em 1 ^^

Link para o post
Compartilhar em outros sites

2º - NPC DALK 

troque o script por esse;

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
 
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
msg = string.lower(msg)
---------
local configs = {
diamondsID = 2145,  --id do diamond no items.xml/otb... (achu q vais ter q criar, ou pegar algum item q ja tenha ae...)
VIP = {days = 30, cost = 10},    --days = qnts dias de VIP o player compra por vez.... cost = custo para virar VIP...
SEX = {cost = 2},   --cost = custo para trocar de sexo...
TOWN = {cost = 2},  --cost = custo para trocar de city...
}  
 
local places = {
["saffron"] = 1,    --tens q por o id do RME das tuas citys aki...
["cerulean"] = 2,
["lavender"] = 3,
["fuchsia"] = 4,
["celadon"] = 5, 
["viridian"] = 6, 
["vermilion"] = 7, 
["pewter"] = 8,                      
["cinnabar"] = 10,
}
 
       
        if (msgcontains(msg, 'diamond account') or msgcontains(msg, 'diamond')) then  
           selfSay("você que paga uma diamond account e Ser VIP até "..configs.VIP.days.." dias? Custará "..configs.VIP.cost.." diamonds!", cid)   
           talkState[talkUser] = 2
           return true    
          
        elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then
           if getPlayerItemCount(cid, configs.diamondsID) >= configs.VIP.cost then
              selfSay("Ok então, agora você tem "..configs.VIP.days.." dias de VIP, Divirta-se!", cid)
              doPlayerAddPremiumDays(cid, configs.VIP.days)
              doPlayerRemoveItem(cid, configs.diamondsID, configs.VIP.cost)
              talkState[talkUser] = 0
              return true
           else
              selfSay("Você precisa de pelo menos "..configs.VIP.cost.." diamonds para fazer isso!", cid)
              talkState[talkUser] = 0
              return true
           end
           
        elseif (msgcontains(msg, 'sex change') or msgcontains(msg, 'sex')) then
           selfSay("Então você quer mudar de sexo? Custará "..configs.SEX.cost.." diamonds, Para isso Fale sex change ou sex", cid) 
           talkState[talkUser] = 3
           return true
        
        elseif msgcontains(msg, 'yes') and talkState[talkUser] == 3 then
           if getPlayerItemCount(cid, configs.diamondsID) >= configs.SEX.cost then
              local sex = getPlayerSex(cid)
              selfSay("Ok então, agora você é do sexo "..(sex == 0 and "female" or "male")..". Divirta-se!", cid)
              doPlayerSetSex(cid, (sex == 0 and 1 or 0))
              doPlayerRemoveItem(cid, configs.diamondsID, configs.SEX.cost)
              talkState[talkUser] = 0
              return true
           else
              selfSay("Você precisa de pelo menos "..configs.SEX.cost.." diamonds para fazer isso!", cid)
              talkState[talkUser] = 0
              return true
           end
           
        elseif (msgcontains(msg, 'town change') or msgcontains(msg, 'town')) then 
           selfSay("Então você quer mudar sua cidade natal? Custará "..configs.TOWN.cost.." diamonds, para isso fale town change ou town", cid) 
           talkState[talkUser] = 4
           return true
           
        elseif msgcontains(msg, 'yes') and talkState[talkUser] == 4 then
           selfSay("Ok, então, me diga qual cidade?", cid)
           talkState[talkUser] = 5
           return true
           
        elseif places[msg] and talkState[talkUser] == 5 then
           if getPlayerItemCount(cid, configs.diamondsID) >= configs.TOWN.cost then
              selfSay("Feito, desfrutar da sua nova cidade!", cid)
              doPlayerSetTown(cid, places[msg]) 
              doPlayerRemoveItem(cid, configs.diamondsID, configs.TOWN.cost)
              talkState[talkUser] = 0
              return true
           else
              selfSay("Você precisa de pelo menos "..configs.TOWN.cost.." diamonds para fazer isso!", cid)
              talkState[talkUser] = 0
              return true
           end 
           
        elseif msgcontains(msg, 'no') then
          selfSay("Ok, então, dizer-me outra vez o que você quer ...", cid)
          talkState[talkUser] = 0
          return true 
        end
 
return true
end
 
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())             

 

teste e fale se funcionou

Link para o post
Compartilhar em outros sites

ERRO 2: Sobre o NPC:

A função da linha 68 "places" provavelmente não existe na lib, sendo usada incorretamente ou está conflitando.

 

Não conheço direito as funções destes servidores derivados.

Conforme for conseguindo tempo, vou verificando os erros pra você.

Gosta do meu trabalho?

Curta e siga a página do meu projeto de 2016 e 2017 (Lab Z Games) que trará vários servidores OTServs.

 

Atenciosamente,
Adriano Swatt'

 

Para ver meus tutoriais acesse meu perfil.

 

cbCyOSZ.png

Link para o post
Compartilhar em outros sites

Anna Feeh, Sim sim, todo rep+ eu já agradeço por postar uma solução funcional ou não, mesmo porque eu acho que deva ganhar rep+ pelo sua boa vontade.

mais funfou sim, quando não funfar eu aviso beleza?

e muito obrigado por tudo. depois que terminar esses ainda vai ter outros que vou postar, mais ainda nao sei como, pq o script e imenso, então devo postar o script pra download com scan

Link para o post
Compartilhar em outros sites

3° isso é no moves dos pokemons, esses mesmo ataques estão funcionando?

 

4° troque o script da box por esse;

local a = {
 
[11638] = {pokemons = {"Slowpoke", "Magnemite", "Doduo", "Seel", "Grimer", "Gastly", "Drowzee", "Voltorb", "Cubone", "Koffing", "Cyndaquil", "Pidgeotto", "Weepinbell", "Wooper", "Dratini", "Dunsparce", "Pichu", "Slugma", "Remoraid", "Ledyba", "Goldeen", "Vulpix", "Tentacool", "Bulbasaur", "Charmander", "Squirtle", "Metapod", "Kakuna", "Teddiursa", "Chikorita", "Chinchou", "Cleffa", "Marill", "Natu", "Smoochum", "Phanpy", "Slugma", "Ekans", "Abra", "Mankey", "Psyduck", "Sandshrew", "Kabuto", "Beedrill", Omanyte", "Butterfree", "Snubbul", "Togepi", "Zubat", "Diglett", "Venonat", "Shuckle", "Mareep", "Meowth", "Poliwag", "Growlithe", "Machop", "Ponyta", "Geodude", "Hoothoot", "Pineco", "Sentret", "Swinub", "Totodile"}},
 
[11639] = {pokemons = {"Skiploom", "Raticate", "Ariados", "Flaffy", "Delibird", "Fearow", "Clefairy", "Arbok", "Nidorino", "Nidorina", "Elekid", "Magby", "Ledian", "Dodrio", "Golbat", "Gloom", "Parasect", "Venomoth", "Dugtrio", "Persian", "Poliwhirl", "Machoke", "Quilava", "Yanma", "Graveler", "Slowbro", "Magneton", "Farfetch'd", "Haunter", "Kingler", "Electrode", "Weezing", "Seadra", "Bayleef", "Croconaw", "Qwilfish", "Tyrogue", "Jigglypuff", "Seaking", "Tauros", "Starmie", "Eevee", "Charmeleon", "Wartortle", "Ivysaur", "Pikachu"}},
 
[11640] = {pokemons = {"Politoed", "Magcargo", "Noctowl", "Poliwrath", "Nidoking", "Pidgeot", "Sandslash", "Ninetales", "Vileplume", "Primeape", "Nidoqueen", "Granbull", "Jumpluff", "Golduck", "Kadabra", "Rapidash", "Azumarill", "Murkrow", "Clefable", "Wigglytuff", "Dewgong", "Onix", "Cloyster", "Hypno", "Exeggutor", "Marowak", "Hitmonchan", "Quagsire", "Stantler", "Xatu", "Hitmonlee", "Bellossom", "Lanturn", "Pupitar", "Smeargle", "Lickitung", "Golem", "Chansey", "Tangela", "Mr. Mime", "Pinsir", "Espeon", "Umbreon", "Vaporeon", "Jolteon", "Flareon", "Porygon", "Dragonair", "Hitmontop", "Octillery", "Sneasel"}},
 
[11641] = {pokemons = {"Shiny Hitmonlee", "Shiny Hitmonchan", "Dragonite", "Snorlax", "Kabutops", "Omastar", "Kingdra", "Ampharos", "Blissey", "Donphan", "Girafarig", "Mantine", "Miltank", "Porygon2", "Skarmory", "Lapras", "Gyarados", "Magmar", "Electabuzz", "Jynx", "Scyther", "Kangaskhan", "Venusaur", "Crobat", "Heracross", "Meganium", "Piloswine", "Scizor", "Machamp", "Arcanine", "Charizard", "Blastoise", "Tentacruel", "Alakazam", "Feraligatr", "Houndoom", "Gengar", "Rhydon", "Misdreavus", "Wobbuffet", "Raichu", "Slowking", "Steelix", "Sudowoodo", "Typhlosion", "Tyranitar", "Ursaring"}},
 
[12331] = {pokemons = {"Shiny Abra"}},
 
[12227] = {pokemons = {"Shiny Crobat", "Shiny Magmar", "Shiny Giant Magikarp", "Shiny Venusaur", "Shiny Charizard", "Shiny Blastoise", "Shiny Arcanine", "Shiny Alakazam", "Shiny Ninetales", "Shiny Gengar", "Shiny Scyther", "Shiny Rhydon", "Shiny Umbreon", "Shiny Pidgeot", "Shiny Raichu", "Shiny Tentacruel", "Shiny Ampharos", "Shiny Feraligatr", "Shiny Meganium", "Shiny Jynx", "Shiny Electabuzz", "Shiny Gyarados", "Shiny Snorlax", "Shiny Tangela", "Shiny Ariados", "Shiny Politoed", "Shiny Typhlosion", "Shiny Tauros", "Shiny Butterfree", "Shiny Beedrill", "Shiny Venomoth", "Shiny Espeon", "Shiny Magneton", "Shiny Onix", "Shiny Larvitar", "Shiny Pupitar", "Shiny Machamp", "Shiny Golbat", "Shiny Kingler", "Shiny Dodrio", "Shiny Farfetch'd", "Shiny Parasect", "Shiny Pinsir", "Shiny Zubat", "Shiny Dratini", "Shiny Venonat", "Shiny Electrode", "Shiny Muk", "Shiny Stantler", "Shiny Marowak", "Shiny Seadra", "Shiny Dragonair", "Shiny Mr. Mime"}}
}
 
local happy = 220 
         
function onUse(cid, item, frompos, item2, topos)
         local b = a[item.itemid]                                    
               if not b then return true end
         local pokemon = b.pokemons[math.random(#b.pokemons)]
         local btype = b.balltype
               if not pokeballs[btype] then return true end    
         
         doPlayerSendTextMessage(cid, 27, "You opened a pokemon prize box +"..item.itemid - (11637).."!")
    doPlayerSendTextMessage(cid, 27, "The prize pokemon was a "..pokemon..", congratulations!")
    doSendMagicEffect(getThingPos(cid), 29)
               
         addPokeToPlayer(cid, pokemon, 0, nil, btype)     --alterado v1.9                                                 
         doRemoveItem(item.uid, 1)
    
return true
end

Link para o post
Compartilhar em outros sites

5 -- Erro é simples tem um uniqueid(unicoid) duplicado você terar que deletar troca-lo, ou  em movements/movements.xml ou em actions/actions.xml, Que não vem ao caso poderia tbm ser o no mapa ou em scripter de quest.

 

6 -- Esse é simples no primeiro spoiler é um problema no fly, o scripter ta tentando localizar a habilidade desses pokemons = "Pinsir, Butterfree, Yanma é Xatu" pode ter acontecido um erro que você ou alguem tenha colocado como se esses pokemons tive-se a habilidade "fly" creio que não tenha intão você terar que ir em data/lib/configuration/specialabilities é deleta-lo é tbm na tabela flys no configuration mesmo.

 

2 - Spoiler não entendi muito bem creio que tenha um erro que o pokemon tenta executar uma orden enquanto ele tiver na passive/control mind não tenho ctz.

[21/08/2014 23:41:02] [Error - Action Interface]
[21/08/2014 23:41:02] In a timer event called from:
[21/08/2014 23:41:02] data/actions/scripts/order.lua:onUse
[21/08/2014 23:41:02] Description:
[21/08/2014 23:41:02] (luaDoCreateMonster) Cannot create monster: Pinsir

[21/08/2014 23:43:36] [Error - Action Interface]
[21/08/2014 23:43:36] In a timer event called from:
[21/08/2014 23:43:36] data/actions/scripts/order.lua:onUse
[21/08/2014 23:43:36] Description:
[21/08/2014 23:43:36] (luaDoCreateMonster) Cannot create monster: Butterfree

[21/08/2014 23:43:56] [Error - Action Interface]
[21/08/2014 23:43:56] In a timer event called from:
[21/08/2014 23:43:56] data/actions/scripts/order.lua:onUse
[21/08/2014 23:43:56] Description:
[21/08/2014 23:43:56] (luaDoCreateMonster) Cannot create monster: Yanma

[21/08/2014 23:44:23] [Error - Action Interface]
[21/08/2014 23:44:23] In a timer event called from:
[21/08/2014 23:44:23] data/actions/scripts/order.lua:onUse
[21/08/2014 23:44:24] Description:
[21/08/2014 23:44:24] (luaDoCreateMonster) Cannot create monster: Xatu

o outro

[21/08/2014 23:40:28] [Error - Action Interface]

[21/08/2014 23:40:28] In a timer event called from:
[21/08/2014 23:40:28] data/actions/scripts/order.lua:onUse
[21/08/2014 23:40:28] Description:
[21/08/2014 23:40:28] (luadoSetMonsterPassive) Creature not found

 

Veja se as duvidas acimas foram senadas é caso persista comente abaixo, dps posto as outros tou muito ocupado ^^.

Editado por kttallan (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Zagaf
      ShowOff Poketibia
       
      Bom a alguns dias atrás eu comecei a reformular um mapa de poketibia que eu baixei (pokexmaster) , ate o momento eu refiz a cidade de saffron.
       
       
       
       
       
    • Por Baryon
      Boa noite amigos, estou aqui para apresentar meu projeto.
      Estou aqui no intuito de tentar desenvolver um ats baseado em naruto full perspectiva e com uso reduzido de bot, teremos um bot próprio que ira lhe auxiliar na cura e com espaço para 1 magia com finalidade de treino, assim focando que os players possam tentar se divertir jogando na mao tanto a parte pve como pvp do game (oque eu acho mais legal).
      O Servidor ja se encontra com alguns sistema sendo eles:
      ・Passe de batalha
      ・Painel de missoes 
      ・Village war
      ・Sistema de vilas
      ・Bingo book
      ・Autoloot
      ・Ninja procurado
      ・Painel de Dungeons
      ・ World Boss
      Nossas vocaçoes sao divididas em classes sendo elas:
       ・Shooters: Deidara, Gaara, Kankuro, Tenten, Sasori, Konan.
       ・Especialistas: Shikamaru, Nagato, Hashirama, Oonoki, Orochimaru.
       ・Assassinos: Asuma, Madara, Minato, Sasuke, Obito, Kisame.
       ・Suportes: Sakura, Shizune, Ino, Tsunade.
       ・Lutadores: Naruto, Kiba, Chouji, Lee, Neji, Hinata.
             (obs: ja temos por volta de mais 10 personagens "prontos" alem desses com foco em atualizações futuras)
       Atualmente apenas eu e mais uma pessoas estamos desenvolvendo o servidor e ambos trabalham o tempo ou seja nao temos tanto tempo disponivel entao estou em buscas de novas pessoas com certa experiencia para integrar a equipe tenho em mente 4 vagas disponiveis que sao: 1 Mapper, 1 Dev, 1 Designer, 1 Moderador (ficara em contato com a staff e interagindo em nosso discord, ficando por dentro das novidades e no inicio do game ira iniciar como tutor para auxiliar os players).
       Caso alguem tenha interessa em embarcar nessa aventura favor entrar em contato cmg pelo discord 😉 em breve estarei postando mais atualizaçoes do ot aqui!

       Nosso discord: https://discord.gg/pPTkbAnNSV
      Meu contato no discord: baryon1492



    • Por Mathwsz
      Bom galera, estou trazendo um script de fusão que funciona assim:
      Explicação: É necessário de 7 itens, na qual você coloca em tal coordenada e aperte a alavanca, sendo assim formando um item na qual você deseja em tal lugar configurado.
      Exemplo: Você pode fazer 7 bosses na qual dropa tals itens "Parecidos" e formando um item raro de sua escolha, ou como preferir.. Vamos ao script!
       
      Em Data/Actions/Scripts crie um arquivo chamado fusaoitens.lua e adicione isto dentro:
       
       
      Agora, em Data/Actions.xml adicione o seguinte:
       
      <action uniqueid="9900" script="fusaoitens.lua" /> E no seu RemeresMapEditor , pegue sua alavanca, vai em Propriedades e adicione o UniqueID 9900 nele! 
      PRONTO! Agora configure e divirta-se! Obs: Caso lhe ajudei, da um REP+ Aí !
    • Por Underewar
      Após anos sem contribuir com um servidor fico feliz em lançar essa versão com muitas correções!

      Está versão é a versão OPEN_BETA.

      Que pode ser testada aqui. (Online até dia 25/05/2023)

      Foram corrigos muitos bugs e existem diversas melhorias em muitos dos sistemas existentes.

      Vocês podem encontrar as Libs que devem estar com uns 30% desses novos sistemas que foram adicionados e podem testar ou usar os códigos.

      O servidor esta online a 120+ dias, foi construído com XP 1 e bateu 66 Players Online.

      O ideal é usar este servidor em low rate.

      Atualizações

      Verifique a pagina do facebook para saber todas as atualizações!
      Se você curtiu acompanhe a pagina para acompanha o lançamento do jogo oficial!
       
      Importante
       

      A cada onda do nosso sistema de incursões, você terá a chance de encontrar um Pokémon Shiny raro e, após a terceira onda, um chefe shiny ainda mais raro aparecerá, oferecendo recompensas valiosas para os treinadores ousados o suficiente para enfrentá-lo.
      Utilize seus tokens de incursão para reiniciar o sistema e tentar novamente.

      Para saber sobre todas as novidades Por favor considere olhar nossa pagina,

      https://www.facebook.com/pokexadventure/photos
       
      Imagens
       
       
      Downloads

      Para configurar basta substituir a pasta data que você pode encontrar fazendo download da source, cole a pasta data baixa do Pokexadventure e divirta-se!

      Sources

      pokexadventure_open_beta_datapack.rar

      DLLS + Executaveis (Windows)

      OTC
       
      (mediafire.com)
       
      Website
       
      https://github.com/otsoft/myaac

      Ferramentas : 
      auto_restarter_windows.bat

      RME 3.5 ou superior.

      Object builder 10.98 Support ou superior.

      Item editor 10.98 Support ou superior.

      Tutoriais para Compilações
       

      Créditos : @Underewar @pota
    • Por Tungsx
      Olá a todos,
      Recentemente, trabalhei em um projeto de desenvolvimento de uma source para PDA e fiquei muito satisfeito com os resultados. Depois de muito esforço e testes, consegui atingir cerca de 90% de sucesso na implementação da source em diversos PDAs. Agora, gostaria de compartilhar meu trabalho com vocês.
      A source é escrita em C++ e possui diversas funções, incluindo getDamageMapPercent, isPokeball e Order System (getDirectionToWalk). Adicionado raças (Crystal, Steel, Dark), função OnSpawn, Pokemon Passivos e agressivos. Além disso, é altamente compatível com a maioria dos PDAs, embora possa haver algumas adaptações necessárias dependendo do dispositivo específico.
      Para quem estiver interessado em testar a source, deixo aqui o link para todas as funções: https://pastebin.com/EdvX88gv
      Ficarei muito grato por qualquer feedback que vocês possam me dar sobre a minha source. Compartilhar conhecimento e ajudar a comunidade é sempre muito gratificante e espero que minha source possa ajudá-los em seus projetos. Obrigado pela atenção e apoio!
      Atenciosamente, Tungs (kevick)
      a source se encontra anexada nesse tópico + link do mediafire para quem não conseguir baixar aqui.
       
      DOWNLOAD DA SOURCE ATUALIZADA: https://www.mediafire.com/file/nbf3ypdv8yaf903/Source_PDA_atualiza%C3%A7%C3%A3o_052023.rar/file
       
      PS. QUALQUER ERRO EU AJUDAREI, BASTA COMENTAR AQUI NO TÓPICO
       
      SCAN : https://www.virustotal.com/gui/file/d0a3903d6d246dfaa63c0813e7dc91c5d8cb4ebf3f4969ed0e81dbb04504de5e?nocache=1
       
      ATUALIZAÇÃO 052023
      ADIÇÃO DA FUNÇÃO getDirectionToWalk (C++) após baixar e compilar a nova source que se encontra logo abaixo, adicione em 032-position.lua que se encontra na pasta lib a função abaixo:
      function getDirectionToWalk(p1, pos2) local dir = NORTH local pos1 = getCreaturePosition(p1) if(pos1.x > pos2.x) then dir = WEST if(pos1.y > pos2.y) then dir = NORTHWEST elseif(pos1.y < pos2.y) then dir = SOUTHWEST end elseif(pos1.x < pos2.x) then dir = EAST if(pos1.y > pos2.y) then dir = NORTHEAST elseif(pos1.y < pos2.y) then dir = SOUTHEAST end else if(pos1.y > pos2.y) then dir = NORTH elseif(pos1.y < pos2.y) then dir = SOUTH end end return dir end function getNextStepDelay(cid, dir) return tonumber(398) end  
       
       
       
      Source PDA atualização 052023.rar
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo