This is how I think it will work.
1. There will be an ingame addon ready to monitor events and accept commands from rombot. Maybe I'll make it part of the ingamefunctions.
2. Lets say you want to know when your party leader sends a message to the party chat so you can respond to it. You would issue a command to the addon to monitor the event and include filter options, in this case only messages from your leader. It might be something like
Code: Select all
MonitorEvent("LeaderChat","CHAT_MSG_PARTY",{nil,nil,nil,"Leadername"})
"CHAT_MSG_PARTY" is the event to monitor.
{nil,nil,nil,"Leadername"} is the filter and means that it will only record an event if the 4th argument of the event (the senders name) is "Leadername".
3. The addon monitors the event, checking the filter options. If it detects a message from the leader it saves it in an event log, recording the time, monitor name and arguments. eg.
Code: Select all
12:21, "LeaderChat", {"Get Ready", link with perons name, unknown, "Leadername"}
12:22, "LeaderChat", {"Attack!", link with perons name, unknown, "Leadername"}
Code: Select all
time, args, remaining = CheckEvent("LeaderChat",{true,false,false,false})
A more detailed example
Code: Select all
repeat
time, args, remaining = CheckEvent("LeaderChat",{true,false,false,false})
if args[1] == "Get ready" then
RoMScript("SendChatMessage('Im ready', 'RAID')")
elseif args[1] == "Attack!" then
player:fight()
end
until remaining == 0
Code: Select all
StopMonitoring("LeaderChat")
How does that sound?