Jump to content
  • 0
Sign in to follow this  
karazu

Custom Battle Ground by goddammit (not properly working)

Question

This is a Rathena Script "2012"

No error in MAP DB

Related Topics
http://rathena.org/board/topic/88644-what-is-the-error-all-about/            (solve no error on map DB)
http://rathena.org/board/topic/88636-onclock-command/#entry227658     (solve no error on map DB)

 

 

 

Theirs a problem probably because this is a rAthena script year ago. 
NOTE: I am using Hercules.

This is the Script

 

//Author-Script		Goddameit	My forum : http://bit.ly/MDuQ9F	//Author-Map		TrojanWorm//Version		2012-10-31//Don't re-release in anywhere and anyway//////////////////////////////////////////////////////////////////////////endless_war	mapflag	battleground	2endless_war,218,86,0	script	#BattleGroundwarpA2	100,{	end;OnInit:	waitingroom "Join Team A(Click)",2,"#BattleGroundwarpA2::OnJoin",1;	end;OnJoin:	if(!$@bg_id_a)		set $@bg_id_a,waitingroom2bg("endless_war",205,85,"","");	else		waitingroom2bg_single($@bg_id_a,"endless_war",205,85,"#BattleGroundwarpA2");	warpwaitingpc "endless_war",205,85;	end;}endless_war,40,86,0	script	#BattleGroundwarpB2	100,{	end;OnInit:	waitingroom "Join Team B(Click)",2,"#BattleGroundwarpB2::OnJoin",1;	end;OnJoin:	if(!$@bg_id_		set $@bg_id_b,waitingroom2bg("endless_war",53,85,"","");	else	waitingroom2bg_single($@bg_id_b,"endless_war",53,85,"#BattleGroundwarpB2");	warpwaitingpc "endless_war",53,85;	end;}endless_war,165,86,0	script	#BattleGroundwarpA1	45,2,2,{	warp "endless_war",161,86;	end;}endless_war,90,86,0	script	#BattleGroundwarpB1	45,2,2,{	warp "endless_war",94,86;	end;}prontera,150,180,4	script	Battle Ground	100,{	if(.status==2)	{		mes "Game is running.";		close;	}	if(.status==1)	{				if(.playernm>=128)		{			mes "Sorry, full";			close;		}		select("Join");		if(!.playerid[1])		{			//callsub OnEndd;			initnpctimer;		}		set .playernm,.playernm+1;		set .playerid[.playernm],getcharid(0);		mes "Complete";		close;	}	end;OnMinute00:OnMinute15:OnMinute30:OnMinute45:	callsub OnActive;	end;OnActive:	callsub OnEndd;	set .status,1;	Announce "[Battle Ground]:Someone active the game! Go to prontera,150,180 and join us!",0;	end;OnTimer60000:if(.point[1]>.point[2]){Announce "[Battle Ground]:Team A Win!",0;getitem $@bg_id_a,605,1;}else if(.point[2]>.point[1]){Announce "[Battle Ground]:Team B Win!",0;getitem $@bg_id_b,605,1;}else{Announce "[Battle Ground]:Draw!",0;getitem $@bg_id_a,605,1;getitem $@bg_id_b,605,1;}	callsub OnEnab2;	end;OnTimer90000:	set .status,2;	Announce "[Battle Ground]:Go!",0;	bg_monster $@bg_id_a,"endless_war",128,120,"A",1907,"Battle Ground::OnAdestory";	bg_monster $@bg_id_b,"endless_war",127,46,"B",1907,"Battle Ground::OnBdestory";	callsub OnEnab1;	end;OnTimer190000:	if(.point[1]>.point[2])	{		Announce "[Battle Ground]:Team A Win!",0;		getitem $@bg_id_a,605,1;	}else if(.point[2]>.point[1])	{		Announce "[Battle Ground]:Team B Win!",0;		getitem $@bg_id_b,605,1;	}else	{		Announce "[Battle Ground]:Draw!",0;		getitem $@bg_id_a,605,1;		getitem $@bg_id_b,605,1;	}	sleep2 3000;	callsub OnEndd;		end;OnBdestory:	set .point[1],.point[1]+5;	set .point[2],.point[2]-3;	bg_updatescore "endless_war",.point[1],.point[2];	detachrid;	sleep2 10000;	bg_monster $@bg_id_b,"endless_war",127,46,"B",1907,"Battle Ground::OnBdestory";	end;OnAdestory:	set .point[2],.point[2]+5;	set .point[1],.point[1]-3;	bg_updatescore "endless_war",.point[1],.point[2];	detachrid;	sleep2 10000;	bg_monster $@bg_id_a,"endless_war",128,120,"A",1907,"Battle Ground::OnAdestory";	end;OnEndd:	set .status,0;	bg_destroy $@bg_id_a;	bg_destroy $@bg_id_b;	set $@bg_id_a,0;	set $@bg_id_b,0;	setarray .point[1],0,0;	killmonsterall "endless_war";	bg_updatescore "endless_war",.point[1],.point[2];	deletearray .playerid[0],128;	mapwarp "endless_war","prontera",150,180;	callsub OnDisa;	return;OnEnab1:	enablenpc "#BattleGroundwarpA1";	enablenpc "#BattleGroundwarpB1";	return;OnEnab2:	enablenpc "#BattleGroundwarpA2";	enablenpc "#BattleGroundwarpB2";	return;OnDisa:	disablenpc "#BattleGroundwarpA1";	disablenpc "#BattleGroundwarpB1";	disablenpc "#BattleGroundwarpA2";	disablenpc "#BattleGroundwarpB2";	return;OnInit:	sleep2 10000;	setwall "endless_war",218,87,1,1,0,"BattleGroundwarpA21";	setwall "endless_war",219,87,1,1,0,"BattleGroundwarpA22";	setwall "endless_war",219,86,1,1,0,"BattleGroundwarpA23";	setwall "endless_war",219,85,1,1,0,"BattleGroundwarpA24";	setwall "endless_war",218,85,1,1,0,"BattleGroundwarpA25";	setwall "endless_war",217,85,1,1,0,"BattleGroundwarpA26";	setwall "endless_war",217,86,1,1,0,"BattleGroundwarpA27";	setwall "endless_war",217,87,1,1,0,"BattleGroundwarpA28";	setwall "endless_war",40,87,1,1,0,"BattleGroundwarpB21";	setwall "endless_war",41,87,1,1,0,"BattleGroundwarpB22";	setwall "endless_war",41,86,1,1,0,"BattleGroundwarpB23";	setwall "endless_war",41,85,1,1,0,"BattleGroundwarpB24";	setwall "endless_war",40,85,1,1,0,"BattleGroundwarpB25";	setwall "endless_war",39,85,1,1,0,"BattleGroundwarpB26";	setwall "endless_war",39,86,1,1,0,"BattleGroundwarpB27";	setwall "endless_war",39,87,1,1,0,"BattleGroundwarpB28";	callsub OnEndd;	end;OnPCKillEvent:	if(strcharinfo(3)=="endless_war" && $@bg_id_a && $@bg_id_	{		if(getcharid(4) == $@bg_id_a)		{			set .point[1],.point[1]+1;		}else			set .point[2],.point[2]+1;		bg_updatescore "endless_war",.point[1],.point[2];	}	end;} 

