Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

PVP Level Range


Matt
 Share

Recommended Posts

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!
Link to comment
Share on other sites

  • 6 months later...
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.
Link to comment
Share on other sites

> 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.
Link to comment
Share on other sites

> 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 ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)

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.
Link to comment
Share on other sites

  • 6 months later...
> Good ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

Why do you post in a thread from last year if you don't even have a question about the tutorial ?
Link to comment
Share on other sites

> 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.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...