| View previous topic :: View next topic |
| Author |
Message |
Vodecca
Joined: 21 Feb 2010 Posts: 3
|
Posted: Sun Feb 21, 2010 4:21 pm Post subject: Just getting started, and have a couple of questions... |
|
|
I'm just poking around, but I do have a project in mind that I would like to work on. For now I am just working with the events and character and world filters to see what happens when I do certain things in the game.
I have a couple of questions:
1. Is there any sort of spell success/failure message event? The spell cast event fires at the start of a spell being cast and action complete (with a generic message) fires when I finish the spell. I've searched the forums and see some old posts referring to reading the chat window looking for keywords (fizzle, success, etc.), but is that really the only way to know if I successfully cast a spell? If anyone has an example in C#, that would be great!
2. Pretty regularly I see a ChangePlayer event with a type of Statistic and a stat of 125. Are these combinations documented somewhere?
Thanks for any info! |
|
| Back to top |
|
 |
Vodecca
Joined: 21 Feb 2010 Posts: 3
|
Posted: Sun Feb 21, 2010 11:23 pm Post subject: |
|
|
So, it looks like I can watch StatusMessage and ActionComplete...
This is observational (still hunting for documentation on some of these numbers):
StatusMessage type 1025 - could not cast (too low mana?)
StatusMessage type 1026 - fizzle
StatusMessage type 29 - busy casting (maybe busy in general)?
I have not seen a StatusMessage event for a successful cast, but if I watch for complete and flag failures that should be ok.
I believe I read AC is single threaded, which should mean I should not be able to get an ActionComplete out of order form an action started (correct?)
Thanks again for any help. |
|
| Back to top |
|
 |
simius

Joined: 11 Jun 2006 Posts: 33 Location: Sweden
|
Posted: Tue Feb 23, 2010 12:07 pm Post subject: |
|
|
Can always check for chatmessage with 'You cast'. Maybe not the best way... But thats the one i use, til i run in to any problems with it
Not sure with the thread question. sorry  _________________ -$imiu$- |
|
| Back to top |
|
 |
Vodecca
Joined: 21 Feb 2010 Posts: 3
|
Posted: Tue Feb 23, 2010 5:51 pm Post subject: |
|
|
| Do you have a c# example for how you are checking it....I assume you are capturing all text and triggering on "you cast" then popping that spell off your queue? |
|
| Back to top |
|
 |
simius

