Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. local initialBetamount = 1
  2. local multipleByonLoss = 2
  3. local delay = 500 --[[ waits between actions, if it's so low, then you won't play properly because npc is so slow ]]--
  4. local messages = false;
  5. local streak = 0;
  6. local when_increase_bet = 6;
  7. local increase_by = 1;
  8. local coinId = 3043 --[[ crystal coin ]]--
  9.  
  10. local betL = "l"
  11. local betH = "h"
  12.  
  13. local name = "nick"
  14.  
  15. local myposition_x = Self.Position().x
  16. local myposition_y = Self.Position().y
  17. local pos_z = Self.Position().z
  18.  
  19. local dice_x = myposition_x-2
  20. local dice_y = myposition_y-1
  21.  
  22. local srodek_pos_x = myposition_x-1
  23. local srodek_pos_y = myposition_y-1
  24.  
  25. local currentBet = initialBetamount
  26. local currentHL = betL
  27. Self.DropItem(srodek_pos_x, srodek_pos_y, pos_z, coinId, Self.ItemCount(coinId))
  28.  
  29.  
  30. while (true)
  31. do
  32. if (Self.Position().x == myposition_x and Self.Position().y == myposition_y and Self.Position().z == pos_z)
  33. then
  34. wait(0.3*delay)
  35. if (messages)
  36. then
  37. Self.PrivateMessage(name,"Przewiduje ".. currentBet .."cc na: " ..currentHL)
  38. end
  39. Self.SayToNpc(currentBet .."cc" ..currentHL)
  40. wait(0.3*delay)
  41.  
  42. if (currentHL == betL)
  43. then
  44. if (Map.GetTopUseItem(dice_x, dice_y, pos_z).id < 5795) --[[ low i wygral ]]--
  45. then
  46. streak = 0
  47. wait(0.1*delay)
  48. currentBet = initialBetamount
  49. increase_by = 1
  50.  
  51. elseif (Map.GetTopUseItem(dice_x, dice_y, pos_z).id >= 5795) --[[ low i przegral ]]--
  52. then
  53. streak = streak+1
  54. wait(0.1*delay)
  55.  
  56. if (streak>=when_increase_bet)
  57. then
  58. increase_by = increase_by + 1
  59. currentBet = currentBet*multipleByonLoss + increase_by
  60. Self.PrivateMessage(name,"Increased bet: " ..currentBet)
  61. end
  62.  
  63. if (streak<when_increase_bet)
  64. then
  65. currentBet = currentBet*multipleByonLoss
  66. end
  67. currentHL = betH
  68. end
  69. elseif (currentHL == betH)
  70. then
  71. if (Map.GetTopUseItem(dice_x, dice_y, pos_z).id >= 5795) --[[ high i wygral ]]--
  72. then
  73. streak = 0
  74. currentBet = initialBetamount
  75. increase_by = 1
  76.  
  77. elseif (Map.GetTopUseItem(dice_x, dice_y, pos_z).id < 5795) --[[ high i przegral ]]--
  78. then
  79. streak = streak+1
  80. wait(0.1*delay)
  81.  
  82. if (streak>=when_increase_bet)
  83. then
  84. increase_by = increase_by + 1
  85. currentBet = currentBet*multipleByonLoss + increase_by
  86. Self.PrivateMessage(name,"Increased bet: " ..currentBet)
  87. end
  88.  
  89. if (streak<when_increase_bet)
  90. then
  91. currentBet = currentBet*multipleByonLoss
  92. end
  93. currentHL = betL
  94. end
  95. end
  96. end
  97. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement