PVP Level Range

This is my first tutorial ever for Eclipse, so i’m sorry if this isn’t that impressive.

This tutorial will add a specific range of players who you can attack in a PVP area. This range is based on your combat level. This is to ensure that players level 80 don’t attack or kill level 30 players who are looking to fight players their level.

Go to your server, and find

' Make sure victim is high enough level

Right underneath

    ' Make sure victim is high enough level
    If GetPlayerLevel(victim) < 10 Then
        Call PlayerMsg(attacker, GetPlayerName(victim) & " is below level 10, you cannot attack this player yet!", BrightRed)
        Exit Function
    End If

put there

    'Make sure the attacker's level isn't too high
    If GetPlayerLevel(victim) + 10 < GetPlayerLevel(attacker) Then
        Call PlayerMsg(attacker, "Your combat levels are too different!", BrightRed)
        Exit Function
    End If
    'Make sure the attacker's level isn't too low
    If GetPlayerLevel(victim) - 10 > GetPlayerLevel(attacker) Then
        Call PlayerMsg(attacker, "Your combat levels are too different!", BrightRed)
        Exit Function
    End If

The range is 10 levels higher than you and 10 levels lower than you. Change it to what you want, but keep the numbers the same.

Save, compile, and you’re done!

Very simple yet a great source edit, thanks for sharing!

@kira423:

Very simple yet a great source edit, thanks for sharing!

Thank you! 🙂

w0w its the same kind of what i did… I did correct 😄 lol i’m just good at editing… But thanks for showing the correct form.

@Sherwin:

w0w its the same kind of what i did… I did correct 😄 lol i’m just good at editing… But thanks for showing the correct form.

No problem 🙂

Well besides the fact that this belongs in source. It’s a good tutorial.

@Relaxing:

Well besides the fact that this belongs in source. It’s a good tutorial.

I didn’t know what the difference between the two was. Sorry 😞

Lol i have seen soo many of these released xD

Nice tut. Basic but needed.

@abhi2011:

Nice tut. Basic but needed.

I agree.

@abhi2011:

Nice tut. Basic but needed.

Thank you 🙂

You have some of the most epic tutorials ever, Keep making 'em - Your great! =]

Would be cool to see either a night/day (or timezones) tutorial or one on crafting (with recipes, gathering resources, etc).

edit: on a side note - is there a way to have certain enemy npcs have a level range assigned to them as to who can engage them?

(similar to this tutorial but for npc’s and on a npc-to-npc basis, for exampe - a bee which is level 23 and can only be attacked by no one higher level then it?)

Sorry about 23235 questions - I just think you are just the person to ask. Thanks for reading.

edit: on a side note - is there a way to have certain enemy npcs have a level range assigned to them as to who can engage them?

(similar to this tutorial but for npc’s and on a npc-to-npc basis, for exampe - a bee which is level 23 and can only be attacked by no one higher level then it?)

It is possible. You can edit it in MapLogic I think. Or somewhere related to Attack on Sight of NPC’s.

You have some of the most epic tutorials ever, Keep making 'em - Your great! =]

Would be cool to see either a night/day (or timezones) tutorial or one on crafting (with recipes, gathering resources, etc).

edit: on a side note - is there a way to have certain enemy npcs have a level range assigned to them as to who can engage them?

(similar to this tutorial but for npc’s and on a npc-to-npc basis, for exampe - a bee which is level 23 and can only be attacked by no one higher level then it?)

Sorry about 23235 questions - I just think you are just the person to ask. Thanks for reading.

Hey! Thanks for your input! Its nice to know someone appreciates them ;)

As for your requests, I have made a skill system for gathering resources (Its in my signature), but I haven’t made one for crafting. I should work on that.

A day/night system doesn’t sound too hard, but I’ve never tried it so I may be wrong.

As for the npc level range, I’ll pm you the edit to make that work.

Good :)

Good :)

Why do you post in a thread from last year if you don’t even have a question about the tutorial ?

Why do you post in a thread from last year if you don’t even have a question about the tutorial ?

I’m assuming he found the tutorial helpful and wanted to let other people know that it worked for him.

With files i must edit ?

With files i must edit ?

modCombat in the server.

Log in to reply