Jump to content
  • 0

request help myy


anginputih

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  81
  • Reputation:   1
  • Joined:  01/06/12
  • Last Seen:  

// ------------------------------------------------------------------------------------------
// ------ rAthena Script Release
// Title: Simple 4 vs 4 PVP Gateway
// Author: jTynne - [email protected]
// Version: 0.1 (Beta)
// Notes:
//	v0.1: This is the UNOPTIMIZED release of a simple 4vs4vs4vs4 PVP gateway.
//		  There are likely bugs in this version. Please report them as you find them!
//		  Please note that this script uses a TON of global variables. Keep that in mind
//		  when using this script in the current version.
// ------------------------------------------------------------------------------------------

prontera,161,190,4	script	PVP 4vs4	91,{
set .@n$,"[^FF0000PVP Manager^000000]";
set .@charid,getcharid(0);
mes .@n$;
mes "Would you like to register for a 4vs4 PVP Battle?";
next;
menu "Yes",-,"No",L_cancel;
if(getmapusers("guild_vs1") > 0) { mes .@n$; mes "There appears to be a match currently in session. Check back momentarily."; close; end; }
mes .@n$;
mes "Which side of the arena would you like to join?";
next;
menu "North ("+$pvp4nA+"/4)",L_north,"South ("+$pvp4nB+"/4)",L_south,"East ("+$pvp4nC+"/4)",L_east,"West ("+$pvp4nD+"/4)",L_west,"Cancel",L_cancel;

L_north:
if(.@charid == $pvp4nAchar1 || .@charid == $pvp4nAchar2 || .@charid == $pvp4nAchar3 || .@charid == $pvp4nAchar4 || .@charid == $pvp4nBchar1 || .@charid == $pvp4nBchar2 || .@charid == $pvp4nBchar3 || .@charid == $pvp4nBchar4 || .@charid == $pvp4nCchar1 || .@charid == $pvp4nCchar2 || .@charid == $pvp4nCchar3 || .@charid == $pvp4nCchar4 || .@charid == $pvp4nDchar1 || .@charid == $pvp4nDchar2 || .@charid == $pvp4nDchar3 || .@charid == $pvp4nDchar4) { mes .@n$; mes "You may only register once per round."; close; end; }
if($pvp4nA < 4) {
set $pvp4nA,$pvp4nA+1;
if($pvp4nA == 1) { set $pvp4nAchar1,getcharid(0); }
if($pvp4nA == 2) { set $pvp4nAchar2,getcharid(0); }
if($pvp4nA == 3) { set $pvp4nAchar3,getcharid(0); }
if($pvp4nA == 4) { set $pvp4nAchar4,getcharid(0); }
if($pvp4nA == 1 || $pvp4nB == 1 || $pvp4nC == 1 || $pvp4nD == 1) { if($pvp4timer == 0 ) { initnpctimer; set $pvp4timer,1; } }
mes .@n$;
mes "You've joined the selected team. Once the other four teams have filled up, you'll automatically be transferred into the PVP arena. If all four teams do not fill up within the next 30 seconds, this session will be cleared.";
npctalk strcharinfo(0)+" has entered the round on the North side.";
if($pvp4nA == 4 && $pvp4nB == 4 && $pvp4nC == 4 && $pvp4nD == 4) { stopnpctimer; goto L_begin;}
close;
end;
}

goto L_full;

L_south:
if(.@charid == $pvp4nAchar1 || .@charid == $pvp4nAchar2 || .@charid == $pvp4nAchar3 || .@charid == $pvp4nAchar4 || .@charid == $pvp4nBchar1 || .@charid == $pvp4nBchar2 || .@charid == $pvp4nBchar3 || .@charid == $pvp4nBchar4 || .@charid == $pvp4nCchar1 || .@charid == $pvp4nCchar2 || .@charid == $pvp4nCchar3 || .@charid == $pvp4nCchar4 || .@charid == $pvp4nDchar1 || .@charid == $pvp4nDchar2 || .@charid == $pvp4nDchar3 || .@charid == $pvp4nDchar4) { mes .@n$; mes "You may only register once per round."; close; end; }
if($pvp4nB < 4) {
set $pvp4nB,$pvp4nB+1;
if($pvp4nB == 1) { set $pvp4nBchar1,getcharid(0); }
if($pvp4nB == 2) { set $pvp4nBchar2,getcharid(0); }
if($pvp4nB == 3) { set $pvp4nBchar3,getcharid(0); }
if($pvp4nB == 4) { set $pvp4nBchar4,getcharid(0); }
if($pvp4nA == 1 || $pvp4nB == 1 || $pvp4nC == 1 || $pvp4nD == 1) { if($pvp4timer == 0 ) { initnpctimer; } else {set $pvp4timer,1; } }
mes .@n$;
mes "You've joined the selected team. Once the other four teams have filled up, you'll automatically be transferred into the PVP arena. If all four teams do not fill up within the next 30 seconds, this session will be cleared.";
npctalk strcharinfo(0)+" has entered the round on the South side.";
if($pvp4nA == 4 && $pvp4nB == 4 && $pvp4nC == 4 && $pvp4nD == 4) { stopnpctimer; goto L_begin;}
close;
end;
}

goto L_full;

L_east:
if(.@charid == $pvp4nAchar1 || .@charid == $pvp4nAchar2 || .@charid == $pvp4nAchar3 || .@charid == $pvp4nAchar4 || .@charid == $pvp4nBchar1 || .@charid == $pvp4nBchar2 || .@charid == $pvp4nBchar3 || .@charid == $pvp4nBchar4 || .@charid == $pvp4nCchar1 || .@charid == $pvp4nCchar2 || .@charid == $pvp4nCchar3 || .@charid == $pvp4nCchar4 || .@charid == $pvp4nDchar1 || .@charid == $pvp4nDchar2 || .@charid == $pvp4nDchar3 || .@charid == $pvp4nDchar4) { mes .@n$; mes "You may only register once per round."; close; end; }
if($pvp4nC < 4) {
set $pvp4nC,$pvp4nC+1;
if($pvp4nC == 1) { set $pvp4nCchar1,getcharid(0); }
if($pvp4nC == 2) { set $pvp4nCchar2,getcharid(0); }
if($pvp4nC == 3) { set $pvp4nCchar3,getcharid(0); }
if($pvp4nC == 4) { set $pvp4nCchar4,getcharid(0); }
if($pvp4nA == 1 || $pvp4nB == 1 || $pvp4nC == 1 || $pvp4nD == 1) { if($pvp4timer == 0 ) { initnpctimer; } else {set $pvp4timer,1; } }
mes .@n$;
mes "You've joined the selected team. Once the other four teams have filled up, you'll automatically be transferred into the PVP arena. If all four teams do not fill up within the next 30 seconds, this session will be cleared.";
npctalk strcharinfo(0)+" has entered the round on the East side.";
if($pvp4nA == 4 && $pvp4nB == 4 && $pvp4nC == 4 && $pvp4nD == 4) { stopnpctimer; goto L_begin;}
close;
end;
}

goto L_full;

L_west:
if(.@charid == $pvp4nAchar1 || .@charid == $pvp4nAchar2 || .@charid == $pvp4nAchar3 || .@charid == $pvp4nAchar4 || .@charid == $pvp4nBchar1 || .@charid == $pvp4nBchar2 || .@charid == $pvp4nBchar3 || .@charid == $pvp4nBchar4 || .@charid == $pvp4nCchar1 || .@charid == $pvp4nCchar2 || .@charid == $pvp4nCchar3 || .@charid == $pvp4nCchar4 || .@charid == $pvp4nDchar1 || .@charid == $pvp4nDchar2 || .@charid == $pvp4nDchar3 || .@charid == $pvp4nDchar4) { mes .@n$; mes "You may only register once per round."; close; end; }
if($pvp4nD < 4) {
set $pvp4nD,$pvp4nD+1;
if($pvp4nD == 1) { set $pvp4nDchar1,getcharid(0); }
if($pvp4nD == 2) { set $pvp4nDchar2,getcharid(0); }
if($pvp4nD == 3) { set $pvp4nDchar3,getcharid(0); }
if($pvp4nD == 4) { set $pvp4nDchar4,getcharid(0); }
if($pvp4nA == 1 || $pvp4nB == 1 || $pvp4nC == 1 || $pvp4nD == 1) { if($pvp4timer == 0 ) { initnpctimer; } else {set $pvp4timer,1; } }
mes .@n$;
mes "You've joined the selected team. Once the other four teams have filled up, you'll automatically be transferred into the PVP arena. If all four teams do not fill up within the next 30 seconds, this session will be cleared.";
npctalk strcharinfo(0)+" has entered the round on the West side.";
if($pvp4nA == 4 && $pvp4nB == 4 && $pvp4nC == 4 && $pvp4nD == 4) { stopnpctimer; goto L_begin;}
close;
end;
}

goto L_full;

L_full:
mes .@n$;
mes "Sorry, but this team is full. Try another team, please.";
close;
end;

L_begin:
npctalk "All four teams have been filled. All participants currently logged in will be transferred to the arena in ten seconds.";
sleep2 10000;
set .@x,0;
L_warploop:
while (.@x < 16) {
	if (.@x == 0)
		{ warpchar "guild_vs1",49,92,$pvp4nAchar1; }
	else if (.@x == 1)
		{ warpchar "guild_vs1",49,92,$pvp4nAchar2; }
	else if (.@x == 2)
		{ warpchar "guild_vs1",49,92,$pvp4nAchar3; }
	else if (.@x == 3)
		{ warpchar "guild_vs1",49,92,$pvp4nAchar4; }
	else if (.@x == 4)
		{ warpchar "guild_vs1",49,8,$pvp4nBchar1; }
	else if (.@x == 5)
		{ warpchar "guild_vs1",49,8,$pvp4nBchar2; }
	else if (.@x == 6)
		{ warpchar "guild_vs1",49,8,$pvp4nBchar3; }
	else if (.@x == 7)
		{ warpchar "guild_vs1",49,8,$pvp4nBchar4; }
	else if (.@x == 8)
		{ warpchar "guild_vs1",92,50,$pvp4nCchar1; }
	else if (.@x == 9)
		{ warpchar "guild_vs1",92,50,$pvp4nCchar2; }
	else if (.@x == 10)
		{ warpchar "guild_vs1",92,50,$pvp4nCchar3; }
	else if (.@x == 11)
		{ warpchar "guild_vs1",92,50,$pvp4nCchar4; }
	else if (.@x == 12)
		{ warpchar "guild_vs1",7,50,$pvp4nDchar1; }
	else if (.@x == 13)
		{ warpchar "guild_vs1",7,50,$pvp4nDchar2; }
	else if (.@x == 14)
		{ warpchar "guild_vs1",7,50,$pvp4nDchar3; }
	else if (.@x == 15)
		{ warpchar "guild_vs1",7,50,$pvp4nDchar4; }
	else
		{ npctalk "A round is now in session."; goto L_clear;}
set .@x, .@x + 1;
}
goto L_warploop;
end;

L_cancel:
mes .@n$;
mes "Do come back if you change your mind.";
close;
end;

OnTimer10000:
npctalk "Ten seconds have passed. Entry to the round ends in 20 seconds.";
end;

OnTimer20000:
npctalk "Twenty seconds have passed. Entry to the round ends in 10 seconds.";
end;

OnTimer30000:
npctalk "Thirty seconds have passed and thus I have canceled the round.";
stopnpctimer;
goto L_clear;

L_clear:
set $pvp4timer,0;
set $pvp4nA,0;
set $pvp4nB,0;
set $pvp4nC,0;
set $pvp4nD,0;
set $pvp4nAchar1,0;
set $pvp4nAchar2,0;
set $pvp4nAchar3,0;
set $pvp4nAchar4,0;
set $pvp4nBchar1,0;
set $pvp4nBchar2,0;
set $pvp4nBchar3,0;
set $pvp4nBchar4,0;
set $pvp4nCchar1,0;
set $pvp4nCchar2,0;
set $pvp4nCchar3,0;
set $pvp4nCchar4,0;
set $pvp4nDchar1,0;
set $pvp4nDchar2,0;
set $pvp4nDchar3,0;
set $pvp4nDchar4,0;
end;
}

