I'm interested in writing .NET caster scripts

eccentric

Active Member
Ranged combat for casters in raids and other scenarios is an enormous weakness of the existing scripts, because every single caster class I tried goes into a "Check Buffs" lockup where it refuses to do anything at all. Heck, GL running the beloved Illusionist against Trak even standing still in melee mode! Restarting the bot and the client does zero to fix this, and different combinations of checkboxes and options aren't any better. It has frustrated me to breaking point and I yell myself hoarse more at the bot than at the game itself.

I have few choices.

1) Abandon the product for uses other than crafting.
2) Disassemble EverQuest2.exe and build up my own bot program entirely.

But these are so much trouble I'd rather just quit the game first. Instead I'm requesting any and all information about how to get the .NET wrapper running for EQ2 so I can make a hobby of writing C# class scripts for it (OFC I would open-source them). I can't think straight in LavishScript, and the ${} syntax is so damn messy it isn't worth trying.

Thanks.
 

Pygar

EQ2Bot Specialist
Ranged combat for casters in raids and other scenarios is an enormous weakness of the existing scripts, because every single caster class I tried goes into a "Check Buffs" lockup where it refuses to do anything at all. Heck, GL running the beloved Illusionist against Trak even standing still in melee mode! Restarting the bot and the client does zero to fix this, and different combinations of checkboxes and options aren't any better. It has frustrated me to breaking point and I yell myself hoarse more at the bot than at the game itself.
You are doing something wrong. If it is running checkbuffs, its cause the conditions needed to enter combat have not happened yet. Once combat initiates checkbuffs is ignored unless you die.
 

eccentric

Active Member
Frequently it enters combat, chain casts offensively for a while, and then goes right back into Check Buffs without any range/position changes, and before the mob dies. God forbid a single-target buff recipient of the character should die, then all bets are off. And ACT running off the character's log is picking up everyone else's combat activity, so I'm at a loss as to the problem. But it happens as surely as the sun rises.

.NET, please.
 

Amadeus

The Maestro
Staff member
If I have some time over the holidays I'll try to write a couple of .NET samples using the wrapper. However, until then, you could look at the examples that are provided for ISXVG. The ISXVG and ISXEQ2 wrappers are very similar given that I designed both extensions to be almost the same.

And, pygar is right, if you have someone other than yourself listed as main assist, the bot will go into 'combat' as soon as that person goes into combat. The selection of 'main assist' and 'main tank' is VERY important to the bot.

I find it interesting that no one else seems to have issues with this particular thing. And, most people are using it without any knowledge of how any of it is programmed at all and wouldn't know the first thing about reverse engineering, lavishscript, or .NET.

My suggestion is to take the time to go somewhere with a group of characters and tweak around until you figure out what is not working properly and then find out why. Testing on a trakanon raid is not the best time. If things are working elsewhere and suddenly NOT on a trak raid ..then you probably have something going on with the range values, the MA/MT values, or something along those lines.
 

Amadeus

The Maestro
Staff member
Frequently it enters combat, chain casts offensively for a while, and then goes right back into Check Buffs without any range/position changes, and before the mob dies. God forbid a single-target buff recipient of the character should die, then all bets are off. And ACT running off the character's log is picking up everyone else's combat activity, so I'm at a loss as to the problem. But it happens as surely as the sun rises.
This would happen if the Main Assist were NOT in combat or did not have a mob targetted and/or was not attacking that target. The script assumes that whoever you have as MainAssist is going to be targetting and attacking whatever you are going to be attacking.

The other issue could be range -- if your MA or the target is out of the range you have set in the UI.


-----

With regard to .NET the wrapper is there included in the patcher and there are sample scripts in the repository for ISXVG that should be *easily* portable to isxeq2. No one has seen fit to do anything in .NET for EQ2, so you would be the first and will have to be the trailblazer if that's something in which you're interested.

However, the .NET Wrapper that's included in the patcher is fully compatable with visual studio intellisource browser and will allow you to see everything you need for documentation in that sense. Take a look at the ISXVG samples (there MIGHT be some basic ISXEQ2 sampels too) in the script repository.
 

Pygar

EQ2Bot Specialist
Trak has the line of site / distance issues from the model not rendering as I recall.

If the .Y check crept back in to ValidActor, then yes the bot is going to do crap all on a fight where the mob is 'in the floor'.
 

eccentric

Active Member
I find it interesting that no one else seems to have issues with this particular thing. And, most people are using it without any knowledge of how any of it is programmed at all and wouldn't know the first thing about reverse engineering, lavishscript, or .NET.

My suggestion is to take the time to go somewhere with a group of characters and tweak around until you figure out what is not working properly and then find out why. Testing on a trakanon raid is not the best time. If things are working elsewhere and suddenly NOT on a trak raid ..then you probably have something going on with the range values, the MA/MT values, or something along those lines.
A normal botted grind group is a very easy thing to set up when melee and whatnot are left on, and the character behavior is straightforward. Quirky at times depending on the regular maintenance of the script, but still straightforward. It's the ranged casting where I try to get too creative with the configuration, but with raid AE's being what they are, I really have no choice. In these cases I'm far less worried about positioning and very very concerned about the perfect spell cast sequence.
 

eccentric

Active Member
What function do I use to get the name of the currently casting ability?

Also, how do I safely perform a wait? Thread.Sleep( ) locks up the EQ2 client.
 
Last edited:

Amadeus

The Maestro
Staff member
The first question will require adding a few things to the wrapper -- I will probably have to do that when I get home. However, for reference, the lavishscript equivalent is:

Code:
${EQ2DataSourceContainer[GameData].GetDynamicData[Spells.Casting].ShortLabel

The second question I will let someone else answer. As far as I know you can't really do 'waits' with .NET ....you would have to design the entire bot to be "pulse based" (ie, a 'heart beat') ...then, when you wanted it to 'wait' or 'pause' you would set a boolean value that would cause that pulse to do nothing for however many pulses you wanted it to do nothing.

At least, that's my understanding.
 

wired203

Active Member
My understanding with Lavish is anything to sleep would cause it to hang the program as it locks the window to get info. There is some more info on that over at the lavish forums however.

You could do a heartbeat style for the whole program, or just do it for the current thread. Since the bot is just for your personal style you could create .net timers with the spells info and use a bool value.

Say you cast a spell that has a 30 second recast, you would start the timer with a value of 30000 I believe and set a bool of say icecometisready to false etc until the timer ran out and reset the bool to true.

C# timers are helpfull for a lot of different things, for sample code google C# progress bar and you can find some samples with that.
 

eccentric

Active Member
I found what I was doing wrong, I wasn't waiting for the next frame but instead looping too tightly, or waiting while the frame was locked, etc.
 

Valerian

ISX Specialist
The first question will require adding a few things to the wrapper -- I will probably have to do that when I get home. However, for reference, the lavishscript equivalent is:

Code:
${EQ2DataSourceContainer[GameData].GetDynamicData[Spells.Casting].ShortLabel
I'm pretty sure I wrapped the EQ2DataSourceContainer stuff in the wrapper as well... maybe I missed it?
 
Top Bottom