Crie um arquivo ride.lua em talkaction/scripts , e cole isso dentro:
function onSay(cid, words, param, channel)
local pokes = {
['Tauros'] = {128, 200},
['Ninetales'] = {129, 300},
['Rapidash'] = {130, 350},
}
local old_speed = getCreatureBaseSpeed(cid)
local summons = getCreatureSummons(cid)
if getPlayerStorageValue(cid, 20000) == 10 then
local nome = getItemName(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid)
local poke_name = nome:match('(.-) Pokeball')
local action_id = getItemAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "aid")
doChangeSpeed(cid, -(getCreatureSpeed(cid) - getCreatureBaseSpeed(cid)))
doRemoveCondition(cid, CONDITION_OUTFIT)
setPlayerStorageValue(cid, 20000, 7)
setPlayerStorageValue(cid, 26000, 6)
local monster = doCreateMonster(poke_name, getCreaturePosition(cid))
doConvinceCreature(cid, monster)
doPlayerSay(cid, poke_name .. ", Stop Ride!", TALKTYPE_SAY)
return true
end
if #getCreatureSummons(cid) < 1 then
return doPlayerSendCancel(cid, "You dont have pokemon")
end
local pokemon = pokes[getCreatureName(getCreatureSummons(cid)[1])]
local name = getCreatureName(getCreatureSummons(cid)[1])
if not pokes[name] then
return doPlayerSendCancel(cid, "Pokemon not allowed.")
end
doChangeSpeed(cid, pokemon[2])
setPlayerStorageValue(cid, 20000, 10)
setPlayerStorageValue(cid, 26000, 5)
doSetCreatureOutfit(cid, {lookType = pokemon[1], lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_FEET).uid, "aid", getCreatureHealth(getCreatureSummons(cid)[1]))
function getPokemonId(summons)
for _, pid in ipairs(summons) do
return pid
end
end
doRemoveCreature(getPokemonId(summons))
doPlayerSay(cid, name .. ", Let's go Ride!", TALKTYPE_SAY)
end
Vá em Data/talkactions/talkactions.xml e add a TAG:
<talkaction words="/ride" hide="yes" event="script" value="ride.lua"/>
OBs: ['Tauros'] = {128, 200},
Taurus >> Nome do poke do raid
128 >> Outfit da montaria
200 >> Velocidade que ganhará ao montar