Jump to content
  • 0

about WOE Prize Giver


Green

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  61
  • Reputation:   0
  • Joined:  04/28/13
  • Last Seen:  

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
Link to comment
Share on other sites

13 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  


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;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  61
  • Reputation:   0
  • Joined:  04/28/13
  • Last Seen:  

ill Try That Skorm........ Thx a Lot

Link to comment
Share on other sites


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


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

just add a check at the OnAgitEnd then remove / alter the variable carefully ....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

Thanks Emistry. While I am trying to figure out and understand what you meant, may I also request for an example ? I'm not trying to be lazy, but I just dont know how to start ..=(.

Link to comment
Share on other sites


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

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;
	}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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

trunk/npc/custom/woe_controller.txt

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  61
  • Reputation:   0
  • Joined:  04/28/13
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

[4] Only reward Guild Masters.

set .Options, 1|4|8;// enable option => [1] Enable rewards. + [4] Only reward Guild Masters. + [8] Duplicate IP check.
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...