Jump to content

Request Script


Recommended Posts

On 11/7/2020 at 11:23 PM, Lance Dance said:

And do you have a script to pause bot and play alert when BN is sending msg check??

auto(100)
if not g_game.isOnline() then return end
local messagesToDetect = {"[English]", "msgheck", "bot"} -- 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 checkBotMessage(name, level, mode, message, channelId, creaturePos)
  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, 5 do
          playSound("alarm.wav")
          sleep(1000)
        end
      end
      return
    end
  end
end

This version is working starting from beta 15

Link to post
Share on other sites
  • Replies 288
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

if g_game.isOnScreen("Wolf") then playSound("alarm.wav") sleep(2000) end auto(100)     I'll take a look at it

You can load the “Keep Target” script that is already included in the bot.   Keep soul at 100: local player = g_game.getLocalPlayer() if player:getSoul() ~= 100 then   g_game.talk("furie

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"

Posted Images

20 hours ago, Zelek said:

if not g_game.isOnline() then return end
local itemToUse = 3199
local items = {3411, 3043, 3412}
for v, item in pairs(g_game.getLocalPlayer():getItems()) do
  for j, l in pairs(items) do
  	if item:getId() == l then
      g_game.useItemOnPosition(itemToUse, item:getPosition())
      sleep(1000)
    end
  end
end
auto(500)

 

 

Unfortunately this one is not working 😕 I'm not sure why. There is no error message, It just doesn't do anything. I have check and i have both itemToUse and items in my bp and it just doesn't do anything.

Link to post
Share on other sites
52 minutes ago, wildbrood said:

There is a Script for alarm when a specific monster appear?

if g_game.isOnScreen("Wolf") then
  playSound("alarm.wav")
  sleep(2000)
end
auto(100)

 

 

3 hours ago, Lance Dance said:

 

Unfortunately this one is not working 😕 I'm not sure why. There is no error message, It just doesn't do anything. I have check and i have both itemToUse and items in my bp and it just doesn't do anything.

I'll take a look at it

  • Like 2
Link to post
Share on other sites
18 hours ago, dragusioo said:

if possible need script for walking to effect, i mean if effect is on the screen, my character will try to stand on that tile, this effect dont have id so i dont know how to write it or its even possbile, maybe if we have option " specifed color is on the screen ", thanks

I've already stated multiple times that anything about reading the map (items on the ground/effects/whatever) is not possible right now. It will be added after we are past the beta.

Link to post
Share on other sites

Hello, Can you give script for best choose of target for spell droped on mob "getBestTargetSelection ()" (eventualy only if x mobs  around our target)?

- we got g_game.getMonstersAround for positioning it from our position

Can we also have something like  "g_game.getMonstersAroundTarget"

Link to post
Share on other sites

hello i am looking for 2 scripts one of them is to turn targeting off when 1-3 monsters is around and turn it on when there is 3-6 monsters around.( ive tried to make it on targeting it just lure X amount of mobs kill one and moves on)
another one is to detect a specific message on screen if text on screen "Using one of 100 half senzu beans..." i would like it to play alarm 
Thanks in advance 😄

Link to post
Share on other sites
21 hours ago, Msgsanta said:

Hello, I'm looking for a script that will scroll my waypoints as the character stands in place until he moves!!!!!!!

 

auto(500)
local idleTimeThreshold = 30000 -- time in milliseconds to consider character being stuck
if not g_game.isAttacking() and g_game.getIdleTime() >= idleTimeThreshold then
  nextWpt()
  sleep(1000)
end

 

Link to post
Share on other sites
39 minutes ago, victinhods said:

some action to turn off cavebot only?

i will create a perfect Lure mode...

some like .... 3 monster or more = Cavebot Off

0 monster in screen... turn on cavebot again

local monstersToStop = 3
local monstersToResume = 0
local disableTargeting = false -- set to true to disable targeting between the lures and false otherwise
if luring == nil then luring = true end
if luring and #g_game.getMonstersAround(6) >= monstersToStop then
  setOption("Cavebot/Enabled", "false")
  setOption("Targeting/Enabled", "true")
  luring = false
elseif not luring and #g_game.getMonstersAround(6) == monstersToResume and #g_game.getMonstersAround(6) < monstersToStop then
  luring = true
  setOption("Cavebot/Enabled", "true")
  if disableTargeting then
    setOption("Targeting/Enabled", "false")
  end
end
auto(100)

 

Link to post
Share on other sites
On 11/10/2020 at 12:52 PM, Zelek said:

if not g_game.isOnline() then return end
local messageToDetect = {"msgheck", "bot"}
local lastMessage = g_game.lastTalkMessage().message
if not lastMessage then return end
for v, k in pairs(messageToDetect) do
  if string.find(lastMessage, k, 1, true) then
    setOption("Global/BotPaused", "true")
    g_game.lastTalkMessage().message = ""
    for i = 1, 5 do
      playSound("alarm.wav")
      sleep(1000)
    end
  end
end
auto(50)

 

 

Well. This one doesn't work. At least not on DBL. I got banned today :c I was in front of the PC, doing something else, so its not like I haven't heard the alarm or something 😕

  • Sad 1
Link to post
Share on other sites
  • 2 weeks later...
On 12/11/2020 at 5:50 AM, Zelek said:

It’s already included in the bot by default. Scripts->Hotkeys->Toggle Pause.lua

if getOption("Global/BotPaused") == "true" then 
    setOption("Global/BotPaused", "false")
else
    setOption("Global/BotPaused", "true")
end

 

 how to use on HK pausebreak :

Link to post
Share on other sites
On 12/14/2020 at 1:25 AM, aline said:

if getOption("Global/BotPaused") == "true" then 
    setOption("Global/BotPaused", "false")
else
    setOption("Global/BotPaused", "true")
end

 

 how to use on HK pausebreak :

Double click on the "<no key>" cell and press the button you want to be assigned.

Sometimes it doesn't work correctly so your best bet is to restart the bot.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...