Jump to content

zakne11

Members
  • Posts

    60
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by zakne11

  1. auto(100) if not g_game.isOnline() then return end if g_game.isAttacking() then g_game.sendKey("F1") sleep(3000) end
  2. 1. Just use spell helaler 2. auto(100) if not g_game.isOnline() then return end local messagesToDetect = {"xxx", "xxx", "xxx", "xxx"} -- which words should it look for? local respondToMessage = false -- should it respond if trigger word is found? local messageToRespond = "im here" -- what should it respond? local pauseBot = false -- should it pause the bot? local playAlarm = true -- should it play alarm? connect("g_game", "onTalkMessage", checkBotMessage) function checkBotText(mode, message) for _, messageToDetect in pairs(messagesToDetect) do if string.find(message, messageToDetect, 1, true) then if respondToMessage then g_game.talk(messageToRespond) end if pauseBot then setOption("Global/BotPaused", "true") end if playAlarm then for i = 1, 3 do playSound("alarm.wav") sleep(1000) end end return end end end
  3. ROTS most of CC room2 and room3 task waypoints cc - drum task.xml cc - destroyers task.xml cc - charmers task.xml cc - bio_saib_man task.xml cc - anhilator v2 task.xml cc - anhilator task.xml cc - yao task.xml cc - vampires task.xml cc - tyranosaur task.xml cc - toxic spiders task.xml cc - swamp spiders task.xml cc - susha task.xml cc - slighty sceleton task.xml cc - skeletons task.xml cc - pterodactyls task.xml cc - pirate robot task.xml cc - mummy task.xml cc - giras task.xml cc - frozen_skel_warior task.xml
  4. local TextToFind = xxx local FoundMessage = false for k,v in pairs(g_game.getTextMessages()) do if v = TextToFind then return FoundMessage = true end end if FoundMessage then gotolabel("HUNTING", "start-hunting") end
  5. local x = local y = local z = pos = g_game.getLocalPlayer():getPosition() if pos.x ~= x or pos.y ~= y or pos.z ~= z then playSound("alarm.wav") if getOption("Global/BotPaused") == "false" then setOption("Global/BotPaused", "true") sleep(300000) end if getOption("Global/BotPaused") == "true" then setOption("Global/BotPaused", "flase") end end auto(500)
  6. local playersOnScreen = 0 if i == nill then i = 0 end for _, creature in pairs(g_game.getCreatures()) do if creature:isPlayer() then playersOnScreen = playersOnScreen + 1 end end if playersOnScreen > 1 and i >= 1200 then g_game.talk("xxxx") i = 0 end i = i + 1 auto(500)
  7. local player local playerhp local playername = xxxx for v, k in pairs(g_game.getCreatures()) do if k:getName() == "playername" and k:isPlayer() then player = k player:getHealthPercent() = playerhp break end end if playerhp <= 70 then g_game.talk("exura sio" playername) end auto(250)
  8. Turn you got posted previously, here i place condition for player detection
  9. use database to add conditions local playersOnScreen = 0 for _, creature in pairs(g_game.getCreatures()) do if creature:isPlayer() then playersOnScreen = playersOnScreen + 1 end end if playersOnScreen = 1 then ...
  10. you can take my long script few posts upper, and just adjust to rotation
  11. look on lure script on forum (works good)
  12. just got 6 attacking skills with different conditions
  13. Not ideal as you ask, but made for my needs. if not g_game.isOnline() then return end local function wave5x3() local MonstersInRangeN = 0 local MonstersInRangeE = 0 local MonstersInRangeS = 0 local MonstersInRangeW = 0 local MonstersInActualRange = 0 local direction = g_game.getLocalPlayer():getDirection() for _, creature in pairs(g_game.getCreatures()) do local playerPos = g_game.getLocalPlayer():getPosition() local creaturePos = creature:getPosition() local offsetX = playerPos.x - creaturePos.x local offsetY = playerPos.y - creaturePos.y if creature == nil then creature = playerPos end -- West if creature:isMonster() and creaturePos:isInRange(playerPos, 5, 5) and offsetX >= 1 and offsetX <= 5 and offsetY <= 1 and offsetY >= -1 then MonstersInRangeW = MonstersInRangeW + 1 end -- East if creature:isMonster() and creaturePos:isInRange(playerPos, 5, 5) and offsetX >= -5 and offsetX <= -1 and offsetY <= 1 and offsetY >= -1 then MonstersInRangeE = MonstersInRangeE + 1 end -- North if creature:isMonster() and creaturePos:isInRange(playerPos, 5, 5) and offsetY >= 1 and offsetY <= 5 and offsetX <= 1 and offsetX >= -1 then MonstersInRangeN = MonstersInRangeN + 1 end -- Sauth if creature:isMonster() and creaturePos:isInRange(playerPos, 5, 5) and offsetY >= -5 and offsetY <= -1 and offsetX <= 1 and offsetX >= -1 then MonstersInRangeS = MonstersInRangeS + 1 end end local highest = 0 local nums = {MonstersInRangeN, MonstersInRangeE, MonstersInRangeS, MonstersInRangeW} local bestdirection = direction for i,v in pairs(nums)do if v > highest then highest = v end end if highest == MonstersInRangeN and MonstersInRangeN > MonstersInRangeE and MonstersInRangeN > MonstersInRangeS and MonstersInRangeN > MonstersInRangeW then bestdirection = 0 end if highest == MonstersInRangeE and MonstersInRangeE > MonstersInRangeN and MonstersInRangeE > MonstersInRangeS and MonstersInRangeE > MonstersInRangeW then bestdirection = 1 end if highest == MonstersInRangeS and MonstersInRangeS > MonstersInRangeE and MonstersInRangeS > MonstersInRangeN and MonstersInRangeS > MonstersInRangeW then bestdirection = 2 end if highest == MonstersInRangeW and MonstersInRangeW > MonstersInRangeE and MonstersInRangeW > MonstersInRangeS and MonstersInRangeW > MonstersInRangeN then bestdirection = 3 end if direction == 0 then MonstersInActualRange = MonstersInRangeN end if direction == 1 then MonstersInActualRange = MonstersInRangeE end if direction == 2 then MonstersInActualRange = MonstersInRangeS end if direction == 3 then MonstersInActualRange = MonstersInRangeW end return MonstersInRangeN,MonstersInRangeE,MonstersInRangeS,MonstersInRangeW,MonstersInActualRange,bestdirection end local MonstersInRangeN, MonstersInRangeE, MonstersInRangeS, MonstersInRangeW, MonstersInActualRange, bestdirection = wave5x3() local player = g_game.getLocalPlayer() local checkRange = 5 local monsterinrange = 3 local monsterinrangestand = 1 local monsteraround2 = #g_game.getMonstersAround(2) local monsteraround1 = #g_game.getMonstersAround(1) local manapercent = g_game.getLocalPlayer():getManaPercent() if a == nil then a = 0 end if a ~= nil and a > 3 and monsteraround1 >= MonstersInActualRange and monsteraround1 >= 1 and g_game.isAttacking() and g_game.getIdleTime() > 300 then g_game.turn(g_game.getBestTurnDirection()) a = 0 end if g_game.isAttacking() then if manapercent >= 20 and monsteraround2 >= monsterinrange then g_game.sendKey("Fx") end if manapercent >= 20 and monsteraround2 >= monsterinrange*2 then g_game.sendKey("Fx") end if manapercent >= 20 and MonstersInActualRange >= 2 then g_game.sendKey("Fx") end if manapercent >= 20 and MonstersInActualRange >= monsterinrange then g_game.sendKey("Fx") end if manapercent >= 20 and MonstersInActualRange >= monsterinrange then g_game.sendKey("Fx") end end if a ~= nil then a=a+1 end auto(250)
  14. Bot close after any operations after ROTS new update (dx one) Strange but seems opengl one works fine
  15. if not g_game.isAttacking() then for _, creature in pairs(g_game.getCreatures()) do if creature:isMonster() and creature:getHealthPercent() <= 50 then g_game.attack(creature) return end end end If you add it to previous lure it should solve your request.
  16. zakne11

    Few Issues

    use range from 3 to 8 bot will then keep 3 sqm distance together with keep away
  17. ok got propably crash of bot log, (add time stamp to logging will be helpfull. But this time just leaving spot when bot turns off. otclientbot.log [C]: at 0x00ce8a50 ERROR: protected lua call failed: LUA ERROR: attempt to call a userdata value stack traceback: [C]: at 0x00ce8a50 [C]: in function 'createWidget' /game_console/console.rsx:846: in function 'addTabText' /game_console/console.rsx:749: in function 'addText' /game_textmessage/textmessage.rsx:194: in function 'callback' /gamelib/textmessages.rsx:11: in function </gamelib/textmessages.rsx:3> Lua Call Stack: [0] [C++]:-1 -- createWidget [C++] [1] /game_console/console.rsx:846 -- addTabText [Lua] [2] /game_console/console.rsx:749 -- addText [Lua] [3] /game_textmessage/textmessage.rsx:194 -- callback [Lua] [4] /gamelib/textmessages.rsx:11 -- <unknown> [Lua] ERROR: lua function callback failed: LUA ERROR: attempt to call a string value stack traceback: [C]: at 0x00ce8a50 [C]: at 0x00ce8a50 ERROR: ATTENTION the event list is not getting empty, this could be caused by some bad code ERROR: protected lua call failed: LUA ERROR: attempt to call a number value stack traceback: [C]: at 0x00ce8a50 ERROR: protected lua call failed: LUA ERROR: attempt to call a number value stack traceback: [C]: at 0x00ce8a50 ERROR: protected lua call failed: LUA ERROR: attempt to call a userdata value stack traceback: [C]: at 0x00ce8a50 [C]: in function 'setCameraPosition' /game_minimap/minimap.rsx:199: in function </game_minimap/minimap.rsx:192> Lua Call Stack: [0] [C++]:-1 -- setCameraPosition [C++] [1] /game_minimap/minimap.rsx:199 -- <unknown> [Lua]
  18. In RoTS Got max danger on standard mob and 1 less on enraged version, and anyway it prioritizes enraged one. Got setted 1 not 1+ this can be reason?
  19. local healthToCast = 60 local manaToCast = xx local range = x local monsterquantity = x local spellToCast = "exori" local player = g_game.getLocalPlayer() if g_game.isAttacking() and player:getHealthPercent() >= healthToCast and player:getManaPercent()>= manaToCast and #g_game.getMonstersAround(range) >= monsterquantity then g_game.talk(spellToCast) sleep(900, 1200) end auto(100)
  20. Danger lvl in targeting doesn't work, seems for now priority of targeting base only on list position.
  21. Sorry for not complete description. from targeting: no movement, chase, reach, keep away for manual play no movement works great, it attack from targeting list and do all things and dont push/impact any movement but when Cavebot, no movement stops our character in place until have no target. Idea is that to follow cavebot nodes without any movement from targeting, but keep it's usage (i know i can have it in script, but try to keep target list up to date for different creatures, and with stop function in 1 place, it's why i base on "isatacking") you place great lure script on forum, but it's base on complete turn off targeting, which is ok (but prefer to keep attacking for ROTS Kidrain, any target cause cavebot to use one of previously setted option " no movement, chace, reach, keep away") 2 solutions: - add in cavebot to target but not apply any movement options - rename no movement to stop, add real no movement impact Hope now it's enough described
  22. Add function to ignore targeting why cavebot, insted of only turn off targeting, then in luring we can attack with aoe, and attack closest to keep do dmg (regen mana from hits)
  23. Hello, need script for follow player based on name, which do not disturb targeting, based on read send of position to move Something like: local toFollow = storage.followFriend local toFollowPos = {} local followMacro = macro(20, "follow target", function() local target = getCreatureByName(toFollow) if target then local tpos = target:getPosition() toFollowPos[tpos.z] = tpos end if player:isWalking() then return end local p = toFollowPos[posz()] if not p then return end if autoWalk(p, 20, {ignoreNonPathable=true, precision=1, ignoreStairs=false}) then delay(100) end end) addTextEdit("followfriend", storage.followFriend or "", function(widget, text) storage.followFriend = text end) onCreaturePositionChange(function(creature, newPos, oldPos) if creature:getName() == toFollow then toFollowPos[newPos.z] = newPos end end)
  24. With using F* keys there is no possibility without stop bot to write on chat, will be nice to have solution for that without stopping bot, or opening additional script
  25. Dont know if errors are after last update or because my new script. but yesterday log file got close to 20mb otclientbot.log
×
×
  • Create New...