endless loop if 2 mobs infront behind a barrier

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#21 Post by lisa »

rock5 wrote:How do you accidentally commit files while at the same time add a comment saying you accidentally added them? Do you know a way to edit a comment after committing the files?
it's quite simple really, as you are typing in the change log for the SVN commit you realise that the files weren't just the new code you did to the last revision and that they were edited of files you downloaded that someone else did, you then say buggered if I am going to go through and edit them again and you just hit commit.

Bit tired and needed to be somewhere, so didn't really have the time to go back through the files, I figured they would be fine though.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#22 Post by lisa »

Looks like something went astray, no time to check it out atm.
Attachments
canttarget.png
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#23 Post by rock5 »

Yes, that happens when it fails to cast a skill out of combat. I'll make sure to fix that when I do my other changes.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#24 Post by rock5 »

Ok, my code is coming along nicely. Added continual monitoring of alert and warning messages to igf_events. Used a table so if we ever want to add an event we can just add it to the table. Added a couple of commands to the bot 'getLastWarningMessage(age)' and 'getLastAlertMessage(age)'. Changed the new system message checks in combat to use those functions. Set it up to deal with obstacle messages and face target messages. Are there any other messages you get when you are stuck and unable to cast? There is that stunned/rooted message Jandrana mentioned but I'm not sure what the message is (might be "Skills requirement error") and I'm not sure what actions to take if you did get that message.

One thing I noticed yesterday when doing some tests, is that I got a lot of 'Cooling down' messages. Because they can come out a lot (because the bot sometimes does extra key presses) it could interfere with receiving the other warning messages. So I'm thinking of adding an ignore list to ignore certain messages. There would be very few messages on this list. Just messages that could interfere with receiving recent urgent messages.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#25 Post by lisa »

couldnt you just make the addon part of monitor to store specific ones into their own table with a time stamp. Then you just check the last thing in that table for that message.

So instead of ignoring messages you only record specific messages to the table you will access.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#26 Post by rock5 »

I could just set up a monitor for just his purpose like what you committed but I like the idea that users can at any time get the last warning or alert without having to set up a monitor.

On another note, I think the clear ignore list needs a time factor. I think I'll change it from 'clearing the whole ignore list at the end of a fight if more than 50 from last ignore' to 'if 50 from the last ignore and the mob has been on the list for more than 10s then remove it'. I think it will work a bit better and simplifies it a bit.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#27 Post by lisa »

I was thinking the addon would just collect the warning message data and store them straight to a table, a bit like the table set up I had to use in the use item.

Code: Select all

		if tmptable[warnmessage] == nil then tmptable[warnmessage] = {} table.insert(groups,warnmessage) end
		table.insert(tmptable[warnmessage],getTime())
So the message itself would be the table "name" and insert the time of the message.

You would then need a function to return the time for the specific message you ask for.

Code: Select all

