Script: AI raid timer

Post Reply
User avatar
Hyde
Hyde!
Posts: 3477
Joined: Thu Apr 20, 2006 5:26 am

Script: AI raid timer

Post by Hyde »

Edited by Hyde on 2017-02-03 to add an entirely new version

Useful for timing the waves of an AI raid, be it an org raid or a farm raid. The waves drop at the same interval either way.

The code is all there below INCLUDING the instructions on how to use it. In other words you should be able to figure out how to use it from what I've already written in the code comments.

Copy and Paste the ONE of the code areas below, alone, into an AO script (\program files\funcom\anarchy online\scripts\aitimer) and away you go.

Invoke the script via "/aitimer [botname]" where [botname] is the name of a Bebot you have permissions to use.

For AP use "/aitimer bobsan" (/macro aitimer /aitimer bobsan). GoA can use "/aitimer westap", 1024 can use "/aitimer hrtz", etc.

NEW Version 2 ... Script sends !timers to a bot and then halts, so that you can use other scripts while raiding and see Shields notices in orgbot.

Code: Select all

# aitimer - Doctorhyde@RK2 - v2.20170202.1
# Monitors the time during an AI raid so you know when each wave is done. 

# This script is DIFFERENT, it sends !timer commands to a bebot so that
# you can execute other scripts without losing your timer. It will also 
# set a !ptimer for raising shields that will broadcast to the org of the 
# bebot so that you can get a reminder even when you have switched to an alt
# to raise shields.

# It also makes use of !timer [classes] to lower spam on public timers
# while giving you a countdown on waves :)

# I recognize this will be duplicated some by the AlienRaid timers
# that our bebot automatically uses. I need to run it a time or two to remove
# duplicated stuff. But this also means it works for bots that don't 
# use that module. 

# This script does NOT send any text directly to you. If dual/multiboxing
# you'll have the best luck using this script on the toon you're watching 
# most since it won't allow you to send chat to a local/team channel to 
# see it on all toons. 

# invoke this script with the name of the bot you are setting timers on
# EXAMPLE:
# 	/aitimer Botname
# (will send the timers to a bot named ... wait for it ... "Botname")
# For ease of use put this in a macro (examples):
# 	/macro RAID /aitimer Botname

# Start the script exactly when you drop the shields. 
# Any delay will mean the timer will be slightly off. 
# ( I usually start this RIGHT BEFORE I use the disable button )

# there is a 2 second delay between each /tell to the bot
# to avoid lagging/spamming warnings. The timers are adjusted for those numbers

/text PUSH THE BUTTON ... timers are about to be sent 
/text ... WAIT 27 seconds to run any scripts
/text NOTE: if you forgot to push the button, remove your private timers
/text       via /tell %1 !timers and the public timers
/text       via /tell %1 !ptimers
/delay 2500
# aliens target city after 3:20
/tell %1 !timer LowSpam 3:18 AI timer: City Targeted ... Wave 1 starts 80sec later
/delay 2000
# wave 1 starts 5 minutes after shields down
/tell %1 !timer Countdown 4:56 AI timer: Wave 1
/delay 2000
# wave 2 starts 2.5 minutes after wave 1
/tell %1 !timer Countdown 7:24 AI timer: Wave 2
/delay 2000
# all further waves start 2 minutes after previous
/tell %1 !timer Countdown 9:22 AI timer: Wave 3
/delay 2000
/tell %1 !timer Countdown 11:20 AI timer: Wave 4
/delay 2000
/tell %1 !timer Countdown 13:18 AI timer: Wave 5
/delay 2000
/tell %1 !timer Countdown 15:16 AI timer: Wave 6
/delay 2000
/tell %1 !timer Countdown 17:14 AI timer: Wave 7
/delay 2000
/tell %1 !timer Countdown 19:12 AI timer: Wave 8 -GENERAL in 2 minutes-
/delay 2000
/tell %1 !timer Countdown 21:10 AI timer: -GENERAL- ... good luck with drops!
# the next 2 commands are PUBLIC timers unless you change the !ptimer to !timer
# this way you and org can see shield notices
/delay 2000
/tell %1 !ptimer LowSpam 59:38 AI timer: %m ... please make sure the shield is raised
#/delay 2000
#/tell %1 !ptimer LowSpam 1:59:36 AI timer: Shields can be lowered for another AI raid
/delay 1000
/text DONE setting timers, good luck
/text to see current timers, just:
/text /tell %1 !timers
OLD version 1 with Mophro's edits ... uses chat channels but can be halted if another script is run:

TIP: Executing another script during the time that this script is active (it will be active for up to an hour) will abort this script. No way to avoid that. No way to restart it in the middle. MACROs will not abort the script, but scripts will.
TIP: That's a handy thing though. Create a script called "abort" with 1 line ("/delay 1"). That can stop this script in case you fire it off at the wrong time or in the wrong place. It will abort any script you might be running that you need to stop.

Code: Select all

# aitimer - Doctorhyde with fixes by Mophro - v1.20161123.2
# Monitors the time during an AI raid so you know when each wave is done. 
#
# Start the script exactly when you drop the shields. 
# Any delay will mean the timer will be slightly off. 
# ( I usually start this THEN press the disable button )
#
# ... If you do not specify which group to send to via arguments (see below)
#     then it will send to your current channel. 
#
# 1: Send to your current channel:
#     /aitimer
#
# ... If you're going to send to a specific channel:
#       %1 = the command to use (ie, /tell, /group, /vicinity, /shout, etc)
#     If using a command that requires a target (like /tell) then use up to 9 words:
#       %2 = the channel to send to IF needed (empty for /shout, /tell, etc)
#     Example: /aitimer /group RAIDBOTNAME
#     Example: /aitimer /tell PLAYERNAME
#
# 2: Send to ONLY yourself:
#     /aitimer /text
#
# 3: Send to your team:
#     /aitimer /group team
# 
# 4: Send to your org (careful with this :P ):
#     /aitimter /o
#
# 5: Shout to everyone nearby (careful here too): 
#     /aitimer /shout
#
# For ease of use put this in a macro (examples):
#     /macro RAID /aitimer
#     /macro RAID /aitimer /text
#     /macro RAID /aitimer /group team 
#     /macro RAID /aitimer /o
#     /macro RAID /aitimer /tell PLAYER
#     /macro RAID /aitimer /shout 
%1 %2 <font color="yellow">AI timer:</font> Shields lowered, landing in 5 minutes, can raise in 1 hour
/delay 200000
%1 %2 <font color="yellow">AI timer:</font> City targeted, landing in 1min 40sec
/delay 100000
%1 %2 <font color="yellow">AI timer:</font> Wave 1, next in 2.5 minutes, General in 18.5 minutes.
/delay 150000
%1 %2 <font color="yellow">AI timer:</font> Wave 2, all following take 2 minutes
/delay 120000
%1 %2 <font color="yellow">AI timer:</font> Wave 3
/delay 120000
%1 %2 <font color="yellow">AI timer:</font> Wave 4
/delay 120000
%1 %2 <font color="yellow">AI timer:</font> Wave 5
/delay 120000
%1 %2 <font color="yellow">AI timer:</font> Wave 6
/delay 120000
%1 %2 <font color="yellow">AI timer:</font> Wave 7
/delay 120000
%1 %2 <font color="yellow">AI timer:</font> Wave 8, General in 2 minutes, Get Ready Now!
/delay 120000
%1 %2 <font color="yellow">AI timer:</font> Wave General, bots please.
/delay 2190000
%1 %2 <font color="yellow">AI timer:</font> Don't forget to raise shields.
User avatar
Chrisax
President
Posts: 23045
Joined: Wed Apr 19, 2006 1:08 pm

Post by Chrisax »

:D Nice work!
Rulzern
King Size Leet
Posts: 681
Joined: Fri Jul 07, 2006 11:17 am

Post by Rulzern »

Very nice indeed! :D
User avatar
Mophro
Giant Leet
Posts: 943
Joined: Thu Apr 20, 2006 7:44 pm
Location: The Netherlands
Contact:

Re: Script: AI raid timer

Post by Mophro »

Necro!
I used this script again, there were some minor problems with a few font tags.
Thanks again for the nice Script Hyde!

