![]() |
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? |
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.
|
Quote:
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. |
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.
|
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.
|
Here, I made the plugin in less than three minutes... just so you can see how easy it is.
Code:
using System; |
Quote:
|
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.
|
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. |
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.
|
| All times are GMT -5. The time now is 07:42 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI