Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script pause for x seconds
#1
good night friends, I need a script that if he can't walk, in which case he stays still for 10 seconds, he pauses bot and emits alert.
if you can, it will be interesting if he can't move to the next waypoint, he would have to stop and not try to start all the waypoints again, imagine a gm creating a barrier preventing you from moving forward, the bot goes and comes back where it's already been , and strange ne.

this one doesn't work for me, because there are times when he tries to go to the waypoint and it bugs then he already pauses the bot doesn't want to, I just want it if he stays 10 seconds without being able to move.
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#2
Hello.

Please, be careful about which forum/section you are posting. You are using Kasteria OTBot but posted in the Classitibia Bot section. Bots can have specific functions that don't exist in the other, so I could spend time developing the script for bot X using functions that only exist in it but would not be useful, because you need to use it in bot Y.[/b]

Pause Bot pauses everything, including Persistents except those that you disable "Pause on Pause Bot?".

Pausing Bot while a GM is trying to block you will not stop you from being banished. In fact, this is more likely to prove you're a botter. xD
Maybe would be better to just play sound/flash instead of pause bot OR also say a message instead of just pausing bot.

1. If you just wanna check how long you are standing still on sqm sqm then use Alerts -> Stand Time. Then use a Persistent to check for how long Bot is paused and unpause it.

2. If you wanna check if you Bot stucked while trying to reach a waypoint then use Cavebot -> Unreachable Skip -> Play Sound & Flash client or "Pause Bot". Then use a Persistent to check for how long Bot is paused and unpause it.

3. A combination of both, check for message "there is no way" and if you are standing still on sqm sqm for more than 10s. That doesn't means this will trigger only if you are actually standing on sqm due to being trapped or so, for example: you stand on same sqm attacking and looting multiple creatures for 12 seconds then after killing all of it, bot tries to walk and receives "There is no way" then the script will be triggered. I recommend you to test it before leaving it afk.
local StuckTime = 10000 -- In milliseconds. How long standing in same sqm?

if statusmessage() == 'There is no way.' and standtime() >= StuckTime then
     playsound('default')
     flashclient()
end

An alternative to the script above, which also sends messages but only triggers if the script didn't been triggered in last X milliseconds to avoid spamming message or so.
local Messages = { '?', 'sup?', '??', 'hello?' } -- Random messages to say.
local StuckTime = 10000 -- In milliseconds. How long standing in same sqm?
local TriggerTime = 10000 -- In milliseconds. How long since last time script was triggered? Only triggers if the script didn't been triggered in last X milliseconds to avoid spamming message or so.


if statusmessage() == 'There is no way.' and standtime() >= StuckTime and (LAST_TRIGGER_TIME == nil or (runningtimems() - LAST_TRIGGER_TIME) >= TriggerTime) then
     pausebot(true)
     say(random(1, #Messages))
     playsound('default')
     flashclient()
     LAST_TRIGGER_TIME = runningtimems()
end
Reply

#3
tanks !
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016