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

Need Easy Script on Use Item

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
What script should to do?

If player got storage 2100, 3 and when he do Use on item X ID he get storage 2100, 4 and 1000 exp.
When he get other storage than 2100, 3 example 2100, 2 or 2100, 4 he can't do use on item X ID.

can anyone create for me that script?
 
Lua:
local storage = 2100
function onUse(cid, item, fromPos, toPos)
if getPlayerStorageValue(cid, storage) >= 0 then
   if getPlayerStorageValue(cid, storage) == 3 then
      setPlayerStorageValue(cid, storage, 4)
      doPlayerAddExperience(cid, 1000)
   else
      return doPlayerSendCancel(cid, "You cannot use this item yet.")
   end
else
   return doPlayerSendCancel(cid, "You cannot use this item.")
end
return true
end
 
Back
Top