Page 2 of 2

Re: disguiese event bot

Posted: 09 Oct 2012, 07:06
by ewan123
thanks guys for giving me an idea.I tested just now to participate in the event using kore and fortunately,Kore recognize the NPC as a monster e.g. "monster"(disguise) followed by the monster ID etc.

my problem are

1. I cant do pos triggering idea because in my server the NPC disguiser is moving in time to time.
2. I dont have any idea on how I can extract the "monster" in the ml list.

questions

1.if I will depend on the ml list,do I need to use it frequently? I mean,spam it over and over again so that kore will recognized it?

Re: disguiese event bot

Posted: 09 Oct 2012, 09:54
by rocknroll
look on 1st page the variable to call the name of monsters in monsters.txt :D
you should fill all the name of monsters, search by your self :D

Re: disguiese event bot

Posted: 09 Oct 2012, 10:25
by ewan123

Code: Select all

automacro disguise {
console #I will enter triggering command like the whole message in ml command list.
var .lastMatch1 = 1001
var .lastMatch2 = 1002
var .lastMatch3 = 1003
var .lastMatch4 = 1004

#so forth until the last monster ID?

call {
   $num1 = $.lastMatch1
   $num2 = $.lastMatch2
   $num3 = $.lastMatch3
#so forth 
   $monstername = @eval($::monsters_lut{$num1})
   $monstername = @eval($::monsters_lut{$num2})
#so forth 
   do c $monstername
   stop
   }
}
sir rock I just edited your work in page 1,can you check this one if its correct?sorry sir but Im tying my best to understand the code,pls be patient T_T

Re: disguiese event bot

Posted: 09 Oct 2012, 10:49
by rocknroll
wew, you should take a rest. ragnarok make you sick :D
hint :
let's say the console displaying this

#Unknown NPC (12345) turned into a #Unknown Monster (1002)

hmm maybe use this regex to trigger it:
(.*)\((\d+)\) turned into a (.*) \((\d+)\)
where:
-$.lastMatch1 is "#Unknown NPC "
-$.lastMatch2 is 12345
-$.lastMatch3 is "#unknown Monster "
-$.lastMatch4 is 1002

the macros.txt maybe:

Code: Select all

automacro disguise {
 console /(.*)\((\d+)\) turned into a (.+) \((\d+)\)/
 var .lastMatch4 =~ 1001..2125
 call {
	$monstername = @eval($::monsters_lut{$num1})
	do c $monstername
	stop
	}
}

Re: disguiese event bot

Posted: 09 Oct 2012, 13:04
by ewan123
sir rock thanks for helping me but as I tested just now(sorry for the late replay cause I have to wait 6 hrs for the event to start again)Kore didn't show any text like this in the console #Unknown NPC (12345) turned into a #Unknown Monster (1002)

so we cant use that trick but perhaps we can focus on ml list.

if I will use the ml command frequently and check the monster around maybe I can make it work.

like console (.*)\((\d+)\) (disguise)

but how can I extract the "(.*)\((\d+)\)". I dont know how to use var and $.lastMatchN.Can you explain to me how to use those codes or direct me to any site so that I can study it?T_T im such a noob.

EDITED:after 2 hrs of studying how these var and $.lastMatchN work,I finally figured out how it work.so sir rock correct me if Im wrong.the $.lastmatchN is a backreference that corresponds to this line (.*) right?:D

Re: disguiese event bot

Posted: 09 Oct 2012, 21:03
by rocknroll
oh god why.....
#Unknown NPC (12345) turned into a #Unknown Monster (1002) is just an example to make you think logically and it doesn't appear in console :?
so sir rock correct me if Im wrong.the $.lastmatchN is a backreference that corresponds to this line (.*) right?:D
such like that :)
$.lastMatchN is like $args :roll:

okay, god bless you :)

Re: disguiese event bot

Posted: 13 Feb 2013, 08:34
by AkenoYuki
Excuse me :mrgreen:
My macro is somewhat run perfectly on disguise the monster's name

but I need still some help... >_<
I need to give some "IF" on my macro's line
I need to make it only run if the MONSTER is on x,y exact position

Example
When the monster is on 155, 155 the macro will run
When the monster is on 160, 170 the macro will NOT run

Thanks a lot :)

Re: disguiese event bot

Posted: 29 Sep 2018, 13:40
by manticora