EstebanGod
New Member
- Joined
- Jun 18, 2014
- Messages
- 83
- Reaction score
- 3
Hello guys, so I got this script, what it does is that when you use the item it turns you into a monster and gives you speed bonus for like 1 minute.
Now id like to get some help so when you use this item you get a boost on your skills and magic level. help me out please, i mean i want it to work like a berserk potion kinda :/
Now id like to get some help so when you use this item you get a boost on your skills and magic level. help me out please, i mean i want it to work like a berserk potion kinda :/
Code:
function onUse(cid, item)
local outfit ={lookType =342}--Outfit da montaria!
local exhaust =60--Tempo para player poder usar o item novamente!(tempo em segundos)
local time =60--Tempo para ficar na montaria!(tempo em segundos)
local speed =300--Velocidade adicionada ao player após usar o item!(300= velocidade, quanto maior mais rapido...)
local mana =100--Quantidade de mana que o player necessita para usar o sistema!
local premium ="yes"--Apenas players premium accounts "yes"or"no"!?
local storage =9393-- Não mexa aqui!
if premium =="yes"andnot isPremium(cid)then
return doPlayerSendTextMessage(cid,23,"Sorry, only premium players.")
end
if(getCreatureMana(cid)< mana)then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA)
end
if(getPlayerStorageValue(cid, storage)<= os.time())then
doCreatureSay(cid,"Yeeeah!!!\nYou went up on his ride.",19)
doSetCreatureOutfit(cid, outfit, time*1000)
doChangeSpeed(cid, speed)
doSendMagicEffect(getCreaturePosition(cid),34)
setPlayerStorageValue(cid, storage, os.time()+exhaust)
doPlayerAddMana(cid,-mana)
addEvent(doChangeSpeed, time*1000+40, cid,-speed)
addEvent(doPlayerSendTextMessage, time*1000+45, cid,23,"Mount System is time out!")
addEvent(doSendMagicEffect, time*1000+50, getCreaturePosition(cid),2)
doRemoveItem(item.uid,1)
else
doPlayerSendCancel(cid,"Sorry, you only can again use this item after "..exhaust.." seconds.")
end
return TRUE
end
Last edited by a moderator: