EQ2Interface.com
Search Downloads


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

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 09-05-2007, 09:26 PM
scyllel scyllel is offline
A Brown Bear
 
Join Date: May 2005
Server: Antonia Bayle
Posts: 10
Default button to gsay and cast

I've been tweaking some existing mods to cast heals (not cures) on players in the group window. I can get most of the spells to fire off, but the one with a chat command is giving me grief. Does anybody see what my problem is? Am I even trying to approach this in the right way?

Code:
OnPress="target_none target_group_member 1 gsay=I'm stunned while I focus on healing %T. useability Focused Benefaction"
thanks,

Scyllel
Reply With Quote
  #2  
Unread 09-05-2007, 11:43 PM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Commands in a single line will be triggered from right to left.

Try something like this:

OnPress="target_none
target_group_member 1
gsay I'm stunned while I focus on healing %T.
useability Focused Benefaction"

Would you want to use a /target_previous command at the end there? You can see how I made cure buttons in a persona window here:
http://www.eq2interface.com/forums/s...7530#post57530
__________________

Visit Othesus World!
Reply With Quote
  #3  
Unread 09-06-2007, 10:52 PM
scyllel scyllel is offline
A Brown Bear
 
Join Date: May 2005
Server: Antonia Bayle
Posts: 10
Default

Thanks for your help Othesus. I actually used one of your mods for parts of my project. I get no love with the chat command though. If I include the line with the gsay command, nothing happens. Not even if I put the spell first. Sometimes it even takes two or three clicks to get the button to target. But if I omit the gsay line, then Bang, targeting works and the spell fires.

Do you know of any mods that are successfully using chat commands coupled with a useability command so I could peek at one that works. I'm really drawing a blank on this, and I don't have enough of my own experience to know what syntax works and what is doomed to fail.

I'm curious, if I use a /target previous in there, won't it revert back to none because of the /target none statement that starts it off? Of course I'm not sure the /target none is necessary, but everybody seemed to be using it.

Thanks

Scyllel
Reply With Quote
  #4  
Unread 09-07-2007, 08:44 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

If you want, just attach your xml file here and I'll look at it.

After a bit more testing I think your gsay command has to look like this:

gsay "I'm stunned while I focus on healing" Parent.Name.Text
__________________

Visit Othesus World!
Reply With Quote
  #5  
Unread 09-07-2007, 04:02 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

Yep, you need to put quotes around your gsay line.

The reason is that ' can act as a string delimiter -- in other words, its saying that starting there, everything is a string and since theres no closing version, the other lines are treated as strings and so not executed.

Adding those two " should solve your problems.
Reply With Quote
  #6  
Unread 09-10-2007, 10:36 PM
scyllel scyllel is offline
A Brown Bear
 
Join Date: May 2005
Server: Antonia Bayle
Posts: 10
Default

Thanks you guys. Now I've gotten it to say the first part properly, but I'm out of my league again when it comes to all the parent.name.text stuff.

any way, now it says:

I'm stunned while I heal parent.name.text

then it casts the spell.

I've tried:

gsay "I'm stunned while I focus on healing parent.name.text "

gsay "I'm stunned while I focus on healing" parent.name.text

gsay "I'm stunned while I focus on healing %T"

No love on any. I guess I'll have to look up some mods that have speech in them to get a better idea how to do that.

Thanks for your kind help while I try to learn this from the middle outward. I'll try again when I get back from my trip this week.

I've decided to take you up on your offer to look at the file Othesus. I think you might recognize some of it (since you wrote one of my sources for this little Frankenproject...)
Attached Files
File Type: xml eq2ui_mainhud_groupmembers.xml (46.0 KB, 411 views)
Reply With Quote
  #7  
Unread 09-11-2007, 12:35 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Ok, I looked at your xml file and I see where you have the buttons. The "parent" part of Parent.Name.Text makes the UI engine move back one level of the UI tree. You'll have to use more parents to get back up to the level that the Name object is.

From your xml file I think it needs to be:

<Button LocalTooltip="Focused Benefaction" Name="FocusedHealingButton" OnPress="target_none
target_group_member 0
gsay &quot;I&apos;m stunned while I focus on healing&quot; Parent.Parent.Parent.Name.Text
useability Focused Benefaction" Opacity="0.000" ScrollExtent="18,18" Size="18,18"></Button>
__________________

Visit Othesus World!
Reply With Quote
  #8  
Unread 09-17-2007, 09:16 PM
scyllel scyllel is offline
A Brown Bear
 
Join Date: May 2005
Server: Antonia Bayle
Posts: 10
Default

Thanks. I just got back from a trip and tested this. That was the ticket. Now that I understand the nested reference it seems such a trivial mistake. I was referencing the parent object which in the previous case was the button, but I needed to reference the target window which was up to more levels. Anyway, that one is working now. Thanks again.
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 08:32 AM.


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