Dirge Sonic Barrier Script

sumoslim

Well-Known Member
I need some help in programming my dirge to use sonic Barrier.

Basically it is a 3 stoneskin buff that can go on anyone once they go under 50% health. Seems like eq2bot could check for that on the dirge script.
 

bob_the_builder

Well-Known Member
I need some help in programming my dirge to use sonic Barrier.

Basically it is a 3 stoneskin buff that can go on anyone once they go under 50% health. Seems like eq2bot could check for that on the dirge script.
You should check the original thread you started:

http://www.isxgames.com/forums/showthread.php?t=4231

That really describes the best way to do it, add it to eq2botcommander.

But if you really think you can set some logic then try something like this in the combat routine (Will cast it on the player that is lowest lower than 50% health):

Code:
declare temphl int local 1
declare barrier int local 0
 
if ${Me.GroupCount} > 1
{
	do
	{
		if ${Me.Group[${temphl}].ToActor(exists)}
		{
			if ${Me.Group[${temphl}].ToActor.Health}<100 && !${Me.Group[${temphl}].ToActor.IsDead}
			{
				if !${Me.Group[${temphl}].ToActor.IsDead} && ${Me.Group[${temphl}].ToActor.Health}<50 && ${Me.Group[${temphl}].ToActor.Distance}<=${Me.Ability[Sonic Barrier].Range}
					barrier:Set[${temphl}]
			}
		}
	}
	while ${temphl:Inc} <= ${Me.GroupCount}
	if ${Me.Ability[Sonic Barrier].IsReady}
		call CastSpellRange "Sonic Barrier" ${Me.Group[${barrier}].ToActor.ID}
}
 

sumoslim

Well-Known Member
Thanks a ton - I would put it in eq2botcommander. But it happens so fast to any character - that it is far better having eq2bot target and cast it.

Will test this tonight.

Does it matter where I put it in the script?
 

bob_the_builder

Well-Known Member
Well you need to put it in the combat_routine as a action or a function. Maybe even make a function and add the call to the heartbeat. It's your call where to put it, depends on how often and when it needs to be checked... all the time, before a CA, after the CA's ... *shrug* that's kinda the point I'm making is it depends on where you want it and what the conditions are for it to fire off...

Hope that helps some ...
 

sumoslim

Well-Known Member
Yeah see your point - how much does it slow down the script to have it checked each pulse? (which is what it should be)

This is why i want to get rhythmic and victorous working on the dirge script as part of the CA rotation and having them fire off one after the other (10s between) - as par tof the regular CA rotation. What would that script look like? How and where does eq2bot prioritize CAs/Spell rotations?

If I can figure that out I can do a great deal of refining in the scripts to make them as efficient as possible.
 

Kannkor

Ogre
Yeah see your point - how much does it slow down the script to have it checked each pulse? (which is what it should be)
A simple check each pulse won't slow anything down.

However, for anyone that doesn't do a lot of scripting, be VERY careful not to put serverchecks in a pulse. Doing that can lag an entire zone. If you aren't sure what is a serverside check, feel free to ask here. The easist way to test, is to echo the command in the console on a "fresh" character without a bot running.

For example: login a toon and do your command.

Here is an example for you to try.

echo ${Me.Ability[sprint].IsReady}
You will get NULL.
Wait 2 seconds, then do the exact same line again, and you will get TRUE.
(Or if you just sprinted, it will be FALSE).
A NULL generally means it is doing a server side check (there are many exceptions).
You want to be careful when doing this on a pulse, because you spam the server with requests and it bogs down the server. Back in the day I was able to take any zone I wanted, and give it 3-5 seconds of lag. Not just in my zone, on anyone (cross server) in that zone the same lag. Obviously it wasn't on purpose..
 

sumoslim

Well-Known Member
YIKES

Which means they(SOE) would be able to tell that it was you causing the lag as well?

How long is a pulse in ISX?

This would be asking the bot to check to see if anyone in the group is under 50% health every pulse.
Isn't that basically what the healer bots do every pulse?
 

Kannkor

Ogre
YIKES

Which means they(SOE) would be able to tell that it was you causing the lag as well?

How long is a pulse in ISX?

This would be asking the bot to check to see if anyone in the group is under 50% health every pulse.
Isn't that basically what the healer bots do every pulse?
hehe yes correct.. It was during this massive lag experience that Ama was able to track down that we were part of the lag issue, and I spent 2 days rewriting every function of mine that required it. To be honest, I don't know how anyone didn't get the axe cause of it. We had many scripts that were doing it. Either way.. Most if not all major scripts here have been fixed.

That's fine. Most bots check the following every pulse (that it isn't casting, and some even while it is casting).
To cure
To heal
To debuff
To nuke
To use clickies
etc etc.
I bet my bot has easily 500-1000 checks per pulse.
 

sumoslim

Well-Known Member
Script didn't work:
Code:
declare temphl int local 1
declare barrier int local 0
 
if ${Me.GroupCount} > 1
{
	do
	{
		if ${Me.Group[${temphl}].ToActor(exists)}
		{
			if ${Me.Group[${temphl}].ToActor.Health}<100 && !${Me.Group[${temphl}].ToActor.IsDead}
			{
				if !${Me.Group[${temphl}].ToActor.IsDead} && ${Me.Group[${temphl}].ToActor.Health}<50 && ${Me.Group[${temphl}].ToActor.Distance}<=${Me.Ability[Sonic Barrier].Range}
					barrier:Set[${temphl}]
			}
		}
	}
	while ${temphl:Inc} <= ${Me.GroupCount}
	if ${Me.Ability[Sonic Barrier].IsReady}
		call CastSpellRange "Sonic Barrier" ${Me.Group[${barrier}].ToActor.ID}
}
Could it be that I put the declare commands right above the script - instead of at the start of the whole file?
 

Kannkor

Ogre
Copy/pasting the error message would help..

But I will add this, you don't need to check the same thing twice.

You have this:
if ${Me.Group[${temphl}].ToActor.Health}<100 && !${Me.Group[${temphl}].ToActor.IsDead}

Then immediately after you have:
if !${Me.Group[${temphl}].ToActor.IsDead} && (.. etc..)

Code:
${Me.Ability[Sonic Barrier].Range}
That is a server call
And so is:
if ${Me.Ability[Sonic Barrier].IsReady}

The .Range may get cached.. but I don't use the cache so that's more of a question for Pygar/Amadeus. And unless Name to ID conversion gets cached (which it may) the .IsReady is definitely a server call.

Where are you putting this block of code? If it's not in its own function, then temphl never gets reset. So it goes up to 6 (or however many people in your group) on the first check, and never gets reset.
 

sumoslim

Well-Known Member
Ahh good point - this is the code I copied from Bob's post. I put it behind the check for rez part of the pulse.

I did find a dirge script already posted that has it working - in another thread. So this is a non issue at this point.

A couple things:
1. How do you copy stuff from the console - whenever i try to it just selects the pixels I mouse drag over and copies nothing.
2. Can you give me a brief walkthrough on where and how CA or spell casting orders are done in isx. I know that's a lot - but I really want to make the scripts do more dps (which is something i am REALLY good at as a player) but need some help with synax as a coder to make it happen. Once that happens lots of the scripts could have there casting orders changed and see great results.
 
Top Bottom