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

Windows Question about a script

Mattt

I'm cool I swear
Joined
Apr 28, 2008
Messages
1,163
Reaction score
7
Location
USA
Okay, so i'm starting a new custom server soon and well, I'm safe to say i suck at scripting..

Anyways, i was wondering if someone could make me a script where u click something and you'll get an aol.

I tried to edit a lever script to it, but it kept bugging, so i just deleted it.

I know it's probably simple, but if you help it'll be greatly appreciated.

Thank you,
Matt
 
Lua:
function onUse(cid, item, frompos, item2, topos)
			 if item.uid == 1202 then --change the unique ID
doPlayerSendTextMessage(cid,22,"You have found an amulet of loss.") 
doPlayerAddItem(cid, 2173, 1)
end
return TRUE
end
If you want it to give aol only one time, use this:
Lua:
function onUse(cid, item, frompos, item2, topos)
			 if item.uid == 1202 then --change unique ID
queststatus = getPlayerStorageValue(cid,1202)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found an amulet of loss.") 
doPlayerAddItem(cid, 2173, 1)
setPlayerStorageValue(cid,1202,1)
else
doPlayerSendTextMessage(cid,22,"You have already got the item!")
end
end
return 1
end
^_^
 
Lua:
  function onUse(cid, item, frompos, item2, topos)
                         if item.uid == 1202 then --change unique ID
money = 20000
if doPlayerRemoveMoney(cid, money) == TRUE then
doPlayerSendTextMessage(cid,22,"You have found an amulet of loss.")
doPlayerAddItem(cid, 2173, 1)
else
doPlayerSendTextMessage(cid,22,"You do not have enough money!")
end
end
return 1
end
 
Last edited:
Back
Top