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

Lua Monster lever problem

Cornwallis

Member
Joined
Jan 3, 2010
Messages
480
Reaction score
16
I'm not getting any errors, it just won't summon anything.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.id == 10029 or item.id == 10030 and getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) < 50 then
		doSummonCreature("Skunk", pos)
	elseif getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) < 200 then
		doSummonCreature("Dragon", pos)
	elseif getPlayerLevel(cid) >= 200 and getPlayerLevel(cid) < 500 then
		doSummonCreature("Demon", pos)
	elseif getPlayerLevel(cid) >= 500 and getPlayerLevel(cid) < 1000 then
		doSummonCreature("Hellhound", pos)
	return TRUE
	end
end
 
Not tested, send me a PM if you have issues.

data/actions/scripts/script.lua
LUA:
local t = {
	[{1, 49}] = "Skunk",
	[{50, 199}] = "Dragon lord",
	[{200, 499}] = "Demon",
	[{500, 999}] = "Hellhound"
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.itemid == 1946) then
		for k, v in pairs(t) do
			if(getPlayerLevel(cid) >= k[1] and getPlayerLevel(cid) <= k[2]) then
				doSummonCreature(v, getPlayerPosition(cid))
				doTransformItem(item.uid, 1945)
			end
		end
	elseif(item.itemid == 1945) then
		doTransformItem(item.uid, 1946)
	end
	return true
end
 
Last edited:
Back
Top