Jump to content
  • 0

about WOE Prize Giver


Question

Posted (edited)

i Used This Script But The Problem is ..this script is only for 1 castle ..i want to add another castle ..but i dont know how to put properly on the script

i want add this castle prize: prtg_cas01, prtg_cas04, payg_cas01 payg_cas04 aldeg_cas05 gefg_cas01 gef_cas04

 

 

prontera,146,174,5    script    WoE Prize Giver    1002,{
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;
}
if ( getcastledata( .castlename$,1 ) == getcharid(2) ) {
  if ( $castle_claimed ) {
   mes "your guild already received the reward";
   close;
  }else if ( getguildmasterid( getcharid(2) ) == getcharid(0) ) {
   mes "receiving the reward for "+ .castlename$[.@menu];
   getitem 12035,1; // some mathematics ...
   set $castle_claimed,1;
   close;
  }else {
   mes "ask your guild master to see me";
   close;
  }
}
mes "your guild failed to take reward";
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:
set .castlename$, "prtg_cas01";
    waitingroom "Woe Prize",0;
end;
}

 

woeprice.txt

Edited by Capuche
Code

13 answers to this question

Recommended Posts

Posted


prontera,146,174,5 script WoE Prize Giver 1002,{

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;

}

while(.castlename$[set(.@a,.@a+1)]!="")

if ( getcastledata( .castlename$[.@a],1 ) == getcharid(2) ) {

if ( $castle_claimed[.@a] ) {

mes "your guild already received the reward";

close;

} else if ( getguildmasterid( getcharid(2) ) == getcharid(0) ) {

mes "receiving the reward for "+ .castlename$[.@a];

getitem 12035,1; // some mathematics ...

set $castle_claimed[.@a],1;

close;

} else {

mes "ask your guild master to see me";

close;

}

}

mes "your guild failed to take reward";

mes "if your guild owned a castle ask your guild master to claim reward from me";

close;

OnAgitEnd:

deletearray $castle_claimed[0], 128; // everytime woe ends the variable resets

end;

OnInit:

setarray .castlename$[1], "prtg_cas01", "prtg_cas04", "payg_cas01", "payg_cas04", "aldeg_cas05", "gefg_cas01", "gef_cas04";

waitingroom "Woe Prize",0;

end;

}

Posted

quick question, does the above script only gives the reward if the castle was broken? I mean, on my server, I have it set up different castle per day, I am worried that they will claim the reward everydy since the castle will be theirs for a week... 

Posted

In both script the variable to check if the reward is given is reseted each end of woe. If there is woe everyday in different castle then they could claim the reward even if there wasn't woe in this castle

Posted

try this...

http://pastebin.com/raw.php?i=GFw1dEq5

 

set the woe castle to reset every day ..

	switch( gettime(4) ){
		Case 0:	//	sunday
			setarray .@today_woe_map$,"aldeg_cas01","aldeg_cas03";
			break;
		Case 1:	//	monday
			setarray .@today_woe_map$,"prtg_cas01","prtg_cas03";
			break;
		Case 2:	//	tuesday
			setarray .@today_woe_map$,"payg_cas01","payg_cas03";
			break;
		Case 3:	//	wednesday
			setarray .@today_woe_map$,"gefg_cas01","gefg_cas03";
			break;
		Case 4:	//	thursday
			setarray .@today_woe_map$,"prtg_cas01","prtg_cas03";
			break;
		Case 5:	//	friday
			setarray .@today_woe_map$,"aldeg_cas01","aldeg_cas03";
			break;
		Case 6:	//	saturday
			setarray .@today_woe_map$,"payg_cas01","payg_cas03";
		default: break;
	}
Posted

Misc. a typo in Emistry's script

	for( set .@x,0; .@i < .castle_size; set .@x,.@x + 1 )// .@i -> .@x
		for( set .@y,0; .@i < .@today_map_size; set .@y,.@y + 1 )// .@i -> .@y
Posted

Thanks Emistry.

 

Hi Euphy, yes I am currently using your WOE Controller =)..But I am not sure how to make use of the reward system. Should I just uncomment these lines?


 

//  [1] Enable rewards.
//  [2] Mail all rewards.
//      - If not set, players receive items in their inventory.
//      - Only ONE item can be sent via mail, plus Zeny.
//      - Note that offline players do NOT receive rewards.
//  [4] Only reward Guild Masters.
//      - If not set, all guild members are rewarded.
//      - If mailing is enabled (option 2), offline Guild Masters WILL receive rewards.
//  [8] Duplicate IP check.
//      - Members in a guild with the same IP address are not rewarded.
//      - If Guild Masters is enabled (option 4), this feature is not used.
// -----------------------------------------------------------

	// Combine values as needed (e.g. 1|8 = 1+8 = 9).
	set .Options, 1|8;

	// Rewards per castle.
	// -- when given directly: <itemID>,<amount>{,<itemID>,<amount>,...}
	// -- via mail (option 2): <itemID>,<amount>,<Zeny>
	setarray .Reward[0],14001,1;

Posted (edited)

My WOE controller gives out rewards for only the active castles in a session.

trunk/npc/custom/woe_controller.txt

Sir Euphy i already test your WOE controller but the problem is .. all guildmates receive the prize after Woe ....how to change only Guildmaster can receive the prize.................thx sir

Edited by Green

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...