![]() |
To send a tell
I initially sent this post to "help" section, but nobody answered. May be I 'll get answer here.
Let's say I want to add a "Send tell" button to the target window. Is there a command to send a tell to a player ? And another question, I was trying to add "Invite" button to friends page of the community window. How I would get the name of the selected player? Thank you. |
UI "commands" are the same as in game, so the command for sending a tell is, well, "tell". :)
Doesn't the community window already have an invite button? At least for the search results I'm fairly certain that it does. Otherwise you could make one yourself. Get the friend's name from the list's SelectedItem. The format is hopefully defined in some template file (can't check, am at work), telling you which parameter contains the name. Grab the name and send it to the command line (command is "beginchatinput"). Happy modding! :D |
The friends list actually shows up in one of those dreaded Table things. There's a DataSourceContainer with three DataSources, one for Name, one for Location, and one for Notes. It might be possible to get the Name out of a Table, since it has a SelectedRow property. But it gets tricky because the Table can be sorted by clicking on the Header.
Hmm, after looking at the Community window I have a couple ideas to try with my tracking window kludge when I get a chance. I used a Dropdownbox to get into the DataSource there. |
Thank you very much for the fast answer. There is no invite or tell buttons on the friends page, only on search page.
Command "beginchatinput" is a piece that I was missing, but there is still something wrong. When I add event OnPress : beginchatinput tell namehere it works, but line in the doesnt starts from '/' and it just says it in antonican. When I try beginchatinput /tell namehere it just doesnt do anything. But anyway I am much closer now ) |
Try
OnPress="beginchatinput '/tell ' ## NAMEHERE" Or maybe you need to put it like this (can't remember): OnPress="ARG='/tell ' ## NAMEHERE beginchatinput (ARG)" |
The real problem with grabbing the name is I don't know if there's any way to get it out of the Table directly. In a Dropdownbox you can get data from SelectedItem.Datatype but I don't know if there's any equivalent for Tables.
Maybe we can ask Zonx to request this for us. ;) |
finally managed to make it work.
The OnPress line is pretty simple: beginchatinput "/tell %t " That enough to start tell to a target. Actually it plays line in chat - /tell %t yourtexthere, but it sends to your current target. It works better then "/tell parent.Name2.LocalText" because if name has prefix, like "hunter", first variant still works. Thanks again for you help ) |
That's true for the target. For using names from the community window list you'll need the more complicated notation. And mine was the format you would write in the XML, I never use UIbuilder for that. ;)
|
1 Attachment(s)
Thanks for Othesus, found out how to add "Invite" and "Tell" buttons to friends page. I wasnt able to take the value from the table, so I add dropdown connected to the name datasourse.
If somebody interested, here is the code. But the styles pretty messed up, so to make it work properly on your computer could take some additional efforts. |
1 Attachment(s)
enhanced version with additional files needed.
|
| All times are GMT -5. The time now is 12:29 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI