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

Few things I don't quite get


Fuyuumi
 Share

Recommended Posts

1\. How is the HP/MP regen calculated and where can I edit it?

2\. If a mob deals 100 dmg per hit does raising its STR will increase the dmg output?

3\. Can I make HP/MP regen faster (not gaining some HP per 8 sec but per 1 sec)

4\. How can I set the starting X Y coordinates so new player won't spawn in the middle of the mountain or some other unaccesable place?

5\. How can I edit an item type to make these items stackable (like differend types of minerals and ores, since flooding my inventory with 15 rubies ain't lookin' good at all)?
Link to comment
Share on other sites

The HP/MP regen is calculated in this sub (server sided)

```

Function GetPlayerVitalRegen(ByVal index As Long, ByVal Vital As Vitals) As Long

Dim i As Long

' Prevent subscript out of range

If IsPlaying(index) = False Or index <= 0 Or index > MAX_PLAYERS Then

GetPlayerVitalRegen = 0

Exit Function

End If

Select Case Vital

Case HP

i = (GetPlayerStat(index, Stats.willpower) * 0.8) + 6

Case MP

i = (GetPlayerStat(index, Stats.willpower) / 4) + 12.5

End Select

If i < 2 Then i = 2

GetPlayerVitalRegen = i

End Function

```

The HP/MP regen is handled in the server loop. Look for```

' Checks to update player vitals every 5 seconds - Can be tweaked

If Tick > LastUpdatePlayerVitals Then

UpdatePlayerVitals

LastUpdatePlayerVitals = GetTickCount + 5000

End If

```(1000 is one second)

This is the sub for calculation NPC damage. (server sided)

```

Function GetNpcDamage(ByVal npcNum As Long) As Long

GetNpcDamage = 0.085 * 5 * Npc(npcNum).Stat(Stats.Strength) * Npc(npcNum).damage + (Npc(npcNum).Level / 5)

End Function

```

To change the starting loctation, look for this (server sided)

```

' Default starting location [Server Only]

Public Const START_MAP As Long = 1

Public Const START_X As Long = 12

Public Const START_Y As Long = 11

```

As for the stackable items, you'd have to look for a tutorial, or look at how currency is handled.
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...