EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 03-05-2009, 05:42 AM
Mayve's Avatar
Mayve Mayve is offline
Snoogans!
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Oct 2005
Server: Befallen
Posts: 53
Default OnPress and unknown commands

Hello, I am wondering if OnPress can be used with unknown commands?

Specifically, I would like to achieve the result of typing "/act end" only through OnPress.

When I try it, it doesn't work. I even made a txt file with just "act end" and tried OnPress="do_file_commands (txt file)" and that didn't work as well. I added a line to the txt file to make it write "test" in chat and tried it again and get the word test displayed but not the "Unknown command: act end" that is usually displayed by typing "/act end" or pressing the macro on my hotbar that types it for me.

Any solutions or ideas how to get this to work or is not possible since it's not a real command?
Reply With Quote
  #2  
Unread 03-05-2009, 05:55 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

It's not possible, unrecognized scripted commands do not produce any error messages. Best you can do is put it to the chat input line via beginchatinput and then press Enter yourself.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #3  
Unread 03-05-2009, 06:15 AM
Mayve's Avatar
Mayve Mayve is offline
Snoogans!
Premium Member
Interface Author - Click to view interfaces
 
Join Date: Oct 2005
Server: Befallen
Posts: 53
Default

Quote:
Originally Posted by gm9 View Post
It's not possible, unrecognized scripted commands do not produce any error messages. Best you can do is put it to the chat input line via beginchatinput and then press Enter yourself.
Meh, that sucks. A horrible kink in an otherwise perfect ACT window lol.


EDIT:
Tried the beginchatinput method and it adds a space. I get "/act end " which ACT doesn't recognize so I end up having to hit Backspace and Enter. I'll have to decide if I like that or not over the alternative of going back to automatic encounter ending which has it's own kinks.

Last edited by Mayve : 03-05-2009 at 06:22 AM.
Reply With Quote
  #4  
Unread 03-05-2009, 06:28 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Yeah the space can't be helped either. Maybe just ask Aditu whether ACT can't be changed to recognize commands in chat, maybe via a plugin.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #5  
Unread 03-05-2009, 03:13 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

It would be simple for a plugin to initiate an ACT command. You would just need to handle this event to figure out if it has the chat text you want and then call this method to initiate the command. Since you're already forced into having a plugin... you could probably expand the UI to do more complicated things to ACT through the plugin.
Reply With Quote
  #6  
Unread 03-05-2009, 04:07 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

Here, I made the plugin in less than three minutes... just so you can see how easy it is.

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Advanced_Combat_Tracker;

namespace ACT_Plugin
{
	public class ParseForActEnd : IActPluginV1
	{
		public void InitPlugin(System.Windows.Forms.TabPage pluginScreenSpace, System.Windows.Forms.Label pluginStatusText)
		{
			ActGlobals.oFormActMain.OnLogLineRead += oFormActMain_OnLogLineRead;
		}

		void oFormActMain_OnLogLineRead(bool isImport, LogLineEventArgs logInfo)
		{
			if(logInfo.logLine.Contains("act end"))
				ActGlobals.oFormActMain.ActCommands("end");
		}
		public void DeInitPlugin()
		{
			ActGlobals.oFormActMain.OnLogLineRead -= oFormActMain_OnLogLineRead;
		}
	}
}
Most of the typing was actually done by Visual Studio Express and Intellisense auto-completing.

Last edited by EQAditu : 03-05-2009 at 04:09 PM.
Reply With Quote
  #7  
Unread 03-05-2009, 04:33 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by EQAditu View Post
Most of the typing was actually done by Visual Studio Express and Intellisense auto-completing.
lol, best comment ever. (but yeah, the autocompletion is really very useful)
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #8  
Unread 03-05-2009, 05:22 PM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

Awesome. I've been thinking about a better way to end combat in act for a bit, but getting it to understand the end command from a script was the hurdle. Basically what I'm thinking of is when the CombatIcon in the player window is hidden it ends act. Now I'll have to see if I can put it together when I have time this weekend.
__________________
Reply With Quote
  #9  
Unread 03-05-2009, 07:04 PM
EQAditu's Avatar
EQAditu EQAditu is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Permafrost
Posts: 256
Default

You're quite right. That would be a superior way of ending combat in some cases. More accurate than the timer method which is the most accurate when considering multi-encounter battles. If you're chain pulling, even a second of non-combat would split the encounters well enough. If there's no non-combat in-between encounters, why split the encounter to begin with. Which is the problem with EQ2 message ending.

Since the combat icon has its own DynamicData you could create a custom window to do it. The only inelegance is that you would have to have the user create a custom chat channel... or I suppose you could do something like I have and find an EQ2 command that accepts a parameter and echoes invalid parameters into the log file.
Reply With Quote
  #10  
Unread 03-05-2009, 07:32 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

You could simply script the creation of the chat channel, if you add the user name to the channel name you are just about certain to create a unique channel.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:32 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI