Fuyuumi Posted January 25, 2013 Author Share Posted January 25, 2013 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 More sharing options...
Matt Posted January 25, 2013 Share Posted January 25, 2013 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 = iEnd 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 = 1Public Const START_X As Long = 12Public 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 More sharing options...
Fuyuumi Posted January 26, 2013 Author Share Posted January 26, 2013 Man, you're a life saver. Thanks a lot. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now