Jump to content
  • 0

Question

Posted

Hello guys

 

Im rly trying to do a custom healer but im getting problems with it

 

I want a healer where can select each buff at time, and you need to pay with zeny for every one you chose

 

I mean...Bless ang agiup cost 5k eath, so if u select both u pay 10k and u receive them

 

Oh, and if someone knows how to edit the duration off the buffs, can tell me how?

 

Can anyone help me with this? Thx

4 answers to this question

Recommended Posts

Posted

Like this?

prontera,150,150,5	script	Buffer	100,{
	if( @h_last > gettimetick(2) || !slc_bufs ) goto Set_Buffs;
	set @h_last, gettimetick(2)+5;
	
	.@total = callsub(Sub_PriceCheck);
	
	if( .@total > Zeny ) {
		message strcharinfo(0), "You don't have enough zeny to buff double click the buffer to modify your selection.";
		end;
	}
	
	for( .@a = 0; .@a < .len; .@a++ )
		if( ( slc_bufs & pow( 2, .@a ) ) ) {
			skilleffect .skil_num[.@a], .levels[.@a];
			sc_start .sc_effect[.@a], .ticks[.@a], .levels[.@a];
			message strcharinfo(0),"Buff "+.skil_txt$[.@a]+" Added!";
		}
	Zeny = Zeny - .@total;
	end;
	
Sub_PriceCheck:
	for( .@a = 0; .@a < .len; .@a++ )
		if( ( slc_bufs & pow( 2, .@a ) ) )
			.@total = .@total + .price[.@a];
	return .@total;
	
Set_Buffs:
	.@slc_bufs = slc_bufs;
	.@total = callsub(Sub_PriceCheck);

	function sf {
		function s;
		.@a = getarg(2);
		.@len = getarg(3);
		return (
			sprintf( getarg(0),
				s(.@a, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)),
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)),
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), 
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), 
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5))
			)
			+(( .@a+1 < .@len )?":Next":":")
			+(( .@a-11 > 0 )?":Back":":")
			+":Done:Cancel"
		);
		function s {
			if( getarg(0) >= getarg(1) ) return "";
			else {
				.@name$ = getelementofarray( getarg(2), getarg(0) );
				return .@name$==""?"":"Buff [ ^0054ff"+.@name$+"^000000 ] Lv"+getelementofarray( getarg(4), getarg(0) )+" [ "+(getarg(3)&pow(2,getarg(0))?"^35a100On":"^FF0000Off")+"^000000 ]";
			}
		};
	};
	function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); };
	function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); };
	
	mes .npc_nm$;
	mes "Select your buffs!";
	next;
	.@a = 0;
	while( 1 ) {
		select( sf( .format$, .skil_txt$, .@a, .len, .@slc_bufs, .levels ) );
		switch( @menu ) {
			case 11: .@a = nex( .@a, .len ); break;
			case 12: .@a = bac( .@a ); break;
			case 13: 
				mes .npc_nm$;
				mes "Alright, your current total will be "+.@total+"z each time you use my buffing service. Is that ok?";
				next;
				if( select("Yes:No") == 1 )
					slc_bufs = .@slc_bufs;
			case 14: end;
			
			default:
				.@select = .@a+@menu-1;
				if( ( .@slc_bufs & pow( 2, .@select ) ) ) {
					.@slc_bufs = .@slc_bufs - pow( 2, .@select );
					.@total = .@total - .price[.@select];
				} else {
					.@slc_bufs = .@slc_bufs + pow( 2, .@select );
					.@total = .@total + .price[.@select];
				}
		}
	}
	end;
	
OnInit:
	.npc_nm$ = "[ "+strnpcinfo(1)+" ]";
	setarray .sc_effect, SC_INCREASEAGI, SC_BLESSING, SC_ASSUMPTIO, SC_IMPOSITIO, SC_ANGELUS, SC_MAGNIFICAT, SC_GLORIA;
	setarray .skil_txt$, "Increase Agi", "Blessing",  "Assumptio",  "Impositio",  "Angelus",  "Magnificat",  "Gloria";
	setarray .ticks,     300000,         300000,      300000,       300000,       300000,     300000,        300000;
	setarray .price,     1000,           1000,        5000,         5000,         5000,       10000,         10000;
	setarray .skil_num,  29,             34,          361,          66,           33,         74,            75;
	setarray .levels,    10,             10,          5,            5,            10,         5,             5;
	.format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s";
	.len = getarraysize(.sc_effect);
	end;
}
Posted

