• 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!

magic level scroll with time limit

megazx

Graphic designer
Joined
Mar 4, 2013
Messages
443
Solutions
2
Reaction score
32
Location
Egypt
i need the magic level scroll script

that when player use it he gain 10 magic lvls for like 30 mint

and the magic lvls cant be removed on death it only be removed when the time is over

thx
 
It's possible, but annoying to do.

Why do you need it to keep working even after death?

- - - Updated - - -

Well.
There are a few ways to do it.
One Way:
1)Make a GlobalEvent that runs once a minute, and checks if getPlayerStorageValue(cid, "MagicAdd") > 0 then subracts one doPlayerSetStorageValue(cid, "MagicAdd", getPlayerStorageValue(cid, "MagicAdd")-1)
If the storage value IS greater than 0 then doAddCondition(cid, magicBuff) (make the condition in Libs or in the Globalevents script, you can use Mastermind Potion as an example)
2)Then make the Magic Scroll doPlayerSetStorageValue(cid, "MagicAdd", 30) (30 is the number of minutes it would be active)
 
Lua:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_SUBID, 3)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_TICKS, 30 * 60 * 1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 10)
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doAddCondition(cid, condition)
	doRemoveItem(item.uid)
	return true
end
 
working good but i need player when he use one and try to use another one at the same time Its Say to him u cant use this now

and the item dont disappear thx
 
Back
Top