Ir para conteúdo
  • 0

Pergunta

7 respostass a esta questão

Posts Recomendados

  • 0

o script q muda a velocidade é esse :

 

function onSay(cid, words, param, channel)

playerpos = getCreaturePosition(cid)
pos = getCreaturePosition(cid)
flyoutfit = {lookType = 34, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}

       if getCreatureCondition(cid, CONDITION_INFIGHT) == true then    
       doPlayerSendCancel(cid, "Sorry, you are in battle.")


       elseif getTilePzInfo(pos) == true then
       doPlayerSendCancel(cid, "Você nao pode voar aqui.")

       elseif getPlayerStorageValue(cid,1234) == 1 then
       doPlayerSendCancel(cid, "Você já está voando.")

elseif getPlayerMana(cid) > 199 then
doSendMagicEffect(playerpos, 10)
doSetCreatureOutfit(cid, flyoutfit, -1)
doPlayerAddMana(cid,-200)
setPlayerStorageValue(cid,1234,1)
doChangeSpeed (cid, 1500)
    		else
	doPlayerSendCancel(cid, "Você não pode fazer isso.")
end
return TRUE
end

 

e o q volta na velocidade é esse (eu tentei mudar aki mas n consegui o efeito esperado)

 

function onSay(cid, words, param, channel)

playerpos = getCreaturePosition(cid)

if getTileItemById(playerpos, 11154) == False then
doPlayerSendCancel(cid, "Você nao pode descer aqui.")


elseif getPlayerStorageValue(cid,1234) == 1 then
doSendMagicEffect(playerpos, 10)
doRemoveCondition(cid, CONDITION_OUTFIT)
doChangeSpeed(cid, 500)
setPlayerStorageValue(cid,1234,0)
    		else
	doPlayerSendCancel(cid, "você não pode fazer isso.")
end
return TRUE
end

 

obs : a velocidade tem q ser por tempo indeterminado

Link para o comentário
https://xtibia.com/forum/topic/134145-function/#findComment-884035
Compartilhar em outros sites

  • 0
  Em 02/06/2010 em 10:54, apocarai disse:

Tente usar a função getCreatureBaseSpeed(cid), ficando assim:

 

doChangeSpeed(cid, getCreatureBaseSpeed(cid))

 

 

flw

 

naõ deu certo , ele continuou acelerado

Link para o comentário
https://xtibia.com/forum/topic/134145-function/#findComment-884228
Compartilhar em outros sites

  • 0

Tente isto:

 

function onSay(cid, words, param, channel)

flyoutfit = {lookType = 34, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}

       if getCreatureCondition(cid, CONDITION_INFIGHT) then    
          doPlayerSendCancel(cid, "Sorry, you are in battle.")
       return TRUE
       end

       if getTilePzInfo(getCreaturePosition(cid)) then
          doPlayerSendCancel(cid, "Você nao pode voar aqui.")
       return TRUE
       end   

       if getPlayerStorageValue(cid,1234) >= 1 then
          doPlayerSendCancel(cid, "Você já está voando.")
       return TRUE
       end   

       if getCreatureMana(cid) >= 200 then
          doSendMagicEffect(getCreaturePosition(cid), 10)
          doSetCreatureOutfit(cid, flyoutfit, -1)
          doCreatureAddMana(cid,-200)
          setPlayerStorageValue(cid,1234,1)
          doChangeSpeed(cid, getCreatureBaseSpeed(cid)+1500)
       else
          doPlayerSendCancel(cid, "Você não tem mana suficiente.")
end
return TRUE
end

 

 

function onSay(cid, words, param, channel)

        if getTileItemById(getCreaturePosition(cid, 11154)) then
            doPlayerSendCancel(cid, "Você nao pode descer aqui.")
         return TRUE
         end

         if getPlayerStorageValue(cid,1234) >= 1 then
            doSendMagicEffect(getCreaturePosition(cid), 10)
            doRemoveCondition(cid, CONDITION_OUTFIT)
            doChangeSpeed(cid, getCreatureSpeed(cid)-1500)
            setPlayerStorageValue(cid,1234,0)
         else
            doPlayerSendCancel(cid, "você não pode fazer isso.")
end
return TRUE
end

 

 

 

flw

Link para o comentário
https://xtibia.com/forum/topic/134145-function/#findComment-884240
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...