cahadeyelo Posted June 17, 2016 Posted June 17, 2016 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. Quote
0 Fratini Posted June 17, 2016 Posted June 17, 2016 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. Quote
0 cahadeyelo Posted June 18, 2016 Author Posted June 18, 2016 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; } Quote
0 cahadeyelo Posted June 20, 2016 Author Posted June 20, 2016 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 Quote
Question
cahadeyelo
Hello rathenians...i'm on the bind here and in need for some help with my script.
How can i check if the killer has killed a 3rd job class only on this script.
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.