samuel157
/root
- Joined
- Mar 19, 2010
- Messages
- 447
- Solutions
- 3
- Reaction score
- 49
- Location
- São Paulo, Brazil
- GitHub
- Samuel10M
I need a new coin 11192 quantity 100 to play in the casino, this script works only that when betting 100 vip coins 11192 it becomes.
Need work on three scripts.
Lua:
-- Cassino System by LucasHere
function onUse(cid, item, frompos, item2, topos)
local pos1 = {x = 264, y = 344, z = 7, stackpos = 1} -- posição que vai criar os items
local pos2 = {x = 265, y = 344, z = 7, stackpos = 1}
local pos3 = {x = 266, y = 344, z = 7, stackpos = 1}
local config = {
moneyneed = 100, -- dinheiro necessário para jogar (scarab 100)
}
local premio = 2189 -- id do prêmio
local premio_cont = 1 -- quantidade do prêmio que vai ganhar
function additem(cid, premio, premio_cont)
doPlayerAddItem(cid, premio, premio_cont)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player apostou no cassino e ganhou " .. premio_cont .. " item.")
end
if item.itemid == 1945 and getPlayerItemCount(cid, 11192) < config.moneyneed then
doPlayerSendCancel(cid, "Desculpe, você não tem dinheiro suficiente para jogar!")
return false
end
if item.itemid == 1945 and math.random(0, 8) == 1 then
doTransformItem(item.uid, 1946)
doPlayerRemoveItem(cid, 11192, config.moneyneed)
doCreateItem(6556, 1, pos1)
addEvent(doCreateItem, 1000, 6556, 1, pos2)
addEvent(doCreateItem, 2000, 6556, 1, pos3)
addEvent(additem, 2000, cid, premio, premio_cont)
return true
elseif item.itemid == 1945 and math.random(0, 8) == 2 then
doTransformItem(item.uid,1946)
doPlayerRemoveMoney(cid,config.moneyneed)
doCreateItem(6557,1,pos1)
addEvent(doCreateItem, 1000, 6557, 1, pos2)
addEvent(doCreateItem, 2000, 6556, 1, pos3)
return true
elseif item.itemid == 1945 and math.random(0, 8) == 3 then
doTransformItem(item.uid,1946)
doPlayerRemoveMoney(cid,config.moneyneed)
doCreateItem(6557,1,pos1)
addEvent(doCreateItem, 1000, 6557, 1, pos2)
addEvent(doCreateItem, 2000, 6557, 1, pos3)
addEvent(additem,2000,cid,premio,premio_cont)
return true
elseif item.itemid == 1945 and math.random(0, 8) == 4 then
doTransformItem(item.uid,1946)
doPlayerRemoveMoney(cid,config.moneyneed)
addEvent(doCreateItem, 1000, 6556, 1, pos2)
addEvent(doCreateItem, 2000, 6556, 1, pos3)
doCreateItem(6557,1,pos1)
return true
elseif item.itemid == 1945 and math.random(0, 8) == 5 then
doTransformItem(item.uid,1946)
doPlayerRemoveMoney(cid,config.moneyneed)
addEvent(doCreateItem, 1000, 6557, 1, pos2)
addEvent(doCreateItem, 2000, 6556, 1, pos3)
doCreateItem(6557,1,pos1)
return true
elseif item.itemid == 1945 and math.random(0, 8) == 6 then
doTransformItem(item.uid,1946)
doPlayerRemoveMoney(cid,config.moneyneed)
addEvent(doCreateItem, 1000, 6556, 1, pos2)
addEvent(doCreateItem, 2000, 6557, 1, pos3)
doCreateItem(6557,1,pos1)
return true
elseif item.itemid == 1945 and math.random(0, 8) == 7 then
doTransformItem(item.uid,1946)
doPlayerRemoveMoney(cid,config.moneyneed)
addEvent(doCreateItem, 1000, 6557, 1, pos2)
addEvent(doCreateItem, 2000, 6556, 1, pos3)
doCreateItem(6557,1,pos1)
return true
elseif item.itemid == 1945 and math.random(0, 8) == 8 then
doTransformItem(item.uid,1946)
doPlayerRemoveMoney(cid,config.moneyneed)
addEvent(doCreateItem, 1000, 6556, 1, pos2)
addEvent(doCreateItem, 2000, 6557, 1, pos3)
doCreateItem(6556,1,pos1)
return true
end
item0 = getThingfromPos(pos1)
item1 = getThingfromPos(pos2)
item2 = getThingfromPos(pos3)
if item.itemid == 1946 then
doTransformItem(item.uid,1945)
if item0.itemid ~= 0 and item1.itemid ~= 0 and item2.itemid ~= 0 then
doRemoveItem(item0.uid,1)
doRemoveItem(item1.uid,1)
doRemoveItem(item2.uid,1)
end
else
doTransformItem(item.uid,1945)
end
return 1
end
Need work on three scripts.
Attachments
-
casino1.lua4.1 KB · Views: 0 · VirusTotal
-
cassino2.lua4.1 KB · Views: 0 · VirusTotal
-
casssino3.lua4.1 KB · Views: 0 · VirusTotal
Last edited: