opkSXMode.pl XKore Utilities by Ninkoman

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
ninkoman
Noob
Noob
Posts: 3
Joined: 26 Dec 2011, 19:33
Noob?: No

opkSXMode.pl XKore Utilities by Ninkoman

#1 Post by ninkoman »

- Show hidden Player,Monster and NPC
- Anti Blinded status

Code: Select all

################################################
##Openkore :: opkSXMode plugin
##This plugin is licensed under the GNU GPL
##See http://www.gnu.org/licenses/gpl.html for the full license
##Beta version 1.0 by Ninkoman
##For Openkore Ragnarok Online Bot
##Test on Openkore SVN 8448 07/06/13
################################################

package opkSXMode;

use strict;
use Plugins;
use Globals;

Plugins::register('opkSXMode', 'Openkore XKore Utilities', \&on_unload);

my $hooks = Plugins::addHooks(
   ['packet/actor_moved', \&on_parseActor],
   ['packet/actor_exists', \&on_parseActor],
   ['packet/actor_connected', \&on_parseActor],
   ['packet/character_status', \&on_parseActor],
);

sub on_unload {
   Plugins::delHooks($hooks);
}

sub on_parseActor {
	my (undef,$args) = @_;
	return if(!$config{'XKore'});
	my $switch = $args->{switch};

	if ($switch eq "07F7" || $switch eq "07F8" || $switch eq "07F9" || $switch eq "0856" || $switch eq "0857" || $switch eq "0858") {
		antiHideDisplay(\%{$args},5,13);
	}elsif($switch eq "0078" || $switch eq "0079" || $switch eq "007B" || $switch eq "007C" || $switch eq "022A" || $switch eq "022B" || $switch eq "022C" || $switch eq "02ED" || $switch eq "02EE"){
		antiHideDisplay(\%{$args},2,10);
	}elsif($switch eq "02EC"){
		antiHideDisplay(\%{$args},3,11);
	}elsif ($switch eq "0119" || $switch eq "0229"){
		my ($ID, $param2, $param3) = unpack("x2 a4 x2 S2",$args->{RAW_MSG});
		my $actor = Actor::get($ID);
		if ($ID eq $accountID && $param2 & 16) {
			$args->{RAW_MSG} = substr($args->{RAW_MSG},0,8).pack("S",$param2 - 16).substr($args->{RAW_MSG},10,$args->{RAW_MSG_SIZE}-10);
		}elsif(ref($actor)){
			antiHideDisplay(\%{$args},2,8);
		}
	}
}

sub antiHideDisplay {
	my $args = shift;
	my $msg = $args->{RAW_MSG};
	my $ID_ops = shift;
	my $param2_ops = shift;
	my $msg_size = length($msg);
	my $ID = unpack("x${ID_ops} a4", $msg);
	my ($param2, $param3) = unpack("x${param2_ops} S2", $msg);

	if ($ID ne $accountID && ($param3 & 2 || $param3 & 4 || $param3 & 64)) {
		my ($newmsg,$newp2,$newp3);
		if ($param2 & 2) {
			$newp2 = $param2;
		}else {
			$newp2 = $param2 + 2;
		}
		if ($param3 & 2) {
			$newp3 = $param3 - 2;
		}elsif($param3 & 4){
			$newp3 = $param3 - 4;
		}elsif($param3 & 64){
			$newp3 = $param3 - 64;
		}else {
			$newp3 = $param3;
		}
		$args->{RAW_MSG} = substr($msg,0,$param2_ops).pack("S2",$newp2,$newp3).substr($msg,$param2_ops + 4,$msg_size - ($param2_ops + 4));
	}
}

return 1;

Raider
The Kore Devil
The Kore Devil
Posts: 672
Joined: 22 Feb 2013, 03:40
Noob?: No
Location: The Netherlands

Re: opkSXMode.pl XKore Utilities by Ninkoman

#2 Post by Raider »

AWESOME! Is there a way to see myself hidden/ cloaked?

chuck608
Human
Human
Posts: 24
Joined: 23 Aug 2011, 02:30
Noob?: Yes

Re: opkSXMode.pl XKore Utilities by Ninkoman

#3 Post by chuck608 »

i just wanna say GREAT WORK! THANKS!

ninkoman
Noob
Noob
Posts: 3
Joined: 26 Dec 2011, 19:33
Noob?: No

Re: opkSXMode.pl XKore Utilities by Ninkoman

#4 Post by ninkoman »

Raider wrote:AWESOME! Is there a way to see myself hidden/ cloaked?
edit

Code: Select all

  if ($ID ne $accountID && ($param3 & 2 || $param3 & 4 || $param3 & 64)) {
to

Code: Select all

  if ($param3 & 2 || $param3 & 4 || $param3 & 64) {

Raider
The Kore Devil
The Kore Devil
Posts: 672
Joined: 22 Feb 2013, 03:40
Noob?: No
Location: The Netherlands

Re: opkSXMode.pl XKore Utilities by Ninkoman

#5 Post by Raider »

Awesome, the plugin is just great! Could you explain how you managed to make this?

ninkoman
Noob
Noob
Posts: 3
Joined: 26 Dec 2011, 19:33
Noob?: No

Re: opkSXMode.pl XKore Utilities by Ninkoman

#6 Post by ninkoman »

This plugin work with monitor packet > strip unwanted status > change new status before send to RO client in xkore mode.

sry, i have low skills in english language ^^ i hope you understand it.

chuck608
Human
Human
Posts: 24
Joined: 23 Aug 2011, 02:30
Noob?: Yes

Re: opkSXMode.pl XKore Utilities by Ninkoman

#7 Post by chuck608 »

is there any way at all to detect gms that are perfecly hidden? i know theres macros where /perfectly hidden/ thing but that dont work sadly.

rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

Re: opkSXMode.pl XKore Utilities by Ninkoman

#8 Post by rocknroll »

nice plugin after all :D
chuck608 wrote:is there any way at all to detect gms that are perfecly hidden? i know theres macros where /perfectly hidden/ thing but that dont work sadly.
There is no Recv Packet for Perfect Hide status when it move, so that's impossible :D
CMIIW
Sorry, my english is very bad !

Post Reply