![]() |
#1 |
Slash Commands
I am tring to learn how to create add-ons in the Rift API. I wanted to start with something simple, and started with slash commands. I thought it would be simple. I got my .toc file completed and I created the .lua file. In the .lua file I created two slash commands:
table.insert = Command.Slash.Register("hey") table.insert = Command.Slash.Register("heythere") Took me awhile to get this far, I was using eventTable instead of table.insert. Now I would like to add some function to the slash command. I was thinking of an emote that that says hello to the target. When I type /hey it will say "hello (target) how are you doing". Regards, Lildry |
|
![]() |
![]() |
![]() |
#2 |
Check out the Generic Addon for an example of creating slash commands
![]()
__________________
Lua Code:
|
|
![]() |
![]() |
![]() |
#3 |
Command.Slash.Register yields a table into which you can insert things.
Do not assign to table.insert, that way lies madness. x = Command.Slash.Register("foo") table.insert(x, { function, addon_name, name }) BTW, my LibGetOpt offers a way to get some of this done automatically for you, and get your function called with the command line arguments, parsed out for your convenience. |
|
![]() |
![]() |
![]() |
#4 |
Thanks for the information Aieny, I got the slash commands to function. I think I need to change the function to work a diffrent way. I am tring to create slash commands to make new emotes that are not in the game. For example I want to type /growl and have the emote say growls loudly at "target".
Seebs thanks for your imput going to check out your addon right now. I started using luapad and I like that one makes a lot easier to alt tabing out every few mins. |
|
![]() |
![]() |
![]() |
#5 |
Right now, we don't have any way to have an Addon communicate with other players, or execute any real commands. I'm sure that is coming, and you can at least get the groundwork setup for your Addon, but until we have access to use the /emote command, or something similar, you won't quite be able to finish. (just a heads up
![]()
__________________
Lua Code:
|
|
![]() |
![]() |
![]() |
#6 |
I see, guessing thats why I can only get the system to talk and can't say anything in chat. Ok I will move onto something else until we can use chat features.
|
|
![]() |
![]() |
![]() |
![]() | Riftui » Developer Discussions » Lua Help » Slash Commands |
«
Previous Thread
|
Next Thread
»
|
Thread Tools | |
Display Modes | |
|
|