• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Closed.

Status
Not open for further replies.
try this
LUA:
local t = {
	levels = 500,
	storage_id = 1337
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (getPlayerStorageValue(cid, t.storage_id) >= 3) then
		return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can only use this scroll 2x times!")
	end
		else
			doPlayerAddLevel(cid ,t.levels)
			setPlayerStorageValue(cid, getPlayerStorageValue(cid, t.storage_id) + 1)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_BLUE)
		end
	return true
end
 
try this
LUA:
local t = {
	levels = 500,
	storage_id = 1337
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (getPlayerStorageValue(cid, t.storage_id) >= 3) then
		return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can only use this scroll 2x times!")
	end
		else
			doPlayerAddLevel(cid ,t.levels)
			setPlayerStorageValue(cid, getPlayerStorageValue(cid, t.storage_id) + 1)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_BLUE)
		end
	return true
end

nop didnt work ;(
 
remove the end after the first return statement and it should work

but instead of asking to be spoonfed you should try to make this script yourself, it doesn't get any simpler
how do you expect to host a server with absolutely 0 knowledge in programming?

not tryin to be harsh, just honest
 
Status
Not open for further replies.
Back
Top