Page 1 of 2

disguiese event bot

Posted: 07 Oct 2012, 15:53
by ewan123
Good day to all,just want to ask if its possible to have a bot that can recognize a npc that disguised as a monster?cuz in a private server there are events such as disguise event that in order to win you need to tell what monster the npc will turn into and unfortunately im not good with this event.Hope you can help me thanks!

Re: disguiese event bot

Posted: 08 Oct 2012, 03:52
by rocknroll
perhaps yes, editing the source and a little bit line of macro :D

Re: disguiese event bot

Posted: 08 Oct 2012, 06:51
by ewan123
sir rock can you give me some hints on making this bot?what code in macro will I use?and what do you mean by editing the source O_O.I'm totally noob about this macro -_- but anyway thanks for the replay.

Re: disguiese event bot

Posted: 08 Oct 2012, 08:53
by rocknroll
ewan123 wrote:sir rock can you give me some hints on making this bot?what code in macro will I use?and what do you mean by editing the source O_O.I'm totally noob about this macro -_- but anyway thanks for the replay.
hmm hints??
maybe you should to know about source code for actor exist, and then little bit of logic to editing the source :D
when NPC turn into Monster, the kore trigger actor exist function, so the ID of NPC turn into ID Monster (disguise), and you'll get the ID of monster, to get the name of monster maybe you should use this variable $monsters_lut{$monster->{nameID}. don't forget to give condition about the range of ID monster, so the plugins/macro triggered when the ID in the range of ID monster, not in ID NPC/Player, and one more, fill the entire of monster name in monster.txt :)

Re: disguiese event bot

Posted: 08 Oct 2012, 09:21
by ewan123
I got your point sir but how can I do that T_T.Perhaps I need to know how open kore is working.if your willing sir can you teach me how to make this possible? Do I need to edit my NPC.pm file?(in src folder > actor).Sorry for being such a noob.Thanks a lot for your kind replay and patience in teaching me /no1

EDITED: sir I have a question,in the current setting of openkore,does it recognized npc that turn into a monster? for example if a npc turn into a poring does it shows in the console that "npc1 turn into a poring" something like that?

Re: disguiese event bot

Posted: 08 Oct 2012, 10:03
by rocknroll
hmm, i only change the function to showing on console, so i trigger it with macro (because i don't really know much about perl :p)

yes but in debug mode, something like "Unknown Actor Exists: #unknown1234 (12345)"
hahaha, i speak to much :D
almost all of them have I given to u :lol:

Re: disguiese event bot

Posted: 08 Oct 2012, 10:41
by ewan123
@_@ I think my mind will blow out!T_T,sir I know that your giving me the right code to use but I dont know how to build it all up,can you explain to me how to use $monsters_lut{$monster->{nameID} in variables? cuz I dont know how to write a variable in a macro.I'm totally have 0 knowledge with macro.dont worry I'm a fast learner.Thanks!

Re: disguiese event bot

Posted: 08 Oct 2012, 12:41
by rocknroll
something edited like this in macro :D

Code: Select all

automacro disguise {
............................. #your logic here :)
var .lastMatch1 =~ 1001..2125
call {
	$num = $.lastMatch1
	$monstername = @eval($::monsters_lut{$num})

	do c $monstername
	stop
	}
}
and also in your src file :)

sorry, i'm not someone who's smart to make it into plugins :p

Re: disguiese event bot

Posted: 08 Oct 2012, 13:14
by dracus_loki
Hi.. Rock roll ..ur techinique is good I'll have to learn a lot frm people like U ... But here's my contribution ... This is the way I'll play it


Autonacro pos {

Location mapname

Call {

Do ml ##this will display the name of the monster as the npc changes

##After this in not sure cause ill have to see the work..but U have to just make ur bot say the name
}
Timeout 2
}

Re: disguiese event bot

Posted: 08 Oct 2012, 21:53
by rocknroll
if the ml function showing the monster (NPC) maybe it can, but in most private server more than one NPC form of monster, hmm perhaps it can be tricked with position of monster :lol: