Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.70 KB | None | 0 0
  1. --[[
  2.  
  3. ]]--
  4. -----------------------------------------------------------------------------------------------------------------------------------------------------
  5. -- B A C K P A C K S
  6. -----------------------------------------------------------------------------------------------------------------------------------------------------
  7.  
  8.  
  9. Lixo = "orange backpack" -- Bp de LIXO recomendado : 100+ 1 dentro da outra!
  10.  
  11. BetCashBP = "shopping bag" -- Checar o Dinheiro
  12.  
  13. MoneyBP = "red backpack" -- Local para guardar o seu dinheiro 10 + 1 dentro da outra!
  14.  
  15. LyreBackpack = "brocade backpack" -- Local ParaColocar o ITEM DE MUSICA
  16.  
  17.  
  18. -----------------------------------------------------------------------------------------------------------------------------------------------------
  19. -- T R U E & F A L S E S E T T I N G S --
  20. -----------------------------------------------------------------------------------------------------------------------------------------------------
  21.  
  22. LyreActive = true -- [[True Ou False]]
  23. LyreCassino = 1.0 -- Tempo que vai Usar LYRE 1.0 = 1 Segundo(s)
  24. Connection_Speed = 'real-time' -- (real-time/sfast/fast/normal/slow or default)
  25. MensagemAntiTRASH = "Nao Jogue Lixo"
  26. DPBox = 1 -- De 1 a 17 [ Local onde as Backpacks estar?o dentro do dp]
  27.  
  28. -----------------------------------------------------------------------------------------------------------------------------------------------------
  29. -- P O S I T I O N C O N F I G --
  30. -----------------------------------------------------------------------------------------------------------------------------------------------------
  31.  
  32. Dicer = "norte" -- norte/sul
  33.  
  34. -----------------------------------------------------------------------------------------------------------------------------------------------------
  35. -- G A M E T Y P E S --
  36. -----------------------------------------------------------------------------------------------------------------------------------------------------
  37.  
  38.  
  39. Bet =
  40. {
  41. Value = 0, -- Deixe assim
  42. min = 5, -- 5 = 5cc 5 = 50k
  43. max = 300, -- 200 = 1kk
  44. }
  45.  
  46. payo = 0.85 -- 1 == 90% , 0.9 == 90%
  47.  
  48. -----------------------------------------------------------------------------------------------------------------------------------------------------
  49. -- T R U E & F A L S E S E T T I N G S --
  50. -----------------------------------------------------------------------------------------------------------------------------------------------------
  51.  
  52. yellActive = true
  53. yellMessage = ("["..Self.Name().."]\n $| 7/24\n| (H/L) |\n| PAYOUT: 90% |\n| MIN: 5 CC ~ MAX: 3 kk |")
  54.  
  55.  
  56.  
  57. info = "Min: 5 cc ~ Max: 3 KK\nGames: {High/Low}\nSay any game to know how to play!"
  58.  
  59.  
  60.  
  61. -----------------------------------------------------------------------------------------------------------------------------------------------------
  62. -- T R U E & F A L S E S E T T I N G S --
  63. -----------------------------------------------------------------------------------------------------------------------------------------------------
  64.  
  65.  
  66. MENSAGEM_BEMVINDO = {
  67. "•[ Ola! ]•\n•[ |Gambler| ]•\n•[ Info ]• ",
  68. "•[ Bem vinda! ]•\n•[ |Gambler| ]•\n•[ Info ]•",
  69. "•[ Bem vinda! ]•\n•[ |Gambler| ]\n5 cc Max: 3 kk \nScript Version 3.5",
  70. "•Opa Tigers\n [Bem-vindo ]\n 5 cc Max: 3 kk\n ao melhor cassino!",
  71. "•Welcome, Tigers\n| Min: 5 cc | Max: 3 kk |\nBem-vindo ao melhor cassino!\n| Nao Accept Itens |",
  72.  
  73. }
  74.  
  75.  
  76. -----------------------------------------------------------------------------------------------------------------------------------------------------
  77. -- F U N C T I O N S & M O D U L E S A R E A --
  78. -----------------------------------------------------------------------------------------------------------------------------------------------------
  79.  
  80. Last_Activity_Player_In_Spot = os.time()
  81. EXHT_BEM_VINDO = os.time()
  82. cashposx = Self.Position().x
  83. cashposy = Self.Position().y
  84. cashposz = Self.Position().z
  85. Players = {}
  86. Rolls = {}
  87. cc = 3043
  88. Balance = 0
  89. Gambler_Name = ""
  90. EXHT_BEM_VINDO = os.time()
  91. money = Self.ItemCount(cc)
  92. cash = Self.ItemCount(cc)
  93. Players = {}
  94. Rolls = {}
  95. AntiSpamTimer = os.clock()
  96. function AntiSpam(message, type)
  97. if os.difftime(os.clock(), AntiSpamTimer) >= 2 then
  98. Self.Speak(message, type)
  99. AntiSpamTimer = os.clock()
  100. end
  101. end
  102. dados = {
  103. 5792,
  104. 5793,
  105. 5794,
  106. 5795,
  107. 5796,
  108. 5797,
  109. 3043,
  110. 3497,
  111. 3499
  112. }
  113. crystal = {3043}
  114. TempoDeBlocker = 1
  115. local PositionDice
  116. if Dicer == "norte" then
  117. PositionDice = Self.Position().y - 1
  118. else
  119. PositionDice = Self.Position().y + 1
  120. end
  121. Module.New("ANTI-TRASH", function(mod)
  122. if not table.contains(dados, Map.GetTopUseItem(Self.Position().x, PositionDice, Self.Position().z).id) then
  123. Map.PickupItem(cashposx - 1, cashposy, cashposz, Container(Lixo), 19)
  124. AntiSpam("")
  125. end
  126. mod:Delay(WaitConfiguration + Self.Ping())
  127. end)
  128. Module.New("ANTI-TRASH1", function(mod)
  129. if table.contains(crystal, Map.GetTopUseItem(Self.Position().x, PositionDice, Self.Position().z).id) then
  130. Map.MoveItem(cashposx - 1, cashposy, cashposx + 1, cashposy, 100)
  131. AntiSpam("By Star Fire-SCRIPTS\n" .. MensagemAntiTRASH .. "")
  132. end
  133. mod:Delay(WaitConfiguration + Self.Ping())
  134. end)
  135. if Connection_Speed == "Star Fire" then
  136. WaitConfiguration = 300
  137. elseif Connection_Speed == "default" then
  138. WaitConfiguration = 200
  139. elseif Connection_Speed == "normal" then
  140. WaitConfiguration = 150
  141. elseif Connection_Speed == "fast" then
  142. WaitConfiguration = 300
  143. elseif Connection_Speed == "sfast" then
  144. WaitConfiguration = 15
  145. elseif Connection_Speed == "real-time" then
  146. WaitConfiguration = 0
  147. end
  148. function onSpeak(channel, msg)
  149. if msg == 'balance' then
  150. channel:SendOrangeMessage('DiceBot', Gambler_Name .. '\'s balance is ' .. Balance)
  151. end
  152. if msg == 'info' then
  153. channel:SendOrangeMessage('DiceBot', "Bet.min = " .. Bet.min)
  154. channel:SendOrangeMessage('DiceBot', "Bet.max = " .. Bet.max)
  155. channel:SendOrangeMessage('DiceBot', "Gambler_Name = " .. Gambler_Name)
  156. channel:SendOrangeMessage('DiceBot', "Balance = " .. Balance)
  157. end
  158. end
  159. function onClose(channel, msg)
  160. print("Leaving channel")
  161. end
  162. channel = Channel.New('DiceBot log', onSpeak, onClose)
  163. Module.New('Casino_Turn', function(Mod)
  164. Casino_Loaded = true
  165. if (Casino_Loaded) then
  166. Player_Detected = false
  167.  
  168. for name, creature in Creature.iPlayers(2) do
  169.  
  170. if (creature:Position().x == Self.Position().x + 2 and creature:Position().y == Self.Position().y and creature:Position().z == Self.Position().z) then
  171. Player_Detected = true
  172. if Gambler_Name ~= creature:Name() and not table.contains(Players, Gambler_Name) then
  173. table.insert(Players, Gambler_Name)
  174. for i = 1, #Players do
  175. print(Players[i])
  176. end
  177. end
  178.  
  179. Gambler_Name = creature:Name()
  180. if (creature:Position().x < Self.Position().x) then
  181. cashposx = Self.Position().x + 1
  182. cashposy = PositionDice
  183. cashposz = Self.Position().z
  184. if (Self.LookDirection() ~= WEST) then
  185. Last_Activity_Player_In_Spot = os.time()
  186. Self.Turn(WEST)
  187. end
  188. elseif (creature:Position().x > Self.Position().x) then
  189. cashposx = Self.Position().x + 1
  190. cashposy = PositionDice
  191. cashposz = Self.Position().z
  192. if (Self.LookDirection() ~= EAST) then
  193. Last_Activity_Player_In_Spot = os.time()
  194. Self.Turn(EAST)
  195. tmp = string.gsub(tostring(MENSAGEM_BEMVINDO[math.random(1, table.getn(MENSAGEM_BEMVINDO))]), "|Gambler|", name)
  196. if os.time() - EXHT_BEM_VINDO > 4 then
  197. Self.Say(tmp) EXHT_BEM_VINDO = os.time() end
  198.  
  199.  
  200.  
  201.  
  202.  
  203. end
  204.  
  205.  
  206. else
  207. if (creature:Position().y < Self.Position().y) then
  208. if (Self.LookDirection() ~= SOUTH) then
  209. Last_Activity_Player_In_Spot = os.time()
  210. Self.Turn(SOUTH)
  211. end
  212. elseif (creature:Position().y > Self.Position().y) then
  213. if (Self.LookDirection() ~= SOUTH) then
  214. Last_Activity_Player_In_Spot = os.time()
  215. Self.Turn(SOUTH)
  216. end
  217. else
  218. print('Casino: Error. Self character is the potential gambler.')
  219. end
  220. end
  221. break
  222. end
  223. end
  224. if not (Player_Detected) then
  225. Balance = 0
  226. if (Self.LookDirection() ~= SOUTH) then
  227. yellDelay = os.time()
  228. Self.Turn(SOUTH)
  229. Balance = 0
  230. AntiSpam("GoodBye, " .. Gambler_Name .. ".\n{*Today Gamblers*}: " .. #Players, SPEAK_SAY)
  231. end
  232. end
  233. end
  234. Mod:Delay(0)
  235. end)
  236. Module.New("UseFanfare", function(module)
  237. if LyreActive and not Player_Detected then
  238. Container(LyreBackpack):UseItem(spot, true)
  239. module:Delay(LyreCassino * 1000)
  240. end
  241. end)
  242. Module('InactivityDetectionSystem', function(Mod)
  243.  
  244. if(Player_Detected == true) then
  245. if (os.difftime(os.time(),Last_Activity_Player_In_Spot) >= TempoDeBlocker*80) then
  246. Self.Say("[BOT] Porfavor jugue o muevase.")
  247. Last_Activity_Player_In_Spot = os.time()
  248. end
  249.  
  250. end
  251. Mod:Delay(30000)
  252. end)
  253.  
  254. EffectMessageProxy.OnReceive("DiceSignal", function(proxy, message, x, y, z)
  255. roll = string.match(message, Self.Name().." rolled a (.+).")
  256. if roll then
  257. dice = Signal.New('Dice')
  258. dice:Send(roll)
  259. end
  260. end)
  261. Module.New('Check-Bet', function(mod)
  262.  
  263. BetBP = Container.New(BetCashBP)
  264. CashBP = Container.New(MoneyBP)
  265. if (Map.GetTopMoveItem(cashposx, cashposy, cashposz).id == cc and not withdraw and not Casher) then
  266. Casher = true
  267. d = (Map.GetTopMoveItem(cashposx, cashposy, cashposz)).count
  268. Map.PickupItem(cashposx, cashposy, cashposz, BetBP:Index(), 0)
  269. wait(WaitConfiguration + Self.Ping())
  270. -- print(BetBP:CountItemsOfID(cc))
  271. Bet.Value = BetBP:CountItemsOfID(cc)
  272. Balance = Balance + Bet.Value
  273.  
  274. Self.Say("[ " .. Gambler_Name .. " ] Balance: " .. Balance/100 .. "kk" , SPEAK_SAY)
  275.  
  276. repeat
  277. BetBP:MoveItemToContainer(0, CashBP:Index(), 0)
  278. until
  279. BetBP:CountItemsOfID(cc) == 0
  280. -- AntiSpam("Bot added " .. Bet.Value * 10 .. " k to your balance. Your balance is " .. Balance * 10 .. "k.", SPEAK_SAY)
  281. channel:SendOrangeMessage('DiceLog', 'Bot added ' .. Bet.Value *10 .. 'k on ' .. Gambler_Name .. '\'s balance and its ' .. Balance *10 .. 'k.')
  282. -- print('Bet Value is ' .. Bet.Value * 10 .. " " .. Gambler_Name .. " balance is " .. Balance * 10)
  283. wait(WaitConfiguration + Self.Ping())
  284. Casher = false
  285. Bet.Value = 0
  286.  
  287. end
  288. end)
  289. LocalSpeechProxy.OnReceive('bet', function(proxy, mtype, speaker, level, text)
  290. Cyfra = text:match('%d+')
  291. Litera = text:match('%a+')
  292. if speaker == Gambler_Name and Cyfra ~= nil and Litera ~= "" then
  293. Cyfra1 = tonumber(Cyfra) + 0
  294. if table.isStrIn({'l', 'h'}, Litera) and Cyfra ~= nil then
  295. -- print(Cyfra1 .. " " .. Litera)
  296. if Cyfra1 >= Bet.min * 1 and Cyfra1 <= Bet.max * 1 and Balance >= Cyfra1 / 1 and Litera == "h" or Litera == "l" or Litera == "high" or Litera == "low" or Litera == "odd" or Litera == "even" or Litera == "246" or Litera == "135" or Litera == "1" or Litera == "2" or Litera == "3" or Litera == "4" or Litera == "5" or Litera == "6" or Litera == "first" or Litera == "middle" or Litera == "last" and speaker == Gambler_Name then
  297. ValidBet = true
  298. playerBet = Cyfra1
  299. playerType = Litera
  300. -- print('valid ' .. playerBet .. 'valid ' .. playerType)
  301. else
  302. ValidBet = false
  303. end
  304. else
  305. ValidBet = false
  306. end
  307. end
  308. if Cyfra == nil or Cyfra == 0 and Litera == "" then
  309. ValidBet = false
  310. end
  311. end)
  312. LocalSpeechProxy.OnReceive('Balance', function(proxy, mtype, speaker, level, text)
  313. if speaker == Gambler_Name and text:lower() == 'balance' then
  314. AntiSpam(MENSAGEM_BALANCE .. Balance * 1 .. " cc. Crystal Coins.", SPEAK_SAY)
  315. end
  316. end)
  317. LocalSpeechProxy.OnReceive('BalanceRolls', function(proxy, mtype, speaker, level, text)
  318. if speaker == Gambler_Name and ValidBet and not Casher then
  319. -- print(playerBet .. " playerBet " .. "playerType " .. playerType)
  320.  
  321. if playerType:lower() == 'h' and playerBet / 1 >= Bet.min and playerBet / 1 <= Bet.max and Balance ~= 0 and playerBet /1 <= Balance and ValidBet == true and not Bett and not withdrawthen then
  322. Bett = true
  323. Self.UseItemFromGround(Self.Position().x, PositionDice, Self.Position().z)
  324. Signal.OnReceive('Dice', function(signal, data)
  325. if (data == "4" or data == "5" or data == "6") and playerType:lower() == 'h' and playerBet / 1 >= Bet.min and not withdraw then
  326. Container(LyreBackpack):UseItem(spot, true)
  327. Container(LyreBackpack):UseItem(spot, true)
  328. Last_Activity_Player_In_Spot = os.time()
  329. Balance = math.floor(Balance + ((playerBet / 1) * payo))
  330. AntiSpam("Balance: " .. Balance/100 .. "kk" , SPEAK_SAY)
  331. channel:SendYellowMessage('DiceLog', Gambler_Name .. ": " .. playerType .. ' . Bet: ' .. playerBet .. ' $$ Oiaa Acertou $$:' .. playerBet .. ' Balance = ' .. Balance * 10)
  332.  
  333. print('won')
  334. Bett = false
  335. else
  336. Bett = true
  337. Balance = math.floor(Balance - playerBet / 1)
  338. AntiSpam( "Balance 0kk" , SPEAK_SAY)
  339. Last_Activity_Player_In_Spot = os.time()
  340. Self.Say('exura gran san')
  341. Self.Say('exura gran san')
  342. channel:SendOrangeMessage('DiceLog', Gambler_Name .. ": " .. playerType .. ' . Bet: ' .. playerBet .. ' $$ Perdeu Paizمo , Tenta Dnv $$ :' .. playerBet .. ' Balance = ' .. Balance * 10)
  343. print("lost")
  344. Bett = false
  345. end
  346. end)
  347. elseif playerType:lower() == 'l' and playerBet / 1 >= Bet.min and playerBet / 1 <= Bet.max and playerBet /1 <= Balance and Balance ~= 0 and ValidBet == true and not Bett and not withdraw then
  348. -- browse:UseItem(0)
  349. Bett = true
  350. Self.UseItemFromGround(Self.Position().x, PositionDice, Self.Position().z)
  351. Signal.OnReceive('Dice', function(signal, data)
  352. if (data == "1" or data == "2" or data == "3") and playerType:lower() == 'l' and playerBet /1 >= Bet.min and not withdraw then
  353. Container(LyreBackpack):UseItem(spot, true)
  354. Container(LyreBackpack):UseItem(spot, true)
  355.  
  356. Last_Activity_Player_In_Spot = os.time()
  357. Balance = math.floor(Balance + ((playerBet / 1)*payo))
  358. AntiSpam("Balance: " .. Balance/100 .. "kk" , SPEAK_SAY)
  359. channel:SendYellowMessage('DiceLog', Gambler_Name .. ": " .. playerType .. ' . Bet: ' .. playerBet / 1.2 .. ' $$ - Aي Sim , Ganhou rsrs $$:' .. playerBet * 0.8 .. ' Balance = ' .. Balance * 10)
  360. Bett = false
  361. print('won')
  362. else
  363. Bett = true
  364. Balance =math.floor(Balance - playerBet / 1)
  365. Last_Activity_Player_In_Spot = os.time()
  366. Self.Say('exura gran san')
  367. Self.Say('exura gran san')
  368.  
  369. AntiSpam( "You Lose! Balance 0kk" , SPEAK_SAY)
  370. channel:SendOrangeMessage('DiceLog', Gambler_Name .. ": " .. playerType .. ' . Bet: ' .. playerBet .. ' $$ Perdeu Paizمo , Tenta Dnv $$ :' .. playerBet .. ' Balance = ' .. Balance * 10)
  371. print("lost")
  372. Bett = false
  373. end
  374. end)
  375. end
  376. elseif speaker == Gambler_Name and not ValidBet then
  377. if text:lower() == 'h' and Balance >= Bet.min and Balance <= Bet.max and not Bett and not withdraw then
  378. Bett = true
  379. Self.UseItemFromGround(Self.Position().x, PositionDice, Self.Position().z)
  380. Signal.OnReceive('Dice', function(signal, data)
  381. if (data == "4" or data == "5" or data == "6") and text:lower() == 'h' then
  382.  
  383. Container(LyreBackpack):UseItem(spot, true)
  384. Container(LyreBackpack):UseItem(spot, true)
  385. Last_Activity_Player_In_Spot = os.time()
  386. Balance = math.floor(Balance + (Balance * payo))
  387. AntiSpam("[ " .. Gambler_Name .. " ] Balance: " .. Balance/100 .. "kk" , SPEAK_SAY)
  388. channel:SendYellowMessage('DiceLog', Gambler_Name .. ": " .. text:upper() .. ' . Bet: ' .. Balance * 10 .. ' Ganhou!! Parabens <3:' .. Balance * 10 .. ' Balance = ' .. Balance * 10)
  389. Bett = false
  390. print('won')
  391. else
  392. Bett = true
  393. cash = money + Balance
  394. Last_Activity_Player_In_Spot = os.time()
  395. Self.Say('exura gran san')
  396. Self.Say('exura gran san')
  397.  
  398. AntiSpam( "[ " .. Gambler_Name .. " ] Balance 0kk", SPEAK,SAY)
  399. Balance = 0
  400. channel:SendOrangeMessage('DiceLog', Gambler_Name .. ": " .. text:upper() .. ' . Bet: ' .. Balance * 10 .. ' Lost:' .. Balance * 10 .. ' Balance = 0' )
  401. print("lost")
  402. Bett = false
  403. end
  404. end)
  405. elseif text:lower() == 'l' and Balance >= Bet.min and Balance <= Bet.max and not Bett and not withdraw then
  406. Bett = true
  407. Self.UseItemFromGround(Self.Position().x, PositionDice, Self.Position().z)
  408. Signal.OnReceive('Dice', function(signal, data)
  409. if (data == "1" or data == "2" or data == "3") and text:lower() == 'l' then
  410. Container(LyreBackpack):UseItem(spot, true)
  411. Container(LyreBackpack):UseItem(spot, true)
  412.  
  413. Last_Activity_Player_In_Spot = os.time()
  414. Balance = math.floor(Balance + (Balance * payo))
  415. AntiSpam("[ " .. Gambler_Name .. " ] Balance: " .. Balance/100 .. "kk" , SPEAK_SAY)
  416. channel:SendYellowMessage('DiceLog', Gambler_Name .. ": " .. text:upper() .. ' . Bet: ' .. Balance .. ' Pirikita:D:' .. Balance * 10 .. ' Balance = ' .. Balance * 10)
  417. Bett = false
  418. print('won')
  419. else
  420. Bett = true
  421. Last_Activity_Player_In_Spot = os.time()
  422. Self.Say('exura gran san')
  423. Self.Say('exura gran san')
  424.  
  425. AntiSpam( "[ " .. Gambler_Name .. " ] Balance 0kk", SPEAK,SAY)
  426. Balance = 0
  427. channel:SendOrangeMessage('DiceLog', Gambler_Name .. ": " .. text:upper() .. ' . Bet: ' .. Balance * 10 .. ' Lost:' .. Balance * 10 .. ' Balance = 0' )
  428. print("lost")
  429. Bett = false
  430. end
  431. end)
  432. end
  433. end
  434.  
  435. end)
  436.  
  437.  
  438. LocalSpeechProxy.OnReceive("withdraw", function(proxy, mtype, speaker, level, text)
  439. if not Casher and not withdraw and speaker:lower() == Gambler_Name:lower() and Balance ~= 0 and not withdraw and not Bett and not Casher and (text:lower() == "pay" or text:lower() == ">" or text:lower() == "payout" or text:lower() == "payo" or text:lower() == "withdraw" or text:lower() == "<" and not withdraw) then
  440. withdraw = true
  441. channel:SendRedMessage("DiceLog", "Moving " .. Balance .. " Crystal Coins onto " .. Gambler_Name .. "'s locker.")
  442. repeat
  443. if CashBP:CountItemsOfID(cc) > 100 then
  444. if Balance >= 100 then
  445. lalunia = Self.ItemCount(cc)
  446. dupcia = CashBP:GetItemData(1)
  447. for _, value in pairs(dupcia) do
  448. if value == cc then
  449. CashBP:MoveItemToGround(1, cashposx + 1, cashposy, cashposz, 100)
  450. wait(WaitConfiguration + Self.Ping())
  451. end
  452. end
  453. if lalunia - Self.ItemCount(cc) == 100 then
  454. Balance = Balance - 100
  455. else
  456. Balance = Balance
  457. end
  458. else
  459. Self.DropItem(cashposx + 1, cashposy, cashposz, cc, Balance)
  460. Balance = 0
  461. end
  462. else
  463. CashBP:GoBack()
  464. wait(1000)
  465. end
  466. until Balance == 0
  467. AntiSpam("Withdrawn: " .. Balance * 1 .. " cc.", SPEAK_SAY)
  468. wait(2000)
  469. withdraw = false
  470. end
  471. end)
  472.  
  473.  
  474.  
  475. Module.New("openNextBackpack", function(m)
  476. for c = 0, #Container.GetAll() - 1 do
  477. cont = Container.New(c)
  478. if cont:EmptySlots() == 0 and Item.isContainer(cont:GetItemData(cont:ItemCapacity() - 1).id) then
  479. cont:UseItem(cont:ItemCapacity() - 1, true)
  480. end
  481. end
  482. m:Delay(WaitConfiguration + Self.Ping())
  483. end)
  484.  
  485.  
  486.  
  487.  
  488. Module.New('Yelling', function(mod)
  489. if yellActive then
  490. if not Player_Detected then
  491. -- Timer2 = yellDelay
  492. local Spam2 = os.difftime(os.time(), Timer2)
  493. Self.UseItemFromEquipment("head")
  494. if Spam2 >= 5 then
  495. Self.Yell(yellMessage)
  496. Timer2 = os.time()
  497. end
  498. end
  499. end
  500. mod:Delay(700)
  501. end)
  502.  
  503.  
  504. LocalSpeechProxy.OnReceive('info', function(proxy, mtype, speaker, level, text)
  505. if (speaker == Gambler_Name and text:lower() == 'info') then
  506. AntiSpam(info , SPEAK_SAY)
  507. end
  508. end)
  509. Self.CloseContainers()
  510. Self.OpenDepot()
  511. Client.HideEquipment()
  512. local DPChest = Container.GetLast()
  513. for i = 0, DPChest:ItemCount() - 1 do
  514. if DPChest:GetItemData(i).id == 22796 + DPBox then
  515. DPChest:UseItem(i, true)
  516. wait(Self.Ping() * 2, Self.Ping() * 3)
  517. for j = 0, DPChest:ItemCount() - 1 do
  518. if DPChest:GetItemData(j).id == Item.GetID(Lixo) then
  519. DPChest:UseItem(j, false)
  520. wait(Self.Ping() * 2, Self.Ping() * 3)
  521. Container.New(#Container.GetAll() - 3):Minimize()
  522. wait(Self.Ping())
  523. end
  524. end
  525. end
  526. end
  527. for j = 0, DPChest:ItemCount() - 1 do
  528. if DPChest:GetItemData(j).id == Item.GetID(BetCashBP) then
  529. DPChest:UseItem(j, false)
  530. wait(Self.Ping() * 2, Self.Ping() * 3)
  531. Container.New(#Container.GetAll() - 3):Minimize()
  532. wait(Self.Ping())
  533. end
  534. end
  535. for j = 0, DPChest:ItemCount() - 1 do
  536. if DPChest:GetItemData(j).id == Item.GetID(MoneyBP) then
  537. DPChest:UseItem(j, false)
  538. wait(Self.Ping() * 2, Self.Ping() * 3)
  539. Container.New(#Container.GetAll() - 3):Minimize()
  540. wait(Self.Ping())
  541. end
  542. end
  543. for j = 0, DPChest:ItemCount() - 1 do
  544. if DPChest:GetItemData(j).id == Item.GetID(LyreBackpack) then
  545. DPChest:UseItem(j, false)
  546. wait(Self.Ping() * 2, Self.Ping() * 3)
  547. wait(Self.Ping())
  548. Container.New(#Container.GetAll() - 3):Minimize()
  549. Self.Say("Stared Casino By [Star Fire]")
  550. end
  551. end
  552. for spot = Container(LyreBackpack):ItemCount() - 1, 0, -1 do
  553. if Item.isContainer(Container(LyreBackpack):GetItemData(spot).id) then
  554. end
  555. end
  556. function onClose(channel, msg)
  557. print("Reabrindo Backpacks")
  558. Self.CloseContainers()
  559. Self.OpenDepot()
  560. Client.HideEquipment()
  561. local DPChest = Container.GetLast()
  562. for i = 0, DPChest:ItemCount() - 1 do
  563. if DPChest:GetItemData(i).id == 22796 + DPBox then
  564. DPChest:UseItem(i, true)
  565. wait(Self.Ping() * 2, Self.Ping() * 3)
  566. for j = 0, DPChest:ItemCount() - 1 do
  567. if DPChest:GetItemData(j).id == Item.GetID(Lixo) then
  568. DPChest:UseItem(j, false)
  569. wait(Self.Ping() * 2, Self.Ping() * 3)
  570. Container.New(#Container.GetAll() - 3):Minimize()
  571. wait(Self.Ping())
  572. end
  573. end
  574. end
  575. end
  576. for j = 0, DPChest:ItemCount() - 1 do
  577. if DPChest:GetItemData(j).id == Item.GetID(BetCashBP) then
  578. DPChest:UseItem(j, false)
  579. wait(Self.Ping() * 2, Self.Ping() * 3)
  580. Container.New(#Container.GetAll() - 3):Minimize()
  581. wait(Self.Ping())
  582. end
  583. end
  584. for j = 0, DPChest:ItemCount() - 1 do
  585. if DPChest:GetItemData(j).id == Item.GetID(MoneyBP) then
  586. DPChest:UseItem(j, false)
  587. wait(Self.Ping() * 2, Self.Ping() * 3)
  588. Container.New(#Container.GetAll() - 3):Minimize()
  589. wait(Self.Ping())
  590. end
  591. end
  592. for j = 0, DPChest:ItemCount() - 1 do
  593. if DPChest:GetItemData(j).id == Item.GetID(LyreBackpack) then
  594. DPChest:UseItem(j, false)
  595. wait(Self.Ping() * 2, Self.Ping() * 3)
  596. wait(Self.Ping())
  597. Container.New(#Container.GetAll() - 3):Minimize()
  598. Self.Say("Casino Started By [Star Fire]")
  599. end
  600. end
  601. end
  602. for spot = Container(LyreBackpack):ItemCount() - 1, 0, -1 do
  603. if Item.isContainer(Container(LyreBackpack):GetItemData(spot).id) then
  604. end
  605. end
  606.  
  607. local LastMessage = os.time() -- this only runs once, it sets the LastMessage variable to the time
  608. local MessageDelay = 1 -- your bot will only respond to a message every x seconds
  609. local AdvertisementTimer = 15
  610. local AdvertisementTimer2 = 45
  611. LastAdvertisement = os.time()
  612.  
  613. -- Advertising, messagedelay means if player sends 2 messages within 1 sec you will answer only 1, it will send each message every 2 second
  614. -- it will not reply to player when it's ready to advertise within 60 secs, after it did it will start again
  615. Module.New('Advertisement', function(Mod)
  616. if Player_Detected == false then
  617. if (os.time()-LastAdvertisement)>AdvertisementTimer then
  618. Self.Say(MENSAGEM_ANUNCIO)
  619. LastAdvertisement = os.time()
  620. end
  621. else
  622. if (os.time()-LastAdvertisement)>AdvertisementTimer2 then
  623. Self.Say(MENSAGEM_ANUNCIO)
  624. LastAdvertisement = os.time()
  625. end
  626. end
  627. end)
  628. -- Advertising, messagedelay means if player sends 2 messages within 1 sec you will answer only 1, it will send each message every 2 second
  629. -- it will not reply to player when it's ready to advertise within 60 secs, after it did it will start again
  630. Module.New('Advertisement', function(Mod)
  631. if Player_Detected == true then
  632. if (os.time()-LastAdvertisement)>AdvertisementTimer then
  633. Self.Say(MENSAGEM_ANUNCIOI)
  634. LastAdvertisement = os.time()
  635. end
  636. else
  637. if (os.time()-LastAdvertisement)>AdvertisementTimer2 then
  638. Self.Say(MENSAGEM_ANUNCIOI)
  639. LastAdvertisement = os.time()
  640. end
  641. end
  642. end)
  643.  
  644. -- localspeechs are local messages
  645. LocalSpeechProxy.OnReceive("DanceStatus", function(proxy, mtype, speaker, level, text)
  646. for name, creature in Creature.iPlayers(2) do
  647. if (creature:Position().x == Self.Position().x + 2 and creature:Position().y == Self.Position().y and creature:Position().z == Self.Position().z) then
  648. if (os.time()-LastMessage)>MessageDelay then
  649.  
  650. lowertext = string.lower(text)
  651. if text == 'hi' then
  652. Self.PrivateMessage(speaker, 'mensagem de quando o cara fala hi')
  653.  
  654. LastMessage = os.time()
  655. elseif text == 'info' then
  656. Self.PrivateMessage(speaker, '{ H = "4,5,6"} ~ 80%\n[ L ="1,2,3 ]|comandos| para saber m?s comandos.')
  657. LastMessage = os.time()
  658. elseif text == 'games' then
  659. Self.PrivateMessage(speaker, '•[ Games: ]•\n•Play•\n•[High/Low]•\n•Disponible•.",')
  660. elseif text == 'rates' then
  661. Self.PrivateMessage(speaker, '•~ Payout 80% ~•')
  662. elseif text == 'debug' then
  663. Self.PrivateMessage(speaker, '[BOT] Si al meter los 5 crystals coins no los cuenta, porfavor introdusca 1 crystal coin m?s para desbugear!.')
  664. elseif text == 'play' then
  665. Self.PrivateMessage(speaker, '[BOT] Ponga Started H/L')
  666. LastMessage = os.time()
  667. elseif text == 'min' then
  668. Self.PrivateMessage(speaker, '•Min: 5 Crystal Coins | •Max: 5 KK.')
  669. elseif text == 'max' then
  670. Self.PrivateMessage(speaker, '•Min: 5 Crystal Coins | •Max: 5 KK.')
  671. elseif text == 'comandos' then
  672. Self.PrivateMessage(speaker, '•$• Os Comandos S?o•$•:\n{ games, play, info, Min/Max, rates, debug, creditos, balance, pay,\n[ buyscript ]')
  673. elseif text == 'COMANDOS' then
  674. Self.PrivateMessage(speaker, '•$• Os Comandos S?o•$•:\n{ games, play, info, Min/Max, rates, debug, creditos, balance, pay,\n [buyscript ]')
  675. elseif text == 'buy script' then
  676. Self.PrivateMessage(speaker, '•[BOT]•\nTENHO DE CASSINO DEPOT,CASSINO HOUSE, ANTI-TRASH,E PRA FICA USANDO PARTY HAT EX:ALGUEM JOGA LIXO NO SEU DP ASSIM COLOCANDO O LIXO ENCIMA DO DADO E O SEU CASSINO NAO IRA PODER TIRAR O LIXO POIS O SCRIPT ANTI-TRASH IRA RETIRAR O LIXO')
  677. elseif text == 'creditos' then
  678. Self.PrivateMessage(speaker, 'Criado por Casino Depot\n| Skype: Huge.scripts |\n| Cliente: HUGE SOUL | ')
  679. elseif text == 'jogos' then
  680. Self.PrivateMessage(speaker, ' Coloque o dinheiro no meio e diga h ou l -- 50h ou 50l')
  681.  
  682. LastMessage = os.time()
  683.  
  684. end
  685. end
  686. end
  687. end
  688. end)
  689.  
  690. MENSAGEM_BALANCE = "Balance: "
  691. MENSAGEM_ANUNCIOI = "["..Self.Name().."]\n $| 7/24\n| (H/L) |\n| PAYOUT: 90% |\n| MIN: 5 CC ~ MAX: 3 kk |"
  692. MENSAGEM_ANUNCIO = "["..Self.Name().."]\n $| 7/24\n| (H/L) |\n| PAYOUT: 90% |\n| MIN: 5 CC ~ MAX: 3 kk |"
  693. MENSAGEM_BALANCE = "Balance: "
  694.  
  695.  
  696. Module.New('Check-MinBet', function()
  697. if (Balance > 0 and (Balance < Bet.min)) then
  698. AntiSpam(Balance .. "cc\n add + "..(Bet.min - Balance).."cc or 'payout'\nYou balance is too low.", SPEAK_SAY)
  699. end
  700. end)
  701.  
  702. LocalSpeechProxy.OnReceive('miner', function(proxy, mtype, speaker, level, text)
  703. if (speaker == Gambler_Name and text:lower() == 'h') then
  704. if Balance < Bet.min then
  705. AntiSpam('Min: ' .. Bet.min * 1 .."cc ~ Max: " .. Bet.max * 1 .. "cc\nBalance: " .. Balance * 1 .."cc", SPEAK_SAY)
  706. end
  707. end
  708. end)
  709.  
  710. LocalSpeechProxy.OnReceive('miner2', function(proxy, mtype, speaker, level, text)
  711. if (speaker == Gambler_Name and text:lower() == 'l') then
  712. if Balance < Bet.min then
  713. AntiSpam('Min: ' .. Bet.min * 1 .."cc ~ Max: " .. Bet.max * 1 .. "cc\nBalance: " .. Balance * 1 .."cc", SPEAK_SAY)
  714. end
  715. end
  716. end)
  717.  
  718. LocalSpeechProxy.OnReceive('miner3', function(proxy, mtype, speaker, level, text)
  719. if (speaker == Gambler_Name and text:lower() == 'h') then
  720. if Balance > Bet.max then
  721. AntiSpam('Min: ' .. Bet.min * 1 .."cc ~ Max: " .. Bet.max * 1 .. "cc\nBalance: " .. Balance * 1 .."cc", SPEAK_SAY)
  722. end
  723. end
  724. end)
  725.  
  726. LocalSpeechProxy.OnReceive('miner4', function(proxy, mtype, speaker, level, text)
  727. if (speaker == Gambler_Name and text:lower() == 'l') then
  728. if Balance > Bet.max then
  729. AntiSpam('Min: ' .. Bet.min * 1 .."cc ~ Max: " .. Bet.max * 1 .. "cc\nBalance: " .. Balance * 1 .."cc", SPEAK_SAY)
  730. end
  731. end
  732. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement