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

[Request] Exp Scroll

Bondy

New Member
Joined
Mar 28, 2009
Messages
282
Reaction score
1
Im not sure if this is the right place to request this, but im looking for an exp scroll which gives u like 50 levels or something, maybe more. Thats all

thanks a lot
 
Hello.
Check out this script
PHP:
function onUse(cid, item)
local item = XXXX  -- Items ID
local pPos = getPlayerPosition(cid)
	if doPlayerRemoveItem(cid, item, 1) == 1 then            
        doPlayerSendTextMessage(cid,19, "You got 50 levels.")
		doSendMagicEffect(pPos, 28)
		doPlayerAddLevel(cid, 50)
	end
return TRUE
end
 
Not Tested & Wrong Section

Code:
local cfg = {
        max = 100, -- Maximum Level to Use
	add = 10 -- Levels to Add
    }
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerLevel(cid) < cfg.max)then
		doPlayerAddExperience(cid, getExperienceForLevel(getPlayerLevel(cid)) + cfg.add)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved ".. cfg.add .." levels.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS)
		doRemoveItem(item.uid)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have exceeeded the max level to use this.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return true
end
 
???

Code:
local cfg = {
        max = 100, -- Maximum Level to Use
	add = 10 -- Levels to Add
    }
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerLevel(cid) < cfg.max)then
		doPlayerAddExperience(cid, getExperienceForLevel(getPlayerLevel(cid)) + cfg.add)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved ".. cfg.add .." levels.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS)
		doRemoveItem(item.uid)
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have exceeeded the max level to use this.")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
	return true
end


Where does it say which item you shall use?
 
Nope. Please read some tutorials if you want to make a good OTServ with good scripts(You don't know even how to install them).
 
Lua:
local config = {}

--// Config
config.exp = 30
config.msg = "You gained "..config.exp.." experience points."
--// Config

function onUse(cid, item, frompos, item2, topos)
	doPlayerAddExperience(cid, config.exp)
	doPlayerSendTextMessage(cid, 25, config.msg)
	doRemoveItem(item.uid, 1)
	return true
end
 
Back
Top