Teddy
SweStream.se
can some make a item so if you use it you will get 5000 mana and you run faster ? :=)
local message = "Put the message you want to appear after you use the item"
local speed = 500 --- Put the speed you'd like
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddMana(cid, 5000)
doChangeSpeed(cid, speed)
addEvent(doChangeSpeed, time*1000, cid, -speed)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,message) ---- If you don't want messages displayed then erase this line
return true
end
local message = "Put the message you want to appear after you use the item"
local speed = 500 --- Put the speed you'd like
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddMana(cid, 5000)
doChangeSpeed(cid, speed)
addEvent(doChangeSpeed, time*1000, cid, -speed)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,message) ---- If you don't want messages displayed then erase this line
doRemoveItem(item.uid,1)
return true
end
[22:2:56.396] [Error - Action Interface]
[22:2:56.396] data/actions/scripts/cocaine.luanUse
[22:2:56.396] Description:
[22:2:56.396] data/actions/scripts/cocaine.lua:6: attempt to perform arithmetic
on global 'time' (a nil value)
[22:2:56.396] stack traceback:
[22:2:56.396] data/actions/scripts/cocaine.lua:6: in function <data/actions/sc
ripts/cocaine.lua:3>
local message = 'Put the message you want to appear after you use the item'
local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, -1)
setConditionParam(speed, CONDITION_PARAM_SPEED, 30) --configure speed value here
function onUse(cid, item, fromPosition, itemEx, toPosition)
doAddCondition(cid, speed)
doPlayerAddMana(cid, 5000)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, message) ---- If you don't want messages displayed then erase this line
doRemoveItem(item.uid, 1)
return true
end