Jump to content
  • 0

About my Orc Face script


cahadeyelo

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

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.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  153
  • Reputation:   8
  • Joined:  07/01/14
  • Last Seen:  



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.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

If(eaclass()&eajl_third) your a third class

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

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;
}

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Your retrieving account id not character id

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  11/13/14
  • Last Seen:  

if i change this if( killedrid == getcharid(3) ) { end; } to if( killedrid == getcharid(0) ) { end; } how can i check if the killer doesn't kill itself by Sacrifice Skill

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