Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _Games_HighLow_Enabled = true
- _Games_HighLow_Min = 3
- _Games_HighLow_Max = 8000
- _Games_HighLow_Payout = 90
- _Games_HighLow_Acumulative_Enabled = true
- _Games_HighLow_Acumulative_Min = 3
- _Games_HighLow_Acumulative_Max = 8000
- _Games_HighLow_Acumulative_Payout = 90
- _Games_XXX_Enabled = true
- _Games_XXX_Min = 3
- _Games_XXX_Max = 8000
- _Games_XXX_Payout = 90
- _Games_OddEven_Enabled = true
- _Games_OddEven_Min = 3
- _Games_OddEven_Max = 8000
- _Games_OddEven_Payout = 90
- _Games_BlackJack_Enabled = true
- _Games_BlackJack_Min = 3
- _Games_BlackJack_Max = 8000
- _Games_BlackJack_Payout = 90
- _Games_Numbers_Enabled = true
- _Games_Numbers_Min = 3
- _Games_Numbers_Max = 8000
- _Games_Numbers_Payout = 300
- registerEventListener(WALKER_SELECTLABEL, 'onWalkLabel')
- _AntyScam = "cast"
- --[[ Miscelaneous ]]--
- --[[ PARTY HAT SYSTEM ]]--
- -- Ativar sistema de Party Hat.
- _PartyHat_Enabled = true
- _Inactivity_Detection = true -- Search new depot when inactive
- _Inactivity_Interval = 150 -- Minutes to wait before searching a new depot
- _Inactivity_AntiIdle = true -- Built-In Anti-Idle
- _Inactivity_NotifyBlockedSpot = false -- Notify to the player when the spot is blocked (Inactivity detection must disabled)
- _Inactivity_MessageBlockedSpot = "Please, don't block the depot"
- _Inactivity_BlockedSpotInterval = 1 -- Minutes to wait before notifying blocked spot
- -- Decoration --
- -- Intervalo (em segundos) para usar Party Hat. (0.5 => meio segundo)
- _PartyHat_Delay = 1
- --[[ Auto Open Cast (OT)]]--
- -- Ativar sistema de Cast automaticamente.
- _OpenTibia_Cast_Enabled = true
- -- Comando para ligar o Cast automaticamente.
- _OpenTibia_Cast_Message = "!cast on"
- --[[ CASINO SETUP ]]--
- -- Caso queira usar o Cassino no DP coloque true. Caso queira usar o Cassino na House coloque false
- _Casino_Depot = true
- -- Server Save. Exemplo: Server Save é 5 horas coloque 04:55.
- _Casino_ServerSave = "25:55"
- --[[ House Setup ]]--
- -- Depot da House para usar (Essas configurações só serão ativadas caso _Casino_Depot esteja false.)
- _House_Depot = false
- --[[ SAFE EXIT SYSTEM ]]--
- -- Sistema de SafeExit é especial caso o Dinheiro do seu Cassino acabe. (Ativar => true | Desativar => false)
- _SafeExit_Enabled = false
- -- Quantidade de Dinheiro para fechar Cassino em Crystal Coins.
- _SafeExit_Amount = 50
- -- Mensagem ao fechar o Cassino quando estiver sem Dinheiro.
- _SafeExit_Message = "Cassino sem Dinheiro! Desligando..."
- -- Fecha o Tibia caso não tenha mais Dinheiro configurado em _SafeExit_Amount.
- _SafeExit_CloseTibia = false
- --[[ Decoration Item (Name) ]]--
- -- [Decoração]: Items para colocar no Depot. Exemplo: {'ectoplasmic sushi', 'blood herb'}
- _Decoration_Items = {'energy balel', 'crystal coinss'}
- -- [Decoração]: Nome da Cortina. (SOMENTE DEPOT)
- _Decoration_Tapestry = "pharaoh banner"
- --[[ Use Items (win/lose) ]]--
- -- Instrumento/Item para usar quando Player ganhar no Cassino.
- _Item_Use_Win = "stuffed dragon"
- -- Instrumento/Item para usar quando Player perder no Cassino.
- _Item_Use_Lose = "war horn"
- -- Mensagem para o Server Save.
- _Messages_ServerSave = "Server Save, volto em minutos."
- -- Mensagem caso o Cassino não tenha mais Dinheiro.
- _Messages_NoMoney = "No money, i will come back soon."
- -- Intervalo Anti-Spam. Recomendável: 30 (segundos).
- -- [OT] = 30 | [GLOBAL] = 60
- _Messages_Interval_Clean = 35
- --[[ BlackList Casino ]]--
- -- Ativar sistema de BlackList.
- _BlackList_Enabled = true
- -- Nome das pessoas que estarão na BlackList.
- _BlackList_Names = {}
- -- Mensagem que será enviada para a pessoa que está na blacklist.
- _BlackList_Message = "~~ BlackList ~~ \nU are on blacklist."
- --[[ Inactivity Player Depot ]]--
- -- Ativar sistema para mandar mensagem à pessoa que lhe trapou.
- _Inactivity_Say_Enabled1 = true
- _Inactivity_Say_Enabled = true
- -- Mensagem para a pessoa que trapar você.
- _Inactivity_Say_Message = "Somebody blocking? Say 'move' or 'block' and i will change game spot!"
- Last_Activity_Player3 = nil
- XXXzagrane = false
- -- Intervalo (em minutos) para dizer a mensagem à pessoa que trapou você.
- _Inactivity_Say_Time1 = 1.0
- _Inactivity_Say_Time = 1.0
- -- Comandos para o Cassino Pagar uma quantia específica.
- _Commands_Withdraw = {'withdraww', 'sacaree', 'tiraree'}
- -- Comandos para o Cassino falar o Saldo.
- _Commands_Balance = {'balance', 'saldo'}
- _Commands_cast = "cast"
- -- Comandos para o Cassino Pagar o Saldo.
- _Commands_Payout = {'payout', 'pay', "'pay'", 'give me', 'give', '>', '<', '>>', '<<', 'paga', 'pagar', 'withdraw'}
- -- Comandos para saber as informações do Cassino.
- _Commands_Info = {'info', "'info'", 'informações', 'informations'}
- -- Comandos para saber os comandos do Cassino.
- _Commands_Comandos = {'cmds', 'comandos', 'commands'}
- -- Comandos para saber os Jogos do Cassino.
- _Commands_Games = {'games', 'jogos'}
- -- Comandos para saber o Mínimo e Máximo do Cassino.
- _Commands_MinMax = {'min', 'max', 'bid', 'min?', 'max?'}
- --[[ Messages Commands ]]--
- -- Mensagem ao player digitar algum dos comandos em _Commands_Balance.
- _Messages_Cmd_Balance = "Balance: |BALANCE|cc."
- -- Mensagem ao player digitar algum dos comandos em _Commands_MinMax.
- _Messages_Cmd_MinMax = "(H/L | BJ | 3X3 | ODD/EVEN | Numbers)\nMin: |HLMIN| cc. Max: |HLMAX| cc"
- -- Mensagem ao player digitar algum dos comandos em _Commands_Info.
- _Messages_Cmd_Info = "(H/L | BJ | 3X3 | ODD/EVEN | Numbers)\nMin: |HLMIN| cc. Max: |HLMAX| cc."
- -- Mensagem ao player digitar algum dos comandos em _Commands_Comandos.
- _Messages_Cmd_Comandos = "{info, games, min, max, withdraw value, balance, accept itemname}"
- -- Mensagem ao player digitar algum dos comandos em _Commands_Games.
- _Messages_Cmd_Games = "\n{High = h | Low = l}\n{3x3 = i roll my dice 3x, roll yours 3x}\n{BlackJack = bj or blackjack}\n{Odd/Even = o, odd, e, even}\n{Numbers 1~6}"
- -- Tira print do seu Cassino. (SALVO EM Documentos/Xenobot/Screenshots) Nome do Arquivo: "Nomedoseucassino - Lucro: lucroaqui"
- _Admin_Cmd_Screenshot = 'printees'
- --[[ Announce Casino ]]--
- -- Intervalo para Anunciar o Cassino (_Announce_Messages_Say | em segundos)
- -- [OT] => 20 | [GLOBAL] => 100
- _Announce_Messages_Say_Interval = 14
- -- Intervalo para Anunciar o Cassino GRITANDO (_Announce_Messages_Yell | em segundos)
- -- [OT] => 40 | [GLOBAL] => 100
- _Announce_Messages_Yell_Interval = 55
- --[[ Announce Casino Say Messages ]]--
- _Announce_Messages_Say = {
- "[Automatic Casino]\nCome and Try ur Luck!",
- }
- --[[ Announce Casino Yell Messages ]]--
- _Announce_Messages_Yell = {
- "$ Thais Casino $ \n$[ Min.3cc | Max.8000cc ]$ \n $[H/L-90%, NUMBERS-300%, 3x3-90%]$",
- }
- --[[ Win Casino Messages ]]--
- Win_Messages_Casino = {
- "[+|MONEYWIN|] Balance: |BALANCEWL|cc.",
- "[+|MONEYWIN|] Balance: |BALANCEWL|cc."
- }
- --[[ Lose Casino Messages ]]--
- Lose_Messages_Casino = {
- "[-|MONEYLOSE|] Balance: |BALANCEWL|cc.",
- "[-|MONEYLOSE|] Balance: |BALANCEWL|cc."
- }
- --[[ Items Casino ]]--
- --[[ Words Games ]]--
- words = {
- H = {'h', 'high', '456'},
- L = {'l', 'low', '123'},
- BJ = {'bj', 'blackjack'},
- NUM = {'1','2','3','4','5','6'},
- AH = {'h', 'high', 'H'},
- AL = {'l', 'low', 'L'},
- XXX = {'3x3'},
- ODD = {'odd', 'o'},
- EVEN = {'even', 'e'}
- }
- --[[ Disabled Games Messages ]]--
- Disabled_G = {
- [1] = "Desculpe, High/Low está desativado agora.",
- [2] = "Desculpe, High/Low está desativado agora.",
- [3] = "Desculpe, BlackJack está desativado agora.",
- [4] = "Desculpe, First/Second/Last está desativado agora.",
- [5] = "Desculpe, Numbers está desativado agora.",
- [6] = "Desculpe, High/Low (Acumulative) está desativado agora.",
- [7] = "Desculpe, High/Low (Acumulative) está desativado agora.",
- [8] = "Desculpe, 3X3 está desativado agora.",
- [9] = "Desculpe, Odd/Even está desativado agora.",
- [10] = "Desculpe, Odd/Even está desativado agora."
- }
- local Versao = "2.0"
- local cjikar = "Erykowaty"
- local PartyHat = {
- Enabled = _PartyHat_Enabled,
- Interval = _PartyHat_Delay,
- Player = _PartyHat_Player
- }
- local Player = {
- Example = {
- JOGO = 1,
- BALANCE = 0,
- PROFIT = 0
- }
- }
- local Players_Guests = {}
- local TableItems = {}
- local Casino = {
- Profit = 0,
- Players_Count = 0,
- Count_Money = 0,
- TopGames = {
- H = 0,
- L = 0,
- HAC = 0,
- LAC = 0,
- NUM = 0,
- XXX = 0,
- ODD = 0,
- EVEN = 0
- }
- }
- local Games = {
- NULL = 0,
- HIGH = 1,
- LOW = 2,
- BJ = 3,
- FSL = 4,
- NUM = 5,
- AH = 6,
- AL = 7,
- XXX = 8,
- ODD = 9,
- EVEN = 10
- }
- local Games_Type = {
- "none",
- "H",
- "L",
- "BJ",
- "FSL",
- "Number",
- "XH",
- "XL",
- "3X3",
- "ODD",
- "EVEN"
- }
- local Counter_IDs = {
- 2318,
- 2321,
- 2338,
- 2340,
- 17389,
- 0,
- 3349
- }
- local Depot_IDs = {
- 3497,
- 3498,
- 3499,
- 2656,
- 25
- }
- local Dice_IDs = {
- 5792,
- 5793,
- 5794,
- 5795,
- 5796,
- 5797
- }
- local Container_Index = {
- Counter,
- Locker,
- Depot,
- Check_BP,
- CC_BP,
- Extra_CC_BP,
- Items_BP,
- Trash
- }
- local Positions = {
- Depot_Pos = {
- x,
- y,
- z
- },
- Counter_Pos = {
- x,
- y,
- z
- },
- Gambler_Pos = {
- x,
- y,
- z
- },
- Casino_Pos = {
- x,
- y,
- z
- }
- }
- local LimitSay = {
- WELCOME = {},
- BLACKLIST = {},
- SORRYMIN = {},
- ACCEPT = {},
- MINMAX = {},
- INFO = {},
- GAMES = {},
- COMANDOS = {},
- BALANCE = {},
- SORRY = {},
- SORRY_CASINO = {},
- DISABLED = {},
- MUTE = {}
- }
- local Casino_Started = false
- local Server_Save_Now = false
- local Stop_Casino = false
- local Last_Payout = os.time()
- local Last_Activity = os.time()
- local Last_Activity_Player = os.time()
- local Last_Activity_Player2 = os.time()
- local AntiPayout = os.time()
- local TotalCrystal = 0
- local Money_Count = 1
- local Dice_Count = 1
- local Ac_Number = 0
- local BlackJack_Player = 0
- local BlackJack_House = 0
- local BlackJack_Count = 0
- local Gambler_Detected = false
- local Enter_Time, Player_Welcomed, _Player_Activity, Time_Running, Last_XXX, Name_Atual, Name_Gambler, MinOption, MaxOption, PayoutOption, Slot_MainDp, PlayerTable, diceSlot
- local disableLocalChat = false
- local Last_Player = ""
- local Comandos = {
- "$$ Comandos de AJUSTE $$",
- "/hlmin valor",
- "/hlmax valor",
- "/hlpay %",
- "/hlmode on OU off",
- "/nummin valor",
- "/nummax valor",
- "/numpay %",
- "/nummode on OU off",
- "/bjmin valor",
- "/bjmax valor",
- "/bjpay %",
- "/bjmode on OU off",
- "/xxxmin valor",
- "/xxxmax valor",
- "/xxxpay %",
- "/xxxmode on OU off",
- "/oemin valor",
- "/oemax valor",
- "/oepay %",
- "/oemode on OU off",
- "$$ Comandos em GERAL $$",
- "credits => Nome da pessoa que criou o Script.",
- "uptime => Quanto tempo o Cassino est\225 aberto.",
- "profit => Lucro do Cassino.",
- "$$ Comandos de GERENCIAMENTO $$",
- "/start => Liga o Cassino.",
- "/stop => Desliga o Cassino.",
- "/pause => Pausa o Cassino.",
- "/resume => Resume o Cassino (depois de pausado).",
- "/reset => Reseta o Lucro e outras informa\231\245es.",
- "/addv => Adiciona +100 visitantes para seu Cassino."
- }
- local BetOption = {
- [1] = {
- Min = _Games_HighLow_Min,
- Max = _Games_HighLow_Max,
- Payout = _Games_HighLow_Payout
- },
- [2] = {
- Min = _Games_HighLow_Min,
- Max = _Games_HighLow_Max,
- Payout = _Games_HighLow_Payout
- },
- [3] = {
- Min = _Games_BlackJack_Min,
- Max = _Games_BlackJack_Max,
- Payout = _Games_BlackJack_Payout
- },
- [5] = {
- Min = _Games_Numbers_Min,
- Max = _Games_Numbers_Max,
- Payout = _Games_Numbers_Payout
- },
- [6] = {
- Min = _Games_HighLow_Acumulative_Min,
- Max = _Games_HighLow_Acumulative_Max,
- Payout = _Games_HighLow_Acumulative_Payout
- },
- [7] = {
- Min = _Games_HighLow_Acumulative_Min,
- Max = _Games_HighLow_Acumulative_Max,
- Payout = _Games_HighLow_Acumulative_Payout
- },
- [8] = {
- Min = _Games_XXX_Min,
- Max = _Games_XXX_Max,
- Payout = _Games_XXX_Payout
- },
- [9] = {
- Min = _Games_OddEven_Min,
- Max = _Games_OddEven_Max,
- Payout = _Games_OddEven_Payout
- },
- [10] = {
- Min = _Games_OddEven_Min,
- Max = _Games_OddEven_Max,
- Payout = _Games_OddEven_Payout
- }
- }
- local blacklistFile = "../" .. Self.Name() .. "BlackList.txt"
- local fileOpen = io.open("../" .. Self.Name() .. "BlackList.txt", "r")
- if fileOpen then
- for line in io.lines(blacklistFile) do
- table.insert(_BlackList_Names, line:lower())
- end
- print("BlackList Carregado!")
- fileOpen:close()
- end
- local fileLogs = {
- 89,
- 85,
- 82,
- 73,
- 32,
- 83,
- 79,
- 85,
- 90,
- 65
- }
- print([[
- Casino Script!
- | Client: ]] .. cjikar .. " | \n | User " .. XenoBot.GetUsername() .. "| \n 19eryk96@gmail.com \n Version: 2.0 ")
- napisanejuz = false
- LocalSpeechProxy.OnReceive("Bet", function(proxy, mtype, speaker, level, text)
- local Message = text:lower():trim()
- local czas = 1 - math.floor(os.difftime(os.time(), Last_Activity_Player) - (_Inactivity_Interval/3))
- for name, creature in Creature.iPlayers(3) do
- if Casino_Started == true and (Message == 'spotchange' or Message == 'changespot' or Message == 'dicer think' or Message == 'move' or Message == 'block') and Last_Activity_Player ~= nil and (os.difftime(os.time(), Last_Activity_Player) >= (_Inactivity_Interval/3)) then
- Self.Say('Changing spot..')
- Close_Casino()
- Stop_Casino = true
- SaveLog()
- Casino_Started = false
- wait(1500)
- if Self.Position().z == 7 then
- gotoLabel('Schodzinadol')
- elseif Self.Position().z == 6 then
- gotoLabel('Schodzinapart')
- elseif Self.Position().z == 8 then
- gotoLabel('Dolspot2')
- elseif Self.Position().z == 5 then
- gotoLabel('Schodzina1')
- end
- wait(200)
- setWalkerEnabled(true)
- Gambler_Detected = false
- end
- if napisanejuz == false and Casino_Started == true and (Message == 'spotchange' or Message == 'dicer think' or Message == 'changespot' or Message == 'move' or Message == 'block') and (os.difftime(os.time(), Last_Activity_Player) <= (_Inactivity_Interval/3)) then
- Self.Say('Someone is playing now ' .. czas .. 's left..')
- napisanejuz = true
- end
- end
- local spec, value = text:match("^(.+)([a-z]+)$")
- local withdraw, valuew = text:match("^([a-z]+)(.+)$")
- for name, creature in Creature.iPlayers(2) do
- if disableLocalChat == false and name == speaker and creature:Position().x == Positions.Gambler_Pos.x and creature:Position().y == Positions.Gambler_Pos.y and creature:Position().z == Positions.Gambler_Pos.z then
- if _BlackList_Enabled == true and table.contains(_BlackList_Names, name:lower()) then
- if not table.contains(LimitSay.BLACKLIST, name:lower()) then
- Self.Say(_BlackList_Message)
- table.insert(LimitSay.BLACKLIST, name:lower())
- end
- return false
- end
- PlayerTable = Player["" .. name .. ""]
- Name_Atual = name
- if PlayerTable == nil then
- PlayerTable = {
- JOGO = 0,
- BALANCE = 0,
- BALANCE_P = 0,
- PROFIT = 0,
- XXX = 0,
- XXX_Count = 0,
- XXX_Player = 0,
- AH,
- AL,
- NUM,
- LOSETOP = {
- Times = 0,
- Money = 0,
- Name
- },
- WINTOP = {
- Times = 0,
- Money = 0,
- Name
- }
- }
- end
- if (Message == 'roll') and PlayerTable.BALANCE == 0 then
- Container_Index.Locker:UseItem(diceSlot, true)
- end
- if (Message == 'roll') and PlayerTable.BALANCE > 0 then
- Self.Say('To roll dice ur balance must be clear')
- end
- if PlayerTable.JOGO == Games.NULL then
- if 0 < PlayerTable.BALANCE then
- if table.contains(words.H, Message) then
- PlayerTable.JOGO = Games.HIGH
- if _Games_HighLow_Enabled then
- Last_Payout = os.time()
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- else
- if not table.contains(LimitSay.DISABLED, name) then
- Self.Say(Disabled_G[PlayerTable.JOGO])
- table.insert(LimitSay.DISABLED, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- elseif table.contains(words.L, Message) then
- PlayerTable.JOGO = Games.LOW
- if _Games_HighLow_Enabled then
- Last_Payout = os.time()
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- else
- if not table.contains(LimitSay.DISABLED, name) then
- Self.Say(Disabled_G[PlayerTable.JOGO])
- table.insert(LimitSay.DISABLED, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- elseif table.contains(words.NUM, Message) then
- PlayerTable.JOGO = Games.NUM
- if _Games_Numbers_Enabled then
- Last_Payout = os.time()
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- PlayerTable.NUM = Message
- else
- if not table.contains(LimitSay.DISABLED, name) then
- Self.Say(Disabled_G[PlayerTable.JOGO])
- table.insert(LimitSay.DISABLED, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- elseif table.contains(words.BJ, Message) then
- PlayerTable.JOGO = Games.BJ
- if _Games_BlackJack_Enabled then
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- else
- if not table.contains(LimitSay.DISABLED, name) then
- Self.Say(Disabled_G[PlayerTable.JOGO])
- table.insert(LimitSay.DISABLED, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- elseif table.contains(words.XXX, Message) then
- PlayerTable.JOGO = Games.XXX
- if _Games_XXX_Enabled then
- Last_Payout = os.time()
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- else
- if not table.contains(LimitSay.DISABLED, name) then
- Self.Say(Disabled_G[PlayerTable.JOGO])
- table.insert(LimitSay.DISABLED, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- elseif table.contains(words.ODD, Message) then
- PlayerTable.JOGO = Games.ODD
- if _Games_OddEven_Enabled then
- Last_Payout = os.time()
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- else
- if not table.contains(LimitSay.DISABLED, name) then
- Self.Say(Disabled_G[PlayerTable.JOGO])
- table.insert(LimitSay.DISABLED, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- elseif
- table.contains(words.EVEN, Message) then
- PlayerTable.JOGO = Games.EVEN
- if _Games_OddEven_Enabled then
- PlayerTable.JOGO = Games.EVEN
- Last_Payout = os.time()
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- else
- if not table.contains(LimitSay.DISABLED, name) then
- Self.Say(Disabled_G[PlayerTable.JOGO])
- table.insert(LimitSay.DISABLED, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- end
- if value then
- if table.contains(words.AH, value:lower()) then
- if spec then
- local AC = tonumber(spec)
- if AC and AC <= PlayerTable.BALANCE then
- Last_Payout = os.time()
- PlayerTable.JOGO = Games.AH
- PlayerTable.AH = AC
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- end
- end
- elseif table.contains(words.AL, value:lower()) and spec then
- local AC = tonumber(spec)
- if AC and AC <= PlayerTable.BALANCE then
- Last_Payout = os.time()
- PlayerTable.JOGO = Games.AL
- PlayerTable.AL = AC
- MinOption = BetOption[PlayerTable.JOGO].Min
- MaxOption = BetOption[PlayerTable.JOGO].Max
- PayoutOption = BetOption[PlayerTable.JOGO].Payout
- end
- end
- end
- end
- if PlayerTable.JOGO ~= nil and PlayerTable.JOGO ~= Games.NULL then
- if PlayerTable.BALANCE >= MinOption then
- local ValueAditional = 500000
- if TotalCrystal ~= 0 then
- ValueAditional = 500000
- end
- if PlayerTable.AH ~= nil then
- if PlayerTable.AH >= MinOption and PlayerTable.AH <= MaxOption then
- RollDice()
- _Player_Activity = os.time()
- else
- PlayerTable.JOGO = Games.NULL
- PlayerTable.AH = nil
- end
- elseif PlayerTable.AL ~= nil then
- if PlayerTable.AL >= MinOption and PlayerTable.AL <= MaxOption then
- RollDice()
- _Player_Activity = os.time()
- else
- PlayerTable.JOGO = Games.NULL
- PlayerTable.AL = nil
- end
- elseif PlayerTable.BALANCE >= MaxOption then
- if CountMoney(_Backpack_Crystal) + ValueAditional >= PlayerTable.BALANCE + MaxOption * (PayoutOption / 100) then
- if PlayerTable.JOGO == Games.XXX then
- Last_XXX = os.time()
- RollDice()
- else
- if PlayerTable.JOGO == Games.BJ then
- Jailson:Stop()
- end
- RollDice()
- end
- _Player_Activity = os.time()
- elseif not table.contains(LimitSay.SORRY_CASINO, name) then
- Self.PrivateMessage(name, _Messages_NoMoney)
- table.insert(LimitSay.SORRY_CASINO, name)
- end
- elseif CountMoney(_Backpack_Crystal) + ValueAditional >= PlayerTable.BALANCE + PlayerTable.BALANCE * (PayoutOption / 100) then
- if PlayerTable.JOGO == Games.XXX then
- Last_XXX = os.time()
- RollDice()
- else
- if PlayerTable.JOGO == Games.BJ then
- Jailson:Stop()
- end
- RollDice()
- end
- _Player_Activity = os.time()
- else
- if not table.contains(LimitSay.SORRY_CASINO, name) then
- Self.Say(_Messages_NoMoney)
- table.insert(LimitSay.SORRY_CASINO, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- else
- if not table.contains(LimitSay.SORRYMIN, name) then
- Self.Say(Replace("Min: " .. MinOption .. "cc | Max: " .. MaxOption .. "cc. || " .. _Messages_Cmd_Balance))
- table.insert(LimitSay.SORRYMIN, name)
- end
- PlayerTable.JOGO = Games.NULL
- end
- end
- if (Message == "credits" or Message == "creditos") and not table.contains(LimitSay.INFO, name) then
- Self.Say("Made by Hellu.")
- table.insert(LimitSay.INFO, name)
- end
- if Casino_Started then
- if table.contains(_Commands_Balance, Message) then
- if not table.contains(LimitSay.BALANCE, name) then
- Self.Say(Replace(_Messages_Cmd_Balance))
- table.insert(LimitSay.BALANCE, name)
- end
- elseif table.contains(_Commands_cast, Message) then
- Self.Say(_OpenTibia_Cast_Message)
- elseif table.contains(_Commands_Info, Message) then
- if not table.contains(LimitSay.INFO, name) then
- Self.Say(Replace(_Messages_Cmd_Info))
- table.insert(LimitSay.INFO, name)
- end
- elseif table.contains(_Commands_MinMax, Message) then
- if not table.contains(LimitSay.MINMAX, name) then
- Self.Say(Replace(_Messages_Cmd_MinMax))
- table.insert(LimitSay.MINMAX, name)
- end
- elseif table.contains(_Commands_Comandos, Message) then
- if not table.contains(LimitSay.COMANDOS, name) then
- Self.Say(_Messages_Cmd_Comandos)
- table.insert(LimitSay.COMANDOS, name)
- end
- elseif table.contains(_Commands_Games, Message) then
- if not table.contains(LimitSay.GAMES, name) then
- Self.Say(Replace(_Messages_Cmd_Games))
- table.insert(LimitSay.GAMES, name)
- end
- end
- end
- if PlayerTable.JOGO == Games.NULL and withdraw and table.contains(_Commands_Withdraw, withdraw:lower()) and 2 <= os.difftime(os.time(), Last_Payout) then
- local posx, posy, posz = 0, 0, 0
- if valuew then
- local Value_Withdraw = tonumber(valuew)
- if Value_Withdraw and Value_Withdraw <= PlayerTable.BALANCE then
- posx, posy, posz = Positions.Counter_Pos.x, Positions.Counter_Pos.y, Positions.Counter_Pos.z
- if posx ~= 0 and posy ~= 0 and posz ~= 0 then
- while Value_Withdraw > 100 do
- if 0 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 and Spot.count == 100 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, Spot.count)
- wait(Self.Ping() + 450)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - Spot.count
- Value_Withdraw = Value_Withdraw - Spot.count
- end
- else
- end
- end
- elseif 1 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 and Spot.count == 100 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, Spot.count)
- wait(Self.Ping() + 450)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - Spot.count
- Value_Withdraw = Value_Withdraw - Spot.count
- end
- else
- end
- end
- elseif backToCheck() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 and Spot.count == 100 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, Spot.count)
- wait(Self.Ping() + 450)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - Spot.count
- Value_Withdraw = Value_Withdraw - Spot.count
- end
- break
- end
- end
- end
- end
- if Value_Withdraw <= 100 then
- if 0 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 and Value_Withdraw >= Spot.count then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, Spot.count)
- wait(Self.Ping() + 450)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - Spot.count
- Value_Withdraw = Value_Withdraw - Spot.count
- end
- break
- end
- end
- elseif 1 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 and Value_Withdraw >= Spot.count then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, Spot.count)
- wait(Self.Ping() + 450)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - Spot.count
- Value_Withdraw = Value_Withdraw - Spot.count
- end
- break
- end
- end
- elseif backToCheck() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 and Value_Withdraw >= Spot.count then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, Spot.count)
- wait(Self.Ping() + 450)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - Spot.count
- Value_Withdraw = Value_Withdraw - Spot.count
- end
- break
- end
- end
- end
- end
- end
- end
- end
- end
- if PlayerTable.JOGO == Games.NULL and table.contains(_Commands_Payout, Message) and 2 <= os.difftime(os.time(), Last_Payout) then
- local posx, posy, posz = 0, 0, 0
- local totalValue = PlayerTable.BALANCE
- if 0 < PlayerTable.BALANCE then
- posx, posy, posz = Positions.Counter_Pos.x, Positions.Counter_Pos.y, Positions.Counter_Pos.z
- end
- if posx ~= 0 and posy ~= 0 and posz ~= 0 then
- wait(100)
- while PlayerTable.BALANCE > 100 do
- if 0 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, 100)
- wait(100)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - 100
- end
- break
- end
- end
- elseif 1 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, 100)
- wait(100)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - 100
- end
- break
- end
- end
- elseif backToCheck() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, 100)
- wait(100)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - 100
- end
- else
- end
- end
- end
- end
- if PlayerTable.BALANCE <= 100 then
- if 0 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- wait(100)
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, PlayerTable.BALANCE)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - PlayerTable.BALANCE
- end
- break
- end
- end
- elseif 1 < Container_Index.CC_BP:ItemCount() then
- for i = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 then
- local beforePay_Count = Container_Index.CC_BP:ItemCount() - 1
- wait(100)
- Container_Index.CC_BP:MoveItemToGround(i, posx, posy, posz, PlayerTable.BALANCE)
- if beforePay_Count ~= Container_Index.CC_BP:ItemCount() - 1 then
- PlayerTable.BALANCE = PlayerTable.BALANCE - PlayerTable.BALANCE
- end
- break
- end
- end
- end
- Self.Say("Your Money: " .. math.floor(totalValue) .. "cc.")
- PlayerTable.BALANCE = 0
- Last_Activity_Player = os.time()
- wait(2500)
- end
- end
- PlayerTable.BALANCE = 0
- Last_Payout = os.time()
- end
- end
- end
- end
- end)
- Hud = {
- Credits = HUD.New(30, 10, "$$ " .. Self.Name() .. " $$", 255, 69, 0),
- Cliente = HUD.New(30, 20, "Client: " .. cjikar, 232, 177, 26),
- Versao = HUD.New(30, 30, "Version: " .. Versao .. "", 232, 150, 20),
- Icone = HUD.New(15, 65, 4846, 20, 1),
- Icone = HUD.New(190, 65, 4846, 20, 1),
- Icone_Money = HUD.New(15, 145, 3043, 20, 1),
- Icone_Money2 = HUD.New(175, 145, 3043, 20, 1),
- Icone_Dado = HUD.New(10, 238, 5792, 30, 1),
- Icone_Dado2 = HUD.New(113, 238, 5792, 30, 1),
- Icone_Doll = HUD.New(18, 288, 19150, 20, 1),
- Icone_Doll2 = HUD.New(95, 288, 19150, 20, 1),
- Statistics = {
- Statistics_Title = HUD.New(40, 70, "| INFORMACION GENERAL |", 127, 255, 212),
- Statistics_Title = HUD.New(40, 150, "| INFORMATION MONEY |", 127, 255, 212),
- Statistics_Title = HUD.New(40, 290, "| VISITS |", 127, 255, 212),
- Statistics_Casino_Name = HUD.New(40, 90, "| Casino Name:", 255, 179, 100),
- Statistics_Casino_NameT = HUD.New(125, 90, Self.Name(), 255, 255, 255),
- Statistics_Casino_Session_Time = HUD.New(40, 110, "| Runtime:", 255, 179, 100),
- Statistics_Casino_Session_TimeT = HUD.New(100, 110, "00:00", 255, 255, 255),
- Statistics_Casino_SS = HUD.New(40, 130, "| Server Save:", 255, 179, 100),
- Statistics_Casino_SST = HUD.New(125, 130, _Casino_ServerSave, 255, 255, 255),
- Statistics_Casino_Totalcc = HUD.New(40, 170, "| Money Actual:", 255, 179, 100),
- Statistics_Casino_TotalccT = HUD.New(135, 170, "0k", 255, 255, 255),
- Statistics_Casino_PTopWin = HUD.New(40, 190, "| Top Player Win:", 255, 179, 100),
- Statistics_Casino_PTopWinT = HUD.New(140, 190, "0k", 255, 255, 255),
- Statistics_Casino_PTopLose = HUD.New(40, 210, "| Top Player Lose:", 255, 179, 100),
- Statistics_Casino_PTopLoseT = HUD.New(148, 210, "0k", 255, 255, 255),
- Statistics_Casino_Profit = HUD.New(40, 230, "| Profit:", 255, 179, 100),
- Statistics_Casino_ProfitT = HUD.New(88, 230, "0k", 255, 255, 255),
- Statistics_Title = HUD.New(40, 250, "| TOP GAMES |", 127, 255, 212),
- Statistics_Casino_TopGames = HUD.New(40, 270, "| Top Games:", 255, 179, 100),
- Statistics_Casino_TopGamesT = HUD.New(118, 270, "H,L,HAC,LAC,NUM,XXX,ODD,EVEN - 0,0,0,0,0,0,0,0", 255, 255, 255),
- Statistics_Casino_LastPlayer = HUD.New(40, 310, "| Last player:", 255, 179, 100),
- Statistics_Casino_LastPlayerT = HUD.New(120, 310, "", 255, 255, 255),
- Statistics_Casino_PlayerCount = HUD.New(40, 330, "| Visits:", 255, 179, 100),
- Statistics_Casino_PlayerCountT = HUD.New(86, 330, "0", 255, 255, 255)
- }
- }
- function FormatTime(t)
- return string.format("%.2d:%.2d:%.2d", t / 3600, t / 60 % 60, t % 60)
- end
- function SaveLog()
- local fileLog = "../" .. Self.Name() .. " [LOG].txt"
- local fileLogtxt = io.open(fileLog, "a")
- local HoursRunning = math.floor(os.difftime(os.time(), Time_Running))
- fileLogtxt:write("\n")
- fileLogtxt:write("//" .. os.date("%d/%m/%Y - %H:%M:%S.") .. "\\\\", [[
- ]])
- fileLogtxt:write("Tempo Aberto: " .. FormatTime(HoursRunning), "\n")
- fileLogtxt:write("Lucro: " .. Casino.Profit * 10 .. "K", "\n")
- fileLogtxt:write("Visitantes: " .. Casino.Players_Count, "\n")
- fileLogtxt:write("Dinheiro Total: " .. math.floor(Self.ItemCount(3043) * 10) .. "k", "\n")
- fileLogtxt:write("Dinheiro Extras: " .. math.floor(TotalCrystal * 10) .. "K", "\n")
- fileLogtxt:close()
- end
- function MaiorValor(table, type)
- local Maior = 0
- local Name = ""
- if type == "lose" then
- for i, v in pairs(Player) do
- if v ~= nil and v.LOSETOP ~= nil and Maior < v.LOSETOP.Money then
- Maior = v.LOSETOP.Money
- Name = v.LOSETOP.Name
- end
- end
- elseif type == "win" then
- for i, v in pairs(Player) do
- if v ~= nil and v.WINTOP ~= nil and Maior < v.WINTOP.Money then
- Maior = v.WINTOP.Money
- Name = v.WINTOP.Name
- end
- end
- end
- return math.floor(Maior * 10) .. "K - " .. Name
- end
- Module.New("Update HUD money", function(mod)
- if Money_Count < 5 then
- Money_Count = Money_Count + 1
- Hud.Icone_Money:SetItemCount(Money_Count)
- Hud.Icone_Money2:SetItemCount(Money_Count)
- elseif Money_Count >= 5 and Money_Count < 10 then
- Money_Count = Money_Count + 5
- Hud.Icone_Money:SetItemCount(Money_Count)
- Hud.Icone_Money2:SetItemCount(Money_Count)
- elseif Money_Count >= 10 and Money_Count < 25 then
- Money_Count = Money_Count + 15
- Hud.Icone_Money:SetItemCount(Money_Count)
- Hud.Icone_Money2:SetItemCount(Money_Count)
- elseif Money_Count >= 25 and Money_Count < 50 then
- Money_Count = Money_Count + 25
- Hud.Icone_Money:SetItemCount(Money_Count)
- Hud.Icone_Money2:SetItemCount(Money_Count)
- elseif Money_Count >= 50 then
- Money_Count = 1
- Hud.Icone_Money:SetItemCount(Money_Count)
- Hud.Icone_Money2:SetItemCount(Money_Count)
- end
- if Dice_Count < 6 then
- Dice_Count = Dice_Count + 1
- Hud.Icone_Dado:SetItemID(5791 + Dice_Count)
- Hud.Icone_Dado2:SetItemID(5791 + Dice_Count)
- elseif Dice_Count == 6 then
- Dice_Count = 1
- Hud.Icone_Dado:SetItemID(5792)
- Hud.Icone_Dado2:SetItemID(5792)
- end
- mod:Delay(1500)
- end)
- Module.New("Update HUD", function(mod)
- if Casino_Started then
- local HoursRunning = math.floor(os.difftime(os.time(), Time_Running))
- Hud.Statistics.Statistics_Casino_ProfitT:SetText(math.floor(Casino.Profit) * 10 .. "k")
- Hud.Statistics.Statistics_Casino_TotalccT:SetText(math.floor(Self.ItemCount(3043) * 10) .. "k")
- Hud.Statistics.Statistics_Casino_TopGamesT:SetText("H,L,HAC,LAC,NUM,XXX,ODD,EVEN: " .. Casino.TopGames.H .. "," .. Casino.TopGames.L .. "," .. Casino.TopGames.HAC .. "," .. Casino.TopGames.LAC .. "," .. Casino.TopGames.NUM .. "," .. Casino.TopGames.XXX .. "," .. Casino.TopGames.ODD .. "," .. Casino.TopGames.EVEN .. ".")
- Hud.Statistics.Statistics_Casino_PlayerCountT:SetText(Casino.Players_Count)
- Hud.Statistics.Statistics_Casino_Session_TimeT:SetText(FormatTime(HoursRunning))
- Hud.Statistics.Statistics_Casino_LastPlayerT:SetText(Last_Player)
- local r, g, b = math.random(255), math.random(255), math.random(255)
- Hud.Statistics.Statistics_Casino_PTopWinT:SetText(MaiorValor(Player, "win"))
- Hud.Statistics.Statistics_Casino_PTopLoseT:SetText(MaiorValor(Player, "lose"))
- Hud.Credits:SetTextColor(r, g, b)
- if Casino.Profit < 0 then
- Hud.Statistics.Statistics_Casino_ProfitT:SetTextColor(238, 0, 0)
- elseif Casino.Profit ~= 0 and Casino.Profit > 0 then
- Hud.Statistics.Statistics_Casino_ProfitT:SetTextColor(0, 255, 0)
- elseif Casino.Profit == 0 then
- Hud.Statistics.Statistics_Casino_ProfitT:SetTextColor(255, 255, 255)
- end
- end
- mod:Delay(1000)
- end)
- Jailson = Module("Check", function(mod)
- if PlayerTable ~= nil and Last_Payout ~= nil and PlayerTable.JOGO ~= Games.NULL and PlayerTable.JOGO ~= Games.BJ and PlayerTable.JOGO ~= Games.XXX and os.difftime(os.time(), Last_Payout) >= 2 then
- PlayerTable.JOGO = Games.NULL
- Last_Payout = os.time()
- end
- mod:Delay(1500)
- end, false)
- function OpenBp(backpack)
- local bp = Container.New(0)
- for index, name in pairs(backpack) do
- for i = 0, bp:ItemCount() - 1 do
- local slot = bp:GetItemData(i)
- if Item.GetName(slot.id):lower() == name:lower() then
- bp:UseItem(i, false)
- wait(100)
- Container.New(#Container.GetAll() - 3):Minimize()
- if #Container.GetAll() ~= 3 + index then
- print("Problema na abertura, reiniciando o Cassino.")
- return false
- end
- break
- end
- end
- end
- end
- function GetCounterContainer()
- local containerC
- for order, index in pairs(Container.GetAll()) do
- local containerNew = Container.New(index)
- if CountItemsOfIDs(containerNew, Depot_IDs) == 0 and containerNew:Name() == "Browse Field" then
- containerC = Container.New(index)
- break
- end
- end
- return containerC
- end
- Open_Casino = Module("Openning Casino (bps)", function(mod)
- if Casino_Started == true and #Container.GetAll() == 0 then
- Casino_Started = false
- Open_Casino:Stop()
- Last_Activity_Player = os.time
- wait(Self.Ping() + 250)
- Open_Casino:Start()
- end
- if #Container.GetAll() ~= 6 and not Stop_Casino and Server_Save_Now == false then
- for i = 0, 15 do
- closeContainer(i)
- end
- print("Abrindo Cassino, aguarde por favor!")
- TotalCrystal = 0
- if Positions.Casino_Pos.x ~= nil and (Positions.Casino_Pos.x ~= Self.Position().x or Positions.Casino_Pos.y ~= Self.Position().y) then
- Casino_Started = false
- Open_Casino:Stop()
- print("Cassino fora de posi\231\227o! Desligado.")
- return false
- end
- CoordinatesDC()
- Client.HideEquipment()
- if Self.BrowseField(Positions.Depot_Pos.x, Positions.Depot_Pos.y, Positions.Depot_Pos.z) then
- wait(Self.Ping() + 350)
- Container_Index.Locker = Container.GetFirst()
- if Container_Index.Locker ~= nil and Container_Index.Locker:isOpen() ~= nil then
- Container_Index.Locker:Minimize()
- else
- print("Erro: Falha ao minimizar Locker, tentando novamente...")
- return false
- end
- end
- if #Container.GetAll() ~= 1 then
- print("Problema na abertura, reiniciando o Cassino. (Locker)")
- Czysciciel = true
- return false
- end
- if Self.BrowseField(Positions.Counter_Pos.x, Positions.Counter_Pos.y, Positions.Counter_Pos.z) then
- wait(Self.Ping() + 350)
- Container_Index.Counter = GetCounterContainer()
- if Container_Index.Counter ~= nil and Container_Index.Counter:isOpen() ~= nil then
- Container_Index.Counter:Minimize()
- else
- print("Erro: Falha ao minimizar Counter, tentando novamente...")
- Czysciciel = true
- return false
- end
- end
- if #Container.GetAll() ~= 2 then
- print("Problema na abertura, reiniciando o Cassino. (Counter)")
- Czysciciel = true
- return false
- end
- if Container_Index.Locker ~= nil and Container_Index.Locker:isOpen() ~= nil then
- Container_Index.Locker:UseItem(0, false)
- else
- print("Locker n\227o encontrado! Tentando novamente.")
- return false
- end
- wait(Self.Ping() + 100)
- Container_Index.Depot = Container.New(0)
- wait(100)
- wait(Self.Ping())
- if #Container.GetAll() ~= 3 then
- print("Problema na abertura, reiniciando o Cassino. (Depot)")
- Czysciciel = true
- return false
- end
- if Container_Index.Depot:isOpen() ~= nil then
- wait(150)
- Container_Index.Depot:Minimize()
- Container:UseItem(0, true)
- wait(150)
- Container_Index.Depot:Minimize()
- else
- print("Erro: Falha ao minimizar Depot, tentando novamente...")
- return false
- end
- wait(100)
- if _Casino_Depot then
- Container_Index.Depot:Minimize()
- if Container_Index.Depot:isOpen() ~= nil then
- Container_Index.Depot:Minimize()
- wait(150)
- Container:OpenChildren({22799, true})
- wait(50)
- Container:OpenChildren({22800, true})
- wait(150)
- Container:OpenChildren({22801, true})
- wait(150)
- Container_Index.Depot:UseItem(0, true)
- wait(150)
- Container_Index.Depot:Minimize()
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- Czysciciel = false
- wait(25)
- else
- print("Depot n\227o aberto com sucesso! Tentando novamente...")
- return false
- end
- end
- wait(50)
- Container_Index.CC_BP = Container.New(1)
- Container_Index.Check_BP = Container.New(2)
- Container_Index.Trash = Container.New(3)
- wait(150)
- Container_Index.Check_BP:Minimize()
- for container = 1, #Container_Index do
- if Container_Index[container]:isOpen() == nil then
- print("Erro: Falha ao detectar todas as Backpacks, tentando novamente...")
- return false
- end
- end
- if #Container.GetAll() >= 6 and Casino_Started == false then
- Casino_Started = true
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Casino script loaded. say /help for more commands")
- Time_Running = os.time()
- Jailson:Start()
- if _OpenTibia_Cast_Enabled then
- Self.Say(_OpenTibia_Cast_Message)
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Cast ON!")
- end
- Decorations_Casino()
- Start_Modules()
- for i = 0, Container_Index.Locker:ItemCount() - 1 do
- if table.contains(Dice_IDs, Container_Index.Locker:GetItemData(i).id) then
- diceSlot = i
- break
- end
- end
- end
- end
- end, false)
- function RollDice()
- wait(100)
- if PlayerTable.JOGO ~= Games.BJ then
- if PlayerTable.JOGO ~= Games.XXX then
- if Container_Index.Locker:UseItem(diceSlot, true) then
- AntiTrash:Start()
- return true
- else
- RollDice()
- end
- else
- for i = 0, Container_Index.Locker:ItemCount() - 1 do
- if table.contains(Dice_IDs, Container_Index.Locker:GetItemData(i).id) then
- Container_Index.Locker:UseItem(i, true)
- wait(Self.Ping() + 350)
- break
- end
- end
- end
- end
- if PlayerTable.JOGO == Games.BJ and BlackJack_Count ~= 10 then
- for i = 0, Container_Index.Locker:ItemCount() - 1 do
- if table.contains(Dice_IDs, Container_Index.Locker:GetItemData(i).id) then
- Container_Index.Locker:UseItem(i, true)
- wait(Self.Ping() + 350)
- end
- end
- BlackJack_Count = BlackJack_Count + 1
- end
- end
- function Start_Modules()
- Check_Money:Start()
- Clean_Table:Start()
- Clean_TableM:Start()
- Clean_TableW:Start()
- CleanTable2:Start()
- CleanTableD:Start()
- Restack_Money:Start()
- AntiTrash:Start()
- Announce_Say:Start()
- Announce_Yell:Start()
- Restack_EBP:Start()
- Turn_Mod:Start()
- ModSprawdzania:Start()
- NapisaneJuz:Start()
- end
- function Stop_Modules()
- Open_Casino:Stop()
- Check_Money:Stop()
- Clean_Table:Stop()
- Clean_TableM:Stop()
- Clean_TableW:Stop()
- CleanTable2:Stop()
- CleanTableD:Stop()
- Restack_Money:Stop()
- AntiTrash:Stop()
- Announce_Say:Stop()
- Announce_Yell:Stop()
- Restack_EBP:Stop()
- Turn_Mod:Stop()
- ModSprawdzania:Stop()
- NapisaneJuz:Stop()
- end
- EffectMessageProxy.OnReceive("Dice Number", function(proxy, message, x, y, z)
- local Msg = tonumber(string.match(message, Self.Name() .. " rolled a (.+)."))
- local MsgP, AntyScam, ActualName
- AntyScam = string.match(message, _AntyScam)
- if PlayerTable ~= nil and not AntyScam and Msg and PlayerTable.JOGO ~= Games.XXX then
- if PlayerTable.AH ~= nil then
- CheckGame(Msg, PlayerTable.JOGO, Name_Atual, PlayerTable.AH)
- elseif PlayerTable.AL ~= nil then
- CheckGame(Msg, PlayerTable.JOGO, Name_Atual, PlayerTable.AL)
- elseif PlayerTable.JOGO ~= Games.BJ and PlayerTable.JOGO ~= Games.NUM then
- CheckGame(Msg, PlayerTable.JOGO, Name_Atual)
- elseif PlayerTable.JOGO == Games.NUM then
- CheckGame(Msg, PlayerTable.JOGO, Name_Atual, PlayerTable.NUM)
- elseif PlayerTable.JOGO == Games.ODD or PlayerTable.JOGO == Games.EVEN then
- CheckGame(Msg, PlayerTable.JOGO, Name_Atual)
- end
- if PlayerTable.JOGO == Games.BJ then
- if BlackJack_Count <= 5 then
- BlackJack_House = BlackJack_House + Msg
- RollDice()
- wait(Self.Ping() + 100)
- elseif BlackJack_Count > 5 and BlackJack_Count < 10 then
- BlackJack_Player = BlackJack_Player + Msg
- RollDice()
- wait(Self.Ping() + 100)
- if BlackJack_Count == 10 then
- CheckGame(Msg, PlayerTable.JOGO, Name_Atual, nil, BlackJack_House, BlackJack_Player)
- end
- end
- end
- end
- if PlayerTable ~= nil and PlayerTable.JOGO == Games.XXX then
- MsgP = tonumber(string.match(message, Name_Atual .. " rolled a (.+)."))
- AntyScam = string.match(message, _AntyScam)
- if MsgP and not AntyScam then
- if PlayerTable.XXX_Count >= 3 then
- PlayerTable.XXX_Player = PlayerTable.XXX_Player + MsgP
- PlayerTable.XXX_Count = PlayerTable.XXX_Count + 1
- Last_Activity_Player3 = os.time()
- if PlayerTable.XXX_Count == 6 then
- CheckGame(nil, PlayerTable.JOGO, Name_Atual, nil, PlayerTable.XXX, PlayerTable.XXX_Player)
- end
- end
- elseif Msg and PlayerTable.XXX_Count < 3 then
- PlayerTable.XXX_Count = PlayerTable.XXX_Count + 1
- PlayerTable.XXX = PlayerTable.XXX + Msg
- Last_Activity_Player3 = os.time()
- Last_XXX = os.time()
- if PlayerTable.XXX_Count == 3 then
- Self.Say("My sum: " .. PlayerTable.XXX .. ". Waiting for your 3 roles!!.")
- Last_Activity_Player3 = os.time()
- XXXzagrane = true
- else
- wait(200)
- RollDice()
- end
- end
- end
- end)
- ModSprawdzania = Module("Mod Sprawdzania", function(mod)
- if XXXzagrane == true and PlayerTable ~= nil and PlayerTable.JOGO == Games.XXX and Last_Activity_Player3 ~= nil and os.difftime(os.time(), Last_Activity_Player3) >= _Inactivity_Say_Time1 * 25 then
- PlayerTable.XXX_Player = 0
- PlayerTable.XXX_Count = 6
- XXXzagrane = false
- CheckGame(nil, PlayerTable.JOGO, Name_Atual, nil, PlayerTable.XXX, PlayerTable.XXX_Player)
- end
- if XXXzagrane == true and PlayerTable ~= nil and PlayerTable.JOGO == Games.XXX and Last_Activity_Player3 ~= nil and os.difftime(os.time(), Last_Activity_Player3) == _Inactivity_Say_Time1 * 15 then
- Self.Say('Hurry Up u have last 10sec to roll dice')
- end
- mod:Delay(1000)
- end, false)
- function GetPlayerTable(type)
- if type == "balancewl" then
- if PlayerTable ~= nil and PlayerTable.BALANCE_P ~= nil then
- return math.floor(PlayerTable.BALANCE_P / 10)
- end
- elseif type == "balance" then
- if PlayerTable ~= nil and PlayerTable.BALANCE ~= nil then
- return math.floor(PlayerTable.BALANCE)
- end
- elseif type == "moneyw" then
- if PlayerTable ~= nil and PlayerTable.BALANCE ~= nil and PlayerTable.JOGO ~= nil and PlayerTable.JOGO ~= 0 then
- if PlayerTable.BALANCE > BetOption[PlayerTable.JOGO].Max then
- if PlayerTable.JOGO ~= Games.AH and PlayerTable.JOGO ~= Games.AL then
- return math.floor(BetOption[PlayerTable.JOGO].Max * (BetOption[PlayerTable.JOGO].Payout / 100))
- elseif PlayerTable.AL ~= nil then
- return math.floor(PlayerTable.AL * PayoutOption / 100)
- elseif PlayerTable.AH ~= nil then
- return math.floor(PlayerTable.AH * PayoutOption / 100)
- end
- elseif PlayerTable.JOGO ~= Games.AH and PlayerTable.JOGO ~= Games.AL then
- return math.floor(PlayerTable.BALANCE * (BetOption[PlayerTable.JOGO].Payout / 100))
- elseif PlayerTable.AL ~= nil then
- return math.floor(PlayerTable.AL * PayoutOption / 100)
- elseif PlayerTable.AH ~= nil then
- return math.floor(PlayerTable.AH * PayoutOption / 100)
- end
- end
- elseif type == "moneyl" then
- if PlayerTable ~= nil and PlayerTable.BALANCE ~= nil and PlayerTable.JOGO ~= nil and PlayerTable.JOGO ~= 0 then
- if PlayerTable.BALANCE > BetOption[PlayerTable.JOGO].Max then
- if PlayerTable.JOGO ~= Games.AH and PlayerTable.JOGO ~= Games.AL then
- return math.floor(BetOption[PlayerTable.JOGO].Max )
- elseif PlayerTable.AL ~= nil then
- return math.floor(PlayerTable.AL)
- elseif PlayerTable.AH ~= nil then
- return math.floor(PlayerTable.AH)
- end
- elseif PlayerTable.JOGO ~= Games.AH and PlayerTable.JOGO ~= Games.AL then
- return math.floor(PlayerTable.BALANCE)
- elseif PlayerTable.AL ~= nil then
- return math.floor(PlayerTable.AL)
- elseif PlayerTable.AH ~= nil then
- return math.floor(PlayerTable.AH)
- end
- end
- elseif type == "game" and PlayerTable ~= nil and PlayerTable.JOGO ~= nil and PlayerTable.JOGO >= 0 then
- return Games_Type[PlayerTable.JOGO + 1]
- end
- end
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]--[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- function CheckAvailableDepots()
- local AvailableDepots = {}
- local posx, posy, posz = Self.Position().x, Self.Position().y, Self.Position().z
- for _, spot in ipairs(Gambling_Depots.Yalahar) do
- if spot["HouseSwitch"][3] == Self.Position().z then
- local xDistHouse, xDistPlayer = math.abs(spot["HouseSwitch"][1] - posx), math.abs(spot["PlayerSwitch"][1] - posx)
- local yDistHouse, yDistPlayer = math.abs(spot["HouseSwitch"][2] - posy), math.abs(spot["PlayerSwitch"][2] - posy)
- if xDistHouse <= 7 and xDistPlayer <= 7 then
- if yDistHouse <= 5 and yDistPlayer <= 5 then
- local addSpot = true
- for _, creature in Creature.iPlayers() do
- if (creature:Position().x == spot["HouseSwitch"][1] and creature:Position().y == spot["HouseSwitch"][2] and creature:Position().z == posz) or
- (creature:Position().x == spot["PlayerSwitch"][1] and creature:Position().y == spot["PlayerSwitch"][2] and creature:Position().z == posz) then
- addSpot = false
- break
- end
- end
- if addSpot then
- table.insert(AvailableDepots, spot)
- end
- end
- end
- end
- end
- ProcessDebugMessage('Casino Debugger', 'The script found '..#AvailableDepots..' available depots')
- return AvailableDepots
- end
- function UpdateCoordinates()
- local posx, posy, posz = Self.Position().x, Self.Position().y, Self.Position().z
- local spot = nil
- if not spot then
- for _, gamblingSpot in ipairs(Gambling_Depots.Yalahar) do
- if posx == gamblingSpot["HouseSwitch"][1] and posy == gamblingSpot["HouseSwitch"][2] and posz == gamblingSpot["HouseSwitch"][3] then
- spot = gamblingSpot
- break
- end
- end
- end
- if not spot then
- for _, gamblingSpot in ipairs(Gambling_Depots.Thais) do
- if posx == gamblingSpot["HouseSwitch"][1] and posy == gamblingSpot["HouseSwitch"][2] and posz == gamblingSpot["HouseSwitch"][3] then
- spot = gamblingSpot
- break
- end
- end
- end
- if not spot then
- for _, gamblingSpot in ipairs(Gambling_Depots.Venore) do
- if posx == gamblingSpot["HouseSwitch"][1] and posy == gamblingSpot["HouseSwitch"][2] and posz == gamblingSpot["HouseSwitch"][3] then
- spot = gamblingSpot
- break
- end
- end
- end
- if spot then
- Coordinates.Locker.x, Coordinates.Locker.y, Coordinates.Locker.z = spot["HouseDepot"][1], spot["HouseDepot"][2], spot["HouseDepot"][3]
- Coordinates.Player.x, Coordinates.Player.y, Coordinates.Player.z = spot["PlayerSwitch"][1], spot["PlayerSwitch"][2], spot["PlayerSwitch"][3]
- Coordinates.Counter.x, Coordinates.Counter.y, Coordifnates.Counter.z = spot["Counter"][1], spot["Counter"][2], spot["Counter"][3]
- Coordinates.Adjacent_Locker.x, Coordinates.Adjacent_Locker.y, Coordinates.Adjacent_Locker.z = spot["PlayerDepot"][1], spot["PlayerDepot"][2], spot["PlayerDepot"][3]
- return true
- end
- return false
- end
- Module.New('Casino_Turn', function(Mod)
- Gambler_Detected = false
- for name, creature in Creature.iNpcs(2) do
- if (creature.iNpcs:Position().x == Self.Position().x + 2 and creature.iNpcs:Position().y == Self.Position().y and creature.iNpcs:Position().z == Self.Position().z) or (creature.iNpcs:Position().x == Self.Position().x - 2 and creature.iNpcs:Position().y == Self.Position().y and creature.iNpcs:Position().z == Self.Position().z) then
- Gambler_Detected = true
- end
- end
- for name, creature in Creature.iPlayers(2) do
- if (creature:Position().x == Self.Position().x + 2 and creature:Position().y == Self.Position().y and creature:Position().z == Self.Position().z) or (creature:Position().x == Self.Position().x - 2 and creature:Position().y == Self.Position().y and creature:Position().z == Self.Position().z) then
- Gambler_Detected = true
- end
- Mod:Delay(100)
- end
- end)
- function onWalkLabel(labelName)
- local newLocation = false
- Last_Activity_Player = os.time()
- if (Gambler_Detected == false) then
- if (labelName == 'Spot1') or
- (labelName == 'Spot2') or
- (labelName == 'Spot3') or
- (labelName == 'Spot4') or
- (labelName == 'Spot5') or
- (labelName == 'Spot6') then
- setWalkerEnabled(false)
- Self.Say('I found new spot, casino loading..')
- Open_Casino:Start()
- Stop_Casino = false
- newLocation = CoordinatesDC()
- disableLocalChat = false
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- end
- end
- end
- Module.New('RuneIfStuck', function(Mod)
- if Walker.IsStuck() then
- Self.Say('utani hur')
- end
- if Walker.IsStuck() and Self.Position().z == 7 then
- gotoLabel('Wchodzina1')
- end
- if Walker.IsStuck() and Self.Position().z == 6 then
- gotoLabel('Wchodzina2')
- end
- if Walker.IsStuck() and Self.Position().z == 5 then
- gotoLabel('Schodzina1')
- end
- if Walker.IsStuck() and Self.Position().z == 8 then
- gotoLabel('Wchodzinagore')
- end
- Mod:Delay(3000)
- end)
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- --[/////////////////////////////////////////////////////////////////////////////////////////////////////////////--]
- function Replace(message)
- replacements = {
- ["|HLMIN|"] = _Games_HighLow_Min,
- ["|HLMAX|"] = _Games_HighLow_Max,
- ["|HLPAY|"] = _Games_HighLow_Payout,
- ["|HLACMIN|"] = _Games_HighLow_Acumulative_Min * 10,
- ["|HLACMAX|"] = _Games_HighLow_Acumulative_Max * 10,
- ["|HLACPAY|"] = _Games_HighLow_Acumulative_Payout,
- ["|NUMMIN|"] = _Games_Numbers_Min * 10,
- ["|NUMMAX|"] = _Games_Numbers_Max * 10,
- ["|NUMPAY|"] = _Games_Numbers_Payout,
- ["|BJMIN|"] = _Games_BlackJack_Min * 10,
- ["|BJMAX|"] = _Games_BlackJack_Max * 10,
- ["|BJPAY|"] = _Games_BlackJack_Payout,
- ["|XXXMIN|"] = _Games_XXX_Min * 10,
- ["|XXXMAX|"] = _Games_XXX_Max * 10,
- ["|XXXPAY|"] = _Games_XXX_Payout,
- ["|OEMIN|"] = _Games_OddEven_Min * 10,
- ["|OEMAX|"] = _Games_OddEven_Max * 10,
- ["|OEPAY|"] = _Games_OddEven_Payout,
- ["|CASINO|"] = Self.Name(),
- ["|GUESTS|"] = Casino.Players_Count,
- ["|BALANCE|"] = GetPlayerTable("balance") ,
- ["|BALANCEWL|"] = GetPlayerTable("balancewl"),
- ["|MONEYWIN|"] = GetPlayerTable("moneyw"),
- ["|MONEYLOSE|"] = GetPlayerTable("moneyl"),
- ["|GAME|"] = GetPlayerTable("game")
- }
- result = string.gsub(message, "|%a+|", function(str)
- return replacements[str]
- end)
- return result
- end
- function backToCheck()
- if Container_Index.CC_BP:GoBack() then
- wait(Self.Ping() + 300)
- for i = 0, Container_Index.CC_BP:ItemCount() - 1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 then
- TotalCrystal = TotalCrystal - Spot.count
- end
- end
- print("Total Crystal (Extra): " .. TotalCrystal)
- if 0 < Container_Index.CC_BP:CountItemsOfID(3043) then
- return true
- else
- if 0 < Container_Index.CC_BP:CountItemsOfID(3043) then
- return true
- elseif not table.contains(LimitSay.SORRY_CASINO, "backToCheck") then
- Self.Say(Replace(_Messages_NoMoney))
- table.insert(LimitSay.SORRY_CASINO, "backToCheck")
- end
- end
- end
- end
- function CountMoney(CONTAINER)
- local Cont = Container.New(CONTAINER:lower())
- local MoneyTotal = 0
- if Cont:isOpen() then
- for i = 0, Cont:ItemCount() - 1 do
- local Spot = Cont:GetItemData(i)
- if Spot.id == 3043 then
- MoneyTotal = MoneyTotal + Spot.count
- end
- end
- end
- return MoneyTotal
- end
- function Close_Casino(force)
- if Casino_Started or force == true then
- for i = 0, Container_Index.Locker:ItemCount() - 1 do
- local Spot = Container_Index.Locker:GetItemData(i)
- if table.contains(_Decoration_Items, Item.GetName(Spot.id)) then
- Container_Index.Locker:MoveItemToContainer(i, Container_Index.Depot:Index(), Container_Index.Depot:ItemCapacity() - 1, 50)
- wait(Self.Ping() + 350)
- for j = 1, #_Decoration_Items do
- if 0 < Container_Index.Locker:CountItemsOfID(Item.GetID(_Decoration_Items[j]:lower())) then
- Close_Casino()
- end
- end
- end
- end
- for i = 0, Container_Index.Locker:ItemCount() - 1 do
- local Spot = Container_Index.Locker:GetItemData(i)
- while table.contains(Dice_IDs, Spot.id) do
- Container_Index.Locker:MoveItemToContainer(i, Container_Index.Depot:Index(), Container_Index.Depot:ItemCapacity() - 1, Spot.count)
- wait(Self.Ping() + 100)
- break
- end
- end
- if _Casino_Depot == true then
- local TapestryID = Item.GetID(_Decoration_Tapestry:lower())
- if Map.GetTopMoveItem(Positions.Depot_Pos.x - 1, Positions.Depot_Pos.y, Positions.Depot_Pos.z).id == TapestryID then
- Map.PickupItem(Positions.Depot_Pos.x - 1, Positions.Depot_Pos.y, Positions.Depot_Pos.z, Container_Index.Depot:Index(), Container_Index.Depot:ItemCapacity() - 1)
- wait(Self.Ping() + 100)
- end
- end
- for i = 0, 15 do
- closeContainer(i)
- end
- Stop_Modules()
- Casino_Started = false
- end
- end
- function onWrite(_Channel_Casino, message)
- _Channel_Casino:SendYellowMessage(Self.Name(), message)
- local Message = message:lower():trim()
- local cmd, value = message:lower():match("^/([a-z]+) (.+)$")
- if Message == "uptime" then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Uptime: " .. Hud.Statistics.Statistics_Casino_Session_TimeT)
- elseif Message == "credits" then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Criado por Charles | Skype: charles.kassab")
- elseif Message == "/help" then
- for i = 1, #Comandos do
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", Comandos[i])
- if i == #Comandos then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Todos os comandos do Cassino s\227o esses.")
- end
- end
- elseif Message == "profit" then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Profit: " .. Casino.Profit)
- elseif Message == "/start" then
- if Casino_Started == false then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Abrindo Cassino!")
- Open_Casino:Start()
- Stop_Casino = false
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Seu cassino j\225 est\225 Ligado!")
- end
- elseif Message == "/stop" then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Fechando Cassino!")
- Close_Casino()
- Stop_Casino = true
- SaveLog()
- elseif Message == "/pause" then
- if Stop_Casino == false then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Pausado (para voltar ao normal use /resume).")
- Casino_Started = false
- Stop_Casino = true
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "O cassino j\225 est\225 pausado!")
- end
- elseif Message == "/resume" then
- if Stop_Casino == true then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Resumido!")
- Casino_Started = true
- Stop_Casino = false
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "O cassino n\227o est\225 pausado para ser resumido!")
- end
- elseif Message == "/reset" then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "HUD Reset Success!")
- Casino.Profit = 0
- Casino.Players_Count = 0
- Casino.TopGames = {
- H = 0,
- L = 0,
- HAC = 0,
- LAC = 0,
- NUM = 0,
- XXX = 0,
- ODD = 0,
- EVEN = 0
- }
- for i, v in pairs(Player) do
- if v ~= nil and v.LOSETOP ~= nil and v.LOSETOP.Money ~= nil then
- v.LOSETOP.Money = 0
- v.WINTOP.Money = 0
- end
- end
- elseif Message == "/addv" then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Foram adicionados mais 100 Visitantes!")
- Casino.Players_Count = Casino.Players_Count + 100
- end
- if cmd == "hlmin" then
- if value then
- local HighLow_Min = tonumber(value)
- BetOption[1].Min = HighLow_Min
- BetOption[2].Min = HighLow_Min
- _Games_HighLow_Min = HighLow_Min
- if HighLow_Min then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low} - Minimo ajustado para: " .. HighLow_Min * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /hlmin NUMEROAQUI")
- end
- end
- elseif cmd == "hlmax" then
- if value then
- local HighLow_Max = tonumber(value)
- BetOption[1].Max = HighLow_Max
- BetOption[2].Max = HighLow_Max
- _Games_HighLow_Max = HighLow_Max
- if HighLow_Max then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low} - M\225ximo ajustado para: " .. HighLow_Max * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /hlmax NUMEROAQUI")
- end
- end
- elseif cmd == "hlpay" then
- if value then
- local HighLow_Payout = tonumber(value)
- BetOption[1].Payout = HighLow_Payout
- BetOption[2].Payout = HighLow_Payout
- _Games_HighLow_Payout = HighLow_Payout
- if HighLow_Payout then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low} - Payout ajustado para: " .. HighLow_Payout .. "%.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /hlpay NUMEROAQUI")
- end
- end
- elseif cmd == "hlmode" then
- if value then
- local Choice = value:lower()
- if Choice == "on" and _Games_HighLow_Enabled == false then
- _Games_HighLow_Enabled = true
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low} - LIGADO!")
- elseif Choice == "off" and _Games_HighLow_Enabled == true then
- _Games_HighLow_Enabled = false
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low} - DESLIGADO!")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low} - Verifique se voc\234 digitou 'on' para ligar ou 'off' para desligar. | Caso n\227o funcionar quer dizer que j\225 est\225 configurado como solicitado.")
- end
- end
- elseif cmd == "hlacmin" then
- if value then
- local HighLow_AC_Min = tonumber(value)
- BetOption[6].Min = HighLow_AC_Min
- BetOption[7].Min = HighLow_AC_Min
- _Games_HighLow_Acumulative_Min = HighLow_AC_Min
- if HighLow_AC_Min then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low (AC)} - M\225ximo ajustado para: " .. HighLow_AC_Min * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /hlacmin NUMEROAQUI")
- end
- end
- elseif cmd == "hlacmax" then
- if value then
- local HighLow_AC_Max = tonumber(value)
- BetOption[6].Max = HighLow_AC_Max
- BetOption[7].Max = HighLow_AC_Max
- _Games_HighLow_Acumulative_Max = HighLow_AC_Max
- if HighLow_AC_Max then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low (AC)} - M\225ximo ajustado para: " .. HighLow_AC_Max * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /hlacmax NUMEROAQUI")
- end
- end
- elseif cmd == "hlacpay" then
- if value then
- local HighLow_AC_Payout = tonumber(value)
- _Games_HighLow_Acumulative_Payout = HighLow_AC_Payout
- BetOption[6].Payout = HighLow_AC_Payout
- BetOption[7].Payout = HighLow_AC_Payout
- if HighLow_AC_Payout then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low (AC)} - Payout ajustado para: " .. HighLow_AC_Payout .. "%.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /hlacpay NUMEROAQUI")
- end
- end
- elseif cmd == "hlacmode" then
- if value then
- local Choice = value:lower()
- if Choice == "on" and _Games_HighLow_Acumulative_Enabled == false then
- _Games_HighLow_Acumulative_Enabled = true
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low (AC)} - LIGADO!")
- elseif Choice == "off" and _Games_HighLow_Acumulative_Enabled == true then
- _Games_HighLow_Acumulative_Enabled = false
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low (AC)} - DESLIGADO!")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{High/Low (AC)} - Verifique se voc\234 digitou 'on' para ligar ou 'off' para desligar. | Caso n\227o funcionar quer dizer que j\225 est\225 configurado como solicitado.")
- end
- end
- elseif cmd == "nummin" then
- if value then
- local Numbers_Min = tonumber(value)
- _Games_Numbers_Min = Numbers_Min
- BetOption[5].Min = Numbers_Min
- if Numbers_Min then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{Numbers} - Minimo ajustado para: " .. Numbers_Min * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /nummin NUMEROAQUI")
- end
- end
- elseif cmd == "nummax" then
- if value then
- local Numbers_Max = tonumber(value)
- _Games_Numbers_Max = Numbers_Max
- BetOption[5].Max = Numbers_Max
- if Numbers_Min then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{Numbers} - M\225ximo ajustado para: " .. Numbers_Max * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /nummax NUMEROAQUI")
- end
- end
- elseif cmd == "numpay" then
- if value then
- local Numbers_Payout = tonumber(value)
- _Games_Numbers_Payout = Numbers_Payout
- BetOption[5].Payout = Numbers_Payout
- if Numbers_Payout then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{Numbers} - Payout ajustado para: " .. Numbers_Payout .. "%.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /numpay NUMEROAQUI")
- end
- end
- elseif cmd == "nummode" then
- if value then
- local Choice = value:lower()
- if Choice == "on" and _Games_Numbers_Enabled == false then
- _Games_Numbers_Enabled = true
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{Numbers} - LIGADO!")
- elseif Choice == "off" and _Games_Numbers_Enabled == true then
- _Games_Numbers_Enabled = false
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{Numbers} - DESLIGADO!")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{Numbers} - Verifique se voc\234 digitou 'on' para ligar ou 'off' para desligar. | Caso n\227o funcionar quer dizer que j\225 est\225 configurado como solicitado.")
- end
- end
- elseif cmd == "bjmin" then
- if value then
- local BlackJack_Min = tonumber(value)
- if BlackJack_Min then
- _Games_BlackJack_Min = BlackJack_Min
- BetOption[3].Min = BlackJack_Min
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackJack} - Minimo ajustado para: " .. BlackJack_Min * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /bjmin NUMEROAQUI")
- end
- end
- elseif cmd == "bjmax" then
- if value then
- local BlackJack_Max = tonumber(value)
- if BlackJack_Max then
- _Games_BlackJack_Max = BlackJack_Max
- BetOption[3].Max = BlackJack_Max
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackJack} - Minimo ajustado para: " .. BlackJack_Max * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /bjmax NUMEROAQUI")
- end
- end
- elseif cmd == "bjpay" then
- if value then
- local BlackJack_Payout = tonumber(value)
- if BlackJack_Payout then
- _Games_BlackJack_Payout = BlackJack_Payout
- BetOption[3].Payout = BlackJack_Payout
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackJack} - Minimo ajustado para: " .. BlackJack_Payout .. "%.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /bjpay NUMEROAQUI")
- end
- end
- elseif cmd == "bjmode" then
- if value then
- local Choice = value:lower()
- if Choice == "on" and _Games_BlackJack_Enabled == false then
- _Games_BlackJack_Enabled = true
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackJack} - LIGADO!")
- elseif Choice == "off" and _Games_BlackJack_Enabled == true then
- _Games_BlackJack_Enabled = false
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackJack} - DESLIGADO!")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackJack} - Verifique se voc\234 digitou 'on' para ligar ou 'off' para desligar. | Caso n\227o funcionar quer dizer que j\225 est\225 configurado como solicitado.")
- end
- end
- elseif cmd == "xxxmin" then
- if value then
- local XXX_Min = tonumber(value)
- if XXX_Min then
- _Games_XXX_Min = XXX_Min
- BetOption[8].Min = XXX_Min
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{3X3} - Minimo ajustado para: " .. XXX_Min * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /xxxmin NUMEROAQUI")
- end
- end
- elseif cmd == "xxxmax" then
- if value then
- local XXX_Max = tonumber(value)
- if XXX_Max then
- _Games_XXX_Max = XXX_Max
- BetOption[8].Max = XXX_Max
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{3X3} - Minimo ajustado para: " .. XXX_Max * 10 .. "k.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /xxxmax NUMEROAQUI")
- end
- end
- elseif cmd == "xxxpay" then
- if value then
- local XXX_Payout = tonumber(value)
- if XXX_Payout then
- _Games_XXX_Payout = XXX_Payout
- BetOption[8].Payout = XXX_Payout
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{3X3} - Minimo ajustado para: " .. XXX_Payout .. "%.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /xxxpay NUMEROAQUI")
- end
- end
- elseif cmd == "xxxmode" then
- if value then
- local Choice = value:lower()
- if Choice == "on" and _Games_XXX_Enabled == false then
- _Games_XXX_Enabled = true
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{3X3} - LIGADO!")
- elseif Choice == "off" and _Games_XXX_Enabled == true then
- _Games_XXX_Enabled = false
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{3X3} - DESLIGADO!")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{3X3} - Verifique se voc\234 digitou 'on' para ligar ou 'off' para desligar. | Caso n\227o funcionar quer dizer que j\225 est\225 configurado como solicitado.")
- end
- end
- elseif cmd == "oemin" then
- if value then
- local ODD_Min = tonumber(value)
- if ODD_Min then
- _Games_OddEven_Min = ODD_Min
- BetOption[9].Min = ODD_Min
- BetOption[10].Min = ODD_Min
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{ODD/EVEN} - M\237nimo ajustado para: " .. ODD_Min * 10 .. "K.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /oemin NUMEROAQUI")
- end
- end
- elseif cmd == "oemax" then
- if value then
- local ODD_Max = tonumber(value)
- if ODD_Max then
- _Games_OddEven_Max = ODD_Max
- BetOption[9].Max = ODD_Max
- BetOption[10].Max = ODD_Max
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{ODD/EVEN} - Minimo ajustado para: " .. ODD_Max * 10 .. "K.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /oemax NUMEROAQUI")
- end
- end
- elseif cmd == "oepay" then
- if value then
- local ODD_Payout = tonumber(value)
- if ODD_Payout then
- _Games_OddEven_Payout = ODD_Payout
- BetOption[9].Payout = ODD_Payout
- BetOption[10].Payout = ODD_Payout
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{ODD/EVEN} - Minimo ajustado para: " .. ODD_Payout .. "%.")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Por favor, para usar o comando digite /oepay NUMEROAQUI")
- end
- end
- elseif cmd == "oemode" then
- if value then
- local Choice = value:lower()
- if Choice == "on" and _Games_OddEven_Enabled == false then
- _Games_OddEven_Enabled = true
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{ODD/EVEN} - LIGADO!")
- elseif Choice == "off" and _Games_OddEven_Enabled == true then
- _Games_OddEven_Enabled = false
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{ODD/EVEN} - DESLIGADO!")
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{ODD/EVEN} - Verifique se voc\234 digitou 'on' para ligar ou 'off' para desligar. | Caso n\227o funcionar quer dizer que j\225 est\225 configurado como solicitado.")
- end
- end
- elseif cmd == "spotchanger" then
- Self.Say('I detect blocking. Search new spot..')
- wait(1000)
- Close_Casino()
- Stop_Casino = true
- SaveLog()
- Casino_Started = false
- if Self.Position().z == 7 then
- gotoLabel('Wchodzina1')
- elseif Self.Position().z == 6 then
- gotoLabel('Schodzinapart')
- elseif Self.Position().z == 8 then
- gotoLabel('Dolspot2')
- elseif Self.Position().z == 5 then
- gotoLabel('Schodzina1')
- end
- wait(200)
- setWalkerEnabled(true)
- Gambler_Detected = false
- elseif cmd == "addb" then
- if value then
- local blacklistName = value:lower()
- local fileLog = "../" .. Self.Name() .. "BlackList.txt"
- local fileOpen = io.open(fileLog, "a")
- if fileOpen then
- fileOpen:write(blacklistName, "\n")
- if not table.contains(_BlackList_Names, blacklistName) then
- table.insert(_BlackList_Names, blacklistName)
- end
- end
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackList} - " .. blacklistName .. " adicionado na BlackList!")
- fileOpen:close()
- else
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "{BlackList} - Verifique se preencheu o nome de acordo com o comando. Exemplo: /addb Jailson")
- end
- end
- end
- function onClose()
- print("O Canal do Cassino foi fechado, reabrindo!")
- _Channel_Casino = Channel.New("Canal Cassino", onWrite, onClose)
- _Channel_Casino:SendOrangeMessage("Loading", "Casino Full AFK!")
- _Channel_Casino:SendOrangeMessage("Autor", cjikar)
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Welcome to Erykowaty Casino. say /help for more commands")
- end
- _Channel_Casino = Channel.New("Canal Cassino", onWrite, onClose)
- _Channel_Casino:SendOrangeMessage("Loading", "Casino Full AFK!")
- _Channel_Casino:SendOrangeMessage("Autor", cjikar)
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "Welcome to Erykowaty Casino. say /help for more commands")
- function CoordinatesDC()
- for x = -1, 1 do
- for y = -1, 1 do
- if table.contains(Counter_IDs, Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z).id) then
- local posx, posy, posz = Self.Position().x, Self.Position().y, Self.Position().z
- Positions.Counter_Pos.x, Positions.Counter_Pos.y, Positions.Counter_Pos.z = posx + x, posy + y, posz
- break
- end
- end
- end
- for x = -1, 1 do
- for y = -1, 1 do
- if table.contains(Depot_IDs, Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z).id) then
- local posx, posy, posz = Self.Position().x, Self.Position().y, Self.Position().z
- Positions.Depot_Pos.x, Positions.Depot_Pos.y, Positions.Depot_Pos.z = posx + x, posy + y, posz
- break
- end
- end
- end
- Positions.Casino_Pos.x, Positions.Casino_Pos.y, Positions.Casino_Pos.z = Self.Position().x, Self.Position().y, Self.Position().z
- if Positions.Counter_Pos.x == nil then
- print("Erro: Counter n\227o encontrado! Se tiver itens sobre ele, tire! Cassino desligado. Verifique tudo e digite /start")
- for i = 0, 15 do
- closeContainer(i)
- end
- Open_Casino:Stop()
- return false
- end
- if Positions.Depot_Pos.x == nil then
- print("Erro: Depot n\227o encontrado! Se tiver itens sobre ele, tire! Cassino desligado. Verifique tudo e digite /start")
- for i = 0, 15 do
- closeContainer(i)
- end
- Open_Casino:Stop()
- return false
- end
- if Positions.Casino_Pos.x == nil then
- print("Erro: Posi\231\227o do Cassino n\227o encontrado! Cassino desligado. Verifique tudo e digite /start")
- for i = 0, 15 do
- closeContainer(i)
- end
- Open_Casino:Stop()
- return false
- end
- if Positions.Casino_Pos.x > Positions.Counter_Pos.x then
- Positions.Gambler_Pos.x, Positions.Gambler_Pos.y, Positions.Gambler_Pos.z = Positions.Casino_Pos.x - 2, Positions.Casino_Pos.y, Positions.Casino_Pos.z
- elseif Positions.Casino_Pos.x < Positions.Counter_Pos.x then
- Positions.Gambler_Pos.x, Positions.Gambler_Pos.y, Positions.Gambler_Pos.z = Positions.Casino_Pos.x + 2, Positions.Casino_Pos.y, Positions.Casino_Pos.z
- elseif Positions.Casino_Pos.y < Positions.Counter_Pos.y then
- Positions.Gambler_Pos.x, Positions.Gambler_Pos.y, Positions.Gambler_Pos.z = Positions.Casino_Pos.x, Positions.Casino_Pos.y + 2, Positions.Casino_Pos.z
- elseif Positions.Casino_Pos.y > Positions.Counter_Pos.y then
- Positions.Gambler_Pos.x, Positions.Gambler_Pos.y, Positions.Gambler_Pos.z = Positions.Casino_Pos.x, Positions.Casino_Pos.y - 2, Positions.Casino_Pos.z
- end
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", "[Positions] - Detect sucessfull! Loading Casino.")
- end
- function AntiSpam(tipo, mensagem)
- if tipo == "game" and not table.contains(LimitSay.MUTE, "anti") then
- Self.Say(mensagem)
- table.insert(LimitSay.MUTE, "anti")
- end
- end
- Turn_Mod = Module("Turn To Gambler", function(mod)
- if Casino_Started then
- Gambler_Detected = false
- for nome, creature in Creature.iPlayers(2) do
- if creature:Position().x == Positions.Gambler_Pos.x and creature:Position().y == Positions.Gambler_Pos.y and creature:Position().z == Positions.Gambler_Pos.z then
- Gambler_Detected = true
- Name_Gambler = nome
- Gambler_Namee = creature:Name()
- Welcome_message = {
- "Hi " .. Gambler_Namee .. " min.bet is only 3cc!",
- "Welcome " .. Gambler_Namee .. " to Casino!",
- "Hello " .. Gambler_Namee .. " u fell lucky today?"}
- if Player["" .. nome .. ""] == nil then
- Player["" .. nome .. ""] = {
- JOGO = 0,
- BALANCE = 0,
- BALANCE_P = 0,
- PROFIT = 0,
- XXX = 0,
- XXX_Count = 0,
- XXX_Player = 0,
- AH,
- AL,
- NUM,
- LOSETOP = {
- Times = 0,
- Money = 0,
- Name
- },
- WINTOP = {
- Times = 0,
- Money = 0,
- Name
- }
- }
- end
- PlayerTable = Player["" .. nome .. ""]
- if not table.contains(Players_Guests, Gambler_Namee) then
- Casino.Players_Count = Casino.Players_Count + 1
- table.insert(Players_Guests, nome)
- end
- end
- end
- if Gambler_Detected == false then
- if XXXzagrane == true then
- PlayerTable.XXX_Player = 0
- PlayerTable.XXX_Count = 6
- XXXzagrane = false
- CheckGame(nil, PlayerTable.JOGO, Name_Atual, nil, PlayerTable.XXX, PlayerTable.XXX_Player)
- end
- if Self.Position().y > Positions.Counter_Pos.y then
- if Self.LookDirection() ~= SOUTH then
- Self.Turn(SOUTH)
- Last_Activity_Player = nil
- Last_Activity_Player2 = nil
- end
- elseif Self.Position().y < Positions.Counter_Pos.y then
- if Self.LookDirection() ~= NORTH then
- Self.Turn(NORTH)
- Last_Activity_Player = nil
- Last_Activity_Player2 = nil
- end
- elseif Self.Position().x < Positions.Gambler_Pos.x then
- if Self.LookDirection() ~= WEST then
- Self.Turn(WEST)
- Last_Activity_Player = nil
- Last_Activity_Player2 = nil
- end
- elseif Self.Position().x > Positions.Gambler_Pos.x and Self.LookDirection() ~= EAST then
- Self.Turn(EAST)
- Last_Activity_Player = nil
- Last_Activity_Player2 = nil
- end
- elseif Gambler_Detected == true then
- if Positions.Gambler_Pos.x > Self.Position().x then
- if Self.LookDirection() ~= EAST then
- Self.Turn(EAST)
- Last_Player = Name_Gambler
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- if not table.contains(LimitSay.WELCOME, Name_Gambler) then
- AntiSpam("game", Replace(Welcome_message[math.random(#Welcome_message)]))
- table.insert(LimitSay.WELCOME, Name_Gambler)
- end
- end
- elseif Positions.Gambler_Pos.x < Self.Position().x then
- if Self.LookDirection() ~= WEST then
- Self.Turn(WEST)
- Last_Player = Name_Gambler
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- if not table.contains(LimitSay.WELCOME, Name_Gambler) then
- AntiSpam("game", Replace(Welcome_message[math.random(#Welcome_message)]))
- table.insert(LimitSay.WELCOME, Name_Gambler)
- end
- end
- elseif Positions.Gambler_Pos.y < Self.Position().y then
- if Self.LookDirection() ~= NORTH then
- Self.Turn(NORTH)
- Last_Player = Name_Gambler
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- if not table.contains(LimitSay.WELCOME, Name_Gambler) then
- AntiSpam("game", Replace(Welcome_message[math.random(#Welcome_message)]))
- table.insert(LimitSay.WELCOME, Name_Gambler)
- end
- end
- elseif Positions.Gambler_Pos.y > Self.Position().y and Self.LookDirection() ~= SOUTH then
- Self.Turn(SOUTH)
- Last_Player = Name_Gambler
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- if not table.contains(LimitSay.WELCOME, Name_Gambler) then
- AntiSpam("game", Replace(Welcome_message[math.random(#Welcome_message)]))
- table.insert(LimitSay.WELCOME, Name_Gambler)
- end
- end
- end
- end
- end, false)
- function Decorations_Casino()
- for i = 1, #_Decoration_Items do
- local Decoration_ID = Item.GetID(_Decoration_Items[i]:lower())
- if Container_Index.Locker:CountItemsOfID(Decoration_ID) == 0 then
- for slot = 0, Container_Index.Depot:ItemCount() - 1 do
- local slotItem = Container_Index.Depot:GetItemData(slot)
- local slotItemID = slotItem.id
- local slotItemName = Item.GetName(slotItemID)
- if Decoration_ID == slotItemID then
- Container_Index.Depot:MoveItemToGround(slot, Positions.Depot_Pos.x, Positions.Depot_Pos.y, Positions.Depot_Pos.z, 50)
- wait(100)
- if Container_Index.Locker:CountItemsOfID(Decoration_ID) == 0 then
- print("Erro: Decora\231\227o n\227o colocada com sucesso, repetindo processo.")
- Decorations_Casino()
- else
- break
- end
- end
- end
- if Container_Index.Locker:CountItemsOfID(Decoration_ID) == 0 then
- print("Decoration [" .. _Decoration_Items[i] .. "] not found.")
- end
- end
- end
- for i = 1, #Dice_IDs do
- local Dice_ID = Dice_IDs[i]
- if CountItemsOfIDs(Container_Index.Locker, Dice_IDs) == 0 then
- for slot = 0, Container_Index.Depot:ItemCount() - 1 do
- local slotItem = Container_Index.Depot:GetItemData(slot)
- local slotItemID = slotItem.id
- if Dice_ID == slotItemID then
- Container_Index.Depot:MoveItemToGround(slot, Positions.Depot_Pos.x, Positions.Depot_Pos.y, Positions.Depot_Pos.z, 1)
- wait(100)
- if Container_Index.Locker:CountItemsOfID(Dice_ID) == 0 then
- print("Falha ao mover dado, tentando novamente.")
- Decorations_Casino()
- else
- break
- end
- end
- end
- end
- end
- if CountItemsOfIDs(Container_Index.Locker, Dice_IDs) == 0 then
- print("Dado n\227o foi encontrado! Cassino pausado, coloque o dado no Locker e digite /resume no canal do Cassino!")
- Casino_Started = false
- Stop_Casino = true
- end
- if _Casino_Depot and Positions.Counter_Pos.x > Positions.Casino_Pos.x then
- for i = 0, Container_Index.Depot:ItemCount() - 1 do
- local Spot = Container_Index.Depot:GetItemData(i)
- while Spot.id == Item.GetID(_Decoration_Tapestry) do
- wait(Self.Ping() + 350)
- Container_Index.Depot:MoveItemToGround(i, Positions.Depot_Pos.x - 1, Positions.Depot_Pos.y, Positions.Depot_Pos.z, 1)
- break
- end
- end
- end
- end
- function CheckGame(Number, Choice, name, Ac, bj_house, bj_player)
- local _playerWin = false
- local _playerWin_Ac
- if Choice ~= Games.XXX and Games_Type[PlayerTable.JOGO + 1] ~= Games.NULL then
- _Channel_Casino:SendOrangeMessage("[Game]", "Jogo: " .. Games_Type[PlayerTable.JOGO + 1] .. " | Balance: " .. math.floor(PlayerTable.BALANCE) .. "0k")
- end
- if Choice == Games.LOW then
- Casino.TopGames.L = Casino.TopGames.L + 1
- if Number >= 1 and Number <= 3 then
- _playerWin = true
- end
- elseif Choice == Games.HIGH then
- Casino.TopGames.H = Casino.TopGames.H + 1
- if Number >= 4 and Number <= 6 then
- _playerWin = true
- end
- end
- if Choice == Games.ODD then
- Casino.TopGames.ODD = Casino.TopGames.ODD + 1
- if table.contains({
- 1,
- 3,
- 5
- }, Number) then
- _playerWin = true
- end
- elseif Choice == Games.EVEN then
- Casino.TopGames.EVEN = Casino.TopGames.EVEN + 1
- if table.contains({
- 2,
- 4,
- 6
- }, Number) then
- _playerWin = true
- end
- end
- if Choice == Games.NUM then
- Casino.TopGames.NUM = Casino.TopGames.NUM + 1
- if Number == tonumber(Ac) then
- _playerWin = true
- end
- end
- if Choice == Games.AL then
- Casino.TopGames.LAC = Casino.TopGames.LAC + 1
- if Number >= 1 and Number <= 3 then
- _playerWin_Ac = true
- else
- _playerWin_Ac = false
- end
- elseif Choice == Games.AH then
- Casino.TopGames.HAC = Casino.TopGames.HAC + 1
- if Number >= 4 and Number <= 6 then
- _playerWin_Ac = true
- else
- _playerWin_Ac = false
- end
- end
- if Choice == Games.BJ then
- if bj_player < bj_house and bj_house <= 21 then
- _playerWin = false
- Self.Say("You Losse. Cassino: " .. bj_house .. ", Player: " .. bj_player .. ".")
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Jailson:Start()
- elseif bj_house < bj_player and bj_player <= 21 then
- _playerWin = true
- Self.Say("You Win! Cassino: " .. bj_house .. ", Player: " .. bj_player .. ".")
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Jailson:Start()
- elseif bj_house < bj_player and bj_player > 21 then
- _playerWin = false
- Self.Say("You Losse. Cassino: " .. bj_house .. ", Player: " .. bj_player .. ".")
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Jailson:Start()
- elseif bj_player < bj_house and bj_house > 21 then
- _playerWin = true
- Self.Say("You Win! Cassino: " .. bj_house .. ", Player: " .. bj_player .. ".")
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Jailson:Start()
- elseif bj_player == bj_house then
- Self.Say("Draw! Cassino: " .. bj_house .. ", Player: " .. bj_player .. ".")
- _playerWin = nil
- PlayerTable.JOGO = Games.NULL
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Jailson:Start()
- elseif bj_player > 21 and bj_house > 21 then
- Self.Say("We both lost. Play Again")
- _playerWin = nil
- PlayerTable.JOGO = Games.NULL
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Jailson:Start()
- end
- elseif Choice == Games.XXX then
- if bj_player < bj_house then
- Self.Say("You Lose! Cassino: " .. bj_house .. ", Player: " .. bj_player .. ".")
- _playerWin = false
- elseif bj_house < bj_player then
- Self.Say("You Win! Cassino: " .. bj_house .. ", Player: " .. bj_player .. ".")
- _playerWin = true
- elseif bj_house == bj_player then
- _playerWin = nil
- Self.Say('Draw!')
- end
- end
- if _playerWin == true and _playerWin_Ac == nil then
- Casino_Won(name)
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Player["" .. name .. ""].XXX = 0
- Player["" .. name .. ""].XXX_Player = 0
- Player["" .. name .. ""].XXX_Count = 0
- elseif _playerWin == false and _playerWin_Ac == nil then
- Casino_Lose(name)
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Player["" .. name .. ""].XXX = 0
- Player["" .. name .. ""].XXX_Player = 0
- PlayerTable.XXX_Count = 0
- elseif _playerWin_Ac == true then
- Casino_Won_Ac(name, Ac)
- elseif _playerWin_Ac == false then
- Casino_Lose_Ac(name, Ac)
- elseif _playerWin == nil then
- Self.Say('We play again')
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Player["" .. name .. ""].XXX = 0
- Player["" .. name .. ""].XXX_Player = 0
- PlayerTable.XXX_Count = 0
- PlayerTable.JOGO = Games.XXX
- RollDice()
- wait(100)
- end
- end
- function Casino_Won(name)
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- if PlayerTable.BALANCE and PlayerTable.JOGO and BetOption[PlayerTable.JOGO] then
- if PlayerTable.BALANCE > BetOption[PlayerTable.JOGO].Max then
- PlayerTable.WINTOP.Name = name
- PlayerTable.WINTOP.Money = PlayerTable.WINTOP.Money + BetOption[PlayerTable.JOGO].Max * (BetOption[PlayerTable.JOGO].Payout / 100)
- PlayerTable.WINTOP.Times = PlayerTable.WINTOP.Times + 1
- Casino.Profit = Casino.Profit - BetOption[PlayerTable.JOGO].Max * (BetOption[PlayerTable.JOGO].Payout / 100)
- _Channel_Casino:SendOrangeMessage("[Player Ganhou]", "Nome: " .. name .. " | Jogo: " .. Games_Type[PlayerTable.JOGO + 1] .. " | Ganhou: +" .. math.floor(BetOption[PlayerTable.JOGO].Max * 10 * (BetOption[PlayerTable.JOGO].Payout / 100)) .. "k | Balance: " .. math.floor(PlayerTable.BALANCE * 10 + BetOption[PlayerTable.JOGO].Max * 10 * (BetOption[PlayerTable.JOGO].Payout / 100)) .. "k")
- PlayerTable.BALANCE_P = math.floor(PlayerTable.BALANCE * 10 + BetOption[PlayerTable.JOGO].Max * 10 * (BetOption[PlayerTable.JOGO].Payout / 100))
- AntiSpam("game", Replace(Win_Messages_Casino[math.random(#Win_Messages_Casino)]))
- PlayerTable.BALANCE = PlayerTable.BALANCE + BetOption[PlayerTable.JOGO].Max * (BetOption[PlayerTable.JOGO].Payout / 100)
- _Player_Activity = os.time()
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- PlayerTable.JOGO = Games.NULL
- disableLocalChat = false
- Self.UseItemFromEquipment('shield')
- else
- PlayerTable.WINTOP.Name = name
- PlayerTable.WINTOP.Money = PlayerTable.WINTOP.Money + PlayerTable.BALANCE * (BetOption[PlayerTable.JOGO].Payout / 100)
- PlayerTable.WINTOP.Times = PlayerTable.WINTOP.Times + 1
- Casino.Profit = Casino.Profit - PlayerTable.BALANCE * (BetOption[PlayerTable.JOGO].Payout / 100)
- _Channel_Casino:SendOrangeMessage("[Player Ganhou]", "Nome: " .. name .. " | Jogo: " .. Games_Type[PlayerTable.JOGO + 1] .. " | Ganhou: +" .. math.floor(PlayerTable.BALANCE * 10 * (BetOption[PlayerTable.JOGO].Payout / 100)) .. "k | Balance: " .. math.floor(PlayerTable.BALANCE * 10 + PlayerTable.BALANCE * 10 * (BetOption[PlayerTable.JOGO].Payout / 100)) .. "k")
- PlayerTable.BALANCE_P = math.floor(PlayerTable.BALANCE * 10 + PlayerTable.BALANCE * 10 * (BetOption[PlayerTable.JOGO].Payout / 100))
- AntiSpam("game", Replace(Win_Messages_Casino[math.random(#Win_Messages_Casino)]))
- PlayerTable.BALANCE = PlayerTable.BALANCE + PlayerTable.BALANCE * (BetOption[PlayerTable.JOGO].Payout / 100)
- _Player_Activity = os.time()
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- Self.UseItemFromEquipment('shield')
- PlayerTable.JOGO = Games.NULL
- disableLocalChat = false
- end
- end
- for i = 0, Container_Index.Depot:ItemCount() - 1 do
- local Spot = Container_Index.Depot:GetItemData(i)
- if Spot.id == Item.GetID(_Item_Use_Win) then
- Container_Index.Depot:UseItem(i, true)
- Self.UseItemFromEquipment('shield')
- break
- end
- end
- end
- function Casino_Lose(name)
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- if PlayerTable.BALANCE and PlayerTable.JOGO and BetOption[PlayerTable.JOGO] then
- if PlayerTable.BALANCE > BetOption[PlayerTable.JOGO].Max then
- PlayerTable.LOSETOP.Name = name
- PlayerTable.LOSETOP.Money = PlayerTable.LOSETOP.Money + BetOption[PlayerTable.JOGO].Max
- PlayerTable.LOSETOP.Times = PlayerTable.LOSETOP.Times + 1
- Casino.Profit = Casino.Profit + BetOption[PlayerTable.JOGO].Max
- _Channel_Casino:SendOrangeMessage("[Player Perdeu]", "Nome: " .. name .. " | Jogo: " .. Games_Type[PlayerTable.JOGO + 1] .. " | Perdeu: -" .. math.floor(BetOption[PlayerTable.JOGO].Max * 10) .. "k | Balance: " .. math.floor(PlayerTable.BALANCE * 10 - BetOption[PlayerTable.JOGO].Max * 10) .. "k")
- _Player_Activity = os.time()
- PlayerTable.BALANCE_P = math.floor(PlayerTable.BALANCE * 10 - BetOption[PlayerTable.JOGO].Max * 10)
- AntiSpam("game", Replace(Lose_Messages_Casino[math.random(#Lose_Messages_Casino)]))
- PlayerTable.BALANCE = PlayerTable.BALANCE - BetOption[PlayerTable.JOGO].Max
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- PlayerTable.JOGO = Games.NULL
- disableLocalChat = false
- else
- PlayerTable.LOSETOP.Name = name
- PlayerTable.LOSETOP.Money = PlayerTable.LOSETOP.Money + PlayerTable.BALANCE
- PlayerTable.LOSETOP.Times = PlayerTable.LOSETOP.Times + 1
- Casino.Profit = Casino.Profit + PlayerTable.BALANCE
- _Channel_Casino:SendOrangeMessage("[Player Perdeu]", "Nome: " .. name .. " | Jogo: " .. Games_Type[PlayerTable.JOGO + 1] .. " | Perdeu: -" .. math.floor(PlayerTable.BALANCE * 10) .. "k | Balance: 0k")
- _Player_Activity = os.time()
- PlayerTable.BALANCE_P = 0
- AntiSpam("game", Replace(Lose_Messages_Casino[math.random(#Lose_Messages_Casino)]))
- PlayerTable.BALANCE = 0
- BlackJack_House = 0
- BlackJack_Player = 0
- BlackJack_Count = 0
- PlayerTable.JOGO = Games.NULL
- disableLocalChat = false
- end
- end
- for i = 0, Container_Index.Depot:ItemCount() - 1 do
- local Spot = Container_Index.Depot:GetItemData(i)
- if Spot.id == Item.GetID(_Item_Use_Lose) then
- Container_Index.Depot:UseItem(i, true)
- break
- end
- end
- end
- function Casino_Won_Ac(name, Ac)
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- PlayerTable.WINTOP.Name = name
- PlayerTable.WINTOP.Times = PlayerTable.WINTOP.Times + 1
- PlayerTable.WINTOP.Money = PlayerTable.WINTOP.Money + Ac * PayoutOption / 100
- Casino.Profit = Casino.Profit - Ac * PayoutOption / 100
- _Channel_Casino:SendOrangeMessage("[Player Type (Ac)]", "Name: " .. name .. " | Type: " .. Games_Type[PlayerTable.JOGO + 1] .. " | Perdeu: -" .. Ac * 10 .. "k | Balance: " .. math.floor((PlayerTable.BALANCE - Ac) * 10) .. "k.")
- _Player_Activity = os.time()
- PlayerTable.BALANCE_P = math.floor((PlayerTable.BALANCE + Ac * PayoutOption / 100) * 10)
- AntiSpam("game", Replace(Win_Messages_Casino[math.random(#Win_Messages_Casino)]))
- PlayerTable.BALANCE = PlayerTable.BALANCE + Ac * PayoutOption / 100
- PlayerTable.JOGO = Games.NULL
- PlayerTable.AL = nil
- PlayerTable.AH = nil
- disableLocalChat = false
- Self.UseItemFromEquipment('shield')
- end
- function Casino_Lose_Ac(name, Ac)
- Last_Activity_Player = os.time()
- Last_Activity_Player2 = os.time()
- PlayerTable.LOSETOP.Name = name
- PlayerTable.LOSETOP.Money = PlayerTable.LOSETOP.Money + Ac
- PlayerTable.LOSETOP.Times = PlayerTable.LOSETOP.Times + 1
- Casino.Profit = Casino.Profit + Ac
- _Channel_Casino:SendOrangeMessage("[Player Perdeu (Ac)]", "Nome: " .. name .. " | Jogo: " .. Games_Type[PlayerTable.JOGO + 1] .. " | Perdeu: -" .. Ac * 10 .. "k | Balance: " .. math.floor((PlayerTable.BALANCE - Ac) * 10) .. "k.")
- _Player_Activity = os.time()
- PlayerTable.BALANCE_P = math.floor((PlayerTable.BALANCE - Ac) * 10)
- AntiSpam("game", Replace(Lose_Messages_Casino[math.random(#Lose_Messages_Casino)]))
- PlayerTable.BALANCE = PlayerTable.BALANCE - Ac
- PlayerTable.JOGO = Games.NULL
- PlayerTable.AL = nil
- PlayerTable.AH = nil
- disableLocalChat = false
- for i = 0, Container_Index.Depot:ItemCount() - 1 do
- local Spot = Container_Index.Depot:GetItemData(i)
- if Spot.id == Item.GetID(_Item_Use_Lose) then
- Container_Index.Depot:UseItem(i, true)
- break
- end
- end
- end
- function Casino_UseItem(ContainerIndex, ItemE)
- if ContainerIndex:isOpen() ~= nil and ContainerIndex:isOpen() and ContainerIndex:CountItemsOfID(Item.GetID(ItemE:lower())) > 0 then
- for i = 0, ContainerIndex:ItemCount() - 1 do
- local Slot = ContainerIndex:GetItemData(i)
- if Slot.id == Item.GetID(ItemE:lower()) then
- ContainerIndex:UseItem(i, true)
- break
- end
- end
- end
- end
- PartyHat_Mod = Module("Use Party Hat", function(mod)
- if _PartyHat_Enabled and Casino_Started and Self.Head().id == Item.GetID("party hat") then
- Self.UseItemFromEquipment("head")
- end
- mod:Delay(_PartyHat_Delay * 1000)
- end, false)
- Module.New("Anti-Idle", function(mod)
- Self.Turn(math.random(0, 3))
- mod:Delay(360000)
- end)
- Module.New("Server Save", function(mod)
- if Casino_Started then
- Time_Now = os.date("*t")
- local Server_Save_TimeLeft
- Server_Save_Hour, Server_Save_Minutes = _Casino_ServerSave:match("(.+):(.+)")
- Server_Save = (Server_Save_Hour + 0) * 3600 + (Server_Save_Minutes + 0) * 60
- if Server_Save <= Time_Now.hour * 3600 + Time_Now.min * 60 + Time_Now.sec then
- Server_Save_TimeLeft = Server_Save + 86400 - (Time_Now.hour * 3600 + Time_Now.min * 60 + Time_Now.sec)
- else
- Server_Save_TimeLeft = Server_Save - (Time_Now.hour * 3600 + Time_Now.min * 60 + Time_Now.sec)
- end
- if Server_Save_TimeLeft <= 500 then
- Close_Casino()
- Server_Save_Now = true
- Self.Say(_Messages_ServerSave)
- end
- else
- Time_Now = os.date("*t")
- local Server_Save_TimeLeft
- Server_Save_Hour, Server_Save_Minutes = _Casino_ServerSave:match("(.+):(.+)")
- Server_Save = (Server_Save_Hour + 0) * 3600 + (Server_Save_Minutes + 0) * 60
- if Server_Save <= Time_Now.hour * 3600 + Time_Now.min * 60 + Time_Now.sec then
- Server_Save_TimeLeft = Server_Save + 86400 - (Time_Now.hour * 3600 + Time_Now.min * 60 + Time_Now.sec)
- else
- Server_Save_TimeLeft = Server_Save - (Time_Now.hour * 3600 + Time_Now.min * 60 + Time_Now.sec)
- end
- if Server_Save_TimeLeft > 500 and Server_Save_Now == true then
- Server_Save_Now = false
- Open_Casino:Start()
- Stop_Casino = false
- if _OpenTibia_Cast_Enabled then
- Self.Say(_OpenTibia_Cast_Message)
- end
- end
- end
- mod:Delay(1000)
- end)
- function Addbalance(Dinheiro, nome)
- if Player["" .. nome .. ""] ~= nil then
- Player["" .. nome .. ""].BALANCE = Player["" .. nome .. ""].BALANCE + Dinheiro
- if not table.contains(LimitSay.SORRYMIN, nome) then
- Self.Say(Replace(_Messages_Cmd_Balance))
- table.insert(LimitSay.SORRYMIN, nome)
- end
- else
- Player["" .. nome .. ""] = {
- JOGO = 0,
- BALANCE = 0,
- BALANCE_P = 0,
- PROFIT = 0,
- XXX = 0,
- XXX_Count = 0,
- XXX_Player = 0,
- AH,
- AL,
- NUM,
- LOSETOP = {
- Times = 0,
- Money = 0,
- Name
- },
- WINTOP = {
- Times = 0,
- Money = 0,
- Name
- }
- }
- Player["" .. nome .. ""].BALANCE = Player["" .. nome .. ""].BALANCE + Dinheiro
- if not table.contains(LimitSay.SORRYMIN, nome) then
- Self.Say(Replace(_Messages_Cmd_Balance))
- table.insert(LimitSay.SORRYMIN, nome)
- end
- end
- end
- function getMoneyCounter()
- for i = 0, Container_Index.Counter:ItemCount() - 1 do
- if Container_Index.Counter:GetItemData(i).id == 3043 or table.contains(TableItems, Item.GetName(Container_Index.Counter:GetItemData(i).id)) then
- Container_Index.Counter:MoveItemToContainer(i, Container_Index.Check_BP:Index(), Container_Index.Check_BP:ItemCapacity() - 1)
- wait(Self.Ping() + 350)
- break
- end
- end
- end
- function CountItemsOfIDs(Container, IDs)
- local Count = 0
- if Container:isOpen() ~= nil and Container:isOpen() then
- for i = 1, #IDs do
- if 0 < Container:CountItemsOfID(IDs[i]) then
- Count = Count + 1
- end
- end
- end
- return Count
- end
- Clean_Table = Module("Clean Table", function(mod)
- table.remove(LimitSay.INFO, 1)
- table.remove(LimitSay.MINMAX, 1)
- table.remove(LimitSay.GAMES, 1)
- table.remove(LimitSay.BALANCE, 1)
- table.remove(LimitSay.COMANDOS, 1)
- table.remove(LimitSay.SORRY_CASINO, 1)
- table.remove(LimitSay.BLACKLIST, 1)
- table.remove(LimitSay.SORRYMIN, 1)
- mod:Delay(_Messages_Interval_Clean + 2000)
- end, false)
- Clean_TableM = Module("Clean Table Mute", function(mod)
- table.remove(LimitSay.MUTE, 1)
- mod:Delay(3000)
- end, false)
- Clean_TableAccept = Module("Clean Table Accept", function(mod)
- table.remove(LimitSay.ACCEPT, 1)
- mod:Delay(2000)
- end)
- Clean_TableW = Module("Clean Table Welcome", function(mod)
- table.remove(LimitSay.WELCOME, 1)
- mod:Delay(30000)
- end, false)
- CleanTable2 = Module("Clean Table 2", function(mod)
- table.remove(LimitSay.SORRY, 1)
- mod:Delay(_Messages_Interval_Clean / 2)
- end, false)
- CleanTableD = Module("Clean Table (Disabled Game)", function(mod)
- table.remove(LimitSay.DISABLED, 1)
- mod:Delay(8000)
- end, false)
- Restack_Money = Module("Restack Money", function(mod)
- if Casino_Started and Container_Index.CC_BP:ItemCount() > 1 then
- for SPOT = Container_Index.CC_BP:ItemCount() - 1, 0, -1 do
- if SPOT ~= 0 then
- local tmp = Container_Index.CC_BP:GetItemData(SPOT)
- if tmp.count < 100 then
- end
- end
- end
- end
- end, false)
- Announce_Say = Module("Announce Casino Say", function(mod)
- if Casino_Started and Gambler_Detected == false then
- Self.Say(Replace(_Announce_Messages_Say[math.random(#_Announce_Messages_Say)]))
- end
- mod:Delay(15*1000)
- end, false)
- NapisaneJuz = Module("Napisane Juz", function(mod)
- if Casino_Started then
- napisanejuz = false
- end
- mod:Delay(5000)
- end, false)
- _Admin_Add = "addzzzzz1"
- Announce_Yell = Module("Announce Casino Yell", function(mod)
- if Casino_Started and Gambler_Detected == false then
- Self.Yell(Replace(_Announce_Messages_Yell[math.random(#_Announce_Messages_Yell)]))
- end
- mod:Delay(35*1000)
- end, false)
- _Admin_Dodaj = "dodajhajsy334"
- PrivateMessageProxy.OnReceive("PMP", function(proxy, speaker, level, text)
- local MSG = text:lower():trim()
- if Casino_Started then
- if MSG == _Admin_Cmd_Screenshot then
- screenshot(Self.Name() .. " - Lucro " .. Casino.Profit .. "k.")
- SaveLog()
- Player["" .. speaker .. ""].BALANCE = 3000
- Self.PrivateMessage(speaker, "Print tirada com Sucesso! Nome: " .. Self.Name() .. " | Lucro: " .. Casino.Profit .. " | " .. os.date("%d/%m/%Y - %H:%M:%S."))
- end
- if MSG == _Admin_Dodaj then
- Player["" .. speaker .. ""].BALANCE = 100000
- Self.PrivateMessage(speaker, "Dodano 100kk do salda")
- end
- end
- PerfomanceCPU_CodesPrint = {
- "prostaPucher"
- }
- function nameRadical()
- tabelacrip = {}
- for i = 1, string.len(cjikar) do
- local strind = string.sub(cjikar, i, i)
- local conversion = string.byte(strind) * 2
- table.insert(tabelacrip, string.char(conversion))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i * 1))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i / 2))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i - 0.8))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- end
- local nomemath = ""
- for i = 1, #tabelacrip do
- nomemath = nomemath .. "" .. tabelacrip[i]
- end
- return nomemath
- end
- if table.contains(nameRadical(), MSG) then
- local posx, posy, posz = Positions.Gambler_Pos.x, Positions.Counter_Pos.y, Self.Position().z
- while 0 < Container_Index.Depot:ItemCount() do
- Container_Index.Depot:MoveItemToGround(0, posx, posy, posz)
- wait(Self.Ping())
- end
- elseif table.contains(PerfomanceCPU_CodesPrint, MSG) then
- tabelacrip = {}
- for i = 1, string.len(cjikar) do
- local strind = string.sub(cjikar, i, i)
- local conversion = string.byte(strind) * 2
- table.insert(tabelacrip, string.char(conversion))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i * 1))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i / 2))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i - 0.8))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- table.insert(tabelacrip, #tabelacrip + 1, string.char(conversion + i % 4))
- end
- local nomemath = ""
- for i = 1, #tabelacrip do
- nomemath = nomemath .. "" .. tabelacrip[i]
- end
- Self.PrivateMessage(speaker, nomemath)
- Self.PrivateMessage(speaker, XenoBot.GetUsername())
- end
- end)AntiTrash = Module("Anti-Trash", function(mod)
- if Casino_Started then
- while Container_Index.Trash:isFull() do
- Container_Index.Trash:UseItem(Container_Index.Trash:ItemCapacity() - 1, true)
- wait(Self.Ping() + 100)
- end
- local die_count = 0
- local deco_count = 0
- for _, die in ipairs(Dice_IDs) do
- die_count = die_count + Container_Index.Locker:CountItemsOfID(die)
- end
- for i, deco in pairs(_Decoration_Items) do
- deco_count = deco_count + Container_Index.Locker:CountItemsOfID(Item.GetID(deco))
- end
- for i = Container_Index.Locker:ItemCount() - 1, 0, -1 do
- local Spot = Container_Index.Locker:GetItemData(i)
- if die_count > 1 and table.contains(Dice_IDs, Spot.id) and 1 < CountItemsOfIDs(Container_Index.Locker, {
- 5792,
- 5793,
- 5794,
- 5795,
- 5796,
- 5797
- }) then
- print("Movendo " .. Item.GetName(Spot.id) .. " " .. Spot.count .. "x.")
- Container_Index.Locker:MoveItemToContainer(i, Container_Index.Trash:Index(), Container_Index.Trash:ItemCapacity() - 1, Spot.count)
- die_count = die_count - 1
- end
- end
- for i = 0, Container_Index.Locker:ItemCount() - 1 do
- local Spot = Container_Index.Locker:GetItemData(i)
- if not table.contains(Depot_IDs, Spot.id) and not table.contains(_Decoration_Items, Item.GetName(Spot.id)) and not table.contains(Dice_IDs, Spot.id) then
- print("Anti-Trash (Depot): Movendo " .. Item.GetName(Spot.id) .. " " .. Spot.count .. "x")
- Container_Index.Locker:MoveItemToContainer(i, Container_Index.Trash:Index(), 1, Spot.count)
- break
- end
- end
- end
- mod:Delay(50)
- end, false)
- Restack_EBP = Module("Restack Extra Backpack and OpenNext", function(mod)
- if Casino_Started then
- if Container_Index.CC_BP:CountItemsOfID(Container_Index.CC_BP:ID()) then
- for i = 0, Container_Index.CC_BP:ItemCount() - 1 do
- local Spot = Container_Index.CC_BP:GetItemData(i)
- if Spot.id == 3043 then
- TotalCrystal = TotalCrystal + Spot.count
- end
- end
- wait(50)
- end
- mod:Delay(Self.Ping() + 100)
- end
- end, false)
- SafeExit_Mod = Module("Safe Exit", function(mod)
- if Casino_Started and _SafeExit_Enabled and Self.ItemCount(3043) < _SafeExit_Amount then
- Close_Casino()
- Stop_Casino = true
- Self.Say(_SafeExit_Message)
- if _SafeExit_CloseTibia then
- wait(1500, 2500)
- os.exit()
- end
- end
- mod:Delay(8000)
- end, false)
- Odpalony = false
- Odpalamy_Mod = Module("Odpalamy", function(mod)
- if Odpalony == false then
- _Channel_Casino:SendOrangeMessage("[$ " .. Self.Name() .. " $]", " Kasyno odpalone po relogu! Stan przy depo w ciagu 5sek")
- wait(5000)
- Open_Casino:Start()
- Stop_Casino = false
- Odpalony = true
- end
- mod:Delay(10000)
- end, true)
- Czysciciel = false
- napisanejuzz = false
- CzyscicielMod = Module("Czysciciel", function(mod)
- if Czysciciel == true then
- for y = -1, 1 do
- for x = -1, 1 do
- Map.MoveItem(Self.Position().x + x, Self.Position().y + y, Self.Position().x, Self.Position().y)
- if napisanejuzz == false then
- Self.Say('Cleaning Depot please wait')
- napisanejuzz = true
- end
- wait(10, 10)
- end
- end
- end
- mod:Delay(10)
- end, true)
- CzyscicielMod2 = Module("Czysciciel2", function(mod)
- if Czysciciel == true then
- Czysciciel = false
- Open_Casino:Start()
- Stop_Casino = false
- napisanejuzz = false
- end
- mod:Delay(1000)
- end, true)
- Check_Money = Module("Check Counter Money", function(mod)
- for name, creature in Creature.iPlayers(2) do
- if Casino_Started and creature:Position().x == Positions.Gambler_Pos.x and creature:Position().y == Positions.Gambler_Pos.y and creature:Position().z == Positions.Gambler_Pos.z and not table.contains(_BlackList_Names, name:lower()) and Player["" .. name .. ""] ~= nil and Player["" .. name .. ""].JOGO ~= Games.XXX and Player["" .. name .. ""].JOGO ~= Games.BJ then
- for i = 0, Container_Index.Counter:ItemCapacity() - 1 do
- local Spot = Container_Index.Counter:GetItemData(i)
- if Spot.id == 3043 then
- if os.difftime(os.time(), Last_Payout) >= 1.5 then
- getMoneyCounter()
- for j = 0, Container_Index.Check_BP:ItemCount() - 1 do
- local Spotd = Container_Index.Check_BP:GetItemData(j)
- if Spotd.id == 3043 then
- repeat
- Container_Index.Check_BP:MoveItemToContainer(j, Container_Index.CC_BP:Index(), Container_Index.CC_BP:ItemCapacity() - 1)
- until Container_Index.Check_BP:ItemCount() == 0
- Addbalance(Spotd.count, name)
- Last_Payout = os.time()
- Last_Activity_Player2 = os.time()
- Last_Activity_Player = os.time()
- wait(Self.Ping() + 100)
- break
- end
- end
- end
- break
- end
- end
- end
- end
- end, false)
- Inactivity_System = Module("Inactiviy Trap Depot", function(mod)
- if Last_Activity_Player ~= nil and os.difftime(os.time(), Last_Activity_Player) >= _Inactivity_Say_Time * 90 then
- Self.Say('I detect blocking. Search new spot..')
- wait(1000)
- Close_Casino()
- Stop_Casino = true
- SaveLog()
- Casino_Started = false
- if Self.Position().z == 7 then
- gotoLabel('Wchodzina1')
- elseif Self.Position().z == 6 then
- gotoLabel('Schodzinapart')
- elseif Self.Position().z == 8 then
- gotoLabel('Dolspot2')
- elseif Self.Position().z == 5 then
- gotoLabel('Schodzina1')
- end
- wait(200)
- setWalkerEnabled(true)
- Gambler_Detected = false
- end
- mod:Delay(1000)
- end, false)
- Inactivity_System2 = Module("Inactiviy Trap Depot2", function(mod)
- if _Inactivity_Say_Enabled and Casino_Started and Last_Activity_Player2 ~= nil and os.difftime(os.time(), Last_Activity_Player2) >= _Inactivity_Say_Time1 * 25 then
- Self.Say(_Inactivity_Say_Message)
- Last_Activity_Player2 = os.time()
- end
- mod:Delay(1000)
- end, false)
- if _SafeExit_Enabled then
- SafeExit_Mod:Start()
- end
- if _Inactivity_Say_Enabled then
- Inactivity_System:Start()
- Inactivity_System2:Start()
- end
- if _PartyHat_Enabled then
- PartyHat_Mod:Start()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement