This Is War
Member
- Joined
- Aug 22, 2013
- Messages
- 123
- Reaction score
- 11
Again with another script id like to re-host, I think its a Slot System not sure but if so enjoy!
This Script Has Not Been Tested!
Data/Actions/Actions.xml
Lua:
<action itemid="xxxx" script="slot.lua"/>
Data/Actions/Scripts/Slot.lua
Lua:
items = {
[0] = {id = 10130, count = 1, chance = 25},
[1] = {id = 5898, count = 10, chance = 25},
[2] = {id = 12394, count = 4, chance = 25},
[3] = {id = 2122, count = 1, chance = 25},
}
function onUse(cid, item, fromPos, itemEx, toPos)
for i = 0, #items do
if (items[i].chance > math.random(1, 100)) then
doPlayerAddItem(cid, items[i].id, items[i].count)
doRemoveItem(item.uid, 1)
doCreatureSay(cid, "Good Luck!", TALKTYPE_ORANGE_1)
return TRUE
end
end
end