cahadeyelo Posted June 17, 2016 Group: Members Topic Count: 70 Topics Per Day: 0.02 Content Count: 172 Reputation: 1 Joined: 11/13/14 Last Seen: 20 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 Fratini Posted June 17, 2016 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 153 Reputation: 8 Joined: 07/01/14 Last Seen: May 3, 2018 Share 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 Link to comment Share on other sites More sharing options...
0 Stolao Posted June 17, 2016 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: Sunday at 01:58 PM Share Posted June 17, 2016 If(eaclass()&eajl_third) your a third class Quote Link to comment Share on other sites More sharing options...
0 cahadeyelo Posted June 18, 2016 Group: Members Topic Count: 70 Topics Per Day: 0.02 Content Count: 172 Reputation: 1 Joined: 11/13/14 Last Seen: 20 hours ago Author Share 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 Link to comment Share on other sites More sharing options...
0 Stolao Posted June 18, 2016 Group: Developer Topic Count: 48 Topics Per Day: 0.01 Content Count: 1443 Reputation: 344 Joined: 10/17/12 Last Seen: Sunday at 01:58 PM Share Posted June 18, 2016 Your retrieving account id not character id Quote Link to comment Share on other sites More sharing options...
0 cahadeyelo Posted June 20, 2016 Group: Members Topic Count: 70 Topics Per Day: 0.02 Content Count: 172 Reputation: 1 Joined: 11/13/14 Last Seen: 20 hours ago Author Share 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 Link to comment Share on other sites More sharing options...
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.
Link to comment
Share on other sites
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.