EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Slash commands with OnPress, etc (https://www.eq2interface.com/forums/showthread.php?t=806)

Quib 01-23-2005 01:46 PM

Semi important discovery relating to OnEvents:
When you have an OnEvent property, all actions on the same line within the OnEvent execute in order from right to left. If you add line returns within the OnEvent, they go from top to bottom, with commands on individual lines (if you have more than 1 on some lines) still execute from right to left. Examples follow:

OnPress="x=3 x=2 x=1"
In this event, x would equal 3.

OnPress="x=3
x=2
x=1"
In this event, x would equal 1.

OnPress="x=3
x=2 x=1"
In this event, x would equal 2.

I think that's simple enough. Just adding to our knowledge base.

Quib

Deathbane27 03-02-2005 05:35 AM

UPDATE!

Getting commands like /say and /gsay to work:

OnPress="say='This is a test.' say='This is a test.'"

The two executes much match exactly, and you must do each execute twice.
So, for example, if you wanted to make a button on the player window that casted a ward and announced it (out of macro slots? :p), you would do something like this:

OnPress="gsay='Warding %t!' gsay='Warding %t!'
useability='Demonstration of Faith' useability='Demonstration of Faith'"



Bug to be aware of.

If you do a script with Anything=Somethingelse, and "Somethingelse" is a command, then you may have problems. Examples:

OnPress="mood='happy' mood='happy'"

OnPress="somevalue=(Some math thing that results in the number 2)"

The first will execute /happy instead of /mood happy because /happy is a command. No known way to work around this.

If you are in two or more chat channels, then the second script may give the message Usage: /tellchannel <channelname> <message> because it thinks you're trying to talk in the second chat channel (/2 Hello!). I'm not certain how to work around it or why it started showing up with math calculations a patch or two ago.

Drumstix42 03-02-2005 02:04 PM

Interesting...

Kosmos 03-02-2005 02:39 PM

Quote:

Originally Posted by Deathbane27
UPDATE!

Getting commands like /say and /gsay to work:

OnPress="say='This is a test.' say='This is a test.'"

The two executes much match exactly, and you must do each execute twice.
So, for example, if you wanted to make a button on the player window that casted a ward and announced it (out of macro slots? :p), you would do something like this:

OnPress="gsay='Warding %t!' gsay='Warding %t!'
useability='Demonstration of Faith' useability='Demonstration of Faith'"



Bug to be aware of.

If you do a script with Anything=Somethingelse, and "Somethingelse" is a command, then you may have problems. Examples:

OnPress="mood='happy' mood='happy'"

OnPress="somevalue=(Some math thing that results in the number 2)"

The first will execute /happy instead of /mood happy because /happy is a command. No known way to work around this.

If you are in two or more chat channels, then the second script may give the message Usage: /tellchannel <channelname> <message> because it thinks you're trying to talk in the second chat channel (/2 Hello!). I'm not certain how to work around it or why it started showing up with math calculations a patch or two ago.


The message that pops up in the other chat window.
I was also getting that message with my Performance Panel mod for a while.
I 'think' it was when I gave it a whole number value instead of a decimal value. But I'm not where I can test it. Once I had all the commands in the correct order and formated it seemed dissapeared. So you might try throwing in 2.0 instead of 2.


On Setting the mood.
For commands that set states. Like Mood, you might try a number instead of the text. mood="2.0" maybe it's some sort of indexed list that the command is interpreted by the chat windows, but not when you use the command through a script.


EDIT: Also... Perhaps social animations are boolean values? Since the macros like /dance are animations that start and stop. It's possible those are set to true or 0 or 1 and that starts the timer, it runs out and the value is reset to false.

The moods might work the same way?

happy = true and you stay happy, since it's not a timed animation.

or mood.happy=enabled.

Kosmos 03-04-2005 03:28 PM

Quote:

OnPress="somevalue=(Some math thing that results in the number 2)"

The first will execute /happy instead of /mood happy because /happy is a command. No known way to work around this.

If you are in two or more chat channels, then the second script may give the message Usage: /tellchannel <channelname> <message> because it thinks you're trying to talk in the second chat channel (/2 Hello!). I'm not certain how to work around it or why it started showing up with math calculations a patch or two ago.

I just had some real fun with this! Check the release section for the MainHUD.PerformancePanel mod for more details.

But this main thing is that if you are working with numbers on OnEvents.
Always. Always. Use Decimals. If you use decimal values you will not get the error in your chat window. It was causing some really freaky behavior with some things that was very hard to figure out. Some of the numbers would work and some wouldn't.. I tried switching the ones in my file that were causing the errors to decimal number, but that wouldn't fix the problem.
like r_light_priority=1 to r_light_priority=1.0 But that didn't fix it.
The reason was because there were OTHER numbers in the Event that would cause the error then. Once I changed ALL of them, the problem went away.

So, if you are getting those errors, throw a decimal in and you should be fine.

Deathbane27 03-04-2005 05:00 PM

Quote:

Originally Posted by Kosmos
So, if you are getting those errors, throw a decimal in and you should be fine.

Thanks for the tip!


All times are GMT -5. The time now is 07:05 AM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI