Please Help Button for /command`s
1 Attachment(s)
Hi,
i have a little Problem, i make a Button with a /command, like this Lua Code:
In the game now i press the button PullTimer. Now it is in chat /pull 6 and I would have to confirm with Enter. But I want if I click the button PullTimer the command /pull 6 is executed automatically. Iam new on lua so i hope everyone can help me with it. It would be very very friendly if someone could help me. Sorry for my Bad English. |
I assume /pull x is simply a text display alerting the group when the pull will start ? If so maybe what you need to use instead is ..
DEFAULT_CHAT_FRAME:AddMessage(text,r,g,b) We use this in nUI to display messages automatically such as for errors and information. However, if /pull x actually does something in the game play then unless there is a macro or script function equivalent there is unlikely to be an automated equivalent. |
I trying to execute the slash command, rather than just put the text in the editbox.
The commands are: /roll /readycheck /pull 6 |
If you're trying to call DBM's pull command from a button, you can use their slash function directly:
This will call the default 10 seconds: SlashCmdList.DEADLYBOSSMODSPULL()This will call the 6 seconds you want: SlashCmdList.DEADLYBOSSMODSPULL(6)Same with /break as well: SlashCmdList.DEADLYBOSSMODSBREAK()(break's number is in minutes) |
This is my Button:
Lua Code:
So i must insert your command here?: Lua Code:
I'm really a big beginner in the .lua area. I think my main.lua is not bad. but I'm not quite there :). |
Ahh, I see what you're doing there. Your buttons only open chat. Replace your OnClick handler with this:
Lua Code:
This is a simple way to do it. You can also do this for readycheck and roll as well, which are DoReadyCheck() and RandomRoll("1","100"). |
Ok Pulltimer works very nice now thx a lot.
Lua Code:
So now i must add the the other commands on the same place like: Lua Code:
But this dont work. |
It's just DoReadyCheck(), no SlashCmdList for that. The colored functions I mentioned are exactly how they are. You're also missing "elseif".
Lua Code:
|
Ahhhh ok i understand very very thank you i love you for the help.
|
All times are GMT -6. The time now is 01:28 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI