Openkore.com

OpenKore Forums
It is currently 14 Nov 2018, 01:38

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: disguiese event bot
PostPosted: 09 Oct 2012, 07:06 
Offline
Human
Human

Joined: 26 Dec 2009, 10:36
Posts: 25
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?


Top
 Profile  
 
 Post subject: Re: disguiese event bot
PostPosted: 09 Oct 2012, 09:54 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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

_________________
Sorry, my english is very bad !


Top
 Profile  
 
 Post subject: Re: disguiese event bot
PostPosted: 09 Oct 2012, 10:25 
Offline
Human
Human

Joined: 26 Dec 2009, 10:36
Posts: 25
Code:
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


Top
 Profile  
 
 Post subject: Re: disguiese event bot
PostPosted: 09 Oct 2012, 10:49 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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:
automacro disguise {
console /(.*)\((\d+)\) turned into a (.+) \((\d+)\)/
var .lastMatch4 =~ 1001..2125
call {
   $monstername = @eval($::monsters_lut{$num1})
   do c $monstername
   stop
   }
}

_________________
Sorry, my english is very bad !


Top
 Profile  
 
 Post subject: Re: disguiese event bot
PostPosted: 09 Oct 2012, 13:04 
Offline
Human
Human

Joined: 26 Dec 2009, 10:36
Posts: 25
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


Top
 Profile  
 
 Post subject: Re: disguiese event bot
PostPosted: 09 Oct 2012, 21:03 
Offline
Been there done that!
Been there done that!

Joined: 19 Sep 2011, 07:30
Posts: 119
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 :?

Quote:
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 :)

_________________
Sorry, my english is very bad !


Top
 Profile  
 
 Post subject: Re: disguiese event bot
PostPosted: 13 Feb 2013, 08:34 
Offline
Noob
Noob

Joined: 15 Jun 2012, 12:42
Posts: 2
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 :)


Top
 Profile  
 
 Post subject: Re: disguiese event bot
PostPosted: 29 Sep 2018, 13:40 
Offline
Documentation Writers
Documentation Writers

Joined: 29 Jan 2010, 05:59
Posts: 28
Openkore.com, Disguise event plugin


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group