This is the problem

You can click it.
Choose Join but after that It will  re direct you to Complete.
And it will continue to announce the statuses
post-2388-0-78650200-1381809029_thumb.jpg

 

Share this post


Link to post
Share on other sites

25 answers to this question

Recommended Posts

  • 0

You Edited it Wrong.

btw you want it every 15 minutes(as what I see from script)

Here's the Fixed Script. Just edit the item id and quantity on Line 124 and 125.

//Author-Script		Goddameit	My forum : http://bit.ly/MDuQ9F	//Author-Map		TrojanWorm//Version		2012-10-31//Don't re-release in anywhere and anyway//////////////////////////////////////////////////////////////////////////endless_war	mapflag	battleground	2endless_war,218,86,0	script	#BattleGroundwarpA2	100,{	end;OnInit:	waitingroom "Join Team A(Click)",2,"#BattleGroundwarpA2::OnJoin",1;	end;OnJoin:	if(!$@bg_id_a)		set $@bg_id_a,waitingroom2bg("endless_war",205,85,"","");	else		waitingroom2bg_single($@bg_id_a,"endless_war",205,85,"#BattleGroundwarpA2");	warpwaitingpc "endless_war",205,85;	end;}endless_war,40,86,0	script	#BattleGroundwarpB2	100,{	end;OnInit:	waitingroom "Join Team B(Click)",2,"#BattleGroundwarpB2::OnJoin",1;	end;OnJoin:	if(!$@bg_id_		set $@bg_id_b,waitingroom2bg("endless_war",53,85,"","");	else	waitingroom2bg_single($@bg_id_b,"endless_war",53,85,"#BattleGroundwarpB2");	warpwaitingpc "endless_war",53,85;	end;}endless_war,165,86,0	script	#BattleGroundwarpA1	45,2,2,{	warp "endless_war",161,86;	end;}endless_war,90,86,0	script	#BattleGroundwarpB1	45,2,2,{	warp "endless_war",94,86;	end;}prontera,150,180,4	script	Battle Ground	100,{	if(.status==2)	{		mes "Game is running.";		close;	}	if(.status==1)	{				if(.playernm>=128)		{			mes "Sorry, full";			close;		}		select("Join");		if(!.playerid[1])		{			//callsub OnEndd;			initnpctimer;		}		set .playernm,.playernm+1;		set .playerid[.playernm],getcharid(0);		mes "Complete";		close;	}	end;OnMinute00:OnMinute15:OnMinute30:OnMinute45:	callsub OnActive;	end;OnActive:	callsub OnEndd;	set .status,1;	Announce "[Battle Ground]:Someone active the game! Go to prontera,150,180 and join us!",0;	end;OnTimer60000:	if(.playernm<=32)	{		Announce "[Battle Ground]:Sorry, player amount isn't enough",0;		callsub OnEndd;		end;	}	Announce "[Battle Ground]:Event is ready!",0;	for(set .@i,1;.@i<=.playernm;set .@i,.@i+1)	{		if(.@i%2==0)			warpchar "endless_war",218,86,.playerid[.@i];		else			warpchar "endless_war",40,86,.playerid[.@i];	}	callsub OnEnab2;	end;OnTimer90000:	set .status,2;	Announce "[Battle Ground]:Go!",0;	bg_monster $@bg_id_a,"endless_war",128,120,"A",1907,"Battle Ground::OnAdestory";	bg_monster $@bg_id_b,"endless_war",127,46,"B",1907,"Battle Ground::OnBdestory";	callsub OnEnab1;	end;OnTimer190000:	if(.point[1]>.point[2]){		set .bg_id_w,$@bg_id_a;		Announce "[Battle Ground]:Team A Win!",0;	}else if(.point[2]>.point[1]){		set .bg_id_w,$@bg_id_b;		Announce "[Battle Ground]:Team B Win!",0;	}else{		set .bg_id_w,-1;		Announce "[Battle Ground]:Draw!",0;	}	for( set .@i,1; .playerid[.@i]; set .@i,.@i+1 ){		if( attachrid(.playerid[.@i]) ){	//Prize if Team A win			if(.bg_id_w == -1){ getitem <ItemID HERE>,<Item Quantity Here>;} //If Match Draws			else if( getcharid(4) == .bg_id_w ) {getitem <ItemID HERE>,<Item Quantity Here>;} //If Someone Wins		}	}	sleep2 3000;	callsub OnEndd;		end;OnBdestory:	set .point[1],.point[1]+5;	set .point[2],.point[2]-3;	bg_updatescore "endless_war",.point[1],.point[2];	detachrid;	sleep2 10000;	bg_monster $@bg_id_b,"endless_war",127,46,"B",1907,"Battle Ground::OnBdestory";	end;OnAdestory:	set .point[2],.point[2]+5;	set .point[1],.point[1]-3;	bg_updatescore "endless_war",.point[1],.point[2];	detachrid;	sleep2 10000;	bg_monster $@bg_id_a,"endless_war",128,120,"A",1907,"Battle Ground::OnAdestory";	end;OnEndd:	set .status,0;	bg_destroy $@bg_id_a;	bg_destroy $@bg_id_b;	set $@bg_id_a,0;	set $@bg_id_b,0;	setarray .point[1],0,0;	killmonsterall "endless_war";	bg_updatescore "endless_war",.point[1],.point[2];	deletearray .playerid[0],128;	mapwarp "endless_war","prontera",150,180;	callsub OnDisa;	return;OnEnab1:	enablenpc "#BattleGroundwarpA1";	enablenpc "#BattleGroundwarpB1";	return;OnEnab2:	enablenpc "#BattleGroundwarpA2";	enablenpc "#BattleGroundwarpB2";	return;OnDisa:	disablenpc "#BattleGroundwarpA1";	disablenpc "#BattleGroundwarpB1";	disablenpc "#BattleGroundwarpA2";	disablenpc "#BattleGroundwarpB2";	return;OnInit:	sleep2 10000;	setwall "endless_war",218,87,1,1,0,"BattleGroundwarpA21";	setwall "endless_war",219,87,1,1,0,"BattleGroundwarpA22";	setwall "endless_war",219,86,1,1,0,"BattleGroundwarpA23";	setwall "endless_war",219,85,1,1,0,"BattleGroundwarpA24";	setwall "endless_war",218,85,1,1,0,"BattleGroundwarpA25";	setwall "endless_war",217,85,1,1,0,"BattleGroundwarpA26";	setwall "endless_war",217,86,1,1,0,"BattleGroundwarpA27";	setwall "endless_war",217,87,1,1,0,"BattleGroundwarpA28";	setwall "endless_war",40,87,1,1,0,"BattleGroundwarpB21";	setwall "endless_war",41,87,1,1,0,"BattleGroundwarpB22";	setwall "endless_war",41,86,1,1,0,"BattleGroundwarpB23";	setwall "endless_war",41,85,1,1,0,"BattleGroundwarpB24";	setwall "endless_war",40,85,1,1,0,"BattleGroundwarpB25";	setwall "endless_war",39,85,1,1,0,"BattleGroundwarpB26";	setwall "endless_war",39,86,1,1,0,"BattleGroundwarpB27";	setwall "endless_war",39,87,1,1,0,"BattleGroundwarpB28";	callsub OnEndd;	end;OnPCKillEvent:	if(strcharinfo(3)=="endless_war" && $@bg_id_a && $@bg_id_	{		if(getcharid(4) == $@bg_id_a)		{			set .point[1],.point[1]+1;		}else			set .point[2],.point[2]+1;		bg_updatescore "endless_war",.point[1],.point[2];	}	end;}
Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

