Creio que não seja exatamente isso que esteja procurando mas essa script faz o player usar a bike/montaria com speed configuravel, porém não adiciona o item ao personagem.
local config =
{
velocidadeDaSuaBike = 5000,
outfitMale = 3612, -- Outfit MALE
outfitFemale = 3613, -- Outfit FEMALE
storageValue = 243656,
}
function onUse(cid, item, itemEx, fromPosition, toPosition)
if getPlayerStorageValue(cid, 17001) > 0 or getPlayerStorageValue(cid, 17000) > 0 or getPlayerStorageValue(cid, 63215) > 0 then
doPlayerSendCancel(cid, "Você não pode usar esta outfit em situações especiais.")
return true
end
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end
if getPlayerStorageValue(cid, config.storageValue) <= 0 then
local a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
local b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."")
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, config.velocidadeDaSuaBike)
setPlayerStorageValue(cid, config.storageValue, 1)
if getPlayerSex(cid) == 0 then
doSetCreatureOutfit(cid, b, -1)
else
doSetCreatureOutfit(cid, a, -1)
end
else
setPlayerStorageValue(cid, config.storageValue, 0)
doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end
Creditos: Lucas Rafaeel





info
Grupo: Campones
Registrado: 23/02/17
Posts: 19
Reputação: 0
Pessoal, alguém poderia me ajudar com um script que se vc clicar em X item (configurável) vc ganha X montaria (configurável)
se eu estiver postado no lugar errado, por favor, perdão!
grato