[Duvida] Bike System Para Poketibia

icaro2507
em Lixeira Pública

icaro2507

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/11/11Posts: 6Char no Tibia: Sekmeet

Ola!

 

Bom eu tenho um duvida sobre o meu script quando usa o System ele aumenta a speed mas quando desse da bike ela continua com a mesmo velocidade como se o player estiveste na bike.

 

Queria e ele diminui-se a velocidade depois de Demount da bike

 

 

local bikeCondition = createConditionObject(CONDITION_OUTFIT)

setConditionParam(bikeCondition, CONDITION_PARAM_TICKS, -1)

addOutfitCondition(bikeCondition, {lookType = 742, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})

local t = {

[6556] = {article='a' ,name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

local v, r = getCreaturePosition(cid), t[item.itemid]

local s = r.s

local pos = {x = v.x, y = v.y, z = v.z}

if r then

if getPlayerStorageValue(cid, 25000) == 5 then

return

end

if getPlayerStorageValue(cid, 23000) == 5 then

return

end

if #getCreatureSummons(cid) >= 1 then

return

end

if getPlayerStorageValue(cid, s) <= 0 then

doSendMagicEffect(pos, 177)

doCreatureSay(cid, r.text, 19)

setPlayerStorageValue(cid, s, 1)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')

doChangeSpeed(cid, 100000)

return doAddCondition(cid, r.condition)

elseif getPlayerStorageValue(cid, s) == 1 then

doSendMagicEffect(pos, 177)

doCreatureSay(cid, r.dtext, 19)

setPlayerStorageValue(cid, s, 0)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.')

return doRemoveCondition(cid, CONDITION_OUTFIT)

else

return doPlayerSendCancel(cid, 'You can\'t do this.')

end

else

return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has bee

gustavo3754

Jallel
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 24/10/11Posts: 133Char no Tibia: ...

ve esse aki feito por vc msm so que tem respostas

 

http://www.xtibia.com/forum/topic/177352-duvida-bike-system-para-poketibia/page__fromsearch__1

AJUDEI ? DA REP+

"A guerra começa por tanto quererem uma paz inalcansavel.."

Quer uma VPS grátis por 3 meses? É só clicar aqui

Yz4U8tE.png

 

Meus Trabalhos:

 

 

Servidors derivados:

 

notle

avatar
Banidos
Banidos

INFOS

Grupo: BanidosRegistrado: 03/09/11Posts: 186

BIKE

local bikeCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(bikeCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(bikeCondition, {lookType = 1394, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
local t = {
[2547] = {article='a' ,name='bike', text='Mount, bike!', dtext='Demount, bike!', s=7700, condition=bikeCondition},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v, r = getCreaturePosition(cid), t[item.itemid]
local s = r.s
local pos = {x = v.x, y = v.y, z = v.z}
if r then
if getPlayerStorageValue(cid, 25000) == 5 then  
return
end
if getPlayerStorageValue(cid, 23000) == 5 then
return
end
if getPlayerStorageValue(cid, s) <= 0 then
doCreatureSay(cid, r.text, TALKTYPE_SAY)
setPlayerStorageValue(cid, s, 1)
return doAddCondition(cid, r.condition)
elseif getPlayerStorageValue(cid, s) == 1 then
doCreatureSay(cid, r.dtext, TALKTYPE_SAY)
setPlayerStorageValue(cid, s, 0)
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
end
end

BANIDO