Jump to content
  • 0

WOE Prize Giver !


Yoona

Question


  • Group:  Members
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  567
  • Reputation:   18
  • Joined:  04/15/13
  • Last Seen:  

How can i change this script?

 

because, Only guild master can receive the Prize but i want to change it to each member

 

invek,144,175,5	script	WoE Prize	734,{

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 ( getmapguildusers( getcharid(0) ) == 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], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05";
	waitingroom "WOE Prize Giver",0;
	end;
}

can someone please help me :( i really need it please?

Edited by Yoona
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   3
  • Joined:  02/24/12
  • Last Seen:  

This line is kinda awkward

} else if ( getmapguildusers( getcharid(0) ) == getcharid(0) ) {

why should the amount of users on the map match the guild id o.O? there is just one given value too although it's 2 in the doc

getmapguildusers("<map name>",<guild id>)

...

 

I think it should work like this:

invek,144,175,5	script	WoE Prize	734,{

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 {
			mes "receiving the reward for "+ .castlename$[.@a];
			getitem 12035,1; // some mathematics ...
			set $castle_claimed[.@a],1;
			close;
		}
	}
mes "Your guild failed to take reward";
mes "if your guild owned a castle your can claim the reward from me";
close;
 
OnAgitEnd:
	deletearray $castle_claimed[0], 128; // everytime woe ends the variable resets
	end;
 
OnInit:
	setarray .castlename$[1], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05";
	waitingroom "WOE Prize Giver",0;
	end;
} 

I think this script is buggy when you have two castles, too. it will only give you the reward for one

 

 

btw: nice music taste <3

Edited by Sunzuke
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  12/26/12
  • Last Seen:  

invek,144,175,5    script    WoE Prize    734,{

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 ( getmapguildusers( getcharid(0) ) == 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], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05", "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05", "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05", "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05", "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05";
    waitingroom "WOE Prize Giver",0;
    end;
}

 

 how about when i have 2 castles per woe time. i have the "main castle" & "secondary castle". i want to give a price for the owner of main castle and secondary castle. but i want this prizes.

 

 

-main castle prize = 30 tcg(7227)  + 50 Btix(7199)

-secondary castle prize = 25 tcg(7227) + 50 btix.(7199)

 

but i want the guild owner to be the one to claim the prizes. thanks in advance. 

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