reactOnNPC v.2.0.2 by hakore

Other plugins for extending OpenKore's functionality. This forum is only for posting new plugins and commenting on existing plugins. For support, use the Support forum.

Moderator: Moderators

User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia

Re: reactOnNPC v.2.0.0 by hakore

#301 Post by help_us »

Code: Select all

useColors 1
on reactOnNPC block
Image
Image
BrianRockzYou
Human
Human
Posts: 21
Joined: 16 Aug 2009, 01:41
Noob?: No
Location: Brazil

Re: reactOnNPC v.2.0.0 by hakore

#302 Post by BrianRockzYou »

help_us wrote:

Code: Select all

useColors 1
on reactOnNPC block
It did not work
BrianRockzYou
Human
Human
Posts: 21
Joined: 16 Aug 2009, 01:41
Noob?: No
Location: Brazil

Re: reactOnNPC v.2.0.0 by hakore

#303 Post by BrianRockzYou »

bkmc...

Code: Select all

How do you wish be helped if you're always inactive and you don't help anyone to help you.
madlock
Noob
Noob
Posts: 2
Joined: 26 Jul 2009, 04:16
Noob?: Yes

Re: reactOnNPC v.2.0.0 by hakore

#304 Post by madlock »

where can i download this?
Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: reactOnNPC v.2.0.0 by hakore

#305 Post by Mushroom »

For everybody who wants to talk to the npc who has the enterEnterEnter responses try this macros:

Code: Select all

automacro answerNPC {
	console /(\d+) (\^[0-9a-z]{6})enter(\^[0-9a-z]{6})enter(\^[0-9a-z]{6})enter(\^[0-9a-z]{6})enter(\^[0-9a-z]{5})/i
	eval ($::Macro::Data::varStack{".lastMatch2"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch3"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch4"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch5"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch6"} =~ /\^435536/)
	exclusive 1
	call {
		do talk num $.lastMatch1
		}
}
But it will only work if you can see the color hexes on the console. To do so, you can go to src/Network/Receive/ServerType0.pm, search for this line

Code: Select all

$talk{msg} =~ s/\^[a-fA-F0-9]{6}//g;
And comment it, so it will be like this
#$talk{msg} =~ s/\^[a-fA-F0-9]{6}//g;
Or you can make it check config, like this
$talk{msg} =~ s/\^[a-fA-F0-9]{6}//g if ($config{removeNpcColor});
Then in config.txt put removeNpcColor 1
Hope it help.
Quit.
bkmc
Noob
Noob
Posts: 6
Joined: 06 Feb 2009, 04:06
Noob?: No

Re: reactOnNPC v.2.0.0 by hakore

#306 Post by bkmc »

to Mushroom
automacro answerNPC {
console /(\d+) (\^[0-9a-z]{6})enter(\^[0-9a-z]{6})enter(\^[0-9a-z]{6})enter(\^[0-9a-z]{6})enter(\^[0-9a-z]{5})/i
eval ($::Macro::Data::varStack{".lastMatch2"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch3"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch4"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch5"} =~ /\^435536/ || $::Macro::Data::varStack{".lastMatch6"} =~ /\^435536/)
exclusive 1
call {
do talk num $.lastMatch1
}
}

Still Geting Error at This line

Code: Select all

Loading tables\recvpackets.txt...
Loading tables\cities.txt...
Loading tables\commanddescriptions.txt...
Loading tables\directions.txt...
Loading tables\elements.txt...
Loading tables\emotions.txt...
Loading tables\equiptypes.txt...
Loading tables\haircolors.txt...
Loading tables\headgears.txt...
Loading tables\items.txt...
Loading tables\itemsdescriptions.txt...
Loading tables\itemslots.txt...
Loading tables\itemslotcounttable.txt...
Loading tables\itemtypes.txt...
Loading tables\maps.txt...
Loading tables\monsters.txt...
Loading tables\npcs.txt...
Loading tables\packetdescriptions.txt...
Loading tables\portals.txt...
Loading tables\portalsLOS.txt...
Loading tables\servers.txt...
Loading tables\sex.txt...
Loading tables\skills.txt...
Loading tables\spells.txt...
Loading tables\skillsdescriptions.txt...
Loading tables\skillssp.txt...
Loading tables\skillssp.txt...
Loading tables\skillsstatus.txt...
Loading tables\skillsailments.txt...
Loading tables\skillsstate.txt...
Loading tables\skillslooks.txt...
Loading tables\skillsarea.txt...
Loading tables\skillsencore.txt...
D:\RO\XiLeRo2.0.5\control\macros.txt: ignoring 'eval
($::Macro::Data::varStack{".lastMatch2"} =~ /\^435536/ ||
$::Macro::Data::varStack{".lastMatch3"} =~ /\^435536/ ||
$::Macro::Data::varStack{".lastMatch4"} =~ /\^435536/ ||
$::Macro::Data::varStack{".lastMatch5"} =~ /\^435536/ ||
$::Macro::Data::varStack{".lastMatch6"} =~ /\^435536/)' (munch, munch, unknown
automacro keyword)
[macro] hooking to packet_privMsg
[macro] hooking to AI_pre
[macro] hooking to log
thanks for ur support
Last edited by bkmc on 15 Sep 2009, 20:30, edited 1 time in total.
User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia

Re: reactOnNPC v.2.0.0 by hakore

#307 Post by help_us »

Use macro plugin 2.0.3-SVN download from bibian.
Image
Image
BrianRockzYou
Human
Human
Posts: 21
Joined: 16 Aug 2009, 01:41
Noob?: No
Location: Brazil

Re: reactOnNPC v.2.0.0 by hakore

#308 Post by BrianRockzYou »

Valeo Mushroom consegui fazer aparecer os hex codes, mas a macro não ta funcionando porque como o bkmc disse o número que aparece é random, é sempre ^ seguido de 6 números mas nunca são os mesmos. Como que fica então a macro?
Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: reactOnNPC v.2.0.0 by hakore

#309 Post by Mushroom »

If it's random then we got a problem there :/.
Try talking to the NPC like 5~10 times and post the responses logs so I can see if there is a pattern or something similar.
Quit.
BrianRockzYou
Human
Human
Posts: 21
Joined: 16 Aug 2009, 01:41
Noob?: No
Location: Brazil

Re: reactOnNPC v.2.0.0 by hakore

#310 Post by BrianRockzYou »

O número nunca se repete, eu falei com o npc 30 vezes e todos deram números diferentes.
A única coisa padrão é que quando os números são no ultimo enter da linha eles não tem ^6 dígitos, tem ^5 dígitos.
E agora oque agente vai fazer :(