Rugged Mage
Lua Scripter
- Joined
- Mar 8, 2010
- Messages
- 1,182
- Solutions
- 2
- Reaction score
- 74
I just made this script for fun, players can use this command for 30k and get random items. I'm thinking about adding a remove soul part to it, so players wouldn't just sit all day using this command .
Btw, if you have any comments or questions go ahead and ask them!
Code:
-- Made by Rugged Mage using QtLua Pad
local items = {2195, 2470, 2472, 2520, 2439, 2241} -- add any items you want in this.
function onSay(cid, words, param)
local randomChance = math.random(1, 6) -- if you have more than 6 items, change 6 to the number of items you have
if getPlayerLevel(cid) >= 125 and getPlayerMoney(cid) >= 30000 then
doPlayerRemoveMoney(cid, 30000)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
doPlayerAddItem(cid, items[randomChance], 1)
else
doPlayerSendCancel(cid, "Sorry, you cannot use this command")
end
return true
end
Btw, if you have any comments or questions go ahead and ask them!