Ir para conteúdo

Featured Replies

Postado

Gostaria que quando o jogador montasse na bike, ela usasse a velocidade base do jogador (a atual do jogador) e aumentasse +20 de speed (mesmo sistema da boots of haste)

function onUse(cid, item, frompos, itemEx, topos)

local bike = {lookType = 738, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser Homen
local bike1 = {lookType = 737, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser mulher
local speed = 474 --- Velocidade que a bike terá.

if isPlayer(cid) and not isPremium(cid) and premium == true then
	doTeleportThing(cid, fromPosition, false)
	doPlayerSendCancel(cid, "Only premium accounts can mount.")
return true
end	

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then   
doPlayerSendCancel(cid, "Put in the correct slot.") 
return true
end

if getPlayerStorageValue(cid, 17001) == 1 
or getPlayerStorageValue(cid, 63215) == 1 
or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "Dismount your pokemon to ride.")
return true
end

if getPlayerStorageValue(cid, 32001) == 1 then
   doRemoveCondition(cid, CONDITION_OUTFIT)
   doChangeSpeed(cid, -speed)
   doSendMagicEffect(getPlayerPosition(cid), 18)
   setPlayerStorageValue(cid, 32001, -1)

else

  if getPlayerSex(cid) == 1 then -- homem
   doChangeSpeed(cid, speed)
   doSetCreatureOutfit(cid, bike, -1)
   doSendMagicEffect(getPlayerPosition(cid), 18)
   setPlayerStorageValue(cid, 32001, 1)
  elseif getPlayerSex(cid) == 0 then -- homem
   doChangeSpeed(cid, speed)
   doSetCreatureOutfit(cid, bike1, -1)
   doSendMagicEffect(getPlayerPosition(cid), 18)	
   setPlayerStorageValue(cid, 32001, 1)
  end
  
end
return true

end

No caso, ela está mudando a velocidade fixa de 474...

Postado
function onUse(cid, item, frompos, itemEx, topos)

local bike = {lookType = 738, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser Homen
local bike1 = {lookType = 737, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0} --- Esse vai ser mulher
local speed = 20 --- Velocidade que a bike terá.

if isPlayer(cid) and not isPremium(cid) and premium == true then
	doTeleportThing(cid, fromPosition, false)
	doPlayerSendCancel(cid, "Only premium accounts can mount.")
return true
end	

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_RING).uid then   
doPlayerSendCancel(cid, "Put in the correct slot.") 
return true
end

if getPlayerStorageValue(cid, 17001) == 1 
or getPlayerStorageValue(cid, 63215) == 1 
or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "Dismount your pokemon to ride.")
return true
end

if getPlayerStorageValue(cid, 32001) == 1 then
   doRemoveCondition(cid, CONDITION_OUTFIT)
   doChangeSpeed(cid, -speed)
   doSendMagicEffect(getPlayerPosition(cid), 18)
   setPlayerStorageValue(cid, 32001, -1)

else

local base = getCreatureBaseSpeed(cid)

  if getPlayerSex(cid) == 1 then -- homem
   doChangeSpeed(cid, base + speed)
   doSetCreatureOutfit(cid, bike, -1)
   doSendMagicEffect(getPlayerPosition(cid), 18)
   setPlayerStorageValue(cid, 32001, 1)
  elseif getPlayerSex(cid) == 0 then -- homem
   doChangeSpeed(cid, base + speed)
   doSetCreatureOutfit(cid, bike1, -1)
   doSendMagicEffect(getPlayerPosition(cid), 18)	
   setPlayerStorageValue(cid, 32001, 1)
  end
  
end
return true

end

 

giphy.gif

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.3k

Informação Importante

Confirmação de Termo