Jump to content
  • 0

help me with this one anyone?


blakbord

Question


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   1
  • Joined:  02/10/12
  • Last Seen:  

maintown,156,209,5 script 3 vs 3 Recruiter 56,{
function isreq;
 
callsub L_check;
select( "Register ?" );
 
if( !getcharid(1) ) {
mes "you're not in a party";
close;
}
else if( .party1 == getcharid(1) || .party2 == getcharid(1) ) {
mes "you're already on my list";
close;
}
getpartymember getcharid(1);
if( $@partymembercount != 3 || !instance_check_party( getcharid(1),3 ) ) {
mes "you need 3 players online in your party";
close;
}
callsub L_check;
if( !.party2 )
.party2 = getcharid(1);
else
.party1 = getcharid(1);
dispbottom "your party is now on my list";
if( !.party1 || !.party2 ) end;
 
.start = 1;
warpparty .map_event$, 7,50, .party1;
warpparty .map_event$, 92,50, .party2;
initnpctimer;
end;
 
OnPCKillEvent:
.@self = getcharid(3);
.@killed = killedrid;
.@is_reg = isreq();
attachrid( .@killed );
if( !isreq() ) end;
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
for( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid( $@partymemberaid[.@i] );
sleep2 1;
if( strcharinfo(3) == .map_event$ ) {
.@is_online += 1;
if( Hp < 1 )
.@count += 1;
}
}
}
if( .@is_online != .@count ) {
attachrid( .@killed );
sleep2( .wait * 1000 );
//atcommand "@alive";
end;
}
else if( !.@is_reg ) end;
 
attachrid( .@self );
sleep2 2;
announce "team "+ getpartyname( getcharid(1) ) +" win the event !", 0;
getpartymember getcharid(1);
getpartymember getcharid(1),1;
getpartymember getcharid(1),2;
for( .@i = 0; .@i < $@partymembercount; .@i++ )
if( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
getmapxy .@map$, .@x, .@y, 0, $@partymembername$[.@i];
if( .@map$ == .map_event$ )
getitem .item_id, .item_count, $@partymemberaid[.@i];
}
stopnpctimer;
sleep 3000;
 
OnTimer300000: // 5 min then end of event
.start = .party1 = .party2 = 0;
mapwarp .map_event$,"turbo_room",100,99;
end;
 
L_check:
if( .start ) end;
else if( getpartyname( .party1 ) == "null" )
.party1 = 0;
else if( getpartyname( .party2 ) == "null" )
.party2 = 0;
else if( getpartyname( .party1 ) != "null" ) {
getpartymember .party1;
if( $@partymembercount != .count_req || !instance_check_party( .party1,.count_req ) )
.party1 = 0;
}
else if( getpartyname( .party2 ) != "null" ) {
getpartymember .party2;
if( $@partymembercount != .count_req || !instance_check_party( .party2,.count_req ) )
.party2 = 0;
}
return;
 
function isreq {
if( strcharinfo(3) == .map_event$ && .start && ( getcharid(1) == .party1 || getcharid(1) == .party2 ) ) return 1;
return 0;
}
OnInit:
waitingroom "3 vs 3 Registration", 0;
.map_event$ = "guild_vs1"; // your event map
.count_req = 1; // count required in the party to start the event
//.wait = 20; // time in secs to be rezu
.item_id = 7539; // item id gained
.item_count = 5; // item count gained
 
setmapflag .map_event$,mf_noteleport;
setmapflag .map_event$,mf_nowarp;
setmapflag .map_event$,mf_nowarpto;
setmapflag .map_event$,mf_nomemo;
setmapflagnosave .map_event$,"maintown",156,203;
setmapflag .map_event$,mf_partylock;
setmapflag .map_event$,mf_pvp;
end;
}

 

if 1 player is killed will automatically warp at maintown

the winning party will automatically warp at bat_b01 10 290

and the loser will warp at bat_b01 390 9

 

thanks in advance..

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...