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

Exp Scroll

ugurdrahs

New Member
Joined
May 6, 2010
Messages
555
Reaction score
2
Location
Netherland
Hi,

someone got an exp scroll that works as following:

-Cant use after level 160
-It does add 10 mil exp


Repp+
thx
 
Last edited:
actions.xml
<action itemid="xxx" script="expscroll.lua"/>

expscroll.lua
Lua:
local config = {
	experience = { min = 9999999, max = 10000000 },
	minLevel = 8,
	maxLevel = 160
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerLevel(cid) < config.minLevel or getPlayerLevel(cid) > config.maxLevel then
		doPlayerSendCancel(cid, "Players of your level may not use this item.")
		return FALSE
	end
	
	local playerExp = math.random(config.experience.min, config.experience.max)
	doPlayerAddExp(cid, playerExp)
	doPlayerSendTextMessage(cid, 22, "Exp scroll gave you " .. playerExp .." experience!")
	doRemoveItem(item.uid, 1) -- Remove this if you want the scroll to not run out
	doSendMagicEffect(getPlayerPosition(cid), 40)
        return TRUE
end
 
Back
Top