Jump to content
  • 0

About agitstart and agitstart2. SE problem


Nero

Question


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   2
  • Joined:  12/18/11
  • Last Seen:  


/*
15,prtg_cas01,Kriemhild,Agit#prtg_cas01,1			// kRO : Creamhilt
16,prtg_cas02,Swanhild,Agit#prtg_cas02,1			// kRO : Sbanhealt
17,prtg_cas03,Fadhgridh,Agit#prtg_cas03,1			// kRO : Lazrigees
18,prtg_cas04,Skoegul,Agit#prtg_cas04,1			// kRO : Squagul
19,prtg_cas05,Gondul,Agit#prtg_cas05,1			// kRO : Guindull
prontera castles ... so only need to use agitcheck(), not agitcheck2()
*/
prontera,146,168,5	script	Woe Prize	100,{
//	setcastledata "prtg_cas05", 1, getcharid(2); // just testing ..
	if ( agitcheck() ) {
		mes "a war is currently in progress";
		mes "if your guild owned a castle ask your guild master to see me to claim the reward";
		close;
	}
	set .@menu, select(.menu$) -1;
	if ( getcastledata("prtg_cas0"+( .@menu +1 ), 1) == getcharid(2) ) {
		if ( $castle_claimed & pow(2, .@menu) ) {
			mes "your guild already received the reward for "+ .castlename$[.@menu];
			close;
		}
		else if ( getguildmasterid( getcharid(2) ) == getcharid(0) ) {
			mes "receiving the reward for "+ .castlename$[.@menu];
			getitem 12187, 1 * (18 - .@menu); // some mathematics ...
			set $castle_claimed, $castle_claimed | pow(2, .@menu);
			close;
		}
		else {
			mes "ask your guild master to see me";
			close;
		}
	}
	mes "your guild failed to take "+ .castlename$[.@menu];
	mes "if your guild owned a castle ask your guild master to claim reward from me";
	close;
OnAgitEnd:
	set $castle_claimed, 0; // everytime woe ends the variable resets
	end;
OnInit:
	setarray .castlename$, "Get Reward";
	for ( set .@i, 0; .@i < 5; set .@i, .@i +1 )
		set .menu$, .menu$ + .castlename$[.@i] +":";

}

 

Using That code that i've found out in eathena.ws 

agitend and agitend2 both of the commands are able to give prize to the Guild leader...

 

I need help to separate the codes, 1 for Agitstart and agitend and also 1 script for SE or Agitstart2 and Agitend2

 

 

Thank you in advance.

Edited by sampang99
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   2
  • Joined:  12/18/11
  • Last Seen:  

Using agitstart2 and agitend2 the script will still give a prize... i want that it will only accept agitstart and agtiend

/*15,prtg_cas01,Kriemhild,Agit#prtg_cas01,1			// kRO : Creamhilt16,prtg_cas02,Swanhild,Agit#prtg_cas02,1			// kRO : Sbanhealt17,prtg_cas03,Fadhgridh,Agit#prtg_cas03,1			// kRO : Lazrigees18,prtg_cas04,Skoegul,Agit#prtg_cas04,1			// kRO : Squagul19,prtg_cas05,Gondul,Agit#prtg_cas05,1			// kRO : Guindullprontera castles ... so only need to use agitcheck(), not agitcheck2()*/prontera,146,168,5	script	Woe Prize	100,{//	setcastledata "prtg_cas05", 1, getcharid(2); // just testing ..	if ( agitcheck() ) {		mes "a war is currently in progress";		mes "if your guild owned a castle ask your guild master to see me to claim the reward";		close;	}	set .@menu, select(.menu$) -1;	if ( getcastledata("prtg_cas0"+( .@menu +1 ), 1) == getcharid(2) ) {		if ( $castle_claimed & pow(2, .@menu) ) {			mes "your guild already received the reward for "+ .castlename$[.@menu];			close;		}		else if ( getguildmasterid( getcharid(2) ) == getcharid(0) ) {			mes "receiving the reward for "+ .castlename$[.@menu];			getitem 12187, 1 * (18 - .@menu); // some mathematics ...			set $castle_claimed, $castle_claimed | pow(2, .@menu);			close;		}		else {			mes "ask your guild master to see me";			close;		}	}	mes "your guild failed to take "+ .castlename$[.@menu];	mes "if your guild owned a castle ask your guild master to claim reward from me";	close;OnAgitEnd:	set $castle_claimed, 0; // everytime woe ends the variable resets	end;OnInit:	setarray .castlename$, "Get Reward";	for ( set .@i, 0; .@i < 5; set .@i, .@i +1 )		set .menu$, .menu$ + .castlename$[.@i] +":";}

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