Openkore.com
http://forums.openkore.com/

disguiese event bot
http://forums.openkore.com/viewtopic.php?f=9&t=18195
Page 1 of 2

Author:  ewan123 [ 07 Oct 2012, 15:53 ]
Post subject:  disguiese event bot

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!

Author:  rocknroll [ 08 Oct 2012, 03:52 ]
Post subject:  Re: disguiese event bot

perhaps yes, editing the source and a little bit line of macro :D

Author:  ewan123 [ 08 Oct 2012, 06:51 ]
Post subject:  Re: disguiese event bot

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.

Author:  rocknroll [ 08 Oct 2012, 08:53 ]
Post subject:  Re: disguiese event bot

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

Author:  ewan123 [ 08 Oct 2012, 09:21 ]
Post subject:  Re: disguiese event bot

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?

Author:  rocknroll [ 08 Oct 2012, 10:03 ]
Post subject:  Re: disguiese event bot

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:

Author:  ewan123 [ 08 Oct 2012, 10:41 ]
Post subject:  Re: disguiese event bot

@_@ 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!

Author:  rocknroll [ 08 Oct 2012, 12:41 ]
Post subject:  Re: disguiese event bot

something edited like this in macro :D
Code:
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

Author:  dracus_loki [ 08 Oct 2012, 13:14 ]
Post subject:  Re: disguiese event bot

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
}

Author:  rocknroll [ 08 Oct 2012, 21:53 ]
Post subject:  Re: disguiese event bot

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:

Page 1 of 2 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/