Same thing Mr. Dastgir Pojee


Everytime i click the NPC>Join>I will just say complete.


And statuses will still be announce like

Not Enough Player.
Go!!!! (event though the NPC already announce that not enough player) 
Draw!!

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0

You Edited it Wrong.

btw you want it every 15 minutes(as what I see from script)

Here's the Fixed Script. Just edit the item id and quantity on Line 124 and 125.

 

No error in the map DB thought. 

Share this post


Link to post
Share on other sites
  • 0

Same thing Mr. Dastgir Pojee

 

 

Everytime i click the NPC>Join>I will just say complete.

 

 

And statuses will still be announce like

 

Not Enough Player.

Go!!!! (event though the NPC already announce that not enough player) 

Draw!!

Edit Line 82,

Because the script bydefault runs if there are more than 32 player registered.

Share this post


Link to post
Share on other sites
  • 0

I tried to reduce it to 2 players and still not working.
 

 

OnTimer60000:	if(.playernm<=2)	{		Announce "[Battle Ground]:Sorry, player amount isn't enough",0;		callsub OnEndd;		end;	} 

 




and also what is is all about?
maybe this something to do?
 

 

	if(.status==1)	{				if(.playernm>=128)		{			mes "Sorry, full";			close;		} 

 

Share this post


Link to post
Share on other sites
  • 0

OnTimer60000:	if(.playernm<=2)	{		Announce "[Battle Ground]:Sorry, player amount isn't enough",0;		callsub OnEndd;		end;	} 

is atleast 2 right?

 

 

1 vs 1? is it correct?

 

Share this post


Link to post
Share on other sites
  • 0

 

Same thing Mr. Dastgir Pojee

 

 

Everytime i click the NPC>Join>I will just say complete.

 

 

And statuses will still be announce like

 

Not Enough Player.

Go!!!! (event though the NPC already announce that not enough player) 

Draw!!

Edit Line 82,

Because the script bydefault runs if there are more than 32 player registered.

Hello, Its great that the game works now, but the prize script doesnt work.

 

 

 

Draw or win it will not give you item.

 

 

OnTimer190000:	if(.point[1]>.point[2]){		set .bg_id_w,$@bg_id_a;		Announce "[Battle Ground]:Team A Win!",0;	}else if(.point[2]>.point[1]){		set .bg_id_w,$@bg_id_b;		Announce "[Battle Ground]:Team B Win!",0;	}else{		set .bg_id_w,-1;		Announce "[Battle Ground]:Draw!",0;	}	for( set .@i,1; .playerid[.@i]; set .@i,.@i+1 ){		if( attachrid(.playerid[.@i]) ){	//Prize if Team A win			if(.bg_id_w == -1){ getitem 605,1;} //If Match Draws			else if( getcharid(4) == .bg_id_w ) { getitem 605,1;} //If Someone Wins		}	} 

 

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0

Maybe change line 116 to

for( set .i,1; .i <= getarraysize(.playerid[.i]); set .i,.i+1 ){
Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

Please avoid double, triple, quadruple, posting.. You must edit your first po and add what you want to say..

Edited by sevenzz23

Share this post


Link to post
Share on other sites
  • 0

 

Maybe change line 116 to

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){

Thank you, for this.

 

Hello Dastgir Pojee

 

Another problem exist.

 

After the NPC announces the winner, It will not give the prize and wont warp you back to the prontera.?

but before I added this line the script works fine about warping back to prontera?

 

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 

also tried this one

 

for( set .@i,1; getarraysize(.playerid[.@i]) < .@i; set .@i,.@i+1 ){ 

 

booth are not giving the prize

 

but the sequences are working fine, just don't have prize

 

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0

 

Maybe change line 116 to

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){
Thank you, for this.

Hello Dastgir Pojee

Another problem exist.

After the NPC announces the winner, It will not give the prize and wont warp you back to the prontera.?

but before I added this line the script works fine about warping back to prontera?

 

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 
also tried this one

 

for( set .@i,1; getarraysize(.playerid[.@i]) < .@i; set .@i,.@i+1 ){ 

booth are not giving the prize

but the sequences are working fine, just don't have prize

 

Maybe some error in map-server on oot or at end of event, please report it.

Share this post


Link to post
Share on other sites
  • 0

I will thank you


I will use this line
 

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 
 

 

 

Maybe change line 116 to

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){
Maybe some error in map-server on oot or at end of event, please report it.

 

sorry for the late reply this is the error using this line
 

 

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 

 

 

post-2388-0-99147000-1381932673_thumb.jpg

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0
 

 

 

Maybe change line 116 to

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){
Maybe some error in map-server on oot or at end of event, please report it.

 

sorry for the late reply this is the error using this line
 

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 

post-2388-0-87068800-1381930514_thumb.jpg

 

 

 

 

 

EDIT:
Sorry for double post again, I cant erase this second 1

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0

Updated post #12, i forgot a .

Testing

 

 

EDIT:

if u sing this one ( the game will end.) but no prize

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 

 

 

if the updated

 

 

for( set .i,1; .i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 

it will not give you prize and the event will not end.

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0

Update:

with this

 

for( set .i,1; i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 

post-2388-0-87068800-1381930514_thumb.jpg

 

 

 

 

for( set .i,1; .i <= getarraysize(.playerid[.i]); set .i,.i+1 ){ 

 

 

post-2388-0-45102100-1381975286_thumb.jpg




 

Edited by karazu

Share this post


Link to post
Share on other sites
  • 0
//Author-Script		Goddameit	My forum : http://bit.ly/MDuQ9F	//Author-Map		TrojanWorm//Version		2012-10-31//Don't re-release in anywhere and anyway//////////////////////////////////////////////////////////////////////////endless_war	mapflag	battleground	2endless_war,218,86,0	script	#BattleGroundwarpA2	100,{	end;OnInit:	waitingroom "Join Team A(Click)",2,"#BattleGroundwarpA2::OnJoin",1;	end;OnJoin:	if(!$@bg_id_a)		set $@bg_id_a,waitingroom2bg("endless_war",205,85,"","");	else		waitingroom2bg_single($@bg_id_a,"endless_war",205,85,"#BattleGroundwarpA2");	warpwaitingpc "endless_war",205,85;	end;}endless_war,40,86,0	script	#BattleGroundwarpB2	100,{	end;OnInit:	waitingroom "Join Team B(Click)",2,"#BattleGroundwarpB2::OnJoin",1;	end;OnJoin:	if(!$@bg_id_		set $@bg_id_b,waitingroom2bg("endless_war",53,85,"","");	else	waitingroom2bg_single($@bg_id_b,"endless_war",53,85,"#BattleGroundwarpB2");	warpwaitingpc "endless_war",53,85;	end;}endless_war,165,86,0	script	#BattleGroundwarpA1	45,2,2,{	warp "endless_war",161,86;	end;}endless_war,90,86,0	script	#BattleGroundwarpB1	45,2,2,{	warp "endless_war",94,86;	end;}prontera,150,180,4	script	Battle Ground	100,{	if(.status==2)	{		mes "Game is running.";		close;	}	if(.status==1)	{				if(.playernm>=64)		{			mes "Sorry, full";			close;		}		select("Join");		if(!.playerid[1])		{			//callsub OnEndd;			initnpctimer;		}		set .playernm,.playernm+1;		set .playerid[.playernm],getcharid(0);		mes "Complete";		close;	}	end;OnMinute00:OnMinute10:OnMinute20:OnMinute30:OnMinute40:OnMinute50:	callsub OnActive;	end;OnActive:	callsub OnEndd;	set .status,1;	Announce "[Battle Ground]:Someone active the game! Go to prontera,150,180 and join us!",0;	end;OnTimer60000:	if(.playernm<=1)	{		Announce "[Battle Ground]:Sorry, player amount isn't enough",0;		callsub OnEndd;		end;	}	Announce "[Battle Ground]:Event is ready!",0;	for(set .@i,1;.@i<=.playernm;set .@i,.@i+1)	{		if(.@i%2==0)			warpchar "endless_war",218,86,.playerid[.@i];		else			warpchar "endless_war",40,86,.playerid[.@i];	}	callsub OnEnab2;	end;OnTimer90000:	set .status,2;	Announce "[Battle Ground]:Go!",0;	bg_monster $@bg_id_a,"endless_war",128,120,"A",1907,"Battle Ground::OnAdestory";	bg_monster $@bg_id_b,"endless_war",127,46,"B",1907,"Battle Ground::OnBdestory";	callsub OnEnab1;	end;OnTimer190000:	if(.point[1]>.point[2]){		set .bg_id_w,$@bg_id_a;		Announce "[Battle Ground]:Team A Win!",0;	}else if(.point[2]>.point[1]){		set .bg_id_w,$@bg_id_b;		Announce "[Battle Ground]:Team B Win!",0;	}else{		set .bg_id_w,-1;		Announce "[Battle Ground]:Draw!",0;	}	for( set .i,1; .i <= getarraysize(.playerid[.i]); set .i,.i+1 ){		if( attachrid(.playerid[.@i]) ){	//Prize if Team A win			if(.bg_id_w == -1){ getitem 605,1;} //If Match Draws			else if( getcharid(4) == .bg_id_w ) { getitem 605,1;} //If Someone Wins		}	}	sleep2 3000;	callsub OnEndd;		end;OnBdestory:	set .point[1],.point[1]+5;	set .point[2],.point[2]-3;	bg_updatescore "endless_war",.point[1],.point[2];	detachrid;	sleep2 10000;	bg_monster $@bg_id_b,"endless_war",127,46,"B",1907,"Battle Ground::OnBdestory";	end;OnAdestory:	set .point[2],.point[2]+5;	set .point[1],.point[1]-3;	bg_updatescore "endless_war",.point[1],.point[2];	detachrid;	sleep2 10000;	bg_monster $@bg_id_a,"endless_war",128,120,"A",1907,"Battle Ground::OnAdestory";	end;OnEndd:	set .status,0;	bg_destroy $@bg_id_a;	bg_destroy $@bg_id_b;	set $@bg_id_a,0;	set $@bg_id_b,0;	setarray .point[1],0,0;	killmonsterall "endless_war";	bg_updatescore "endless_war",.point[1],.point[2];	deletearray .playerid[0],64;	mapwarp "endless_war","prontera",150,180;	callsub OnDisa;	return;OnEnab1:	enablenpc "#BattleGroundwarpA1";	enablenpc "#BattleGroundwarpB1";	return;OnEnab2:	enablenpc "#BattleGroundwarpA2";	enablenpc "#BattleGroundwarpB2";	return;OnDisa:	disablenpc "#BattleGroundwarpA1";	disablenpc "#BattleGroundwarpB1";	disablenpc "#BattleGroundwarpA2";	disablenpc "#BattleGroundwarpB2";	return;OnInit:	sleep2 10000;	setwall "endless_war",218,87,1,1,0,"BattleGroundwarpA21";	setwall "endless_war",219,87,1,1,0,"BattleGroundwarpA22";	setwall "endless_war",219,86,1,1,0,"BattleGroundwarpA23";	setwall "endless_war",219,85,1,1,0,"BattleGroundwarpA24";	setwall "endless_war",218,85,1,1,0,"BattleGroundwarpA25";	setwall "endless_war",217,85,1,1,0,"BattleGroundwarpA26";	setwall "endless_war",217,86,1,1,0,"BattleGroundwarpA27";	setwall "endless_war",217,87,1,1,0,"BattleGroundwarpA28";	setwall "endless_war",40,87,1,1,0,"BattleGroundwarpB21";	setwall "endless_war",41,87,1,1,0,"BattleGroundwarpB22";	setwall "endless_war",41,86,1,1,0,"BattleGroundwarpB23";	setwall "endless_war",41,85,1,1,0,"BattleGroundwarpB24";	setwall "endless_war",40,85,1,1,0,"BattleGroundwarpB25";	setwall "endless_war",39,85,1,1,0,"BattleGroundwarpB26";	setwall "endless_war",39,86,1,1,0,"BattleGroundwarpB27";	setwall "endless_war",39,87,1,1,0,"BattleGroundwarpB28";	callsub OnEndd;	end;OnPCKillEvent:	if(strcharinfo(3)=="endless_war" && $@bg_id_a && $@bg_id_	{		if(getcharid(4) == $@bg_id_a)		{			set .point[1],.point[1]+1;		}else			set .point[2],.point[2]+1;		bg_updatescore "endless_war",.point[1],.point[2];	}	end;} 

Share this post


Link to post
Share on other sites
  • 0

I think you are getting error because of getarraysize 

 

read this.. 

 

doc/script_command.txt

The party members will (apparently) be found regardless of whether they are online or offline. Note that the names come in no particular order.Be sure to use $@partymembercount to go through this array, and not 'getarraysize', because it is not cleared between runs of 'getpartymember'.If someone with 7 party members invokes this script, the array would have 7 elements. But if another person calls up the NPC, and he has a party of 5, the server will not clear the array for you, overwriting the values instead. So in addition to returning the 5 member names, the 6th and 7th elements from the last call remain, and you will get 5+2 members, of which the last 2 don't belong to the new guy's party. $@partymembercount will always contain the correct number, (5) unlike 'getarraysize()' which will return 7 in this case.

try to revised your script and use getpartymember <party id>{,<type>}; instead

I'm not sure in this but give it a try :)

Share this post


Link to post
Share on other sites
  • 0

hello seven, but in that BG event your partners are in random? so getting party name is not possible since u are not the one who made the party or party is automatically build?

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.