Joined: 11 Jun 2006 Posts: 33 Location: Sweden
|
Posted: Mon Apr 05, 2010 2:46 pm Post subject: |
|
|
Sorry for the very late reply, swapped Webbrowser and forgot to add this forum to favorites, so havent been in here for a while!
As i said before, this is most likely not the best way to do it, but I use it and this far it have worked good enough for me
I got a queue with the spells (id's) that i want to cast.
When im about to cast one of the spells, I got a string that i set to the current spell name.
then i use:
| Code: | void ChatMessage(object sender, Decal.Adapter.ChatTextInterceptEventArgs e)
{
if (GetIsBuffing() && e.Color.Equals(7) &&
e.Text.Contains("You cast " + mySpellToCheck))
{
myBuffQueue.Dequeue();
}
} |
To check if the spell is cast, if it is. I dequeue it, else i keep trying
The casting part i use a timer for.
Hope it helps and sorry for the late reply again! _________________ -$imiu$- |
|
| Back to top |
|
 |
Virindi-Inquisitor
Joined: 07 Dec 2005 Posts: 99
|
Posted: Mon Apr 12, 2010 11:40 am Post subject: |
|
|
| simius wrote: | | Can always check for chatmessage with 'You cast'. Maybe not the best way... |
This is also how VTank does it. However, this can cause problems if the user squelches magic. Here is my current list of spell result messages:
| Code: | SpellFailureMessages.Add(new Regex("^Your spell fizzled.$"));
SpellFailureMessages.Add(new Regex("^.* resists your spell$"));
SpellFailureMessages.Add(new Regex("^Target is out of range$"));
SpellFailureMessages.Add(new Regex("^You fail to affect .* because you are not a player killer!$"));
SpellFailureMessages.Add(new Regex("^You fail to affect .* because .* is not a player killer!$"));
SpellFailureMessages.Add(new Regex("^You fail to affect .* because beneficial spells do not affect .*!$"));
SpellFailureMessages.Add(new Regex("^.* is an invalid target.$"));
SpellSuccessMessages.Add(new Regex("^You cast .* on .*$"));
SpellSuccessMessages.Add(new Regex("^You .* due to casting .* on .*$"));
SpellSuccessMessages.Add(new Regex("^With .* you .* from .*$"));
SpellSuccessMessages.Add(new Regex("^With .* you .* to .*$"));
SpellSuccessMessages.Add(new Regex("^Critical hit! You .* .* for .* points with .*.$"));
SpellSuccessMessages.Add(new Regex("^You .* .* for .* points with .*.$"));
SpellSuccessMessages.Add(new Regex("^You cast .* and restore .* points of your .*.$"));
SpellSuccessMessages.Add(new Regex("^You cast .* on yourself and lose .* points of .* and also gain .* points of .*$"));
SpellSuccessMessages.Add(new Regex("^You have been teleported.$"));
SpellSuccessMessages.Add(new Regex("^You cast .* on .*, but the dispel fails.$"));
//All damage types
SpellKillMessages.Add(new Regex("^You knock .* into next Morningthaw!$"));
SpellKillMessages.Add(new Regex("^You obliterate .*!$"));
SpellKillMessages.Add(new Regex("^.* is utterly destroyed by your attack!$"));
SpellKillMessages.Add(new Regex("^.* catches your attack, with dire consequences!$"));
SpellKillMessages.Add(new Regex("^The deadly force of your attack is so strong that .*'s ancestors feel it!$"));
SpellKillMessages.Add(new Regex("^You smite .* mightily!$"));
SpellKillMessages.Add(new Regex("^You killed .*!$")); //Possibly strange
//Slash
SpellKillMessages.Add(new Regex("^.* is torn to ribbons by your assault!$"));
SpellKillMessages.Add(new Regex("^You cleave .* in twain!$"));
SpellKillMessages.Add(new Regex("^Your killing blow nearly turns .* inside-out!$"));
SpellKillMessages.Add(new Regex("^You split .* apart!$"));
//Bludge
SpellKillMessages.Add(new Regex("^The thunder of crushing .* is followed by the deafening silence of death!$"));
SpellKillMessages.Add(new Regex("^You beat .* to a lifeless pulp!$"));
SpellKillMessages.Add(new Regex("^.* is shattered by your assault!$"));
SpellKillMessages.Add(new Regex("^You flatten .*'s body with the force of your assault!$"));
SpellKillMessages.Add(new Regex("^You slay .* viciously enough to impart death several times over!$"));
//Pierce
SpellKillMessages.Add(new Regex("^.* is fatally punctured!$"));
SpellKillMessages.Add(new Regex("^.*'s perforated corpse falls before you!$"));
SpellKillMessages.Add(new Regex("^You run .* through!$"));
SpellKillMessages.Add(new Regex("^.*'s death is preceded by a sharp, stabbing pain!$"));
//Fire
SpellKillMessages.Add(new Regex("^You bring .* to a fiery end!$"));
SpellKillMessages.Add(new Regex("^.* is incinerated by your assault!$"));
SpellKillMessages.Add(new Regex("^.* is reduced to cinders!$"));
SpellKillMessages.Add(new Regex("^.*'s seared corpse smolders before you!$"));
//Lightning
SpellKillMessages.Add(new Regex("^Your lightning coruscates over .*'s mortal remains!$"));
SpellKillMessages.Add(new Regex("^Blistered by lightning, .* falls!$"));
SpellKillMessages.Add(new Regex("^Electricity tears .* apart!$"));
//Cold
SpellKillMessages.Add(new Regex("^Your assault sends .* to an icy death!$"));
SpellKillMessages.Add(new Regex("^Your attack stops .* cold!$"));
SpellKillMessages.Add(new Regex("^.* suffers a frozen fate!$"));
//Acid
SpellKillMessages.Add(new Regex("^.*'s last strength dissolves before you!$"));
SpellKillMessages.Add(new Regex("^.* is liquified by your attack!$"));
SpellKillMessages.Add(new Regex("^You reduce .* to a sizzling, oozing mass!$")); |
Note: the three categories exist because VTank infers from 'kill' type messages that it should ignore that monster. You may not need that.
Let me know if I missed any  _________________ Virindi Inquisitor - Thistledown
http://www.virindi.net/plugins |
|
| Back to top |
|
 |
|