-	script	pvp4vs4#1	-1,{
OnPCDieEvent:
getmapxy (.@map$, .@x, .@y, 0);
if(.@map$ == "guild_vs1") { warp "SavePoint",0,0;}
end;

OnPCKillEvent:
getmapxy (.@map$, .@x, .@y, 0);
if( .@map$ == "guild_vs1") {
set .@tempn1$,strcharinfo(0);
set .@tempn2$,rid2name(killedrid);
mapannounce "guild_vs1",""+.@tempn1$+" has killed "+.@tempn2$+".",1,0xD6A4E6;}
end;
}

pleas help my for set my prize blodybranch

idont understand script size prize blodybranch script party vs party

Edited by Arcenciel
Codeboxed
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   2
  • Joined:  11/13/16
  • Last Seen:  

Why can't i register even though i am the party leader? it keeps saying that i have to be a party leader to register?

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

9 hours ago, topechi said:

Why can't i register even though i am the party leader? it keeps saying that i have to be a party leader to register?

Please stop necro'ing old posts :(

Also, I wouldn't expect old scripts to be 100% compatible with the current rAthena scripting engine.

Link to comment
Share on other sites


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

erm..i see your script using alot of Permanent Global Variable...

it is better not to use Permanent Global Variable to store this type of information or data...