Man, you rlly, rlly help me a lot

 

its working, thx . But Im new at this and Im still trying to know how its works hahaha :)

thx a lot again !

Posted

 

Like this?

prontera,150,150,5	script	Buffer	100,{
	if( @h_last > gettimetick(2) || !slc_bufs ) goto Set_Buffs;
	set @h_last, gettimetick(2)+5;
	
	.@total = callsub(Sub_PriceCheck);
	
	if( .@total > Zeny ) {
		message strcharinfo(0), "You don't have enough zeny to buff double click the buffer to modify your selection.";
		end;
	}
	
	for( .@a = 0; .@a < .len; .@a++ )
		if( ( slc_bufs & pow( 2, .@a ) ) ) {
			skilleffect .skil_num[.@a], .levels[.@a];
			sc_start .sc_effect[.@a], .ticks[.@a], .levels[.@a];
			message strcharinfo(0),"Buff "+.skil_txt$[.@a]+" Added!";
		}
	Zeny = Zeny - .@total;
	end;
	
Sub_PriceCheck:
	for( .@a = 0; .@a < .len; .@a++ )
		if( ( slc_bufs & pow( 2, .@a ) ) )
			.@total = .@total + .price[.@a];
	return .@total;
	
Set_Buffs:
	.@slc_bufs = slc_bufs;
	.@total = callsub(Sub_PriceCheck);

	function sf {
		function s;
		.@a = getarg(2);
		.@len = getarg(3);
		return (
			sprintf( getarg(0),
				s(.@a, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)),
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)),
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), 
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), 
				s(.@a++, .@len, getarg(1), getarg(4), getarg(5)), s(.@a++, .@len, getarg(1), getarg(4), getarg(5))
			)
			+(( .@a+1 < .@len )?":Next":":")
			+(( .@a-11 > 0 )?":Back":":")
			+":Done:Cancel"
		);
		function s {
			if( getarg(0) >= getarg(1) ) return "";
			else {
				.@name$ = getelementofarray( getarg(2), getarg(0) );
				return .@name$==""?"":"Buff [ ^0054ff"+.@name$+"^000000 ] Lv"+getelementofarray( getarg(4), getarg(0) )+" [ "+(getarg(3)&pow(2,getarg(0))?"^35a100On":"^FF0000Off")+"^000000 ]";
			}
		};
	};
	function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); };
	function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); };
	
	mes .npc_nm$;
	mes "Select your buffs!";
	next;
	.@a = 0;
	while( 1 ) {
		select( sf( .format$, .skil_txt$, .@a, .len, .@slc_bufs, .levels ) );
		switch( @menu ) {
			case 11: .@a = nex( .@a, .len ); break;
			case 12: .@a = bac( .@a ); break;
			case 13: 
				mes .npc_nm$;
				mes "Alright, your current total will be "+.@total+"z each time you use my buffing service. Is that ok?";
				next;
				if( select("Yes:No") == 1 )
					slc_bufs = .@slc_bufs;
			case 14: end;
			
			default:
				.@select = .@a+@menu-1;
				if( ( .@slc_bufs & pow( 2, .@select ) ) ) {
					.@slc_bufs = .@slc_bufs - pow( 2, .@select );
					.@total = .@total - .price[.@select];
				} else {
					.@slc_bufs = .@slc_bufs + pow( 2, .@select );
					.@total = .@total + .price[.@select];
				}
		}
	}
	end;
	
OnInit:
	.npc_nm$ = "[ "+strnpcinfo(1)+" ]";
	setarray .sc_effect, SC_INCREASEAGI, SC_BLESSING, SC_ASSUMPTIO, SC_IMPOSITIO, SC_ANGELUS, SC_MAGNIFICAT, SC_GLORIA;
	setarray .skil_txt$, "Increase Agi", "Blessing",  "Assumptio",  "Impositio",  "Angelus",  "Magnificat",  "Gloria";
	setarray .ticks,     300000,         300000,      300000,       300000,       300000,     300000,        300000;
	setarray .price,     1000,           1000,        5000,         5000,         5000,       10000,         10000;
	setarray .skil_num,  29,             34,          361,          66,           33,         74,            75;
	setarray .levels,    10,             10,          5,            5,            10,         5,             5;
	.format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s";
	.len = getarraysize(.sc_effect);
	end;
}

 

thanks for this script..  /no1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...