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.
Credits: Garu066
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