Ir para conteúdo
  • 0

Conserta Meu Starte.lua Pda 1.9


kttallan

Pergunta

Ola Gente Estou Fazendo Um Servidor Propio Pra Meu Colega Ai Usei Como Base O Melhor Serve ( Pda Slicer 1.9 ) Sem Level Ai Ocoreu o Seguinte Erro no Startes Lua Quando Eu Clico Pra Pegar Da Erro.

 

Startes.lua

 

 

local starterpokes = {

["Weedle"] = {x = 53, y = 71, z = 7},

["Rattata"] = {x = 51, y = 71, z = 7},

["Caterpie"] = {x = 49, y = 71, z = 7},

}

 

local btype = "normal"

 

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

 

if getPlayerLevel(cid) > 5 then --alterado v1.3

return true

end

 

local pokemon = ""

 

for a, b in pairs (starterpokes) do

if isPosEqualPos(topos, b) then

pokemon = a

end

end

 

if pokemon == "" then return true end

 

local gender = getRandomGenderByName(pokemon)

 

local happy = 180

 

doPlayerAddItem(cid, 2394, 10)

 

local item = doCreateItemEx(2219)

doItemSetAttribute(item, "poke", pokemon)

doItemSetAttribute(item, "hp", 1)

doItemSetAttribute(item, "happy", happy)

doItemSetAttribute(item, "gender", gender)

doItemSetAttribute(item, "description", "Contains a "..pokemon..".")

doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")

doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v1.6

doPlayerAddItemEx(cid, item, true)

 

doTransformItem(item, pokeballs[btype].on)

 

doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")

doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")

 

doSendMagicEffect(getThingPos(cid), 29)

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doSendMagicEffect(getThingPos(cid), 27)

doSendMagicEffect(getThingPos(cid), 29)

 

 

return TRUE

end

 

 

 

 

Quem Responder Rapido Ganha Rep RSRSRS!!

Link para o comentário
Compartilhar em outros sites

15 respostass a esta questão

Posts Recomendados

  • 0

Quando Clico No Bau Pra Pegar O Poke Ele Não Pega O Poke Vocé Clica E Não Acontece nada alem De Não Pegar e aidna da esse erro no dristo do loguim.lua quando eu clico da esse erro no dristo tbm.

 

[27/04/2013 20:08:16] [Error - CreatureScript Interface]

[27/04/2013 20:08:16] data/creaturescripts/scripts/login.lua:onLogin

[27/04/2013 20:08:16] Description:

[27/04/2013 20:08:16] (luaGetItemAttribute) Item not found

 

[27/04/2013 20:08:16] [Error - CreatureScript Interface]

[27/04/2013 20:08:16] data/creaturescripts/scripts/login.lua:onLogin

[27/04/2013 20:08:16] Description:

[27/04/2013 20:08:16] (luaGetItemAttribute) Item not found

 

[27/04/2013 20:08:16] [Error - CreatureScript Interface]

[27/04/2013 20:08:16] data/creaturescripts/scripts/login.lua:onLogin

[27/04/2013 20:08:16] Description:

[27/04/2013 20:08:16] (luaGetItemAttribute) Item not found

 

 

 

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

  • 0

Man O unico Erro no Dristo Que Da E Do Loguim Lua a Do Startes.lua não da não somente quando clico no bau n nacontece nada ai da erro no loguim lua o erro ta no post acima.

Link para o comentário
Compartilhar em outros sites

  • 0

Tenta trocar por esse:

 

 

local starterpokes = {
["Weedle"] = {x = 53, y = 71, z = 7},
["Rattata"] = {x = 51, y = 71, z = 7},
["Caterpie"] = {x = 49, y = 71, z = 7}
}

local btype = "normal"

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

if getPlayerLevel(cid) < 5 then --alterado v1.3
return false
end

local pokemon = ""

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

if pokemon == "" then return true end

local gender = getRandomGenderByName(pokemon)

local happy = 180

doPlayerAddItem(cid, 2394, 10)

local item = doCreateItemEx(2394)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v1.6
doPlayerAddItemEx(cid, item, true)

doTransformItem(item, pokeballs[btype].on)

doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")
doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")

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


return TRUE
end

 

 

E reinicia o servidor.

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

  • 0

Agora Deu Esse Erro No Dristo

 

[Error - LuaScriptInterface::loadFile] data/actions/scripts/starter.lua:4: unexpected symbol near ','

[27/04/2013 20:26:34] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/starter.lua)

[27/04/2013 20:26:34] data/actions/scripts/starter.lua:4: unexpected symbol near ','

 

Deu Erro no dristo e nen da pra pegar ainda.

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

  • 0

Ainda Continua o Erro So Que Agora E Diferente.

 

[Error - Action Interface]

[27/04/2013 20:42:49] data/actions/scripts/starter.lua:onUse

[27/04/2013 20:42:49] Description:

[27/04/2013 20:42:49] data/actions/scripts/starter.lua:41: attempt to index field '?' (a nil value)

[27/04/2013 20:42:49] stack traceback:

[27/04/2013 20:42:49] data/actions/scripts/starter.lua:41: in function <data/actions/scripts/starter.lua:9>

 

Link para o comentário
Compartilhar em outros sites

  • 0

local starterpokes = {
["Weedle"] = {x = 53, y = 71, z = 7},
["Rattata"] = {x = 51, y = 71, z = 7},
["Caterpie"] = {x = 49, y = 71, z = 7}
}

local btype = "normal"

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

if getPlayerLevel(cid) < 5 then --alterado v1.3
return false
end

local pokemon = ""

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

if pokemon == "" then return true end

local gender = getRandomGenderByName(pokemon)

local happy = 180

doPlayerAddItem(cid, 2394, 10)

local item = doCreateItemEx(2394)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v1.6
doPlayerAddItemEx(cid, item, true)


doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")
doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")

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


return TRUE
end

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

  • 0

Tenta aí:

 

local starterpokes = {
["Bulbasaur"] = {x = 53, y = 71, z = 7},
["Charmander"] = {x = 51, y = 71, z = 7},
["Squirtle"] = {x = 49, y = 71, z = 7},
}

local level = 10
local extrastr = 1.5
local btype = "normal"

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

if getPlayerLevel(cid) > 5 then
return true
end

local pokemon = ""

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

if pokemon == "" then return true end

local gender = getRandomGenderByName(pokemon)

local mypoke = getPokemonStatus(pokemon)

if not mypoke then return true end

local offense = mypoke.off * level * extrastr
local defense = mypoke.def * level * extrastr
local speed = mypoke.agi * level * extrastr
local vit = mypoke.vit * level * extrastr
local spatk = mypoke.spatk * level * extrastr
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)

doPlayerAddItem(cid, 2394, 10)  ---Aki voce coloca o id que vai vir no kit

local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "level", level)
doItemSetAttribute(item, "exp", leveltable[level])
doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(item, "offense", offense)
doItemSetAttribute(item, "defense", defense)
doItemSetAttribute(item, "speed", speed)
doItemSetAttribute(item, "vitality", vit)
doItemSetAttribute(item, "specialattack", spatk)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v2.6
doPlayerAddItemEx(cid, item, true)

doTransformItem(item, pokeballs[btype].on)

doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")   -- Uma mensagem inicial
doPlayerSendTextMessage(cid, 27, "Don\'t forget to use your pokedex on every undiscovered pokemon!")  -- Nao mexa

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

return TRUE

end

 

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

×
×
  • Criar Novo...