Jump to content
  • 0

check party if all the member and leader has the TCG?


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

how to script that when you click and npc it will check all users in the party and when the npc confirms they all have the tcg i will party warp them to the specific dungeon and the npc will delete all the item in the players inventory......

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Editing

prontera,150,160,5	script	ghjkl	456,{

.@itemid = 7227;
.@amount = 10;
.@event_map$ = "prontera";
.@aid = getcharid(3);

if( !getcharid(1) ) {
	mes "You are not in a party.";
	close;
}

getpartymember getcharid(1),0;
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;

while( .@i < $@partymembercount ){
	if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
		attachrid( $@partymemberaid[ .@i ] );
		if( countitem( .@itemid ) < .@amount ){
			attachrid( .@aid );
			mes "Your member "+$@partymembername$[.@i]+" haven't "+.@amount+" "+getitemname( .@itemid )+".";
			close;
		}
		.@log_in[ getarraysize( .@log_in ) ] = $@partymemberaid[ .@i ];
	}
	.@i++;
}

for( .@i = 0; .@i < getarraysize( .@log_in ); .@i++ )
	delitem .@itemid, .@amount, .@log_in[ .@i ];

attachrid( .@aid );
dispbottom "All got items.";

warpparty .@event_map$, 150,150, getcharid(1);
close;
}

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

solved....... thank you

Link to comment
Share on other sites

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.

×
×
  • Create New...