cahadeyelo Posted October 22, 2016 Group: Members Topic Count: 70 Topics Per Day: 0.02 Content Count: 172 Reputation: 1 Joined: 11/13/14 Last Seen: 18 hours ago Share Posted October 22, 2016 can you help me guys how this script will prevent the killer and the victim to get the Karma & Fame point(s) if they have the same ip address. - script orc_face -1,{ OnInit: setitemscript 601,"{ if ( [email protected]<script data-cfhash='f9e31' type="text/javascript">/* */</script>_face ) itemskill \"AL_TELEPORT\",1; }"; setitemscript 602,"{ if ( [email protected]/* */_face ) itemskill \"AL_TELEPORT\",3; }"; end; OnPCKillEvent: if( baselevel < 175 ) { end; } if( killedrid == getcharid(3) ) { end; } if( getstatus( SC_ORCISH ) ) { end; } set FAMEPOINTS,FAMEPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ FAMEPOINTS +" Fame Point(s)."; .@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; if( killerrid == getcharid(3) ) { end; } if( killerrid > 2999999 ) { end; } if( killerrid == NULL ) { end; } if( baselevel < 175 ) { end; } set KARMAPOINTS,KARMAPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s)."; end; } Quote Link to comment Share on other sites More sharing options...
0 anacondaq Posted October 22, 2016 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 1096 Reputation: 348 Joined: 02/26/12 Last Seen: May 30, 2023 Share Posted October 22, 2016 something like this (i have rewrite your functions, sorry about it) OnPCDieEvent: @orc_face = 0; sc_end SC_ORCISH; if( killerrid == getcharid(3) || killerrid > 2999999 || killerrid == NULL || baselevel < 175 ) end; // Now we checking ip of our killer and killed via getcharip(), name2rid convert killedrid to name. if( getcharip() == getcharip(name2rid(killedrid)) ) end; set KARMAPOINTS,KARMAPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s)."; end; // killedrid - the died guy // by default we are attached to guy WHO KILL // so we should for checking IP check IP address of the guy WHO died. OnPCKillEvent: // Your default checks if( baselevel < 175 || killedrid == getcharid(3) || getstatus(SC_ORCISH) ) end; // Now we checking ip of our killer and killed via getcharip(), name2rid convert killedrid to name. if( getcharip() == getcharip(name2rid(killedrid)) ) end; // the same logic like in your example, but without "attach command" and jumping between players. if( !getstatus(SC_ORCISH,0,getcharid(0,rid2name(killedrid))) ) { sc_start SC_ORCISH,60000,10,10000,SCSTART_NOTICKDEF,killedrid; set @orc_face, @orc_face + 1, getcharid(0,rid2name(killedrid)); } set KARMAPOINTS,KARMAPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s)."; end; Quote Link to comment Share on other sites More sharing options...
0 cahadeyelo Posted October 23, 2016 Group: Members Topic Count: 70 Topics Per Day: 0.02 Content Count: 172 Reputation: 1 Joined: 11/13/14 Last Seen: 18 hours ago Author Share Posted October 23, 2016 i tried your codes, now it gives me error on line 10 and 20 - 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( baselevel < 175 || killedrid == getcharid(3) || getstatus( SC_ORCISH ) ) { end; } if( getcharip() == getcharip(name2rid(killedrid)) ) { end; } if( !getstatus(SC_ORCISH,0,getcharid(0,rid2name(killedrid))) ) { sc_start SC_ORCISH,60000,10,10000,SCSTART_NOTICKDEF,killedrid; set @orc_face, @orc_face + 1, getcharid(0,rid2name(killedrid)); } set FAMEPOINTS,FAMEPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ FAMEPOINTS +" Fame Point(s)."; end; OnPCDieEvent: @orc_face = 0; sc_end SC_ORCISH; if( baselevel < 175 || killerrid == getcharid(3) || killerrid > 2999999 || killerrid == NULL ) { end; } if( getcharip() == getcharip(name2rid(killedrid)) ) { end; } set KARMAPOINTS,KARMAPOINTS + 1; dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s)."; end; } Quote Link to comment Share on other sites More sharing options...
Question
cahadeyelo
can you help me guys how this script will prevent the killer and the victim to get the Karma & Fame point(s) if they have the same ip address.
Link to comment
Share on other sites
2 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.