waitForParty -- Don't get separeted! by Chontrad

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
User avatar
help_us
Testers Team
Testers Team
Posts: 106
Joined: 04 Apr 2008, 21:53
Noob?: No
Location: Asia
Contact:

Re: waitForParty -- Don't get separeted!

#11 Post by help_us »

aih after using this plugins my exp drop from 98k to 30k only.
mayb it because it always return to slave to avoid been separated.
Image
Image

Mucilon
Cybernatic Entity
Cybernatic Entity
Posts: 249
Joined: 04 Apr 2008, 13:15
Noob?: Yes
Location: Brazil

Re: waitForParty -- Don't get separeted!

#12 Post by Mucilon »

May be...
but this will happen only if the slave walk way while master is killing a monster. They normally get separated just when the master start to walk or are walking!
You can configure the slave to take items too.

Krai
Been there done that!
Been there done that!
Posts: 106
Joined: 04 Apr 2008, 16:23
Noob?: Yes
Location: The Bay

Re: waitForParty -- Don't get separeted!

#13 Post by Krai »

this plugin has been frustrating me lately... ive been trying to play with it to get it to work with my hunter/priest combo, but, the problem is, whenever my team dies/has to refuel in town the master will always run back to the slave through portals... then the slave wont go through the portal because the master came back through it.... then when the master finds the slave, it will go back on its normal route (through the portal) get through the portal, realize the slave isnt there, then run back to where the slave was (on the other side of the portal).... it gets in the vicious circle and is VERY obvious that i am botting.... (thank goodness for xkore pointing this out to me)... how can i fix this so the master will only wait for the slave on the lockmap?
Don't Get Owned! Do Your Research First.
The Manual | Packet Extractor | Use Macros | Server Info Guide | Old Forum
You got banned? Krai me a fuckin river..

Mucilon
Cybernatic Entity
Cybernatic Entity
Posts: 249
Joined: 04 Apr 2008, 13:15
Noob?: Yes
Location: Brazil

Re: waitForParty -- Don't get separeted!

#14 Post by Mucilon »

That is wierd, this kind of thing never happen to me...
Well, I changed the plugin including the follow_wait_inLockOnly option, you just need to use this option at the config.txt, since I didn't test it yet, I won't post it at the first post for now... when I get home and test it or if you test it and give me your OK, I change the first post.
Attachments

[The extension pl has been deactivated and can no longer be displayed.]


Chontrad
Human
Human
Posts: 30
Joined: 23 Apr 2008, 10:11
Noob?: No
Location: Indonesia TANAH AIRKU
Contact:

CHANGED: wait4party -- Stick together team!

#15 Post by Chontrad »

Here's the Update for the Wait4Party plugins :lol:

Btw, u need to replace your 'Src\Network\Receive.pm' files with my modified one.
Don't worry, it isn't harmful. I even already added 'death exp reduction' features to count your reduced exp on death.

FIXED! TRANSLATED!

Code: Select all

########################################
# Wait4Party v1.0.1 -- Stick Together Team!
# ©2008 by Contrad
# 
# This software is open source, licensed under the GNU General Public
# License, version 2.
# Basically, this means that you're allowed to modify and distribute
# this software. However, if you distribute modified versions, you MUST
# also distribute the source code.
# See http://www.gnu.org/licenses/gpl.html for the full license.
#
# How to install :
# I uses self defined hooks instead of 'AI_pre' to reduce PC usage
# So u must copy my modified <Src\Network\Receive.pm> files.
# Else, just change the hooks to a single 'AI_pre' hook.
#
# How to use :
# <config.txt>
# wait4party (0|1)			Wait4Party On or Off
# wait4party_sameMapOnly (0|1)		Only activate if the party member are in the same map
# wait4party_waitBySitting (0|1)	Don't search, just sit and wait
# wait4party_followSit (0|1)		Sitting when party is sitting
#	ATTENTION! Turn off 'followSitAuto' or they'll sit forever!
#
# Anyway I use 'Bahasa' instead of 'English' to promote INDONESIA. :D
# U'r free to translate it.

