Ir para conteúdo

[Encerrado] [Pokemon] Dúvidas? - Pda


lucashgas

Posts Recomendados

Alguém me consegue o htdocs do GMHareaOT?, o Multiupload tá fora do ar

 

por outro lado, sobre o daycare, eu acho que não é muito necessário

mas já que tem gender system, why not?

 

@Distro

 

ainda ta caindo ao dar save mas nem toda hora

in game também cai as vezes.

Link para o comentário
Compartilhar em outros sites

como boto novos pokes na pokebar?

ja tem uns 20 perguntando eu não sei bem tem que ser uma id certo por que no lib/cooldown tem

 

local foto = fotos[name] - 928

essa parte que pede onde pegar as fotos e o seguinte esse -928 eu acho que seria o numero de cada portrait na lib/configuration - 928 exemplo

Bulbasaur portrait e 11989

11989-928 = 11061

 

11061 e o id da foto no dat editor entendeu?

Agora a parte de colocar os novos é que eu não sei por que ali ta diminuindo 928 que no caso são para os 151 kanto, para adicionar mais eu não sei por que eu tenho os shinys portraits agora não tenho eles na cooldown pois não uso se usase o meu shiny ficaria:

[shiny bulba = 12577

12577-928 = 11649 no meu dat e um item morto :s.

Se algum scripter conseguir mudar o cooldownbar na lib eu não sei se tivesse um jeito de fazer uma tabela com os ids de cada pokemon ai o cara mesmo configurava.

Porem não sou scripter :(

Se alguem quiser dar uma olhada. o script é esse: data/lib/cooldown bar (esse é o padrão não mechi em nada)

 

function getPlayerPokeballs(cid)

local ret = {}

local container = 0

 

if isCreature(cid) then

container = getPlayerSlotItem(cid, 3).uid

local myball = getPlayerSlotItem(cid, 8)

if myball.uid > 0 then

table.insert(ret, myball)

end

else

container = cid

end

 

if isContainer(container) and getContainerSize(container) > 0 then

for slot = 0, (getContainerSize(container) - 1) do

local item = getContainerItem(container, slot)

if isContainer(item.uid) then

local itemsbag = getPlayerPokeballs(item.uid)

if itemsbag and #itemsbag > 0 then

for i = 0, #itemsbag do

table.insert(ret, itemsbag)

end

end

elseif isPokeball(item.itemid) then

table.insert(ret, item)

end

end

end

return ret

end

 

function doUpdatePokemonsBar(cid)

local ret = "p#,"

local balls = getPlayerPokeballs(cid)

local times = 0

for a = 1, #balls do

times = times + 1

local item = balls[a]

local hp = math.ceil(getItemAttribute(item.uid, "hp") * 100)

local name = getItemAttribute(item.uid, "poke")

local foto = fotos[name] - 928

doItemSetAttribute(item.uid, "ballorder", times)

ret = ret..""..foto..","..name..""..times..","..hp..","

end

doPlayerSendCancel(cid, ret)

end

 

function getNewMoveTable(table, n)

if n == 1 and table.move1 then

return table.move1

elseif n == 2 and table.move2 then

return table.move2

elseif n == 3 and table.move3 then

return table.move3

elseif n == 4 and table.move4 then

return table.move4

elseif n == 5 and table.move5 then

return table.move5

elseif n == 6 and table.move6 then

return table.move6

elseif n == 7 and table.move7 then

return table.move7

elseif n == 8 and table.move8 then

return table.move8

elseif n == 9 and table.move9 then

return table.move9

elseif n == 10 and table.move10 then

return table.move10

elseif n == 11 and table.move11 then

return table.move11

elseif n == 12 and table.move12 then

return table.move12

else

return false

end

end

 

 

function doUpdateMoves(cid)

local summon = getCreatureSummons(cid)[1]

local ret = "12&,"

if not summon then

for a = 1, 12 do

ret = ret.."n/n,"

end

doPlayerSendCancel(cid, ret)

addEvent(doUpdateCooldowns, 100, cid)

return true

end

local ret = "12&,"

local moves = movestable[getCreatureName(summon)]

for a = 1, 12 do

local b = getNewMoveTable(moves, a)

if b then

ret = ret..""..b.name..","

else

ret = ret.."n/n,"

end

end

doPlayerSendCancel(cid, ret)

addEvent(doUpdateCooldowns, 100, cid)

end

 

function doUpdateCooldowns(cid)

local a = getPlayerSlotItem(cid, 8)

local ret = "12|,"

if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then

for cds = 1, 12 do

ret = ret.."-1,"

end

doPlayerSendCancel(cid, ret)

return true

end

for cds = 1, 12 do

local cdzin = "move"..cds

 

if getCD(a.uid, cdzin) > 0 then

ret = ret..""..(getCD(a.uid, cdzin) - 1)..","

else

ret = ret.."0,"

end

end

doPlayerSendCancel(cid, ret)

end

 

function getBallsAttributes(item)

local t = {"boffense", "bdefense", "bagility", "bsattack",

"offense", "defense", "speed", "level", "specialattack",

"poke", "gender", "vitality", "nick", "boost", "happy", "hunger",

"burn", "burndmg", "poison", "poisondmg", "confuse", "blind",

"sleep", "hp", "description", "exp", "nextlevelexp", "transBegin",

"transLeft", "transTurn", "transOutfit", "transName", "trans",

"light", "blink", "move1", "move2", "move3", "move4", "move5",

"move6", "move7", "move8", "move9", "move10", "move11", "move12",

"ballorder", "firstpoke"}

local ret = {}

for a = 1, #t do

ret[t[a]] = getItemAttribute(item, t[a]) or false

end

return ret

end

 

function doChangeBalls(cid, item1, item2)

if not isCreature(cid) then return true end

if item1.uid == item2.uid then

if #getCreatureSummons(cid) <= 0 then

doGoPokemon(cid, getPlayerSlotItem(cid, 8))

else

doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)

end

return true

end

 

if item1.uid > 0 and item2.uid > 0 then

local io = getBallsAttributes(item1.uid)

local it = getBallsAttributes(item2.uid)

for a, b in pairs (io) do

if b then

doItemSetAttribute(item2.uid, a, b)

else

doItemEraseAttribute(item2.uid, a)

end

end

for a, b in pairs (it) do

if b then

doItemSetAttribute(item1.uid, a, b)

else

doItemEraseAttribute(item1.uid, a)

end

end

local id = item2.itemid

doTransformItem(item2.uid, item1.itemid)

doTransformItem(item1.uid, id)

doGoPokemon(cid, getPlayerSlotItem(cid, 8))

else

local id = item2.itemid

local b = getBallsAttributes(item2.uid)

local a = doPlayerAddItem(cid, 2643, false)

for c, d in pairs (b) do

if d then

doItemSetAttribute(a, c, d)

else

doItemEraseAttribute(a, c)

end

end

doRemoveItem(item2.uid, 1)

doTransformItem(a, id)

doGoPokemon(cid, getPlayerSlotItem(cid, 8))

end

end

 

 

Link para o comentário
Compartilhar em outros sites

@SoulOroshie

vc pode sim fazer uma tabela separada com os ids dos portraits do .dat ... eh soh tu criar a tabela.. tpw..

fotosDAT = {
["Bulbasaur"] = id no dat,
["Ivysaur"] = id no dat,
...
}

 

e dai trocar essa parte no script...

local foto = fotos[name] - 928

 

por essa...

local foto = fotosDAT[name]

 

mas se n me engano.. o @yahooABC posto um jeito mais facil de fazer isso.. ;x mas n lembro q pagina ta... esperar ele olhar aki e se manifestar sei la.. ;p

Editado por Slicer
Link para o comentário
Compartilhar em outros sites

@all

 

gente tem muitos que estão com esse erro

 

[01/03/2012 13:09:10] [Error - CreatureScript Interface
[01/03/2012 13:09:10] In a timer event called from:
[01/03/2012 13:09:10] data/creaturescripts/scripts/spawn.lua:onSpawn
[01/03/2012 13:09:10] Description:
[01/03/2012 13:09:10] data/creaturescripts/scripts/spawn.lua:4: attempt to index field '?' (a nil value)
[01/03/2012 13:09:10] stack traceback:
[01/03/2012 13:09:10] data/creaturescripts/scripts/spawn.lua:4: in function <data/creaturescripts/scripts/spawn.lua:1>

 

relacionado ao spawn.lua

isso porque vocês estão adicionando os johto

procure na pasta monster todos os johto e vejam se todos os pokemon estão com evento adicionado

 

se não tiver adicione essa parte

 

<script>
<event name="Spawn"/>
</script>

 

ai vejam se ainda o problema ainda continua

Link para o comentário
Compartilhar em outros sites

Nibelins irei testar isso ae.

Yahoo e slicer deu esse erro:

[01/03/2012 17:37:53] data/lib/cooldown bar.lua:3: attempt to call global 'getPlayerPokeballs' (a nil value)

[01/03/2012 17:37:53] stack traceback:

[01/03/2012 17:37:53] data/lib/cooldown bar.lua:3: in function 'doUpdatePokemonsBar'

[01/03/2012 17:37:53] data/talkactions/scripts/cdbar.lua:28: in function <data/talkactions/scripts/cdbar.lua:14>

Ai eu queria saber por que pois o meu char fico falando /pokeread da talkaction mas eu nem mechi lá eu peguei o seu script e mudei os ids da 1º e da ultima portrait e depois trokei o 911 o meu deu 849 eu peguei o id do meu primeiro e diminuir do potrait do dat que era o seguinte:

id no items.xml :12577

id no dat : 11728

deu = 849 ai o meu script fico:

 

function doUpdatePokemonsBar(cid)

local ret = "p#,"

local balls = getPlayerPokeballs(cid)

local times = 0

for a = 1, #balls do

local item = balls[a]

local hp = math.ceil(getItemAttribute(item.uid, "hp") * 100)

local name = getItemAttribute(item.uid, "poke")

local port = getPlayerSlotItem(cid, CONST_SLOT_LEGS)

if fotos[name] >= 12577 and fotos[name] <= 12727 then

times = times + 1

local foto = fotos[name] - 849

doItemSetAttribute(item.uid, "ballorder", times)

ret = ret..""..foto..","..name..""..times..","..hp..","

else

times = times + 1

local foto = fotos[name] - 928

doItemSetAttribute(item.uid, "ballorder", times)

ret = ret..""..foto..","..name..""..times..","..hp..","

end

end

doPlayerSendCancel(cid, ret)

end

 

tem algum erro?

Link para o comentário
Compartilhar em outros sites

@SoulOroshie

tens essa funcion ae no teu lib/cooldown bar.lua? ...

 

 

function getPlayerPokeballs(cid)

local ret = {}

local container = 0

 

if isCreature(cid) then

container = getPlayerSlotItem(cid, 3).uid

local myball = getPlayerSlotItem(cid, 8)

if myball.uid > 0 then

table.insert(ret, myball)

end

else

container = cid

end

 

if isContainer(container) and getContainerSize(container) > 0 then

for slot = 0, (getContainerSize(container) - 1) do

local item = getContainerItem(container, slot)

if isContainer(item.uid) then

local itemsbag = getPlayerPokeballs(item.uid)

if itemsbag and #itemsbag > 0 then

for i = 0, #itemsbag do

table.insert(ret, itemsbag)

end

end

elseif isPokeball(item.itemid) then

table.insert(ret, item)

end

end

end

return ret

end

 

 

esse erro parece ser pq vc n tem essa funcion... mas como tu devia estar usando a CDbar antes... ;x estranhu...

Editado por Slicer
Link para o comentário
Compartilhar em outros sites

Nibelins não ainda continua esse errinho do spawn.

Slicer tipo é só substituir por esse teu?

Se sim deu esse erro:

[01/03/2012 18:11:35] data/actions/scripts/goback.lua:onUse

[01/03/2012 18:11:35] Description:

[01/03/2012 18:11:35] data/actions/scripts/goback.lua:122: attempt to call global 'doUpdateMoves' (a nil value)

[01/03/2012 18:11:35] stack traceback:

[01/03/2012 18:11:35] data/actions/scripts/goback.lua:122: in function <data/actions/scripts/goback.lua:1>

 

[01/03/2012 18:11:37] [Error - TalkAction Interface]

[01/03/2012 18:11:37] data/talkactions/scripts/cdbar.lua:onSay

[01/03/2012 18:11:37] Description:

[01/03/2012 18:11:37] data/talkactions/scripts/cdbar.lua:28: attempt to call global 'doUpdatePokemonsBar' (a nil value)

[01/03/2012 18:11:37] stack traceback:

[01/03/2012 18:11:37] data/talkactions/scripts/cdbar.lua:28: in function <data/talkactions/scripts/cdbar.lua:14>

Link para o comentário
Compartilhar em outros sites

@SoulOroshie

 

mano.. faz assim.. substitui todo seu lib/cooldown bar.lua por esse...

 

 

function getPlayerPokeballs(cid)

local ret = {}

local container = 0

 

if isCreature(cid) then

container = getPlayerSlotItem(cid, 3).uid

local myball = getPlayerSlotItem(cid, 8)

if myball.uid > 0 then

table.insert(ret, myball)

end

else

container = cid

end

 

if isContainer(container) and getContainerSize(container) > 0 then

for slot = 0, (getContainerSize(container) - 1) do

local item = getContainerItem(container, slot)

if isContainer(item.uid) then

local itemsbag = getPlayerPokeballs(item.uid)

if itemsbag and #itemsbag > 0 then

for i = 0, #itemsbag do

table.insert(ret, itemsbag)

end

end

elseif isPokeball(item.itemid) then

table.insert(ret, item)

end

end

end

return ret

end

 

function doUpdatePokemonsBar(cid)

local ret = "p#,"

local balls = getPlayerPokeballs(cid)

local times = 0

for a = 1, #balls do

times = times + 1

local item = balls[a]

local hp = math.ceil(getItemAttribute(item.uid, "hp") * 100)

local name = getItemAttribute(item.uid, "poke")

if fotos[name] >= 12577 and fotos[name] <= 12727 then

foto = fotos[name] - 849

else

foto = fotos[name] - 928

end

doItemSetAttribute(item.uid, "ballorder", times)

ret = ret..""..foto..","..name..""..times..","..hp..","

end

doPlayerSendCancel(cid, ret)

end

 

function getNewMoveTable(table, n)

if n == 1 and table.move1 then

return table.move1

elseif n == 2 and table.move2 then

return table.move2

elseif n == 3 and table.move3 then

return table.move3

elseif n == 4 and table.move4 then

return table.move4

elseif n == 5 and table.move5 then

return table.move5

elseif n == 6 and table.move6 then

return table.move6

elseif n == 7 and table.move7 then

return table.move7

elseif n == 8 and table.move8 then

return table.move8

elseif n == 9 and table.move9 then

return table.move9

elseif n == 10 and table.move10 then

return table.move10

elseif n == 11 and table.move11 then

return table.move11

elseif n == 12 and table.move12 then

return table.move12

else

return false

end

end

 

 

function doUpdateMoves(cid)

local summon = getCreatureSummons(cid)[1]

local ret = "12&,"

if not summon then

for a = 1, 12 do

ret = ret.."n/n,"

end

doPlayerSendCancel(cid, ret)

addEvent(doUpdateCooldowns, 100, cid)

return true

end

local ret = "12&,"

local moves = movestable[getCreatureName(summon)]

for a = 1, 12 do

local b = getNewMoveTable(moves, a)

if b then

ret = ret..""..b.name..","

else

ret = ret.."n/n,"

end

end

doPlayerSendCancel(cid, ret)

addEvent(doUpdateCooldowns, 100, cid)

end

 

function doUpdateCooldowns(cid)

local a = getPlayerSlotItem(cid, 8)

local ret = "12|,"

if a.uid <= 0 or #getCreatureSummons(cid) <= 0 then

for cds = 1, 12 do

ret = ret.."-1,"

end

doPlayerSendCancel(cid, ret)

return true

end

for cds = 1, 12 do

local cdzin = "move"..cds

 

if getCD(a.uid, cdzin) > 0 then

ret = ret..""..(getCD(a.uid, cdzin) - 1)..","

else

ret = ret.."0,"

end

end

doPlayerSendCancel(cid, ret)

end

 

function getBallsAttributes(item)

local t = {"boffense", "bdefense", "bagility", "bsattack",

"offense", "defense", "speed", "level", "specialattack",

"poke", "gender", "vitality", "nick", "boost", "happy", "hunger",

"burn", "burndmg", "poison", "poisondmg", "confuse", "blind",

"sleep", "hp", "description", "exp", "nextlevelexp", "transBegin",

"transLeft", "transTurn", "transOutfit", "transName", "trans",

"light", "blink", "move1", "move2", "move3", "move4", "move5",

"move6", "move7", "move8", "move9", "move10", "move11", "move12",

"ballorder", "firstpoke", "hands"}

local ret = {}

for a = 1, #t do

if getItemAttribute(item, t[a]) == "hands" then

return

end

ret[t[a]] = getItemAttribute(item, t[a]) or false

end

return ret

end

 

function doChangeBalls(cid, item1, item2)

if not isCreature(cid) then return true end

if item1.uid == item2.uid then

if #getCreatureSummons(cid) <= 0 then

doGoPokemon(cid, getPlayerSlotItem(cid, 8))

else

doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect)

end

return true

end

 

if item1.uid > 0 and item2.uid > 0 then

local io = getBallsAttributes(item1.uid)

local it = getBallsAttributes(item2.uid)

for a, b in pairs (io) do

if b then

doItemSetAttribute(item2.uid, a, b)

else

doItemEraseAttribute(item2.uid, a)

end

end

for a, b in pairs (it) do

if b then

doItemSetAttribute(item1.uid, a, b)

else

doItemEraseAttribute(item1.uid, a)

end

end

local id = item2.itemid

doTransformItem(item2.uid, item1.itemid)

doTransformItem(item1.uid, id)

doGoPokemon(cid, getPlayerSlotItem(cid, 8))

else

local id = item2.itemid

local b = getBallsAttributes(item2.uid)

local a = doPlayerAddItem(cid, 2643, false)

for c, d in pairs (b) do

if d then

doItemSetAttribute(a, c, d)

else

doItemEraseAttribute(a, c)

end

end

doRemoveItem(item2.uid, 1)

doTransformItem(a, id)

doGoPokemon(cid, getPlayerSlotItem(cid, 8))

end

end

 

 

e sobre o erro do spawn.. tenta usar o meu spawn.lua q ta na minha sing.. e tb ver se todos os pokes q tu coloco no mapa estao configurados no arquivo lib/configuration.lua... na tabela "pokes"

Editado por Slicer
Link para o comentário
Compartilhar em outros sites

Eae Galera estou me mantado aki mais nao consigo resolver me ajudem =(

Quero add um lokar para surf mais nao consigo o id dele é o 4608, o meu esta assim com as alteracoes

movements.xml

   <movevent type="StepIn" itemid="4608;4820-4825;11756" event="script" value="surf.lua"/>
   <movevent type="StepOut" itemid="4608;4820-4825;11756" event="script" value="surf.lua"/>

furf.lua

local function doSendMagicEffecte(pos, effect)
addEvent(doSendMagicEffect, 50, pos, effect)
end
local waters = {11756, 4608, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}
local poke = {'Poliwag', 'Poliwhirl', 'Seaking', 'Dewgong', 'Blastoise', 'Tentacruel', 'Lapras', 'Gyarados', 'Omastar', 'Kabutops', 'Vaporeon', 'Staryu', 'Starmie', 'Goldeen', 'Seadra', 'Golduck', 'Squirtle', 'Wartortle', 'Tentacool', 'Snorlax', 'Poliwrath',
"Mantine", "Totodile", "Croconow", "Feraligatr", "Marill", "Azumarill", "Quagsire", "Wooper", "Octillery", "Kingdra"}
local flie = {'4820', '4821', '4822', '4823', '4824', '4825','4608'}
local surf = {
["Poliwag"] = {lookType=278, speed = 320},
["Poliwhirl"] = {lookType=137, speed = 480},
["Seaking"] = {lookType=269, speed = 520},
["Dewgong"] = {lookType=183, speed = 700},
["Blastoise"] = {lookType=184, speed = 850},
["Tentacruel"] = {lookType=185, speed = 750},
["Lapras"] = {lookType=186, speed = 960},
["Gyarados"] = {lookType=187, speed = 1050},
["Omastar"] = {lookType=188, speed = 680},
["Kabutops"] = {lookType=189, speed = 840},
["Poliwrath"] = {lookType=190, speed = 680},
["Vaporeon"] = {lookType=191, speed = 800},
["Staryu"] = {lookType=266, speed = 385},
["Starmie"] = {lookType=267, speed = 685},
["Goldeen"] = {lookType=268, speed = 355},
["Seadra"] = {lookType=270, speed = 655},
["Golduck"] = {lookType=271, speed = 760},
["Squirtle"] = {lookType=273, speed = 365},
["Wartortle"] = {lookType=275, speed = 605},
["Tentacool"] = {lookType=277, speed = 340},
["Snorlax"] = {lookType=300, speed = 500},
["Mantine"] = {lookType=636, speed = 820},
["Totodile"] = {lookType=637, speed = 360},
["Croconow"] = {lookType=638, speed = 590},
["Feraligatr"] = {lookType=645, speed = 900},
["Marill"] = {lookType=639, speed = 340},
["Azumarill"] = {lookType=642, speed = 680},
["Quagsire"] = {lookType=643, speed = 740},
["Kingdra"] = {lookType=644, speed = 1020},
["Octillery"] = {lookType=641, speed = 600},
["Wooper"] = {lookType=640, speed = 315},
}
local premium = false
function onStepIn(cid, item, position, fromPosition)
if not isPlayer(cid) or getPlayerAccess(cid) >= 6 then
return true
end
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end -- TV
if isPlayer(cid) and not isPremium(cid) and premium == true then
doTeleportThing(cid, fromPosition, false)
doPlayerSendCancel(cid, "Only premium members are allowed to surf.")
return true
end
if getCreatureOutfit(cid).lookType == 316 or getCreatureOutfit(cid).lookType == 648 then
doSendMagicEffect(fromPosition, 136)
end
if (getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1) then
return true
end
if #getCreatureSummons(cid) == 0 then
doPlayerSendCancel(cid, "You need a pokemon to surf.")
doTeleportThing(cid, fromPosition, false)
return true
end
if (not isInArray(poke, getPokemonName(getCreatureSummons(cid)[1]))) then
doPlayerSendCancel(cid, "This pokemon cannot surf.")
doTeleportThing(cid, fromPosition, false)
return true
end
doSetCreatureOutfit(cid, {lookType = surf[getPokemonName(getCreatureSummons(cid)[1])].lookType + 351}, -1)
doCreatureSay(cid, ""..getPokeName(getCreatureSummons(cid)[1])..", lets surf!", 1)
doChangeSpeed(cid, -(getCreatureSpeed(cid)))
local speed = 75 + PlayerSpeed + getSpeed(getCreatureSummons(cid)[1]) * 8 * speedRate
setPlayerStorageValue(cid, 54844, speed)
doChangeSpeed(cid, speed)
local pct = getCreatureHealth(getCreatureSummons(cid)[1]) / getCreatureMaxHealth(getCreatureSummons(cid)[1])
doItemSetAttribute(getPlayerSlotItem(cid, 8).uid, "hp", pct)
doRemoveCreature(getCreatureSummons(cid)[1])
addEvent(setPlayerStorageValue, 100, cid, 63215, 1)
return true
end
local direffects = {30, 49, 9, 51}
function onStepOut(cid, item, position, fromPosition)
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end
local checkpos = fromPosition
 checkpos.stackpos = 0
if isInArray(waters, getTileInfo(checkpos).itemid) then
 if getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 17000) >= 1 then
  doSendMagicEffecte(fromPosition, direffects[getCreatureLookDir(cid) + 1])
 end
end
if not isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then
 if getPlayerStorageValue(cid, 17000) >= 1 then return true end
 if getPlayerStorageValue(cid, 63215) <= 0 then return true end
 doRemoveCondition(cid, CONDITION_OUTFIT)
 setPlayerStorageValue(cid, 63215, -1)
 local item = getPlayerSlotItem(cid, 8)
 local pokemon = getItemAttribute(item.uid, "poke")
 local x = pokes[pokemon]
 if not x then return true end
 if getItemAttribute(item.uid, "nick") then
  doCreatureSay(cid, getItemAttribute(item.uid, "nick")..", I'm tired of surfing!", 1)
 else
  doCreatureSay(cid, getItemAttribute(item.uid, "poke")..", I'm tired of surfing!", 1)
 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 surfing here.")
   doTeleportThing(cid, fromPosition, false)
  return true
  end
  doConvinceCreature(cid, pk)
 end
 doChangeSpeed(pk, getCreatureSpeed(cid))
 doChangeSpeed(cid, -getCreatureSpeed(cid))
 doChangeSpeed(cid, PlayerSpeed)
 doTeleportThing(pk, fromPosition, false)
 doTeleportThing(pk, getThingPos(cid), true)
 doCreatureSetLookDir(pk, getCreatureLookDir(cid))
 adjustStatus(pk, item.uid, true, false, true)
end
return true
end

 

estou a alguns horas tentado fazer quem puder me dar uma forca.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...