Jump to content
  • 0

Custom Buffer Request


Snaehild

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

Hi,I  would just like to make a follow up request on this one: http://rathena.org/board/topic/81623-buff-requests/

 

 

Can anyone help me about these scripts?

 

lv 50 or lower to buff  heal ab kyrie gloria magnificat.


lv 51-99 to buff heal ab.

Level 90 or higher to pay 1500z.

You can pay a one-hour 20000z

 

A delay in the buff for 3 seconds.

 

Tried the script provided but doesn't look like it's still working. Doesn't buff at all and makes character stuck at some point.

/*
lv 50 or lower to buff  heal ab kyrie gloria magnificat.


lv 51-99 to buff heal ab.

Level 90 or higher to pay 1500z.

You can pay a one-hour 20000z

 

A delay in the buff for 3 seconds.
*/

prontera,150,150,4	script	load	112,{

	if ( @timer >= gettimetick(2) )
		{
			dispbottom "You have to wait for : " + ( @timer - gettimetick(2) ) + " Seconds before another use.";
			end;
		}
		
	if ( BaseLevel <= 50 )
	{
		///====================================================================
		///ADD BUFFS AND EFFECTS HERE FOR 50 AND UNDER <-------------------
		specialeffect2 313;	percentheal 100,100; //HEAL
	}
	else
	{
		if ( BaseLevel >= 90 )
		{
			if ( @allowhealtimer < gettimetick(2) )
			{
				mes "[Buffer]";
				mes "The fee is 1,500z to use buffs at your level.";
				mes "";
				mes "You can also pay a fee for one hour of use at 20,000z";
				close2;
				switch(select("Pay the one time fee:Pay the Hour fee:Don't Pay!"))
				{
					case 1:
						if (Zeny < 1500)
						{	
							dispbottom "You do not have enough zeny!";
							close;	
						}
						else
						{
							set Zeny, Zeny - 1500;
							break;
						}
						
					case 2:
						if (Zeny < 20000 )
						{	
							dispbottom "You do not have enough zeny!";
							close;	
						}
						else
						{
							set Zeny, Zeny - 20000;
							set @allowhealtimer, gettimetick(2) + 3600;
							break;
						}
					case 3:
						close;
						
				}
			}
			if ( @allowhealtimer )
			{
				dispbottom "You have : " + ( ( @allowhealtimer - gettimetick(2) ) / 60 ) + " Minutes of Buffs Remaining.";
			}
		}
		
		///====================================================================
		///ADD BUFFS AND EFFECTS HERE FOR 50 AND OVER <-------------------
		specialeffect2 313;	percentheal 100,100; //HEAL
	}
	
	if ( @timer >= gettimetick(2) )	
	{
		end;
	}
	else 
	{
		dispbottom "You have been blessed!!";
		set @timer, gettimetick(2) + .healtimer;
		close;
	}
	
OnInit:
	set .healtimer, 3; // 3 SECOND DELAY.
}
Edited by Snaehild
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

No error in console logs. The client just stuck up after getting the buff.

 

Edit: Fixed.

end;

to

close;
prontera,100,100,4	script	Buffer	99,{

if (gettimetick(1) < @timer) {
dispbottom "Please try again after 3 seconds";
end;
}

if (BaseLevel <= 50) {
	specialeffect2 313;
	percentheal 100,100;
	sc_start 30,240000,10; specialeffect2 42; //Blessing
	sc_start 32,240000,10; specialeffect2 37; //Agi Up
	sc_start 39,240000,10; specialeffect2 112; // Kyrie
	sc_start 41,240000,3; specialeffect2 75; // Gloria
	sc_start 40,240000,5; specialeffect2 76; // Magnificat  
	}
if (BaseLevel >= 51 && BaseLevel <= 90) {
	specialeffect2 313;
	percentheal 100,100;
	sc_start 30,240000,10; specialeffect2 42; //Blessing
	sc_start 32,240000,10; specialeffect2 37; //Agi Up
	}
if (BaseLevel >= 91) {
	mes "[Healer]";
	mes "Please select an option.";
	mes " ";
	mes "Cost:";
	mes "Normal Buff: 1,500z";
	mes "1 Hour Buff: 200,000z";
	next;
	menu "Normal Buff",-,"1 Hour Buff",One_Hour;

	if (Zeny < 1500) goto Zeny_Lack;
	specialeffect2 EF_HEAL2;
	percentheal 100,100;
	sc_start 30,240000,10; specialeffect2 42; //Blessing
	sc_start 32,240000,10; specialeffect2 37; //Agi Up
	set Zeny, Zeny-1500;

	}
	set @timer, gettimetick(1)+3;
	close;
	
One_Hour:
	if (Zeny < 200000) goto Zeny_Lack;
	specialeffect2 313;
	percentheal 100,100;
	sc_start 30,3600000,10; specialeffect2 42; //Blessing
	sc_start 32,3600000,10; specialeffect2 37; //Agi Up
	set Zeny, Zeny - 200000;
	set @timer, gettimetick(1)+3;
	close;

Zeny_Lack:
	mes "[Healer]";
	mes "You don't have enough Zeny";
	close;
}