package wait4party; 

use Plugins;
use Globals;
use Log qw(message error warning debug);

our $findParty;
our $temp;

Plugins::register('waitParty', 'Tungguin anggota grup', \&unload, \&unload);
my $hooks = Plugins::addHooks(	['actor_player_add', \&waitForOthers, undef],
				['actor_player_remove', \&waitForOthers, undef],
				['party_share', \&waitForOthers, undef],
				['party_move', \&waitForOthers, undef],
				['actor_action_sit', \&waitForOthers, undef],
				['actor_action_stand', \&waitForOthers, undef]);

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

sub waitForOthers {
	return if (AI::action eq "attack");
        return unless $config{'wait4party'};
	return unless defined @partyUsersID;
	my $actor;
	foreach (@partyUsersID) {
	 next if $_ eq $accountID;
	 next if $_ eq "";
		$actor = $playersList->getByID($_);

		if(!$actor && $char->{'party'}{'users'}{$_}{'online'}) {
			if ($config{'wait4party_waitBySitting'}) {
				Commands::cmdSit() if !$char->{sitting};
				if (!$findParty) {
					#TRANSLATION : Party Lost - Sit while waiting for party.
					warning "Party hilang - Duduk untuk tunggu anggota yang hilang.\n", "waitParty";
					$findParty = 1;
				}
				return;
			}
			my %party;

			$party{x} = $char->{party}{users}{$_}{pos}{x};
			$party{y} = $char->{party}{users}{$_}{pos}{y};
			($party{map}) = $char->{party}{users}{$_}{map} =~ /([\s\S]*)\.gat/;

			if ($party{map} ne $field{name} || $party{x} == 0 || $party{y} == 0) {
				return if $config{'wait4party_sameMapOnly'};
				delete $party{x};
				delete $party{y};
			}

			return unless ($party{map} ne $field{name} || exists $party{x});

			if ((exists $ai_v{party} && AI::distance(\%party, $ai_v{party}) > 15)
				|| $party{map} != $ai_v{party}{map}
				|| (AI::timeOut($ai_v{party}{time}, 15) && AI::distance(\%party, $char->{pos_to}) > $config{followDistanceMax})) {

				$ai_v{party}{x} = $party{x};
				$ai_v{party}{y} = $party{y};
				$ai_v{party}{map} = $party{map};
				$ai_v{party}{time} = time;

				#TRANSLATION : Party Lost - Searching Lost Member.
				warning "Party hilang - Cari anggota yang hilang.\n", "waitParty";

				if ($ai_v{party}{map} ne $field{name}) {
					#TRANSLATION : Search party member:....
					message "Mencari anggota grup: $ai_v{party}{map}\n", , "follow";
				} elsif (AI::distance(\%party, $char->{pos_to}) > $config{followDistanceMax} ) {
					message "Mencari anggota grup: $ai_v{party}{map} ($ai_v{party}{x},$ai_v{party}{y})\n", "follow";
				} else {
					return;
				}
				AI::clear("move", "route", "mapRoute");
				AI::ai_route($ai_v{party}{map}, $ai_v{party}{x}, $ai_v{party}{y}, distFromGoal => $config{followDistanceMin}, attackOnRoute => 1);
				my $followIndex = AI::findAction("follow");
				if (defined $followIndex) {
					$ai_seq_args[$followIndex]{ai_follow_lost_end}{timeout} = $timeout{ai_follow_lost_end}{timeout};
				}
			}
			$findParty = 1;
			return;
		} elsif ($findParty && ($actor = $playersList->getByID($_))) {
			Commands::cmdStand() if $char->{sitting};
			#TRANSLATION : Party found.
			warning "Party ditemukan.\n", "waitParty";
			$findParty = 0;
		} elsif ($findParty) {
			#TRANSLATION : Party is offline or missing.
			warning "Party sudah offline atau hilang.\n", "waitParty";
			$findParty = 0;
			return;
		}
		
		if ($config{'wait4party_followSit'} && AI::action ne "sitAuto" && $actor && $actor->{sitting}) {
			if (!$char->{sitting}) {
				Commands::cmdSit();
				#TRANSLATION : Party member is Sitting.
				warning "Party duduk.\n", "waitParty";
			}
			return;
		}
	}
	if ($config{'wait4party_followSit'} && AI::action ne "sitAuto" && $char->{sitting}) {
		Commands::cmdStand();
		#TRANSLATION : Party member is Standing.
		warning "Party berdiri.\n", "waitParty";
	}
}
1;
Thank you very much for all u'r support. But I won't be logged in frequently, sorry.
Best wishes!
Attachments

