Page 1 of 1

[Rom AddOn] Need some help.

Posted: Mon Dec 07, 2009 1:59 am
by bussdee
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:

Re: [Rom AddOn] Need some help.

Posted: Mon Dec 07, 2009 3:39 pm
by Administrator
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.

Re: [Rom AddOn] Need some help.

Posted: Mon Dec 14, 2009 4:41 am
by bussdee
thx 4 info & link