• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Give me money

garu066

Dream's Maker
Joined
Dec 21, 2009
Messages
28
Reaction score
2
This is my first contribution here...

It gives money to the random (from gold until crystal), can only be used one time... so lucky.

Code:
azar = {
[1] = {item=2148, name='gold coin'},
[2] = {item=2152, name='platinium coin'},
[3] = {item=2160, name='crystal coin'},
}
queststatus = getPlayerStorageValue(cid, 7820)
 
function onSay(cid, word, param)
local random_azar = math.random(1,3)
local random_count = math.random(1,100)
if queststatus <= 0 then
	doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You recive " .. azar[random_azar].name .. " as your reward.")
	doPlayerAddItem(cid,azar[random_azar].item,[random_count])
	setPlayerStorageValue(cid,7820,1)
else
	doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You already have you reward.")
end
return true
end

Code:
<talkaction words="!money" script="give_me_money.lua"/>

Credits: Garu066
 
Here:

Lua:
local azar = {
[1] = {item = 2148, name = 'gold coin'},
[2] = {item = 2152, name = 'platinium coin'},
[3] = {item = 2160, name = 'crystal coin'},
}
queststatus = getPlayerStorageValue(cid, 7820)
 


local random_azar = math.random(1,3)
local random_count = math.random(1,100)
function onSay(cid, word, param)
if queststatus <= 0 then
	doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You recive " .. azar[random_azar].name .. " as your reward.")
	doPlayerAddItem(cid,azar[random_azar].item,[random_count])
	setPlayerStorageValue(cid,7820,1)
else
	doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You already have you reward.")
		end
	return true
end
 
Back
Top