Thanks Jyabil for the patience. Much appreciated.

Edited by Snaehild
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

May I bump? Added some details on the request.

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,150,150,4 script load 112,5,5,{

if ( @delay_reused > gettimetick(2) ) end;

if ( BaseLevel >= 90 ) {

if ( free_one_hour <= gettimetick(2) ) {

if ( free_one_hour ) free_one_hour = 0;

if ( Zeny < 1500 ) {

dispbottom "you need 1500 zeny";

end;

}

Zeny = Zeny - 1500;

}

else

dispbottom "The healer is free for "+ callfunc( "timeleft__", ( free_one_hour - gettimetick(2) ) );

}

specialeffect2 313; percentheal 100,100;

sc_start SC_BLESSING,360000,5;

sc_start SC_INCREASEAGI,360000,5;

if ( BaseLevel <= 50 ) {

sc_start SC_KYRIE,360000,5; skilleffect "PR_KYRIE",0;

sc_start SC_GLORIA,360000,5; skilleffect "PR_GLORIA",0;

sc_start SC_MAGNIFICAT,360000,5; skilleffect "PR_MAGNIFICAT",0;

}

@delay_reused = gettimetick(2) + 3;

end;

OnTouch:

if ( BaseLevel < 90 ) end;

if ( free_one_hour && free_one_hour <= gettimetick(2) )

free_one_hour = 0;

if ( free_one_hour ) {

mes "The healer is free for "+ callfunc( "timeleft__", ( free_one_hour - gettimetick(2) ) );

mes "you can only pay for 1 hour.";

mes "update?";

}

else

mes "You can pay a fee for one hour of use at 20,000z";

next;

if ( select( "Leave", "Pay" ) == 1 ) close;

if ( Zeny < 20000 ) {

mes "You need 20000 zeny";

close;

}

Zeny = Zeny - 20000;

free_one_hour = gettimetick(2) + 3600;

mes "The healer is free for 1 hour";

close;

}

function script timeleft__ {

function s { return ( getarg(0) > 1 ? "s " : " " ); }

if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0);

.@week = .@left / ( 86400 * 7 );

.@day = .@left / 86400;

.@hour = .@left % 86400 / 3600;

.@min = .@left % 3600 / 60;

.@sec = .@left % 60;

if( .@week )

return ( .@week +" week"+ s( .@week ) + .@day +" day"+ s( .@day ) + .@hour +" hour"+ s( .@hour ) );

else if ( .@day )

return ( .@day +" day"+ s( .@day ) + .@hour +" hour"+ s( .@hour ) );

else if ( .@hour )

return ( .@hour +" hour"+ s(.@hour) + .@min +" min" +s( .@min ) );

else if ( .@min )

return ( .@min +" min"+ s( .@min ) + .@sec +" sec"+ s( .@sec ) );

else

return ( .@sec +" sec"+ s( .@sec ) );

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  89
  • Reputation:   7
  • Joined:  02/27/12
  • Last Seen:  

May I bump? Added some details on the request.

 

Try this:

prontera,100,100,4	script	Healer	99,{

if (gettimetick(1) < @timer) {
dispbottom "Pls try again after 3 seconds";
end;
}

if (BaseLevel <= 50) {
	specialeffect2 313;
	percentheal 100,100;
	sc_start SC_INCREASEAGI,240000,10;
	sc_start SC_BLESSING,240000,10;
	sc_start SC_KYRIE,240000,10;
	sc_start SC_GLORIA,240000,3;
	sc_start SC_MAGNIFICAT,240000,5;
	}
if (BaseLevel >= 51 && BaseLevel <= 90) {
	specialeffect2 313;
	percentheal 100,100;
	sc_start SC_INCREASEAGI,240000,10;
	sc_start SC_BLESSING,240000,10;
	}
if (BaseLevel >= 91) {
	mes "[Healer]";
	mes "Please select an option.";
	mes " ";
	mes "Cost:";
	mes "Normal Buff: 1,500z";
	mes "1 Hour Buff: 200,000z";
	next;
	menu "Normal Buff",-,"1 Hour Buff",One_Hour;

	if (Zeny < 1500) goto Zeny_Lack;
	specialeffect2 313;
	percentheal 100,100;
	sc_start SC_INCREASEAGI,240000,10;
	sc_start SC_BLESSING,240000,10;

	set Zeny, Zeny - 1500;
}
set @timer, gettimetick(1)+3;
end;
	
One_Hour:
	if (Zeny < 200000) goto Zeny_Lack;
	specialeffect2 313;
	percentheal 100,100;
	sc_start SC_INCREASEAGI,3600000,10;
	sc_start SC_BLESSING,3600000,10;
	set Zeny, Zeny - 200000;
	set @timer, gettimetick(1)+3;
	close;

Zeny_Lack:
	mes "[Healer]";
	mes "You don't have enough Zeny";
	close;
}

