[Rom AddOn] Need some help.

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)

Moderators: lisa, rock5

Post Reply
Message
Author
bussdee
Posts: 37
Joined: Tue Apr 28, 2009 11:20 am

[Rom AddOn] Need some help.

#1 Post by bussdee » Mon Dec 07, 2009 1:59 am

Hi community!
I try to create an addon that will support my botting. (auto-answer, chat-status, ...)
Now i need some help:

1. how to create a GUI in "Runes of Magic".
I searched a lot at google and read some wow-guides, but i can`t get it to work.
Maybe someone can show me some simple GUI that i can lean from it ?!

For example, this is my simple AddOn.lua...

Code: Select all

function ChatScanner_OnLoad(this)
	this:RegisterEvent("CHAT_MSG_GUILD");
	this:RegisterEvent("CHAT_MSG_WHISPER");
        this:RegisterEvent("CHAT_MSG_SAY");
	wait(1)
	DEFAULT_CHAT_FRAME:AddMessage("|cff993333 >> Chat-Scanner|r |cffffffff: aktiviert.|r");
end; 

function GuildInvite_OnEvent(this, event) 
	if event == "CHAT_MSG_GUILD" then 
		s = arg1; if(string.find( s, "!tw") ) then arg1=arg1 .. "*scanned*"; InviteByName(arg4);
	end; 
	end;
end;

function wait(seconds)
  local start = os.time()
  repeat until os.time() > start + seconds
end
...what do i have to do with my AddOn.xml to create a button that opens a config-frame with a checkbox to activate/deactivate the invite-function (and/or a textbox for auto-answer) ???




2. How to scan whispers and autoanswer a status?
I try to change the code to auto-reply whispers with my status, but i can`t get it to work. Maybe can correct this too or give me some tips:

Code: Select all

function MyStatus_OnEvent(this, event) 
	if event == "CHAT_MSG_WHISPER" or
	   if event == "CHAT_MSG_SAY" then 
		s = arg1; 
                if(string.find( s, "!status") ) then 
                arg1=arg1 .. "*scanned*"; SendChatMessage( "ThisIsMyStatus", WHISPER, 0, (arg4) )
	        end; 
	   end;
        end;
end;


Thanks for any informations / help ! :oops:
"Erfahrung ist fast immer eine Parodie auf die Idee."
Johann Wolfgang von Goethe

User avatar
Administrator
Site Admin
Posts: 4863
Joined: Sat Jan 05, 2008 4:21 pm

Re: [Rom AddOn] Need some help.

#2 Post by Administrator » Mon Dec 07, 2009 3:39 pm

All of the graphical stuff is done through XML, not Lua. The only thing that is done through Lua is showing/hiding the frame and, potentially, dynamic information. You should check other addons for RoM and perhaps look at WoW addon frame tutorials.

bussdee
Posts: 37
Joined: Tue Apr 28, 2009 11:20 am

Re: [Rom AddOn] Need some help.

#3 Post by bussdee » Mon Dec 14, 2009 4:41 am

thx 4 info & link
"Erfahrung ist fast immer eine Parodie auf die Idee."
Johann Wolfgang von Goethe

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests