zakne11
-
Posts
60 -
Joined
-
Last visited
-
Days Won
8
Posts posted by zakne11
-
-
On 2/18/2021 at 2:26 PM, xcorek said:
Hey Zelek, I need 2 scripts.
1. barrier on if health 50%< /// barrier off if health 50%>
2. alarm if anyone on the vip list goes online
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
-
ROTS most of CC room2 and room3 task waypoints
- 4
-
5 hours ago, victinhods said:
Its possible some script to check task?
17/200 Monster Killeds -> Check this msg in Default Channel
Exemp: when 200/200 go to label "x" in cavebot
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
- 1
-
21 hours ago, asktheages said:
Hello!
Im very happy with your bot. Unfortunately i lack scripting skills. Thats why i ask for one.
I need a script that pauses every activity of the bot, when character leaves certain X Y box. If the character leaves it, script plays alarm. Also, after a little delay it presses a button (f1-f12). End.
To explain it better - if GM tp's me out of my respawn when i cavebot to another resp with same monsters, the bot will run ASAP to them. This is a sure ban, as human player would never act like this. He would stay and write some "??".
I had it on blackd back in the days. Thanks!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)
-
2 hours ago, lediv said:
if player on screen then type message on default. If he replies type another massage on default. and some pause delay with ~~10mins so that bot does not spam this. Is that script doable?
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 hours ago, victinhods said:
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)
-
2 hours ago, danielbhte said:
it didn't work for me
I wanted him to face the monster and use spell "exemple exori vis"
Turn you got posted previously, here i place condition for player detection
-
6 hours ago, danielbhte said:
turn the character in front of the monster and use X spell
if a player appears on the screen, stop using the spell
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 ...
-
4 hours ago, Lucyfer said:
Good Morning,
Dear Admin,
Please make two scripts for me:
1) Character will always stand face to monster(its very usefully on rots when play gohan and need to use masenko during bot),
you can take my long script few posts upper, and just adjust to rotation
-
7 hours ago, neelix said:
Hi, could you give me script for making targeting on / off ? I mean, when i use cavebot and made action, on 1sqm - targetnig = on, and second one targeting = on - to make lure
look on lure script on forum (works good)
-
22 hours ago, Rise said:
Could you explain me this script? Don't understand last lines when i put hotkeys for that much spells?
just got 6 attacking skills with different conditions
-
On 1/10/2021 at 2:20 PM, Rise said:
Better Turn to target.
And im lookin for one more script for attack spells only if there are monsters within 3 sqms
And script that attack with wave spell this side where is more monster in 8 sqms i mean like west are 3 monsters and east are coming 8, so it should turn to east and wave
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)
- 1
-
Bot close after any operations after ROTS new update (dx one)
Strange but seems opengl one works fine
-
2 hours ago, Msgsanta said:
it needs a script to lure monsters, but when the monster has 50%, it kills it before it disappears
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. -
use range from 3 to 8 bot will then keep 3 sqm distance together with keep away
-
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.
[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]
-
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? -
1 hour ago, Grotos said:
Could you add 2 conditions?
Like mana req and monster distance?
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)
- 1
-
Danger lvl in targeting doesn't work, seems for now priority of targeting base only on list position.
-
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 -
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)
-
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)
-
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
-
Dont know if errors are after last update or because my new script. but yesterday log file got close to 20mb
Request Script
in Lua scripts
Posted · Edited by zakne11