Edit:

Didn't know that there is already a reply.

Also, I think I misunderstood the request. I taught that if you choose to pay 200,000z, the buff will stay for 1 hour.

Sharing it anyways.

Edited by Jyabil
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

Thanks for the replies but for some odd reason, after getting the buff - character can't move anymore. I'm using Hercules btw, if that makes any sense.

 

16CV40s.jpg

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  89
  • Reputation:   7
  • Joined:  02/27/12
  • Last Seen:  

Thanks for the replies but for some odd reason, after getting the buff - character can't move anymore. I'm using Hercules btw, if that makes any sense.

 

16CV40s.jpg

 

Because Hercules uses different const identifier.

 

Change:

SC_INCREASEAGI

To:

SC_INC_AGI 

Or you could change them all to value instead of identifier. Also added the specialeffect.

sc_start 30,240000,10; specialeffect2 42; //Blessing
sc_start 32,240000,10; specialeffect2 37; //Agi Up
sc_start 39,240000,10; specialeffect2 112; // Kyrie
sc_start 41,240000,3; specialeffect2 75; // Gloria
sc_start 40,240000,5; specialeffect2 76; // Magnificat  

Also change the timing for the 1 Hour Buff

sc_start 30,3600000,10; specialeffect2 42; //Blessing
sc_start 32,3600000,10; specialeffect2 37; //Agi Up
Edited by Jyabil
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  72
  • Reputation:   7
  • Joined:  06/23/14
  • Last Seen:  

prontera,100,100,4	script	Buffer	99,{

if (gettimetick(1) < @timer) {
dispbottom "Pls try again after 3 seconds";
end;
}

if (BaseLevel <= 50) {
	specialeffect2 313;
	percentheal 100,100;
	sc_start 30,240000,10; specialeffect2 42; //Blessing
	sc_start 32,240000,10; specialeffect2 37; //Agi Up
	sc_start 39,240000,10; specialeffect2 112; // Kyrie
	sc_start 41,240000,3; specialeffect2 75; // Gloria
	sc_start 40,240000,5; specialeffect2 76; // Magnificat
	}
if (BaseLevel >= 51 && BaseLevel <= 90) {
	specialeffect2 313;
	percentheal 100,100;
	sc_start 32,240000,10; specialeffect2 37; //Agi Up
	sc_start 30,240000,10; specialeffect2 42; //Blessing
	}
if (BaseLevel >= 91) {
	mes "[Healer]";
	mes "Please select an option.";
	mes " ";
	mes "Cost:";
	mes "Normal Buff: 1,500z";
	mes "1 Hour Buff: 200,000z";
	next;
	menu "Normal Buff",-,"1 Hour Buff",One_Hour;

	if (Zeny < 1500) goto Zeny_Lack;
	specialeffect2 313;
	percentheal 100,100;
	sc_start 32,240000,10; specialeffect2 37; //Agi Up
	sc_start 30,240000,10; specialeffect2 42; //Blessing

	set Zeny, Zeny - 1500;
}
set @timer, gettimetick(1)+3;
end;
	
One_Hour:
	if (Zeny < 200000) goto Zeny_Lack;
	specialeffect2 313;
	percentheal 100,100;
	sc_start 32,3600000,10; specialeffect2 37; //Agi Up
	sc_start 30,3600000,10; specialeffect2 42; //Blessing
	set Zeny, Zeny - 200000;
	set @timer, gettimetick(1)+3;
	close;

Zeny_Lack:
	mes "[Healer]";
	mes "You don't have enough Zeny";
	close;
}

Am I still missing something? Client still crashes after receiving the buff.

Edited by Snaehild
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  89
  • Reputation:   7
  • Joined:  02/27/12
  • Last Seen:  

Is there any error on the console?

Could you post it?

Edited by Jyabil
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...