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

[request] item by talkaction..

brendan2

Sensation black
Joined
Feb 19, 2009
Messages
507
Reaction score
1
Well its a little more complicated then saying !buy item.
I want to no if you can make a script or if someone can make a script that does this..

Explanation:
you get a number then you use a talk action !number it gives item once you use it you can't use it again. Don't want to put every number into script. Like a random number generator but it has a pattern.
 
Ok um.....

Talk action say !number and get a randomly generated number only gods can use this talk action...

Then a player says !1293812 or w.e number and gets a item for it..

I don't no how to make it sound simpler then that

Also once player puts in number to get item again it won't work
 
Last edited:
you can try this

Code:
function onSay(cid,words,param)
local r,v = math.random[1,1000]
	if words == '!number' then
		doPlayerSendTextMessage(cid,20,'Your generated number is: '..r..'.')
		local s = r
		setPlayerStorageValue(cid,s,5)
		doSendMagicEffect(v,12)
	elseif words == '!item' then
		for r,i = 1 do
			if param == i then
				if getPlayerStorageValue(cid,i) == 5 then
					doPlayerGiveItem(cid,1000,1)
					doPlayerSendTextMessage(cid,20,'You have received a '..getItemNameById(1000)..'.')
					doPlayerSetStorageValue(cid,i,4)
				elseif getPlayerStorageValue(cid,i) == 4 then
					doPlayerSendTextMessage(cid,20,'You can not get an item twice!')
				end
			else
					doPlayerSendTextMessage(cid,20,'Invalid number.')
			end
		end
	return true
end
 
Back
Top