• 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 Storage vaule...

I r New

New Member
Joined
Feb 1, 2008
Messages
137
Reaction score
1
PHP:
function onSay(cid, words, param)
local STORAGE = 31337
 if doPlayerRemoveItem(cid, 7371, 1) then
   doPlayerAddItem(cid, 9971, 10)
   setPlayerStorageValue(cid, STORAGE, 1)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You've traded a bronze goblet for 10GI.") 
		else
	getPlayerStorageValue(cid, STORAGE)
   doPlayerSendCancel(cid, "You don't have a Bronze Goblet. Go do the quest!")
	end
	return true
  end

I don't get storage values, I want it so you can only do it once X_X.
 
Last edited:
Try this:
Code:
function onSay(cid, words, param)
           queststatus = getPlayerStorageValue(cid,31337)
	if (queststatus == -1 and doPlayerRemoveItem(cid,7371,1)) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You've traded a bronze goblet for 10GI.")
		doPlayerAddItem(cid,9971,10)
		setPlayerStorageValue(cid,31337,1)
    else
		doPlayerSendCancel(cid, "You don't have a Bronze Goblet. Go do the quest!")
    end
    return true
  end
I'm not good scrpit so i dont know that it will work :)
 
Back
Top Bottom