Help with npc buffer

IndieRO

New member
Messages
287
Points
0
Age
34
Location
Indonesia
Discord
RagnaIDN#7960
Emulator
hi, i use this script

Code:
-	script	Healer	-1,{	.@price = 0;	// Zeny required for heal	.@Buffs = 1;	// Also buff players? (1: yes / 0: no)	.@Delay = 2;	// Heal delay, in seconds	if (@HD > gettimetick(2)) end;	if (.@price) {		message strcharinfo(0),"Healing costs "+.@price+" Zeny.";		if (Zeny < .@price) end;		if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close;		Zeny -= .@price;	}	specialeffect2 EF_HEAL2; percentheal 100,100;	if (.@Buffs) {		specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10;		specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10;	}	if (.@Delay) @HD = gettimetick(2)+.@Delay;	close;}
how to change if base lv <99 u get more buff and if baselv> 150 player just get bless and agi.somebody help mesorry for bad english
 
I think you're in the wrong section (should be in support, not request).

For your problem, add a check in .@Buffs section to verify the BaseLevel value, and use different bonus affectations according to the level.

 
im sorry im noob ..you means is like this???

Code:
.@price = 0;	// Zeny required for heal	.@Buffs = 1;	// Also buff players? (1: yes / 0: no)	.@Delay = 2;	// Heal delay, in seconds	if (@HD > gettimetick(2)) end;	if (.@price) {		message strcharinfo(0),"Healing costs "+.@price+" Zeny.";		if (Zeny < .@price) end;		if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close;		Zeny -= .@price;	}	specialeffect2 EF_HEAL2; percentheal 100,100;	if (.@Buffs) {		if(BaseLevel150) goto Buffer;		Buffer:		specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10;		specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10;		Buff:		skilleffect 361,0; sc_start SC_ASSUMPTIO,360000,5;		skilleffect 34,0; sc_start SC_BLESSING,300000,10;		skilleffect 29,0; sc_start SC_INCREASEAGI,300000,10;	    skilleffect 112,0; sc_start SC_WEAPONPERFECTION,360000,10;	    skilleffect 380,0; sc_start SC_TRUESIGHT,360000,5;	    skilleffect 464,0; sc_start SC_KAUPE,360000,3;		skilleffect 33,0; sc_start SC_ANGELUS,360000,10;		skilleffect 463,0; sc_start SC_KAAHI,360000,7;		skilleffect 383,0; sc_start SC_WINDWALK,360000,5;		skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5;		skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3;	}	if (.@Delay) @HD = gettimetick(2)+.@Delay;	close;}
i was try like this but when player click npc buffer player get stuck and can't move like get effect stone curse.please fix my script if any wrong edit
 
.@price = 0; // Zeny required for heal .@Buffs = 1; // Also buff players? (1: yes / 0: no) .@Delay = 2; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if (.@price) { message strcharinfo(0),"Healing costs "+.@price+" Zeny."; if (Zeny < .@price) end; if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close; Zeny -= .@price; } specialeffect2 EF_HEAL2; percentheal 100,100; if (.@Buffs) { if(BaseLevel == 150) { goto Buffer; } else { goto Buffs; } } close; Buffer: specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; if (.@Delay) { @HD = gettimetick(2)+.@Delay; } close;Buff: skilleffect 361,0; sc_start SC_ASSUMPTIO,360000,5; skilleffect 34,0; sc_start SC_BLESSING,300000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,300000,10; skilleffect 112,0; sc_start SC_WEAPONPERFECTION,360000,10; skilleffect 380,0; sc_start SC_TRUESIGHT,360000,5; skilleffect 464,0; sc_start SC_KAUPE,360000,3; skilleffect 33,0; sc_start SC_ANGELUS,360000,10; skilleffect 463,0; sc_start SC_KAAHI,360000,7; skilleffect 383,0; sc_start SC_WINDWALK,360000,5; skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5; skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3; if (.@Delay) { @HD = gettimetick(2)+.@Delay; } close;}
Couldn't test it right now, but it should do the job.

 
There's no error on the script.

Try with that (didn't actually read the entire script, but I think your test on price, buff and delay aren't correct):

Code:
prontera,19,22,5	script	Devil Square Guardian	852,{	.@price = 0;	// Zeny required for heal	.@Buffs = 1;	// Also buff players? (1: yes / 0: no)	.@Delay = 2;	// Heal delay, in seconds	if (@HD > gettimetick(2)) end;	if (.@price != 0) {		message strcharinfo(0),"Healing costs "+.@price+" Zeny.";		if (Zeny < .@price) end;		if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close;		Zeny -= .@price;	}	specialeffect2 EF_HEAL2; percentheal 100,100;	if (.@Buffs == 1) {		if(BaseLevel == 150) 		{			goto Buffer;		}		else 		{			goto Buffs;		}	}	close;	Buffer:	specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10;	specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10;	if (.@Delay >= 1) 	{		@HD = gettimetick(2)+.@Delay;	}	close;Buff:	skilleffect 361,0; sc_start SC_ASSUMPTIO,360000,5;	skilleffect 34,0; sc_start SC_BLESSING,300000,10;	skilleffect 29,0; sc_start SC_INCREASEAGI,300000,10;	skilleffect 112,0; sc_start SC_WEAPONPERFECTION,360000,10;	skilleffect 380,0; sc_start SC_TRUESIGHT,360000,5;	skilleffect 464,0; sc_start SC_KAUPE,360000,3;	skilleffect 33,0; sc_start SC_ANGELUS,360000,10;	skilleffect 463,0; sc_start SC_KAAHI,360000,7;	skilleffect 383,0; sc_start SC_WINDWALK,360000,5;	skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5;	skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3;	if (.@Delay >= 1) 	{		@HD = gettimetick(2)+.@Delay;	}		close;}
 
@@Alayneit's working but when player lv <149 player stuck and can't move when klik buffer how to fix that

 
Hum don't really know...Do you got an error on your map server? I don't see something which should block...Try commenting the bonus 1 by one to see which one is blocking if there's no error.

 
try change your code

Code:
if (.@Buffs == 1) {		if(BaseLevel == 150) 		{			goto Buffer;		}		else 		{			goto Buffs;		}	}	close;
into
Code:
if (.@Buffs == 1) {		if(BaseLevel == 150) 		{			goto Buffer;		}		else 		{			goto Buff;		}	}	close;
player where lv <149 he will be stuck like get effect stone curse
 
the "stone curse" error is because you are using wrong SC_ names, for example "SC_INCREASEAGI" was changed to "SC_INC_AGI" here in hercules and so on, just look at db/sc_config.txt or const.txt to find out their proper names

 
@@evilpunckerThx A lot now fully working :Dim sorry im noob to use SVN Hercules and didn't know different format with rathena, Problem Solve

 
Back
Top