• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Boost Item

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
can some make a item so if you use it you will get 5000 mana and you run faster ? :=)
 
LUA:
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
 
It will now
LUA:
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
 
I use the latest rev
*Item Dont Go Away
*It Dont Come Any Text
*Error In Console

[22:2:56.396] [Error - Action Interface]
[22:2:56.396] data/actions/scripts/cocaine.lua:onUse
[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>
 
LUA:
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
 
and now i wanna make an other item that give hp and speed..
i replace
doPlayerAddMana
Whit
doPlayerAddHealth

but it dont work.. ?
 
Back
Top