[The extension pm has been deactivated and can no longer be displayed.]

Last edited by Chontrad on 27 Apr 2008, 10:48, 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
Contact:

Re: waitForParty -- Don't get separeted!

#16 Post by help_us »

Code: Select all

*** OpenKore 2.0.5.1 - Custom Ragnarok Online client ***
***   http://www.openkore.com/   ***

Loading #plugins/waitForParty.pl...
Scalar found where operator expected at C:/Documents and Settings/****/My Docu
ments/My Received Files/OpenKore -2.0.5.1/#plugins/wait
ForParty.pl line 64, near "$findParty"
        (Missing semicolon on previous line?)
This plugin cannot be loaded because of a problem in the plugin. Please notify
the plugin's author about this problem, or remove the plugin so OpenKore can
start.

The error message is:
Plugin contains syntax errors:
syntax error at C:/Documents and Settings/****/My Documents/My Received
Files/OpenKore -2.0.5.1/#plugins/waitForParty.pl line
64, near "$findParty "

Press ENTER to exit this program.
Image
Image

Mucilon
Cybernatic Entity
Cybernatic Entity
Posts: 249
Joined: 04 Apr 2008, 13:15
Noob?: Yes
Location: Brazil

Re: waitForParty -- Don't get separeted!

#17 Post by Mucilon »

It is missing a semicolon, use this code:

Code: Select all

########################################
# Wait4Party v1.0.1 -- Stick Together Team!
# ©2008 by Contrad
# 
# This software is open source, licensed under the GNU General Public
# License, version 2.
# Basically, this means that you're allowed to modify and distribute
# this software. However, if you distribute modified versions, you MUST
# also distribute the source code.
# See http://www.gnu.org/licenses/gpl.html for the full license.
#
# How to install :
# I uses self defined hooks instead of 'AI_pre' to reduce PC usage
# So u must copy my modified <Src\Network\Receive.pm> files.
# Else, just change the hooks to a single 'AI_pre' hook.
#
# How to use :
# <config.txt>
# wait4party (0|1)         Wait4Party On or Off
# wait4party_sameMapOnly (0|1)      Only activate if the party member are in the same map
# wait4party_waitBySitting (0|1)   Don't search, just sit and wait
# wait4party_followSit (0|1)      Sitting when party is sitting
#   ATTENTION! Turn off 'followSitAuto' or they'll sit forever!
#
# Anyway I use 'Bahasa' instead of 'English' to promote INDONESIA. :D
# U'r free to translate it.

package wait4party; 

use Plugins;
use Globals;
use Log qw(message error warning debug);

our $findParty;
our $temp;

Plugins::register('waitParty', 'Tungguin anggota grup', \&unload, \&unload);
my $hooks = Plugins::addHooks(   ['actor_player_add', \&waitForOthers, undef],
            ['actor_player_remove', \&waitForOthers, undef],
            ['party_share', \&waitForOthers, undef],
            ['party_move', \&waitForOthers, undef],
            ['actor_action_sit', \&waitForOthers, undef],
            ['actor_action_stand', \&waitForOthers, undef]);

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