if you want..you can try script it like this way..

( Untested Script due to my PC Messed up....my Test Server Gone.. )

prontera,155,181,5 script Sample 757,{
mes "Do you want to register for Team PK ?";
if( getarraysize( .TeamCount ) ){
for( set .@i,0; .@i < getarraysize( .TeamCount ); set .@i,.@i + 1 )
 mes "[ ^FF0000"+getarraysize( .TeamCount )+"th Team^000000 ] : ^0000FF"+getpartyname( .TeamCount[.@i] )+"^000000";
}
next;
if( select("Register as "+( getarraysize( .TeamCount ) + 1 )+"th Team:Cancel") == 2 ) close;
if( !getcharid(1) || getpartyleader( getcharid(1),2 ) != getcharid(1) ){
mes "You must be a ^0000FFLeader^000000 of a party to register for this .";
close;
}
deletearray $@partymembercount,getarraysize( $@partymembercount );
deletearray $@partymembercid,getarraysize( $@partymembercid );
getpartymember getcharid(1),1;
if( $@partymembercount != .RequiredMember ){
mes "Your party required total of ^FF0000"+.RequiredMember+"^000000 Members to register.";
close;
}
if( getarraysize( .TeamCount ) >= .TeamLimit ){
mes "Sorry to inform you that there is no more Slot for you to register.";
mes "Maximum of ^FF0000"+.TeamLimit+" Team^000000 each match.";
close;
}
for( set .@i,0; getarraysize( .TeamCount ); set .@i,.@i + 1 )
if( getcharid(1) == .TeamCount[.@i] ){
 mes "Sorry, you cant register twice in a match.";
 close;
}
set .TeamCount[ getarraysize( .TeamCount ) ],getcharid(1);
announce "New Team Registered, "+getarraysize( .TeamCount )+"th Team is "+getpartyname( getcharid(1) )+" .",bc_map;
mes "Your Team has been Registered.";
mes "However, the Registration will be eliminate if there is not enough team sign up in the next minutes.";
initnpctimer;
close;
OnTimer60000:
if( getarraysize( .TeamCount ) < .TeamLimit ){
announce "[ Team PK ] : Cancelled due to not enough teams Register in given time.",0;
deletearray .TeamCount,getarraysize( .TeamCount );
}else{
announce "[ Team PK ] : Match is going to start now. Prepare yourself..",0;
for( set .@i,0; getarraysize( .TeamCount ); set .@i,.@i + 1 )
 warpparty .Map$,0,0,.TeamCount[.@i];
}
stopnpctimer;
end;
OnPCDieEvent:
if( strcharinfo(3) == .Map$ ){
announce "[ "+strcharinfo(0)+" ] killed by "+rid2name( killerrid )+" .",bc_map;
warp "SavePoint",0,0;
}
end;
OnInit:
// How many Available team for PK
set .TeamLimit,4;
// How many Party Members required each teams
set .RequiredMember,4;
// What Map will be used
set .Map$,"guild_vs5";
end;

}

anyway..based on your topic...

i dunno how you want to determine which guild win.....

>.<

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   1
  • Joined:  03/07/12
  • Last Seen:  

edit script party vs party to guild vs guild?

guild master can register only.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

http://www.eathena.w...howtopic=262755

this script has a minor bug

change this

OnPCDieEvent:

into

OnPCDieEvent:
OnPCLogoutEvent:

and add guildlock mapflag at the end of the script

then should be working as a new

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