Jump to content
  • 0

R> Party members when killing


Question

Posted

Hello Good day! Im here for requesting the script. This is for the party members receiving the item.

Example: When one of the party members killed the enemy, everyone (only party members in the same MAP) will receive an item.

Thanks in advance. :)

~kyeme

8 answers to this question

Recommended Posts

Posted
OnLABEL:

if( getcharid(1) ){
set .@Location$,strcharinfo(3);
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
for ( set .@a, 0; .@a < $@partymembercount; set .@a, .@a +1 )
if ( isloggedin( $@partymemberaid[.@a] )  ){
attachrid( $@partymemberaid[.@a] );
if( strcharinfo(3) == .@Location$ ){
getitem 607,1;
getitem 608,1;
 }
}
}
end;

Posted (edited)

Thanks Sir Emistry! Il try this.. :)

Hi Sir but the script is not working,

i change d into

- script Test -1,{

OnPCKillEvent:

if( getcharid(1) ){

set .@Location$,strcharinfo(3);

getpartymember getcharid(1),1;

getpartymember getcharid(1),2;

for ( set .@a, 0; .@a < .partymembercount; set .@a, .@a +1 )

if ( isloggedin( .partymemberaid[.@a] ) )

attachrid( .partymemberaid[.@a] );

if( strcharinfo(3) == .@Location$ ){

getitem 607,1;

getitem 608,1;

}

}

end;

}

But still not working, only the killer can get the items.

Edited by kyeme
Posted

try this again

fixed wrong variable

OnLABEL:
if( getcharid(1) ){
set .@Location$,strcharinfo(3);
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
for ( set .@a, 0; .@a < $@partymembercount; set .@a, .@a +1 )
if ( isloggedin( $@partymemberaid[.@a] )  ){
attachrid( $@partymemberaid[.@a] );
if( strcharinfo(3) == .@Location$ ){
getitem 607,1;
getitem 608,1;
 }
}
}
end;

  • Upvote 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...