KT
pedido

Conserta Meu Starte.lua Pda 1.9

Por kttallan, 27 de abr. de 2013 em Scripts

[pedido]
resolvido
script
16
1.1k
kttallanK
27 de abril de 2013 às 20:00

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!!

RoksasR
27 de abril de 2013 às 20:04

Qual o erro que deu ?

kttallanK
27 de abril de 2013 às 20:08

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 Abril 27 por kttallan

RoksasR
27 de abril de 2013 às 20:09

Cara, me mostra o erro no distro por favor.

kttallanK
27 de abril de 2013 às 20:14

O Erro e Que Quando Clico No Bau Não Acontece Nada.

RoksasR
27 de abril de 2013 às 20:18

Cara, eu quero que me mostre o erro no distro, me manda print.

kttallanK
27 de abril de 2013 às 20:20

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.

RoksasR
27 de abril de 2013 às 20:24

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 Abril 27 por Roksas

kttallanK
27 de abril de 2013 às 20:30

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 Abril 27 por kttallan

RoksasR
27 de abril de 2013 às 20:35

Editei meu post acima, tenta agora.

kttallanK
27 de abril de 2013 às 20:46

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>

 

RoksasR
27 de abril de 2013 às 20:59

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 Abril 27 por Roksas

kttallanK
27 de abril de 2013 às 21:11

  1. Vlw Amigo Obrigado Mesmo ksksksks Vou Dar Meu Rep + Vocé

RoksasR
27 de abril de 2013 às 21:18

Tópico movido para a seção de dúvidas e pedidos resolvidos.

kttallanK
27 de abril de 2013 às 21:22

Ops man Deu um Erro Aki o Erro Foi o Seguinte

 

Edit Mandei Pm Pra vocé .