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

I want to know if my script works :D

LuaScripter

Scripter -Lua-
Joined
Jan 16, 2012
Messages
40
Reaction score
1
Does this script work? I can' test because I don't have an ot downloaded to test with. and btw it's my first script since I've learned lua so please tell me if it'll work! :D

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local premium = 100
	if item.itemid = 1032 and getPlayerLevel(cid) >= 100 then   -- so far 2 ends.
	doPlayerAddPremiumDays(cid, premium)
	elseif item.itemid = 1032 and getPlayerLevel(cid) <= 100 then
	doPlayerSendTextMessage(cid, 21, "You're not high enough level to use this scroll.")
	end
	return true
end
btw it's a premium scroll
 
i use SciTE https://luaforwindows.googlecode.com/files/LuaForWindows_v5.1.4-46.exe

48jkro.png

wzlh1gx.png
 
Does this script work? I can' test because I don't have an ot downloaded to test with. and btw it's my first script since I've learned lua so please tell me if it'll work! :D

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local premium = 100
	if item.itemid = 1032 and getPlayerLevel(cid) >= 100 then   -- so far 2 ends.
	doPlayerAddPremiumDays(cid, premium)
	elseif item.itemid = 1032 and getPlayerLevel(cid) <= 100 then
	doPlayerSendTextMessage(cid, 21, "You're not high enough level to use this scroll.")
	end
	return true
end
btw it's a premium scroll
Here's the script fixed, try to study all your mistakes and get better! :D
45m5xK.png
 
Change
Lua:
doPlayerRemoveItem(cid, item, 1)
to
Lua:
doRemoveItem(item.uid, 1)
 
Back
Top