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

[Sky] Survive Map Moral


SkywardRiver
 Share

Recommended Posts

Hey this is Skyward/Jaxx bringing you the first tutorial feature-add on to Eclipse Skywyre (primitive edition).

The Survive Map Moral is simply a map moral in which you will no longer regen health or magic. This makes for a unique game dynamic for dungeons or some 'undead' life-sapping map or whatnot.

_**Client**_

So, to start off, find:

```
Public Const MAP_MORAL_PARTY_MAP As Byte = 2
```

and place this underneath it:

```
Public Const MAP_MORAL_SURVIVE As Byte = 3
```

Next find:

```
Public Sub UpdateDrawMapName()
```

and before Case Else place this:

```
Case MAP_MORAL_SURVIVE

           DrawMapNameColor = Grey
```
Next open up frmEditor_MapProperties and in the cmbMoral listbox, add in Survive.

_**Server**_

So, to start off, find:

```
Public Const MAP_MORAL_PARTY_MAP As Byte = 2
```
and place this underneath it:

```
Public Const MAP_MORAL_SURVIVE As Byte = 3
```

Next find this:
```
' check regen timer
```

And replace the bit under it with this:

```
' check regen timer

                   If TempPlayer(i).stopRegen Then
                       If TempPlayer(i).stopRegenTimer + 5000 < GetTickCount Then
                           If Map(Player(i).Map).Moral <> MAP_MORAL_SURVIVE Then
                               TempPlayer(i).stopRegen = False
                               TempPlayer(i).stopRegenTimer = 0
                           Else
                           End If
                       End If
                   End If
```

** _Optional_**
If you want the Survive Maps to be PvP then find this in modCombat -> CanPlayerAttackPlayer

```
' Check if map is attackable
```

And replace that bit under it with this:

```
' Check if map is attackable

   If Not Map(GetPlayerMap(attacker)).Moral = MAP_MORAL_NONE And Not Map(GetPlayerMap(attacker)).Moral = MAP_MORAL_SURVIVE Then
       If GetPlayerPK(victim) = NO Then
           Call PlayerMsg(attacker, "This is a safe zone!", BrightRed)
           Exit Function
       End If
   End If
```

That should do it.

Never really tested it, as I've just thought of it and designed it while writing this, but as far as I can tell, it should work perfectly.
Link to comment
Share on other sites

  • 4 months later...
  • 3 weeks later...

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...