local starterpokes = {
["Weedle"] = {x = 53, y = 70, z = 7},
["Rattata"] = {x = 51, y = 70, z = 7},
["Caterpie"] = {x = 49, y = 70, z = 7},
["Bellsprout"] = {x = 43, y = 70, z = 7},
["Oddish"] = {x = 45, y = 70, z = 7},
["Sunkern"] = {x = 47, y = 70, z = 7},
["Pidgey"] = {x = 55, y = 70, z = 7},
}
local btype = "normal"
function onStepIn(cid, item, position, fromPosition)
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
if getPlayerStorageValue(cid, 9658754) ~= 1 then
sendMsgToPlayer(cid, 27, "Talk to the Prof. Robert to choose your beginner city first!")
return true
end --alterado v1.9 \/
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!")
addPokeToPlayer(cid, pokemon, 0, nil, btype, true)
doPlayerAddItem(cid, 2394, 10)
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
function onStepOut(cid, item, position, fromPosition)
return false
end







info
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino
Peço ajuda a vocês com esse script movement.
O script é como se fosse o starter.lua por action, pois esse o player passa no tile e ganha tal Pokémon.
Se o player não tiver falado com Npc antes, aparecerá essa mensagem com a storage
if getPlayerStorageValue(cid, 9658754) ~= 1 then sendMsgToPlayer(cid, 27, "Talk to Prof. Robert for choose your city first!") return true endRep+ pela ajuda.