LogNpcMsg (for log npc massage without debug2)

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

Message
Author
windows98SE
Human
Human
Posts: 22
Joined: 31 May 2008, 21:40
Noob?: No

LogNpcMsg (for log npc massage without debug2)

#1 Post by windows98SE »

This plugins made for Log packet msg (easy to log NPC Massage and color code)
-like set ../config.txt debug 2,logconsole 1
-see logfile in plugins folder
-add more packet see $hooks line
download : http://www.stephack.com/2008/06/lognpcmsg/

Code: Select all

###########################
# Name of Plugin: LogNpcMsg.pl
# Version: 1.0 (3/6/08)
# Version of Openkore Required: OpenKore 1.9.x (test in Opk 1.9.4)
#
# Description: For Log packet msg (link ../config.txt set debug 2,logconsole 1) to add more packet see $hooks line
#
# prowered by windows98SE
 
package LogNpcMsg;
use Plugins;
use strict;
use Globals;
use Log qw(message);
use I18N qw(bytesToString);
Plugins::register('LogNpcMsg', 'LogNpcMsg', \&onUnload);
my $pluginDir = $Plugins::current_plugin_folder;
my $hooks = Plugins::addHooks(
  ['packet/npc_talk', \&onNPCLog],
  ['packet/npc_talk_responses', \&onNPCLog]
);
sub onUnload {
  Plugins::delHooks($hooks);
}
sub onNPCLog {
  my (undef, $args) = @_;
  my $msg = I18N::bytesToString(unpack("Z*", substr($args->{RAW_MSG}, 8)));
  open NPC, ">>:utf8", "$pluginDir/LogNpcMsg.txt";
  print NPC "$msg\n" if ($msg ne '');
  close NPC;
}
return 1;
enjoy Openkore :)
Free !!, All about BOT SETTING, Plz. Read Openkore Manual

iamanoob
Plain Yogurt
Plain Yogurt
Posts: 82
Joined: 04 Apr 2008, 09:49

Re: LogNpcMsg (for log npc massage without debug2)

#2 Post by iamanoob »

just asking, cant i log if debug is 0?
or i cant log because if debug is 0, i cant catch the color code?
do i need other plugins for this to work? like reactOnNpc?

sorry, i cant test this interesting plugin right now

by the way, i like your sig
Free !!, All about BOT SETTING, Plz. Read Openkore Manual
Image
DARKest Ninja

windows98SE
Human
Human
Posts: 22
Joined: 31 May 2008, 21:40
Noob?: No

Re: LogNpcMsg (for log npc massage without debug2)

#3 Post by windows98SE »

this plugin concept is hook "packet/whatPacketYouNeedToLog" (see my $hooks line)
but this plugins i test in OPK 1.9.4 (b'cus i don't play RO 8 month ago, last my opk version is 1.94 - -'')
i not sure it work in SVN ^^" (but i think i can fix it ^^")