(EDIT by Hyde ... see top post for Mop's edited version ... version 1 is that script ... version 2 will send to a bot instead)
Mophro - man of few words - word!
Pass the salt please.
User avatar
Hyde
Hyde!
Posts: 3477
Joined: Thu Apr 20, 2006 5:26 am

Re: Script: AI raid timer

Post by Hyde »

Cleaned up thread, made a new version.

See top post for the redo. Old script still available in top post as "OLD version 1".
User avatar
Hyde
Hyde!
Posts: 3477
Joined: Thu Apr 20, 2006 5:26 am

Re: Script: AI raid timer

Post by Hyde »

Version 2 example outputs:

/aitimer bobsan wrote:PUSH THE BUTTON ... timers are about to be sent
... WAIT 27 seconds to run any scripts
NOTE: if you forgot to push the button, remove your private timers
via /tell bobsan !timers and the public timers
via /tell bobsan !ptimers
To [bobsan]: !timer 3:18 AI timer: City Targeted
[Bobsan]: Timer AI timer: City Targeted with 00:03:18 runtime started!
To [bobsan]: !timer Countdown 4:56 AI timer: Wave 1
[Bobsan]: Timer AI timer: Wave 1 with 00:04:56 runtime started!
To [bobsan]: !timer Countdown 7:24 AI timer: Wave 2
[Bobsan]: Timer AI timer: Wave 2 with 00:07:24 runtime started!
To [bobsan]: !timer Countdown 9:22 AI timer: Wave 3
[Bobsan]: Timer AI timer: Wave 3 with 00:09:22 runtime started!
To [bobsan]: !timer Countdown 11:20 AI timer: Wave 4
[Bobsan]: Timer AI timer: Wave 4 with 00:11:20 runtime started!
To [bobsan]: !timer Countdown 13:18 AI timer: Wave 5
[Bobsan]: Timer AI timer: Wave 5 with 00:13:18 runtime started!
To [bobsan]: !timer Countdown 15:16 AI timer: Wave 6
[Bobsan]: Timer AI timer: Wave 6 with 00:15:16 runtime started!
To [bobsan]: !timer Countdown 17:14 AI timer: Wave 7
[Bobsan]: Timer AI timer: Wave 7 with 00:17:14 runtime started!
To [bobsan]: !timer Countdown 19:12 AI timer: Wave 8 -GENERAL in 2 minutes-
[Bobsan]: Timer AI timer: Wave 8 -GENERAL in 2 minutes- with 00:19:12 runtime started!
To [bobsan]: !timer Countdown 21:10 AI timer: -GENERAL- ... good luck with drops!
[Bobsan]: Timer AI timer: -GENERAL- ... good luck with drops! with 00:21:10 runtime started!
To [bobsan]: !ptimer LowSpam 59:38 AI timer: Goraud ... please make sure the shield is raised
[Bobsan]: Timer AI timer: Goraud ... please make sure the shield is raised with 00:59:38 runtime started!
To [bobsan]: !ptimer LowSpam 1:59:26 AI timer: Shields can be lowered for another AI raid
[Bobsan]: Timer AI timer: Shields can be lowered for another AI raid with 01:59:26 runtime started!
DONE setting timers, good luck
to see current timers, just:
/tell bobsan !timers
PRIVATE timers ... /tell bobsan !timers wrote:Timers for Bobsan:

Timer AI timer: City Targeted has 00:02:53 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 1 has 00:04:33 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 2 has 00:07:03 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 3 has 00:09:03 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 4 has 00:11:03 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 5 has 00:13:03 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 6 has 00:15:03 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 7 has 00:17:04 remaining. Owner: Goraud [DELETE]
Timer AI timer: Wave 8 -GENERAL in 2 minutes- has 00:19:04 remaining. Owner: Goraud [DELETE]
Timer AI timer: -GENERAL- ... good luck with drops! has 00:21:04 remaining. Owner: Goraud [DELETE]
PUBLIC timers ... /tell bobsan !ptimers wrote:Timers for Bobsan:

Timer AI timer: Goraud ... please make sure the shield is raised has 00:59:31 remaining. Owner: Goraud [DELETE]
Timer AI timer: Shields can be lowered for another AI raid has 01:59:21 remaining. Owner: Goraud [DELETE]
Output from start through Wave 1 (wave 2+ will show same countdowns, PUBLIC timers will NOT show countdowns):
Tells from bot wrote: [Bobsan]: Timer AI timer: City Targeted ... Wave 1 starts 80sec later has one minute left!
[Bobsan]: Timer AI timer: City Targeted ... Wave 1 starts 80sec later has 30 seconds left!
[Bobsan]: Timer AI timer: City Targeted ... Wave 1 starts 80sec later has finished!
[Bobsan]: AI timer: Wave 1 [--------> 5 <-------]!
[Bobsan]: AI timer: Wave 1 [--------> 4 <-------]!
[Bobsan]: AI timer: Wave 1 [--------> 3 <-------]!
[Bobsan]: AI timer: Wave 1 [--------> 2 <-------]!
[Bobsan]: AI timer: Wave 1 [--------> 1 <-------]!
[Bobsan]: AI timer: Wave 1 [--> GO GO GO <--]!
User avatar
Hyde
Hyde!
Posts: 3477
Joined: Thu Apr 20, 2006 5:26 am

Re: Script: AI raid timer

Post by Hyde »

Tested v2 fully today. Worked well.

Assuming I'm right that it is 2 hours from dropping shield to raising. Only part I'm still waiting for confirmation on.

Ankari ... meh ...
User avatar
Hyde
Hyde!
Posts: 3477
Joined: Thu Apr 20, 2006 5:26 am

Re: Script: AI raid timer

Post by Hyde »

Commented out the last timer command since city being available again depends on raising shields exactly on time, and Bobsan handles that kind of notification great.

He actually duplicated the timers with the City Raid module almost identically. But it wasn't super spammy and tells me the script itself is pretty much on target.
User avatar
Mophro
Giant Leet
Posts: 943
Joined: Thu Apr 20, 2006 7:44 pm
Location: The Netherlands
Contact:

Re: Script: AI raid timer

Post by Mophro »

Just tested the script, works like a charm.
The !cd is a nice touch.
Be sure to start the script first then after that lower the shield.
Most excelent Hyde! Thanks :).
Mophro - man of few words - word!
Pass the salt please.
Post Reply