Advertisement
zibbol

Untitled

Jun 6th, 2025
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 26.25 KB | None | 0 0
  1. --[[
  2.     Script Name:        Anti GM
  3.    
  4.     Description:        Advanced script to stops bot when GM detected or intereacting with as.                
  5.     Author:             Ascer - example
  6. ]]
  7.  
  8. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  9. --> CONFIG SECTION: start
  10. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  11.  
  12. local CHECK_IF_TELEPORTED = {
  13.     enabled = false,                                     -- true/false check if you character was teleported
  14.     sqms = 6,                                           -- minimal amount of sqms to check.
  15.     pauseBot = false,                                     -- true/false pause bot or not (default alarm will play)
  16.     respond = true                                      -- respond short after character will teleported. Messages used here are this same as CHECK_FOR_PM_DEFAULT_MESSAGE. respond
  17. }
  18.  
  19. local CHECK_IF_GM_ON_SCREEN = {
  20.     enabled = true,                                     -- true/false check for gm on screen
  21.     keywords = {"GM ", "CM ", "Admin ", "ADM ", "Gamemaster"}, -- table of keywords in gm nick
  22.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)    
  23. }
  24.  
  25. local CHECK_FOR_PM_DEFAULT_MESSAGE = {
  26.     enabled = true,                                     -- true/false check if gm send to as pm or default message, #IMPORTANT respond only to nicks from CHECK_IF_GM_ON_SCREEN.keywords
  27.     pauseBot = true,                                    -- true/false pause bot or not (default alarm will play)
  28.     respond = {
  29.         enabled = true,                                -- true/false respond fo default message
  30.         randomMsg = {"siema", "co jest", "nie strasz", "elo", "o kurwa", "dawaj wiecej"}     -- messages to respond only once
  31.     }
  32. }
  33.  
  34. local CHECK_FOR_MANA_INCREASED = {
  35.     enabled = false,                                     -- true/false check if mana gained fast in one tick.
  36.     points = 10,                                       -- minimal mana points gained to module works
  37.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)
  38. }
  39.  
  40. local CHECK_FOR_HEALTH_DMG = {
  41.     enabled = false,                                     -- true/false check for hp decarese by percent
  42.     percent = 30,                                       -- minimal hpperc decreased by GM.                  
  43.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)
  44. }
  45.  
  46. local CHECK_FOR_SPECIAL_MONSTER = {
  47.     enabled = true,                                    -- true/false check if on screen appear special monster that normal don't appear in this place
  48.     names = {"Demon", "Black Sheep"},                   -- monster names
  49.     useAboveListAsSafe = false,                         -- true/false if true then above list will contains safe monsters and any other will be mark as danger. If false then monsters from list will mark as danger
  50.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)
  51. }
  52.  
  53. local CHECK_FOR_RARE_ITEM = {
  54.     enabled = false,                                    -- true/false check for rare item droped on ground.
  55.     ids = {3079, 3319},                                 -- ids of items to check
  56.     range = 7,                                          -- distance from our character we checking
  57.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)
  58. }
  59.  
  60. local CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR = {
  61.     enabled = false,                                    -- true/false check if GM creating monster and destroy it in short time.
  62.     names = {"Wasp", "Wolf", "snake", "bear"},                         -- name of monsters
  63.     isAliveLessThan = 1,                                -- mark monsters that are alive less than 1s. (it won't works for monsters with low HP died on headshoot)
  64.     teleportedSqms = 4,                                 -- check for monster teleportation too, minimal sqms.
  65.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)
  66. }
  67.  
  68. local CHECK_FOR_MONSTERS_CREATION = {
  69.     enabled = true,                                    -- [!IMPORTANT: works only on servers that don't spawn monsters when player on screen] true/false check if monsters spawn on screen.
  70.     ignore = {"Stalker", "Nightstalker"},               -- List of monsters that disappear or you want just ignore.
  71.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)
  72. }
  73.  
  74. local CHECK_FOR_TARGET_MONSTER_HEALED = {
  75.     enabled = false,                                    -- true/false check if GM healing your current targeting monster (red square)
  76.     hpperc = 20,                                         -- minimal percent monster need to be healed.
  77.     pauseBot = true                                     -- true/false pause bot or not (default alarm will play)
  78. }
  79.  
  80. local PAUSE_CAVEBOT_ONLY = {
  81.     enabled = false                                     -- while GM detected pause only Cavebot (targeting, walker, looter)
  82. }
  83.  
  84. local PAUSE_LUA_SCRIPTS = {                            
  85.     enabled = true                                     -- will pause lua scripts too (!IMPORTANT the only way to enable it will manually press CTRL+P)
  86. }
  87.  
  88. local RESUME = {
  89.     enabled = false,                                    -- true/false resume bot after some time paused
  90.     time = 240                                          -- time in seconds to unpause bot
  91. }
  92.  
  93. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  94. --> CONFIG SECTION: end
  95. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  96.  
  97.  
  98. -- DONT'T EDIT BELOW THIS LINE
  99.  
  100. CHECK_FOR_SPECIAL_MONSTER.names = table.lower(CHECK_FOR_SPECIAL_MONSTER.names)
  101. CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.names = table.lower(CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.names)
  102. CHECK_FOR_MONSTERS_CREATION.ignore = table.lower(CHECK_FOR_MONSTERS_CREATION.ignore)
  103.  
  104. local detectTime = 0
  105. local teleported, old = false, {x=0, y=0, z=0}
  106. local lastMana = Self.Mana()
  107. local lastHealth = Self.Health()
  108. local responders, respond, respondTime = {}, false, 0
  109. local checkItemTime = 0
  110. local resumeTime = 0
  111. local pausedTriger = false
  112. local mobDisappear, mobDisappearTime, disappear = -1, 0, false
  113. local allowCheckMobCreation, mobsCreationLevel, appearMob, appear = false, {x=0,y=0,z=0}, -1, false
  114. local lastTarget = {id = -1, hpperc = -1}
  115.  
  116. -- reset teleported pos
  117. Self.GetTeleported()
  118.  
  119. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  120. --> Function:       init()
  121. --> Description:    Params initialization.
  122. -->                
  123. --> Return:         nil - nothing
  124. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  125. function init()
  126.     if Rifbot.isEnabled() then
  127.         if pausedTriger then
  128.             pausedTriger = false
  129.             disappear = false
  130.             mobDisappear = -1
  131.             appear = false
  132.             allowCheckMobCreation = false
  133.             teleported = false
  134.             mobsCreationLevel = {x=0,y=0,z=0}
  135.             old = Self.Position()
  136.             lastMana = Self.Mana()
  137.             lastHealth = Self.Health()
  138.         end    
  139.     else
  140.         pausedTriger = true
  141.     end
  142. end
  143.  
  144. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  145. --> Function:       customPause()
  146. --> Description:    Pause whole bot or pause cavebot only (targeting, walker, looter)
  147. -->                
  148. --> Return:         nil - nothing
  149. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  150. function customPause()
  151.     if PAUSE_CAVEBOT_ONLY.enabled then
  152.         if Targeting.isEnabled() then Targeting.Enabled(false) end
  153.         if Walker.isEnabled() then Walker.Enabled(false) end
  154.         if Looter.isEnabled() then Looter.Enabled(false) end
  155.     else
  156.         if Rifbot.isEnabled() then Rifbot.setEnabled(false, PAUSE_LUA_SCRIPTS.enabled) end
  157.     end    
  158. end    
  159.  
  160. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  161. --> Function:       checkIfTeleported()
  162. --> Description:    Check for character current position and play sound and stops bot when pos quick change.
  163. -->                
  164. --> Return:         nil - nothing
  165. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  166. function checkIfTeleported()
  167.     if not CHECK_IF_TELEPORTED.enabled then return end
  168.     if CHECK_IF_TELEPORTED.sqms <= 2 then Rifbot.setCriticalMode(true) end
  169.     if teleported then
  170.         Rifbot.PlaySound("Default.mp3")
  171.         if CHECK_IF_TELEPORTED.pauseBot then
  172.             customPause()
  173.         end
  174.     end    
  175.     local dist = Self.DistanceFromPosition(old.x, old.y, old.z)
  176.     local getTeleported = Self.GetTeleported()
  177.     if old.x ~= 0 and (dist >= CHECK_IF_TELEPORTED.sqms and (dist > 2 or old.z == Self.Position().z)) or (table.count(getTeleported) > 1 and getTeleported.z == old.z) then
  178.         if CHECK_IF_TELEPORTED.respond and not teleported then
  179.             respond = true
  180.         end
  181.         teleported = true    
  182.         Rifbot.PlaySound("Default.mp3")
  183.         if CHECK_IF_TELEPORTED.pauseBot then
  184.             customPause()
  185.         end
  186.         print("Your character has been teleported " .. dist .. " sqms.")
  187.     end
  188.     old = Self.Position()
  189. end
  190.  
  191. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  192. --> Function:       checkForVisibleGM(creatures)
  193. --> Description:    Check for gms on screen and play sound.
  194. --> Params:        
  195. -->                 @creatures table with creatures.
  196. -->                
  197. --> Return:         nil - nothing
  198. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  199. function checkForVisibleGM(creatures)
  200.     if not CHECK_IF_GM_ON_SCREEN.enabled then return end
  201.     local mypos = Self.Position()
  202.     for i = 1, #creatures do
  203.         local player = creatures[i]
  204.         if Creature.isPlayer(player) then
  205.             for j = 1, #CHECK_IF_GM_ON_SCREEN.keywords do
  206.                 if string.instr(player.name, CHECK_IF_GM_ON_SCREEN.keywords[j]) and mypos.z == player.z then
  207.                     Rifbot.PlaySound("Default.mp3")
  208.                     if CHECK_IF_GM_ON_SCREEN.pauseBot then
  209.                         customPause()
  210.                     end
  211.                     print("Detected player " .. player.name .. " on screen.")
  212.                     break    
  213.                 end    
  214.             end    
  215.         end    
  216.     end
  217. end
  218.  
  219. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  220. --> Function:       checkForManaIncreased()
  221. --> Description:    Check for mana increased.
  222. -->                
  223. --> Return:         nil - nothing
  224. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  225. function checkForManaIncreased()
  226.     if not CHECK_FOR_MANA_INCREASED.enabled then return end
  227.     local mp = Self.Mana()
  228.     if mp > lastMana then
  229.         local gain = mp - lastMana
  230.         if gain >= CHECK_FOR_MANA_INCREASED.points then
  231.             Rifbot.PlaySound("Default.mp3")
  232.             if CHECK_FOR_MANA_INCREASED.pauseBot then
  233.                 customPause()
  234.             end
  235.             print("Mana increased by " .. gain .. " points")
  236.         end    
  237.     end
  238.     lastMana = mp
  239. end
  240.  
  241. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  242. --> Function:       checkForHealthDmg()
  243. --> Description:    Check for health dmg.
  244. -->                
  245. --> Return:         nil - nothing
  246. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  247. function checkForHealthDmg()
  248.     if not CHECK_FOR_HEALTH_DMG.enabled then return end
  249.     local hp = Self.Health()
  250.     if hp < lastHealth then
  251.         local dmg = lastHealth - hp
  252.         dmg = math.floor((dmg / Self.HealthMax()) * 100)
  253.         if dmg >= CHECK_FOR_HEALTH_DMG.percent then
  254.             Rifbot.PlaySound("Default.mp3")
  255.             if CHECK_FOR_HEALTH_DMG.pauseBot then
  256.                 customPause()
  257.             end
  258.             print("Health dmg over " .. dmg .. "%")
  259.         end    
  260.     end
  261.     lastHealth = hp
  262. end
  263.  
  264. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  265. --> Function:       checkForSpecialMonsters(creatures)
  266. --> Description:    Check for special creatures screen and play sound.
  267. --> Params:        
  268. -->                 @creatures table with creatures.
  269. -->                
  270. --> Return:         nil - nothing
  271. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  272. function checkForSpecialMonsters(creatures)
  273.     if not CHECK_FOR_SPECIAL_MONSTER.enabled then return end
  274.     local mypos = Self.Position()
  275.     for i = 1, #creatures do
  276.         local mob = creatures[i]
  277.         if Creature.isMonster(mob) and mob.z == mypos.z then
  278.             local var = table.find(CHECK_FOR_SPECIAL_MONSTER.names, string.lower(mob.name))
  279.             if CHECK_FOR_SPECIAL_MONSTER.useAboveListAsSafe then
  280.                 var = not table.find(CHECK_FOR_SPECIAL_MONSTER.names, string.lower(mob.name))
  281.             end    
  282.             if var then
  283.                 Rifbot.PlaySound("Default.mp3")
  284.                 if CHECK_FOR_SPECIAL_MONSTER.pauseBot then
  285.                     customPause()
  286.                 end
  287.                 print("Detected monster " .. mob.name .. " on screen.")
  288.                 break    
  289.             end        
  290.         end    
  291.     end
  292. end    
  293.  
  294. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  295. --> Function:       checkForMonstersCreationAndDisappear(creatures)
  296. --> Description:    Check if example monster you attacked appear on screen and fast disapper then play sound.
  297. --> Params:        
  298. -->                 @creatures table with creatures.
  299. -->                
  300. --> Return:         nil - nothing
  301. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  302. function checkForMonstersCreationAndDisappear(creatures)
  303.     if not CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.enabled then return end
  304.     local target = Self.TargetID()
  305.     for i = 1, #creatures do
  306.         local mob = creatures[i]
  307.         if Creature.isMonster(mob) then
  308.             if table.find(CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.names, string.lower(mob.name)) then
  309.                 if mob.id == target then
  310.                     if mobDisappear == -1 or mobDisappear.id ~= target then
  311.                         mobDisappear = mob
  312.                         mobDisappearTime = os.clock()
  313.                     end
  314.                     return    
  315.                 end
  316.                 if table.count(mobDisappear) > 1 and mob.id == mobDisappear.id then
  317.                     local absx = math.abs(mob.x - mobDisappear.x)
  318.                     local absy = math.abs(mob.y - mobDisappear.y)
  319.                     local ret = absx
  320.                     if absy > absx then
  321.                         ret = absy
  322.                     end
  323.                     if ret >= CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.teleportedSqms then
  324.                         disappear = true
  325.                     else    
  326.                         mobDisappear.x = mob.x
  327.                         mobDisappear.y = mob.y
  328.                         return
  329.                     end    
  330.                 end
  331.             end        
  332.         end    
  333.     end
  334.     if table.count(mobDisappear) > 1 and table.find(CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.names, string.lower(mobDisappear.name)) and ((Creature.isOnScreen(mobDisappear) and mobDisappear.hpperc > 20 and os.clock() - mobDisappearTime < CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.isAliveLessThan) or disappear) then
  335.         disappear = true
  336.         Rifbot.PlaySound("Default.mp3")
  337.         if CHECK_FOR_MONSTERS_CREATION_AND_DISAPPEAR.pauseBot then
  338.             customPause()
  339.         end
  340.         print("Detected monster creation and disappear " .. mobDisappear.name .. " on screen.")
  341.     else
  342.         mobDisappear = -1    
  343.     end        
  344. end    
  345.  
  346. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  347. --> Function:       checkForMonstersCreation(creatures)
  348. --> Description:    Check if monster was spawned on screen. Works only for servers that don't spawn it when player is on screen
  349. --> Params:        
  350. -->                 @creatures table with creatures.
  351. -->                
  352. --> Return:         nil - nothing
  353. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  354. function checkForMonstersCreation(creatures)
  355.     if not CHECK_FOR_MONSTERS_CREATION.enabled then return end
  356.     local pos = Self.Position()
  357.     if mobsCreationLevel.z ~= pos.z or math.abs(mobsCreationLevel.x - pos.x) > 7 or math.abs(mobsCreationLevel.y - pos.y) > 5 then
  358.         allowCheckMobCreation = false
  359.     end  
  360.     mobsCreationLevel = pos
  361.     local count = 0
  362.     for i = 1, #creatures do
  363.         local mob = creatures[i]
  364.         if Creature.isMonster(mob) and mob.z == pos.z and math.abs(mob.x - pos.x) <= 7 and math.abs(mob.y - pos.y) <= 5 and not table.find(CHECK_FOR_MONSTERS_CREATION.ignore, string.lower(mob.name)) then
  365.             count = count + 1
  366.             if allowCheckMobCreation then
  367.                 if Creature.DistanceFromSelf(mob) < 4 then
  368.                     appear = true
  369.                     appearMob = mob
  370.                     break
  371.                 end    
  372.             end    
  373.         end    
  374.     end
  375.     if count > 0 then
  376.         allowCheckMobCreation = false
  377.     else
  378.         allowCheckMobCreation = true
  379.     end    
  380.     if appear then
  381.         Rifbot.PlaySound("Default.mp3")
  382.         if CHECK_FOR_MONSTERS_CREATION.pauseBot then
  383.             customPause()
  384.         end
  385.         print("Detected monster creation " .. appearMob.name .. " on screen.")
  386.     end    
  387. end
  388.  
  389. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  390. --> Function:       checkForRareItems(range)
  391. --> Description:    Check rare items on ground in range and play sound/pause bot.
  392. --> Params:         None
  393. -->                
  394. --> Return:         nil - nothing
  395. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  396. function checkForRareItems()
  397.     if not CHECK_FOR_RARE_ITEM.enabled then return end
  398.     if os.clock() - checkItemTime < 1 then return end
  399.     local pos = Self.Position()
  400.     checkItemTime = os.clock()
  401.     local range = CHECK_FOR_RARE_ITEM.range
  402.     local rangex, rangey = range, range
  403.     if range > 7 then rangex = 7 end
  404.     if range > 5 then rangey = 5 end
  405.  
  406.     for x = -rangex, rangex do
  407.         for y = -rangey , rangey do
  408.             local map = Map.GetTopMoveItem(pos.x + x, pos.y + y, pos.z)
  409.             if table.find(CHECK_FOR_RARE_ITEM.ids, map.id) then
  410.                 Rifbot.PlaySound("Default.mp3")
  411.                 print("Found rare item on screen: " .. map.id)
  412.                 if CHECK_FOR_RARE_ITEM.pauseBot then
  413.                     customPause()
  414.                 end
  415.                 break
  416.             end    
  417.         end    
  418.     end        
  419. end
  420.  
  421. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  422. --> Function:       checkTargetHealed(creatures)
  423. --> Description:    Read last target id and check if it's gain hpperc.
  424. --> Params:        
  425. -->                 @creatures table with creatures.
  426. -->                
  427. --> Return:         nil - nothing
  428. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  429. function checkTargetHealed(creatures)
  430.     if not CHECK_FOR_TARGET_MONSTER_HEALED.enabled then return end
  431.     local t = Self.TargetID()
  432.     for i = 1, #creatures do
  433.         local mob = creatures[i]
  434.         if Creature.isMonster(mob) and mob.id == t then  
  435.             if lastTarget.id ~= mob.id then
  436.                 lastTarget = mob
  437.                 break
  438.             else
  439.                 if mob.hpperc - lastTarget.hpperc >= CHECK_FOR_TARGET_MONSTER_HEALED.hpperc then
  440.                    Rifbot.PlaySound("Default.mp3")
  441.                     if CHECK_FOR_TARGET_MONSTER_HEALED.pauseBot then
  442.                         customPause()
  443.                     end
  444.                     print("Detected target healing " .. mob.name .. " by " .. (mob.hpperc - lastTarget.hpperc) .. "%")
  445.                     break    
  446.                 end
  447.                 lastTarget = mob
  448.             end              
  449.         end    
  450.     end
  451. end    
  452.  
  453.  
  454. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  455. --> Function:       resume()
  456. --> Description:    Resume bot after beeing paused for x time.
  457. --> Params:         None
  458. -->                
  459. --> Return:         nil - nothing
  460. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  461. function resume()
  462.     if not RESUME.enabled then return end
  463.     if not Rifbot.isEnabled() or (PAUSE_CAVEBOT_ONLY and not Walker.isEnabled()) then
  464.         if resumeTime <= 0 then
  465.             resumeTime = os.clock()
  466.         else    
  467.             if os.clock() - resumeTime > RESUME.time then
  468.                 if PAUSE_CAVEBOT_ONLY then
  469.                     if not Targeting.isEnabled() then Targeting.Enabled(true) end
  470.                     if not Walker.isEnabled() then Walker.Enabled(true) end
  471.                     if not Looter.isEnabled() then Looter.Enabled(true) end
  472.                 end    
  473.                 Rifbot.setEnabled(true)
  474.                 teleported = false
  475.                 old = Self.Position()
  476.                 lastMana = Self.Mana()
  477.                 lastHealth = Self.Health()
  478.                 disappear = false
  479.                 mobDisappear = -1
  480.             end        
  481.         end
  482.     else
  483.         resumeTime = 0    
  484.     end        
  485. end
  486.  
  487. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  488. --> Function:       respondForMessage()
  489. --> Description:    Execute message respond.
  490. -->                
  491. --> Return:         nil - nothing
  492. ----------------------------------------------------------------------------------------------------------------------------------------------------------
  493. function respondForMessage()
  494.     if respond then
  495.         local msg = CHECK_FOR_PM_DEFAULT_MESSAGE.respond.randomMsg[math.random(1, #CHECK_FOR_PM_DEFAULT_MESSAGE.respond.randomMsg)]
  496.         wait(500 + 90 * #msg)
  497.         Self.Say(msg)
  498.         respond = false
  499.         respondTime = os.clock()
  500.         print("Responded this message: " .. msg)
  501.     end
  502.     if os.clock() - respondTime > 10 * 60 then -- reset list to respond
  503.         responders = {}
  504.     end    
  505. end    
  506.  
  507. -- proxy messages
  508. function proxy(messages)
  509.     if not CHECK_IF_GM_ON_SCREEN.enabled then return end
  510.     for i, msg in ipairs(messages) do
  511.         for j = 1, #CHECK_IF_GM_ON_SCREEN.keywords do
  512.             if string.instr(msg.speaker, CHECK_IF_GM_ON_SCREEN.keywords[j]) then
  513.                 Rifbot.PlaySound("Default.mp3")
  514.                 if CHECK_FOR_PM_DEFAULT_MESSAGE.respond.enabled then
  515.                     if not table.find(responders, msg.speaker) then
  516.                         table.insert(responders, msg.speaker)
  517.                         respond = true
  518.                     end
  519.                 end    
  520.  
  521.                 if CHECK_FOR_PM_DEFAULT_MESSAGE.pauseBot then
  522.                     if Rifbot.isEnabled() then
  523.                         customPause()
  524.                     end
  525.                 end
  526.  
  527.                 print("Recived message from: " .. msg.speaker .. ", message: " .. msg.message)
  528.                 break    
  529.             end    
  530.         end    
  531.     end
  532. end
  533. Proxy.New("proxy")
  534.  
  535. -- module 200ms or faster if teleported enabled
  536. Module.New("Anti GM", function ()
  537.    
  538.     -- when connected.
  539.     if Self.isConnected() then
  540.  
  541.         -- load creatures.
  542.         local creatures = Creature.getCreatures()
  543.  
  544.         init()
  545.         checkIfTeleported()
  546.         checkForVisibleGM(creatures)
  547.         checkForManaIncreased()
  548.         checkForHealthDmg()
  549.         respondForMessage()
  550.         checkForSpecialMonsters(creatures)
  551.         checkForRareItems()
  552.         checkForMonstersCreationAndDisappear(creatures)
  553.         checkForMonstersCreation(creatures)
  554.         checkTargetHealed(creatures)
  555.         resume()
  556.  
  557.     end
  558.  
  559. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement