• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved onUse setPlayerStorageValue script

EvoSoft

Is Da Mapper
Joined
Mar 10, 2010
Messages
693
Reaction score
5
Location
Northen part of Sweden
Can someone make it for me? I've been searching for one, but haven't found one ;/

I guess it's simple..
if item.uid = 15848 then playerSetStorageValue(1994, cid)
elseif item.uid = 15849 then playerSetStorageValue(1995, cid)
doPlayerSendTextMessage("You have completed xxx, enter the teleport to face xxx", TEXT_ORANGE1)
elseif item.uid = 15850 then playerSetStorageValue(1996, cid)
doPlayerSendTextMessage("You have completed xxx, enter the teleport to face xxx", TEXT_ORANGE1)
elseif item.uid = 15851 then playerSetStorageValue(1997, cid)
doPlayerSendTextMessage("You have completed xxx, enter the teleport to face xxx", TEXT_ORANGE1)
elseif item.uid = 15852 then playerSetStorageValue(1998, cid)
doPlayerSendTextMessage("You have completed xxx, enter the teleport to face xxx", TEXT_ORANGE1)

Now you might wonder why I don't create it myself?
I only know these "commands" or w/e it's called.. not how to build it up myself :/
 
Last edited:
Now you have the opportunity to learn.
LUA:
local theTable = {
		[15848] = {1994},
		[15849] = {1995},
		[15850] = {1996},
		[15851] = {1997},
		[15852] = {1998}
}
local theVariable = theTable[item.uid]
function onUse(cid, item, fromPosition, itemEx, toPosition)
	setPlayerStorageValue(cid, theVariable[1], 1)
	doPlayerSendTextMessage("You have completed xxx, enter the teleport to face xxx", TEXT_ORANGE1)
	return true
end
 
Back
Top