Jump to content
  • 0

WoE Reward increase per occupation


WhatFT

Question


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

Good day rAthena :) looking for some help to modify the script...

 

-	script	FunctionOnAgitEndReward	-1,{

OnAgitEnd:
	if(attachrid(getcharid(3,getguildmaster(getcastledata("prtg_cas01",1)))))
	{
		callsub Getitemx;
		end;
	}
	set .d,0;
	while(getd("$d_OnAgitEndReward_prtg_cas01_"+.d))
	{
		set .d,.d+1;
		if(.d>5)
		{
			while(getd("$d_OnAgitEndReward_prtg_cas01_"+.d))
			{
				setd "$d_OnAgitEndReward_prtg_cas01_"+.d,0;
				set .d,.d-1;
			}
			set .d,-999;
			break;
		}
	}
	if(.d==-999)end;
	setd "$d_OnAgitEndReward_prtg_cas01_"+.d,1;
	end;

Getitemx:
	getitem 671,200;
	getitem 30153,200;
	getitem 13514,50;
	getitem 29999,30;
	getitem 12103,25;
	return;

OnPCLoginEvent:
	if(getcharid(3)==getcharid(3,getguildmaster(getcastledata("prtg_cas01",1))))
	{
		
		set @dx,0;
		while(getd("$d_OnAgitEndReward_prtg_cas01_"+@dx))
		{
			setd "$d_OnAgitEndReward_prtg_cas01_"+@dx,0;
			set @dx,@dx+1;
			callsub Getitemx;
		}
	}
	end;
}

 

  • If the guild occupies Kriemhild wins another day of WoE. Increase the Prize amount by 5. (ex, 12103 = 25 and it will become 12103 = 30)
  • If the guild lose the kriemhild and occupied by other guild.. The prize will be reset and back to normal, but if they also defended it for straight 3 days.. the prize will be added by 15. 
  • The prize will just increase its amount per day.. (per day = 5 amount of each reward)

 

Looking for some help, thanks !

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  815
  • Reputation:   86
  • Joined:  10/26/12
  • Last Seen:  

prontera,156,177,5    script    WoE Prize    100,{//    setcastledata "prtg_cas01", 1, getcharid(2); // debug    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;    }    select "Kriemhild [Primary Castle]";    if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) {        mes "Your guild failed to take this castle";        close;    }    if ( $castle_claimed[1] ) {        mes "Your guild already received the reward for this castle";        close;    }    if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {        mes "Ask your Guild Master to see me";        close;    }    mes "receiving the reward for this castle";    if ( $castle_prtg1_gid != getcharid(2) ) {        $castle_claimed_times[1] = 0;        $castle_prtg1_gid = getcharid(2);    }    if ( !$castle_claimed_times[1] ) { // 1st time        getitem 7960,200;        getitem 12103,20;        getitem 7959,20;    }    else if ( $castle_claimed_times[1] == 1 ) { // 2nd time        getitem 7960,250;        getitem 12103,30;        getitem 7959,30;    }    else { // 3rd time onwards        getitem 7960,300;        getitem 12103,40;        getitem 7959,40;    }    $castle_claimed[1] = 1;    $castle_claimed_times[1]++;    close;OnAgitEnd:    $castle_claimed[1] = 0; // everytime woe ends the variable resets    end;OnInit:    waitingroom "Kriemhild Reward",0;    end;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

prontera,156,177,5    script    WoE Prize    100,{//    setcastledata "prtg_cas01", 1, getcharid(2); // debug    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;    }    select "Kriemhild [Primary Castle]";    if ( getcastledata( "prtg_cas01", 1) != getcharid(2) ) {        mes "Your guild failed to take this castle";        close;    }    if ( $castle_claimed[1] ) {        mes "Your guild already received the reward for this castle";        close;    }    if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {        mes "Ask your Guild Master to see me";        close;    }    mes "receiving the reward for this castle";    if ( $castle_prtg1_gid != getcharid(2) ) {        $castle_claimed_times[1] = 0;        $castle_prtg1_gid = getcharid(2);    }    if ( !$castle_claimed_times[1] ) { // 1st time        getitem 7960,200;        getitem 12103,20;        getitem 7959,20;    }    else if ( $castle_claimed_times[1] == 1 ) { // 2nd time        getitem 7960,250;        getitem 12103,30;        getitem 7959,30;    }    else { // 3rd time onwards        getitem 7960,300;        getitem 12103,40;        getitem 7959,40;    }    $castle_claimed[1] = 1;    $castle_claimed_times[1]++;    close;OnAgitEnd:    $castle_claimed[1] = 0; // everytime woe ends the variable resets    end;OnInit:    waitingroom "Kriemhild Reward",0;    end;
}

I don't actually understand to tab this..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

bump

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

prontera,156,177,5%tab%script%tab%WoE Prize%tab%100,{

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  313
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

-Bump- Will it be possible to make the script in pastebin? So it's readable?

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:  

prontera,156,177,5	script	WoE Prize	100,{
	// setcastledata "prtg_cas01", 1, getcharid(2);// debug
	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;
	}
	select "Kriemhild [Primary Castle]";
	if( getstrlen( $castle_reward$ ) )
		explode( .@rew$, $castle_reward$, "|" );
	if( !getcharid(2) ) {
		mes "you don't have a guild.";
		close;
	}
	else if ( getcastledata( "prtg_cas01",1 ) != getcharid(2) ) {
		mes "Your guild failed to take this castle";
		close;
	}
	else if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) {
		mes "Ask your Guild Master to see me";	
		close;
	}
	else if ( atoi( .@rew$[2] ) ) {
		mes "Your guild already received the reward for this castle";
		close;
	}
	mes "receiving the reward for this castle";
	getitem 7960,200 + atoi( .@rew$[1] ) * 5;
	getitem 12103,20 + atoi( .@rew$[1] ) * 5;		
	getitem 7959,20 + atoi( .@rew$[1] ) * 5;
	.@rew$[2] = "1";
	.@rew$[0] = getcastledata( "prtg_cas01",1 );
	$castle_reward$ = implode( .@rew$, "|" );
	close;
OnAgitEnd:
	if( getstrlen( $castle_reward$ ) )
		explode( .@rew$, $castle_reward$, "|" );
	if( getcastledata( "prtg_cas01",1 ) != atoi( .@rew$[0] ) )
		$castle_reward$ = getcastledata( "prtg_cas01",1 ) +"|0|0";
	else {
		.@rew$[2] = "0";
		.@rew$[1] = atoi( .@rew$[1] ) +1;
		$castle_reward$ = implode( .@rew$, "|" );
	}
	end;
OnInit:
	waitingroom "Kriemhild Reward",0;
	end;
}

EDIT: forget something

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

@Capuche

 

So this script explains that the reward is increased by 5 everytime the castle is occupied in 2 woe sessions? and It will be reset to normal once the castle is occupied by another guild?

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:  

At the end of the woe, the guild which occupy the castle gain ( X items + 5 * consecutive time the guild own the castle )

= the reward is increased by 5 everytime the castle is occupied by the same guild in 2 woe sessions

 

 

and It will be reset to normal once the castle is occupied by another guild?

yes

 

 

EDIT : correct something in the previous post

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

Will the reward of 5 * days of occupation will be reset if the castle is occupied by the other guild?

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:  

Will the reward of 5 * days of occupation will be reset if the castle is occupied by the other guild?

yes it will

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

Will the reward of 5 * days of occupation will be reset if the castle is occupied by the other guild?

yes it will

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