• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Exp Ring Works with CLICK, With images !!

Lua:
<action itemid="12429" event="script" value="potionexp.lua"/>

Lua:
local config = {
	rate = 2, 
	time = 480, -- Minutes Of Double Exp
	storage = 21002
}
local function endExpRate(cid)
	if isPlayer(cid) == TRUE then
		doPlayerSetRate(cid, SKILL__LEVEL, 1)
		setPlayerStorageValue(cid, config.storage, -1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "The effect of the Double EXP Potion ended!")
	end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerStorageValue(cid, config.storage) < 0) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "His experience was doubled during ".. config.time .." minutes.")
			doSendMagicEffect(getPlayerPosition(cid), 53)
              doCreatureSay(cid,'Double Experience Actived!', TALKTYPE_ORANGE_1) 
		doPlayerSetRate(cid, SKILL__LEVEL, config.rate)
		setPlayerStorageValue(cid, config.storage, os.time() + config.time * 60)
		addEvent(endExpRate, config.time * 60 * 1000, cid)
		doRemoveItem(item.uid, 1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your still under the effect of Double Exp Potion, Wait till the time to stop to use it again.")
	end
	return TRUE
end

Tbh you dont need to add that stuff in Items.xml Only for Discription Best off just using action's Scripts alot easier and more handy :)

Thats My Script, Just From Using Action's If This Helps Plz Rep++
 
Last edited:
thanks for sharing!
2.jpg
3.jpg
6.jpg
wanhuan1-1.jpg
wanhuan1-2.jpg
 
Back
Top