Ir para conteúdo
  • 0

Como Aumentar Velocidade Da Bike


narutochuuu

Pergunta

6 respostass a esta questão

Posts Recomendados

  • 0

posta o script né ¬¬''

 

local bikeCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(bikeCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(bikeCondition, {lookType = 620, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
local t = {
[7441] = {article='a' ,name='bike', text='Montando na Bike!', dtext='Saindo da Bike, 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 .. '.')
  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 have demounted ' .. 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 been some error, try contacting a staff member.')
end
end

Link para o comentário
Compartilhar em outros sites

  • 0

Rapaz, fiquei meio confuso com as storages usadas no seu script, então coloquei uma nova.

 

 

local bikeCondition = createConditionObject(CONDITION_OUTFIT)

setConditionParam(bikeCondition, CONDITION_PARAM_TICKS, -1)

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

local t = {

[7441] = {article='a' ,name='bike', text='Montando na Bike!', dtext='Saindo da Bike, bike!', s=5700, condition=bikeCondition},

}

 

local speed = 800

 

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

doChangeSpeed(cid, speed)

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 .. '.')

return doAddCondition(cid, r.condition)

elseif getPlayerStorageValue(cid, s) == 1 then

doChangeSpeed(cid, getCreatureBaseSpeed(cid))

doSendMagicEffect(pos, 177)

doCreatureSay(cid, r.dtext, 19)

setPlayerStorageValue(cid, s, 0)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have demounted ' .. 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 been some error, try contacting a staff member.')

end

end

 

 

Edite em vermelho.

Editado por LuckOake
Link para o comentário
Compartilhar em outros sites

  • 0

eu editei do pda ver se pega ai

não tenho pokemon flash pra testa

no pda pega :D

edita

local Speed = 500 -- velocidade

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
local sBike = 5701 -- 5701
local Speed = 500 -- velocidade
local t = {
[10925] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},
}
function BikeSpeedOn(cid,nSpeed)
setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,Speed+nSpeed)
end
function BikeSpeedOff(cid)
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))
end

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, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")
return true
end
if getPlayerStorageValue(cid, s) <= 0 then
doCreatureSay(cid, r.text, 19)
setPlayerStorageValue(cid, s, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
BikeSpeedOn(cid,300)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
end

elseif getPlayerStorageValue(cid, s) == 1 then
doCreatureSay(cid, r.dtext, 19)
setPlayerStorageValue(cid, s, 0)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.')
BikeSpeedOff(cid)
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')
end
end

 

 

Editado por notle2012
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...