return tmptable[warnmessage][#tmptable[warnmessage]]
no idea if that code would work or not but you get the idea. So the table itself would keep getting bigger, you could probably add in a check for the number of things in the table and clear it
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#28 Post by rock5 »

That's what I did. The event name is used as the table name. And it records the message and time and the function returns the message and time. Because it only saves the last message (why save more messages if we are only getting the last message) the table doesn't grow. The structure of my table would look like this

Code: Select all

LastMessageLog = {
    ALERT_MESSAGE = {message="message",time=GetTime()},
    WARNING_MESSAGE = {message="message",time=GetTime()},
}
The changes to igf_events.lua were pretty easy to do and didn't take much time. I can show you if you like.

Edit: I just figured out what you meant by table of messages. You mean the actual messages. That could really get out of hand. Especially if you are not botting so the messages never get cleared and just keep accumulating.
Attachments
igf_events.lua
(7.06 KiB) Downloaded 170 times
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#29 Post by lisa »

I guess you could just save the last message like you said, sounds like a good idea actually.

But I think anytime you get a warning message to just auto add it to the table is a good idea, then you don't need to worry about "other" messages like you mentioned.

Code: Select all

tmptable[warnmessage] = getTime()
So each type of warn message would be in the table and only have 1 occurance for it which is the last time it was used.
rock5 wrote:One thing I noticed yesterday when doing some tests, is that I got a lot of 'Cooling down' messages. Because they can come out a lot (because the bot sometimes does extra key presses) it could interfere with receiving the other warning messages.
I am refering to this, using the table like I said it won't matter how many other warn messages you get it will never interfere with the actual message you want.

Code: Select all

Command> local tt = {} tt["TEXT('SYS_CASTSPELL_TARGET_COLLISION')"] = os.time() tt["TEXT('SYS_CASTSPELL_STUPID_ERROR')"] = os.time() table.print(tt)
table: 01CB4D70
TEXT('SYS_CASTSPELL_TARGET_COLLISION'): 1360231797
TEXT('SYS_CASTSPELL_STUPID_ERROR'):     1360231797
then in the function you just use

Code: Select all

return tt["TEXT('SYS_CASTSPELL_STUPID_ERROR')"]
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#30 Post by rock5 »

Even as I wrote my last post, I wasn't really sure. So I had a lay down to think about it and the more I thought about it the more I liked it. Especially if you consider that if you only save the last message then the table wont grow indefinitely. And it will pretty much make the need for monitors for warnings or alerts obsolete now that you don't have to worry about a message being overwritten.

The only hassle I see is if you make a monitor then you can use partial string pattern matching but to use this you would have to use the exact string. We could do a pattern match but it would add a lot more work for the addon. There is a big difference between

Code: Select all

return tmptable[variable]
and

Code: Select all

for k,v in pairs(tmptable) do
   if string.match(k,variable,1,true) then
      return v
   end
end
The table probably wont get that big. We could probably do it anyway. Maybe check for an exact match first then partial

Code: Select all

if tmptable[variable] then
    return tmptable[variable]
else
   for k,v in pairs(tmptable) do
      if string.match(k,variable,1,true) then
         return v
      end
   end
end
Maybe save as lower caps too to avoid caps problems.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#31 Post by lisa »

I figured you would just use the TEXT like you did in the files you posted the other day, that way it will be exact. Then when accessing the addon to get the time you would get bot to also use the TEXT aswell.

You could simplify it for the bot by having

Code: Select all

target_collision = getTEXT("SYS_CASTSPELL_TARGET_COLLISION")
then just have some function which uses that as an arg

Code: Select all

local lasttime = somefunction(target_collision)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#32 Post by rock5 »

Well yeah, I would and will, but I was thinking of users and convenience for them.

I'm very much into seeing things from other people perspective. :D
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#33 Post by lisa »

hmm would users actually use the functions, I thought it would be integrated into the bot to deal with the messages, I guess things like guild register message or enter seige, but that is only once a day so I wouldn't worry about making an allowance for it in the bot's ongoing stuff.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#34 Post by rock5 »

I mean like every now and then a user needs help setting up an event monitor. If it's for an alert or warning, they wouldn't have to.

Code: Select all

if getAlertMessage("message test",5) then
1 line, no extra code needed. No starting and stopping stuff. It only gets a bit more complex if you need to check it often then you need to check the time as well.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: endless loop if 2 mobs infront behind a barrier

#35 Post by Jandrana »

After updating to revision 749, sometimes a system message appears in the chat:

Code: Select all

Cannot get log event for montior 'cant_target'. No such monitor name exists.
If I remember correctly, it was the malatina script. As far as I understood, it could be the
custom fight function there. It calls player:checkSkills(true), which now expects the
EventMonitor 'cant_target' being active.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#36 Post by rock5 »

That's because there is a bug. Someone accidentally committed changes that weren't ready *cough Lisa*.

I've also been remiss because I finished the updates yesterday or the day before but haven't committed them yet. I've been feeling a bit lazy lately.

I'll to a bit of testing and commit soon.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#37 Post by lisa »

rock5 wrote:Someone accidentally committed changes that weren't ready *cough Lisa*.
*looks left, looks right, hides under desk*
rock5 wrote:I'll to a bit of testing and commit soon.
Can you edit the party.lua around line 372

didn't
to
didnt
The ' is causing an issue =(
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#38 Post by rock5 »

Done.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: endless loop if 2 mobs infront behind a barrier

#39 Post by rock5 »

Rev 750 committed.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Post Reply