########################### # responseOnMatrixNumber v1.0.2a # # For OpenKore 1.9.x # # (test in Creamsoda server >> http://creamsoda.i.am) 23/6/250 # # NOTE: This plugin meant to be use with hakore's reactOnNPC package responseOnMatrixNumber; use strict; use Plugins; use Utils; my %reactOnNPC; my @actOnNPC; my $num1; my $num2; my $num3; my $all_line; my $line; my $matrix; my @array; my @NPCresponses; Plugins::register('responseOnMatrixNumber', "response On MatrixNumber", \&Unload); my $cmd = Commands::register(['MatrixNumber', 'talk response On MatrixNumber', \&onMatrixCmd]); my $hooks = Plugins::addHooks( ['packet/npc_talk', \&onNPCTalk], ['packet/npc_talk_close', \&onClose] ); sub onUnload { Plugins::delHooks($hooks); Commands::unregister($cmd); undef %reactOnNPC; undef @actOnNPC; undef $num1; undef $num2; undef $num3; undef $all_line; undef $line; undef $matrix; undef @array; undef @NPCresponses; } sub onClose { } sub onNPCTalk { } else { } debug "01 $reactOnNPC{msg}[1]\n", "success"; debug "02 $reactOnNPC{msg}[2]\n", "success"; debug "03 $reactOnNPC{msg}[3]\n", "success"; debug "04 $reactOnNPC{msg}[4]\n", "success"; debug "05 $reactOnNPC{msg}[5]\n", "success"; debug "06 $reactOnNPC{msg}[6]\n", "success"; debug "07 $reactOnNPC{msg}[7]\n", "success"; debug "08 $reactOnNPC{msg}[8]\n", "success"; debug "09 $reactOnNPC{msg}[9]\n", "success"; debug "10 $reactOnNPC{msg}[10]\n", "success"; } sub onCheckMatrix { my $i = 0; for ($i=3;$i<8 ;$i++) { } my $matrix = ''; my $all_line = ''; my $line = ''; my @array = ''; for $matrix (@actOnNPC) { foreach $line (@array) { $line =~ s/./=/g; } else { } $all_line .= $line; } } # get num 1 debug "num 1 $num1\n", "success"; # get num 2 debug "num 2 $num2\n", "success"; # get num 3 debug "num 3 $num3\n", "success"; # get line for print message "$line1\n", "success"; message "$line2\n", "success"; message "$line3\n", "success"; message "$line4\n", "success"; message "$line5\n", "success"; undef $all_line; undef $line; undef $matrix; undef @array; } sub onMatrixCmd { onCheckMatrix; my %digit = ("######===##===##===######" => 0, "==#===##====#====#==#####" => 1, "==#====#====#====#====#==" => 1, "==##====#====#====#====#=" => 1, "#####====#######====#####" => 2, "#####====######====######" => 3, "#===##===######====#====#" => 4, "===#===##==#=#=#####===#=" => 4, "######====#####====######" => 5, "#====#====######===######" => 6, "######====######===######" => 6, "#####====#====#====#====#" => 7, "#####===#===#===#====#===" => 7, "######===#######===######" => 8, "######===######====######" => 9); my $resutl1 = ''; my $resutl2 = ''; my $resutl3 = ''; if ($_ eq $num1) { $resutl1 = $digit{$_} } if ($_ eq $num2) { $resutl2 = $digit{$_} } if ($_ eq $num3) { $resutl3 = $digit{$_} } } $cmd = "talk $args " .$resutl1.$resutl2.$resutl3; message "[MatrixNumber] Executing command \"$cmd\".\n", "success"; #add Delay 1-5 sec message "*** Delay before $cmd ***.\n", "connection"; while (1) { last if (timeOut($startTime,5)); } Commands::run($cmd); Commands::run("tele"); undef $resutl1; undef $resutl2; undef $resutl3; undef $num1; undef $num2; undef $num3; } return 1;
2007-06-30
responseOnMatrixNumber v1.0.2a
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)

2 ความคิดเห็น:
อยากให้พี่พัฒนาตอบบอทกัน 3 ชั้นจังเลยครับ ระดับพี่ต้องแก้่ได้แน่ๆ ยังไงก็เป็นกำลังใจ ให้พัฒนาต่อไปนะครับ
3 แบบคือ
1. ให้อักษรสีมา 1 ชุดแต่ให้่พิมสีที่กำหนดให้
2.ถาม < , > , <= , =
3.ถามว่ามีกี่ชุด ( อันนี้รู้สึกพี่พัฒนาแล้ว)
[url=http://www.game.jabpid.com/] :D [/url] เว็บเกมออนไลน์ รวมเกม มันส์ๆ
http://www.jabpid.com/
สถานที่เที่ยว-ค้นหาข้อมูลท่องเที่ยวทั่วไทย เที่ยวเมืองไทย ไม่ไปไม่รู้
http://www.tour.jabpid.com/
VT13L1QV5D8UAQ1
[url=http://www.jobs.jabpid.com/] :)[/url] [url=http://www.parttime.jabpid.com/] :)[/url] [url=http://www.music.jabpid.com/] :)[/url] [url=http://www.business.jabpid.com/] :)[/url] [url=http://www.variety.jabpid.com/] :)[/url] [url=http://www.board.jabpid.com/] :)[/url]
แสดงความคิดเห็น