sub waitForOthers {
   return if (AI::action eq "attack");
        return unless $config{'wait4party'};
   return unless defined @partyUsersID;
   my $actor;
   foreach (@partyUsersID) {
    next if $_ eq $accountID;
    next if $_ eq "";
      $actor = $playersList->getByID($_);

      if(!$actor && $char->{'party'}{'users'}{$_}{'online'}) {
         if ($config{'wait4party_waitBySitting'}) {
            Commands::cmdSit() if !$char->{sitting};
            if (!$findParty) {
               warning "Party hilang - Duduk untuk tunggu anggota yang hilang\n", "waitParty";
               $findParty = 1;
            }
            return;
         }
         my %party;

         $party{x} = $char->{party}{users}{$_}{pos}{x};
         $party{y} = $char->{party}{users}{$_}{pos}{y};
         ($party{map}) = $char->{party}{users}{$_}{map} =~ /([\s\S]*)\.gat/;

         if ($party{map} ne $field{name} || $party{x} == 0 || $party{y} == 0) {
            return if $config{'wait4party_sameMapOnly'};
            delete $party{x};
            delete $party{y};
         }

         return unless ($party{map} ne $field{name} || exists $party{x});

         if ((exists $ai_v{party} && AI::distance(\%party, $ai_v{party}) > 15)
            || $party{map} != $ai_v{party}{map}
            || (AI::timeOut($ai_v{party}{time}, 15) && AI::distance(\%party, $char->{pos_to}) > $config{followDistanceMax})) {

            $ai_v{party}{x} = $party{x};
            $ai_v{party}{y} = $party{y};
            $ai_v{party}{map} = $party{map};
            $ai_v{party}{time} = time;

            warning "Party hilang - Cari anggota yang hilang\n", "waitParty";

            if ($ai_v{party}{map} ne $field{name}) {
               message "Mencari anggota grup: $ai_v{party}{map}\n", , "follow";
            } elsif (AI::distance(\%party, $char->{pos_to}) > $config{followDistanceMax} ) {
               message "Mencari anggota grup: $ai_v{party}{map} ($ai_v{party}{x},$ai_v{party}{y})\n", "follow";
            } else {
               return;
            }
            AI::clear("move", "route", "mapRoute");
            AI::ai_route($ai_v{party}{map}, $ai_v{party}{x}, $ai_v{party}{y}, distFromGoal => $config{followDistanceMin}, attackOnRoute => 1);
            my $followIndex = AI::findAction("follow");
            if (defined $followIndex) {
               $ai_seq_args[$followIndex]{ai_follow_lost_end}{timeout} = $timeout{ai_follow_lost_end}{timeout};
            }
         }
         $findParty = 1;
         return;
      } elsif ($findParty && ($actor = $playersList->getByID($_))) {
         Commands::cmdStand() if $char->{sitting};
         warning "Party ditemukan.\n", "waitParty";
         $findParty = 0;
      } elsif ($findParty) {
         warning "Party sudah offline atau hilang.\n", "waitParty";
         $findParty = 0;
         return;
      }
      
      if ($config{'wait4party_followSit'} && AI::action ne "sitAuto" && $actor && $actor->{sitting}) {
         if (!$char->{sitting}) {
            Commands::cmdSit();
            warning "Party duduk.\n", "waitParty";
         }
         return;
      }
   }
   if ($config{'wait4party_followSit'} && AI::action ne "sitAuto" && $char->{sitting}) {
      Commands::cmdStand();
      warning "Party berdiri.\n", "waitParty";
   }
}
1;

Chontrad
Human
Human
Posts: 30
Joined: 23 Apr 2008, 10:11
Noob?: No
Location: Indonesia TANAH AIRKU
Contact:

Re: waitForParty -- Don't get separeted!

#18 Post by Chontrad »

Sorry! My mistake! Thanks Mucilon.

adani_jmc
Noob
Noob
Posts: 2
Joined: 28 Apr 2008, 06:00

Re: waitForParty -- Don't get separeted!

#19 Post by adani_jmc »

waw .. its so cool ...
i will try it

thx before :D

Kissa2k
Human
Human
Posts: 46
Joined: 27 Apr 2008, 12:52
Noob?: No
Location: Russia

Re: waitForParty -- Don't get separeted!

#20 Post by Kissa2k »

Thank you, it's what I looking for! Really helpful.

Post Reply