Jump to content
  • 0
Sign in to follow this  
bayakan

what's wrong with this script?

Question

-	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 ) || 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 || getcharip() == getcharip(name2rid(killedrid)) ) { end; }
	set KARMAPOINTS,KARMAPOINTS + 1;
	dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s).";
	end;
}

1_zpsrxqe7fjj.jpg

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

This kind of looks like they may have read the script commands without logically thinking through, though what I can tell is on the event of killing a mob, if they're less than level 175 or have the status "SC_ORCISH" they cannot gain Fame points. It looks like they tried attaching each individual player to the script based on IP or something, but the character is attached regardless upon hitting the mob. So no need to check IP/rid2name I believe (If you could detail exactly what you're trying to do here that would help bayakan.


Anyways, tell me if this is what you were looking for. Try both.

 

 

-    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 || killedrid == getcharid(3) || getstatus( SC_ORCISH ) || getcharip() == getcharip(rid2name(killedrid)) ) { end; }
    if( !getstatus(SC_ORCISH)) 
    { 
        sc_start SC_ORCISH,60000,10;
        sc_start NOTICKDEF,60000,10;
        @orc_face = @orc_face += 1;
    }
    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; }
    KARMAPOINTS += 1;
    dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s).";
    end;
}

Or try this one:

 

 

-    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 ) || getcharip() == getcharip(rid2name(killedrid)) ) { end; }
    if( !getstatus(SC_ORCISH)) 
    { 
        sc_start SC_ORCISH,60000,10;
        sc_start NOTICKDEF,60000,10;
        @orc_face = @orc_face += 1;
    }
    FAMEPOINTS += 1;
    dispbottom "Gained : "+ 1 +" Point(s). Total : "+ FAMEPOINTS +" Fame Point(s).";
    end;
    
OnPCDieEvent:
if( BaseLevel < 175 )
    {
        end;
    }
    @orc_face = 0;
    sc_end SC_ORCISH;
    sc_end NOTICKDEF;
    KARMAPOINTS += 1;
    dispbottom "Gained : "+ 1 +" Point(s). Total : "+ KARMAPOINTS +" Karma Point(s).";
    end;
}

Share this post


Link to post
Share on other sites
  • 0

If that's the case forget the same IP, the best way to handle this would be to record the mac address of the opponent and upon killing him if their mac addresses are the same end the script and not distribute points. IP address checks in scripts is easily by-passable, as long as you the player know it's recording the IP and not the Mac address. Then again it's pretty easy to spoof your physical mac address too...

Share this post


Link to post
Share on other sites
  • 0

Thanks a lot to your help guys. I have figured that there's no command called name2rid just like nitrous2 said. And i just want to know now if there's such a script that can tell the mac ip of a player..

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.