ex. some npc log (sry, i have log in thai lang ^^") [in OPK 1.9.4]

Code: Select all

[^9400D3Antibot System^000000]
โปรดให้ความร่วมมือในการตรวจสอบ
โปรดอ่านข้อความให้เข้าใจก่อนตอบ
ระบบตรวจสอบไม่มีการจับเวลา........
ผู้ที่ตรวจสอบจะถูกจับแช่แข็ง.............
Access Code : ^0080003389074
Access Code : ^FFA5005068490
Access Code : ^FF00003413149
Access Code : ^9400D38054670
Access Code : ^0000FF1646176
Access Code : ^A52A2A506338
กรุณาป้อน ตัวเลข AC : ^008000สีเขียว
[^9400D3Antibot System^000000]
ยินดีต้อนรับ, ^4233F4openkoreTEST^000000!
Access Code ถูกต้อง
ขอให้สนุกกับการเล่น
ขอบคุณ... ที่ให้ความร่วมมือ.....
[^9400D3Antibot System^000000]
โปรดให้ความร่วมมือในการตรวจสอบ
โปรดอ่านข้อความให้เข้าใจก่อนตอบ
ระบบตรวจสอบไม่มีการจับเวลา........
ผู้ที่ตรวจสอบจะถูกจับแช่แข็ง.............
Access Code : ^FF8C005798405
Access Code : ^A52A2A4834240
Access Code : ^9400D38107152
Access Code : ^FF00006747489
Access Code : ^0000FF9247710
Access Code : ^0080008997321
กรุณาป้อน ตัวเลข AC : ^A52A2Aสีน้ำตาล
[^9400D3Antibot System^000000]
ยินดีต้อนรับ, ^4233F4openkoreTEST^000000!
Access Code ถูกต้อง
ขอให้สนุกกับการเล่น
ขอบคุณ... ที่ให้ความร่วมมือ.....
[^9400D3Antibot System^000000]
โปรดให้ความร่วมมือในการตรวจสอบ
โปรดอ่านข้อความให้เข้าใจก่อนตอบ
ระบบตรวจสอบไม่มีการจับเวลา........
ผู้ที่ตรวจสอบจะถูกจับแช่แข็ง.............
Access Code : ^FF8C001262777
Access Code : ^A52A2A9551340
Access Code : ^9400D37426114
Access Code : ^FF00004807728
Access Code : ^0000FF6218934
Access Code : ^0080009036519
กรุณาป้อน ตัวเลข AC : ^A52A2Aสีน้ำตาล
[^9400D3Antibot System^000000]
ยินดีต้อนรับ, ^4233F4openkoreTEST^000000!
Access Code ถูกต้อง
ขอให้สนุกกับการเล่น
ขอบคุณ... ที่ให้ความร่วมมือ.....
^FF0000[ โปรดอ่านข้อความนี้ทุกคน ]^000000
25/05/2008
ลงแอนตี้บอทแล้วนะครับ
พยามดูให้ดีนะครับ
วิธีตอบแอนตี้ บอท แค่เอาMouse ชี้ที่ตัว ใส่เลข ครับ
[ ^FF0000Antibot By Niffalose^000000 ]
^A020F0กรุณา กด Next แล้วดูที่ชื่อ ที่เห็นบนตัวละครของท่านให้ถูกต้อง^000000
^A020F0โปรดดูตามรูปภาพหากไม่เข้าใจ^000000
 
^FF3300มีเวลา 180 วินาทีในการตอบคำถาม เวลาจะเริ่มนับหลังจาก คุณโดน Antibot ถาม คือง่ายๆว่าตอนนี้มันจับเวลาแล้ว^000000
[ ^FF0000Antibot By Niffalose^000000 ]
^A020F0หากไม่เข้าใจควรทำความเข้าใจกับ Antibot ก่อน^000000
^FF0000[ โปรดอ่านข้อความนี้ทุกคน ]^000000
25/05/2008
ลงแอนตี้บอทแล้วนะครับ
พยามดูให้ดีนะครับ
วิธีตอบแอนตี้ บอท แค่เอาMouse ชี้ที่ตัว ใส่เลข ครับ
[ ^FF0000Antibot By Niffalose^000000 ]
^A020F0กรุณา กด Next แล้วดูที่ชื่อ ที่เห็นบนตัวละครของท่านให้ถูกต้อง^000000
^A020F0โปรดดูตามรูปภาพหากไม่เข้าใจ^000000
 
^FF3300มีเวลา 180 วินาทีในการตอบคำถาม เวลาจะเริ่มนับหลังจาก คุณโดน Antibot ถาม คือง่ายๆว่าตอนนี้มันจับเวลาแล้ว^000000
[ ^FF0000Antibot By Niffalose^000000 ]
^A020F0หากไม่เข้าใจควรทำความเข้าใจกับ Antibot ก่อน^000000
^FF0000[ โปรดอ่านข้อความนี้ทุกคน ]^000000
25/05/2008
ลงแอนตี้บอทแล้วนะครับ
พยามดูให้ดีนะครับ
วิธีตอบแอนตี้ บอท แค่เอาMouse ชี้ที่ตัว ใส่เลข ครับ
^FF0000[ โปรดอ่านข้อความนี้ทุกคน ]^000000
25/05/2008
ลงแอนตี้บอทแล้วนะครับ
พยามดูให้ดีนะครับ
วิธีตอบแอนตี้ บอท แค่เอาMouse ชี้ที่ตัว ใส่เลข ครับ
Free !!, All about BOT SETTING, Plz. Read Openkore Manual

Post Reply