Jump to content
  • 0

Question

Posted

Hello rathenians...i'm on the bind here and in need for some help with my script.

-	script	orc_face	-1,{

OnInit:
	setitemscript 601,"{ if ( !@orc_face ) itemskill \"AL_TELEPORT\",1; }";
	setitemscript 602,"{ if ( !@orc_face ) itemskill \"AL_TELEPORT\",3; }";
	end;

OnPCKillEvent:
	if( Class == JOB_RUNE_KNIGHT_T || Class == JOB_WARLOCK_T || Class == JOB_RANGER_T || Class == JOB_ARCH_BISHOP_T || Class == JOB_MECHANIC_T || Class == JOB_GUILLOTINE_CROSS_T || Class == JOB_ROYAL_GUARD_T || Class == JOB_SORCERER_T || Class == JOB_MINSTREL_T || Class == JOB_WANDERER_T || Class == JOB_SURA_T || Class == JOB_GENETIC_T || Class == JOB_SHADOW_CHASER_T ) {
	if( baselevel < 175 ) { end; }
	if( killedrid == getcharid(3) ) { end; }
	if( getstatus( SC_ORCISH ) ) { end; }
	getitem 673,rand(1,10);
	.@origin = getcharid(3);
	attachrid( killedrid );
	if ( !getstatus( SC_ORCISH ) ) {
		attachrid( .@origin );
		@orc_face++;
		sc_start SC_ORCISH,60000,10;
	}
}
	end;
	
OnPCDieEvent:
	@orc_face = 0;
	sc_end SC_ORCISH;
	end;
}

How can i check if the killer has killed a 3rd job class only on this script.

5 answers to this question

Recommended Posts

  • 0
Posted


set .@comp,getvar(Class,killedrid);
if(.@comp>=4054 && .@comp<=4079) dispbottom "You killed a 3rd Class Player",0xFF0000;


 

This excludes expanded Classes and 3rd Class Babies. I think it could be optimized but with the other variables that I know, I never tested, so with this method it's more secure.

  • 0
Posted

i got this error when i tried those script

[Error]: buildin_getvar: No player found with char id '2000001'

[Debug]: Source <NPC>: orc_face <invisible/not on a map>

 

-	script	orc_face	-1,{

OnInit:
	setitemscript 601,"{ if ( !@orc_face ) itemskill \"AL_TELEPORT\",1; }";
	setitemscript 602,"{ if ( !@orc_face ) itemskill \"AL_TELEPORT\",3; }";
	end;

OnPCKillEvent:
	set .@comp,getvar(Class,killedrid);
	if(eaclass()&eajl_third){
	if( baselevel < 175 ) { end; }
	if( killedrid == getcharid(3) ) { end; }
	if( getstatus( SC_ORCISH ) ) { end; }
	if(.@comp>=4054 && .@comp<=4079) dispbottom "You killed a 3rd Class Player",0xFF0000;
	getitem 673,rand(1,10);
	.@origin = getcharid(3);
	attachrid( killedrid );
	if ( !getstatus( SC_ORCISH ) ) {
		attachrid( .@origin );
		@orc_face++;
		sc_start SC_ORCISH,60000,10;
	}
}
	end;
	
OnPCDieEvent:
	@orc_face = 0;
	sc_end SC_ORCISH;
	end;
}

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