Jump to content
  • 0

need help about woe prize giver


darking123

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

i want that Fadhgridh will be only in the menu

/*
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,157,197,5 script WoE Prize 734,{
// 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 674, 10 * (5 - .@menu); // some mathematics ...
  getitem 12334,1;
  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$, "Kriemhild", "Swanhild", "Fadhgridh", "Skoegul", "Gondul";
for ( set .@i, 0; .@i < 5; set .@i, .@i +1 )
 set .menu$, .menu$ + .castlename$[.@i] +":";
}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


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

then just remove the other castle name from here

setarray .castlename$, "Kriemhild", "Swanhild", "Fadhgridh", "Skoegul", "Gondul";

use this

[ Pastebin ] WOE Castle Rewarder

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

thank you

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