Jump to content

  •  

dota2jvin

Member Since 28 Jun 2016
Offline Last Active Jul 19 2016 06:46 AM
-----

Topics I've Started

Patulong about scripting :D

05 July 2016 - 05:19 PM

Hindi ko po alam kung ano ang error. kasi wala pong nakalagay sa emulator, pero pag nag execute na po yung script in-game, nasstuck yung char at hindi makalakad. naisip ko po na baka sa logic error kasi gumanana naman yung code for VIP:

 

-	script	Healer	4_F_NURSE,{

	.@Price = 10000;	// Zeny required for heal
	.@Buffs = 1;	// Also buff players? (1: yes / 0: no)
	.@Delay = 5;	// Heal delay, in seconds

		if ( @HD > gettimetick(2) )
		{
			dispbottom "You have to wait for : 5 Seconds before another use.";
			end;
		}

		if(getgroupid() > 5)
		{
				if ( BaseLevel <= 50 )
				{
					goto VIP_LOWLVL_BUFFS;
				}
				else
				{
					goto VIP_BUFFS;
				}
				if (.@Delay)
					@HD = gettimetick(2) + .@Delay;
					end;
		}
		else 
		{
			if ( BaseLevel <= 50 )
			{
				message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny.";
				if (select("^0055FFHeal for 10,000z^000000:^777777Cancel^000000") == 1 && Zeny >= .@Price)
				{
					Zeny -= .@Price;
					goto NORMAL_LOWLEVEL_BUFFS;
				}
				if (Zeny < .@Price)
				{
					message strcharinfo(0), "Not enough Zeny.";
					end;
				}
				end;
			}
			else
			{
				message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny.";
				if (select("^0055FFHeal for 10,000z^000000:^777777Cancel^000000") == 1 && Zeny >= .@Price)
				{
					Zeny -= .@Price;
					goto NORMAL_HIGHLEVEL_BUFFS;
				}
				if (Zeny < .@Price)
				{
					message strcharinfo(0), "Not enough Zeny.";
					end;
				}
				end;
			}
			if (.@Delay)
			@HD = gettimetick(2) + .@Delay;
			end;
		}
		
VIP_LOWLVL_BUFFS:
	//Food buffs
	specialeffect2 EF_FOOD01; sc_start SC_FOOD_STR, 360000, 10;
	specialeffect2 EF_FOOD03; sc_start SC_FOOD_AGI, 360000, 10;
	specialeffect2 EF_FOOD02; sc_start SC_FOOD_VIT, 360000, 10;
	specialeffect2 EF_FOOD02; sc_start SC_FOOD_INT, 360000, 10;
	specialeffect2 EF_FOOD04; sc_start SC_FOOD_DEX, 360000, 10;
	specialeffect2 EF_FOOD05; sc_start SC_FOOD_LUK, 360000, 10;
	//Buffs
	specialeffect2 EF_BLESSING; sc_start SC_BLESSING, 360000, 10;
	specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI, 360000, 10;
	specialeffect2 EF_ANGELUS; sc_start SC_ANGELUS, 360000, 10;
	specialeffect2 EF_GLORIA; sc_start SC_GLORIA, 360000, 5;
	specialeffect2 EF_MAGNIFICAT; sc_start SC_MAGNIFICAT, 360000, 5;
	specialeffect2 EF_ASSUMPTIO; sc_start SC_ASSUMPTIO, 360000, 5;
	specialeffect2 EF_IMPOSITIO; sc_start SC_IMPOSITIO, 360000, 5;
	specialeffect2 EF_SUFFRAGIUM; sc_start SC_SUFFRAGIUM, 360000, 3;
	specialeffect2 EF_KYRIE; sc_start SC_KYRIE,360000,10;
	specialeffect2 EF_HEAL2;
	percentheal 100,100;
	end;

VIP_BUFFS:
	//Buffs
	specialeffect2 EF_BLESSING; sc_start SC_BLESSING, 360000, 10;
	specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI, 360000, 10;
	specialeffect2 EF_ANGELUS; sc_start SC_ANGELUS, 360000, 10;
	specialeffect2 EF_GLORIA; sc_start SC_GLORIA, 360000, 5;
	specialeffect2 EF_MAGNIFICAT; sc_start SC_MAGNIFICAT, 360000, 5;
	specialeffect2 EF_ASSUMPTIO; sc_start SC_ASSUMPTIO, 360000, 5;
	specialeffect2 EF_IMPOSITIO; sc_start SC_IMPOSITIO, 360000, 5;
	specialeffect2 EF_SUFFRAGIUM; sc_start SC_SUFFRAGIUM, 360000, 3;
	specialeffect2 EF_KYRIE; sc_start SC_KYRIE,360000,10;
	specialeffect2 EF_HEAL2;
	percentheal 100,100;
	end;

NORMAL_LOWLEVEL_BUFFS:
	//buffs
	specialeffect2 EF_BLESSING; sc_start SC_BLESSING, 360000, 10;
	specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI, 360000, 10;
	specialeffect2 EF_ANGELUS; sc_start SC_ANGELUS, 360000, 10;
	specialeffect2 EF_GLORIA; sc_start SC_GLORIA, 360000, 5;
	specialeffect2 EF_MAGNIFICAT; sc_start SC_MAGNIFICAT, 360000, 5;
	specialeffect2 EF_ASSUMPTIO; sc_start SC_ASSUMPTIO, 360000, 5;
	specialeffect2 EF_IMPOSITIO; sc_start SC_IMPOSITIO, 360000, 5;
	specialeffect2 EF_SUFFRAGIUM; sc_start SC_SUFFRAGIUM, 360000, 3;
	specialeffect2 EF_HEAL2;
	percentheal 100,100;
	end;

NORMAL_HIGHLEVEL_BUFFS:
	//buffs
	specialeffect2 EF_BLESSING; sc_start SC_BLESSING, 360000, 10;
	specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI, 360000, 10;
	specialeffect2 EF_ANGELUS; sc_start SC_ANGELUS, 360000, 10;
	specialeffect2 EF_GLORIA; sc_start SC_GLORIA, 360000, 5;
	specialeffect2 EF_MAGNIFICAT; sc_start SC_MAGNIFICAT, 360000, 5;
	//specialeffect2 EF_HEAL2;
	percentheal 100,100;
	end;
}