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

[ES] Lvl up


Marcin55
 Share

Recommended Posts

Hello I found bug in ES. When I lvl up I give ponit to str and I gain 1 more point wtf!?
I found that file but dont know what change it in.

> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> ' Module: PlayerLevelUp.ess '
> ' Author: Stephan J.R. van Schaik '
> ' Date: August 30th, 2009. '
> ' Version: 1.0.0 '
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
>
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> ' Function: PlayerLevelUp '
> ' Brief: executes when a player levels up. '
> ' Parameters: '
> ' Index: the index number of the player. '
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> Sub PlayerLevelUp(Index)
> Dim PlayerExp
>
> If GetPlayerExp(Index) < GetPlayerNextLevel(Index) Then
> Exit Sub
> End If
>
> Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index)
> PlayerExp = GetPlayerNextLevel(Index)
>
> Call SetPlayerLevel(Index, GetPlayerLevel(Index) + 1)
> Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1)
> Call SetPlayerExp(Index, GetPlayerExp(Index) - PlayerExp)
> Call SetPlayerHP(Index, GetPlayerMaxHP(Index))
> Call SetPlayerMP(Index, GetPlayerMaxMP(Index))
> Call SetPlayerSP(Index, GetPlayerMaxSP(Index))
> Call SendPlayerData(Index)
> Call SendStats(Index)
> Call SendHP(Index)
> Call SendMP(Index)
> Call SendSP(Index)
> Call SendPTS(Index)
> Loop
>
> Call BattleMsg(Index, "You have " & GetPlayerPOINTS(Index) & " stat points.", BRIGHTBLUE, LEFT)
> End Sub


Or here :

> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> ' Module: UsingStatPoints.ess '
> ' Author: Stephan J.R. van Schaik '
> ' Date: August 30th, 2009. '
> ' Version: 1.0.0 '
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
>
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> ' Function: UsingStatPoints '
> ' Brief: executes when a player uses a stat point. '
> ' Parameters: '
> ' Index: the index number of the player. '
> ' Type: the stat type to increment. '
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> Sub UsingStatPoints(Index, StatType)
> Select Case StatType
> Case STAT_STRENGTH
> If GetPlayerSTR(Index) + 1 >= MAX_STAT Then
> Call BattleMsg(Index, "You have maxed your strenght!", BRIGHTRED, LEFT)
>
> Exit Sub
> End If
>
> Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 1)
> Call BattleMsg(Index, "You have gained more strenght!", WHITE, LEFT)
>
> Case STAT_DEFENCE
> If GetPlayerDEF(Index) + 1 >= MAX_STAT Then
> Call BattleMsg(Index, "You have maxed your defence!", BRIGHTRED, LEFT)
>
> Exit Sub
> End If
>
> Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 1)
> Call BattleMsg(Index, "You have gained more defence!", WHITE, LEFT)
>
> Case STAT_SPEED
> If GetPlayerSPEED(Index) + 1 >= MAX_STAT Then
> Call BattleMsg(Index, "You have maxed your speed!", BRIGHTRED, LEFT)
>
> Exit Sub
> End If
>
> Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 1)
> Call BattleMsg(Index, "You have gained more speed!", WHITE, LEFT)
>
> Case STAT_MAGIC
> If GetPlayerMAGI(Index) + 1 >= MAX_STAT Then
> Call BattleMsg(Index, "You have maxed your magic!", BRIGHTRED, LEFT)
>
> Exit Sub
> End If
>
> Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 1)
> Call BattleMsg(Index, "You have gained more magic!", WHITE, LEFT)
>
> Case Else
> Call PlayerMsg(Index, "Unknown stat type.", BRIGHTRED)
>
> Exit Sub
> End Select
>
> Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 1)
> End Sub


Please help. I'm sorry for my english I dont know good it.
Link to comment
Share on other sites

> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> ' Module: UsingStatPoints.ess              '
> ' Author: Stephan J.R. van Schaik   '
> ' Date: August 30th, 2009.              '
> ' Version: 1.0.0                  '
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
>
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> ' Function: UsingStatPoints              '
> ' Brief: executes when a player uses a stat point.      '
> ' Parameters:                    '
> '  Index: the index number of the player.        '
> '  Type: the stat type to increment.        '
> '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> Sub UsingStatPoints(Index, StatType)
>   Select Case StatType
>       Case STAT_STRENGTH
>         If GetPlayerSTR(Index) + 1 >= MAX_STAT Then
>             Call BattleMsg(Index, "You have maxed your strenght!", BRIGHTRED, LEFT)
>
>             Exit Sub
>         End If
>
>         Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 1)
>         Call BattleMsg(Index, "You have gained more strenght!", WHITE, LEFT)
>
>       Case STAT_DEFENCE
>         If GetPlayerDEF(Index) + 1 >= MAX_STAT Then
>             Call BattleMsg(Index, "You have maxed your defence!", BRIGHTRED, LEFT)
>
>             Exit Sub
>         End If
>
>         Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 1)
>         Call BattleMsg(Index, "You have gained more defence!", WHITE, LEFT)
>
>       Case STAT_SPEED
>         If GetPlayerSPEED(Index) + 1 >= MAX_STAT Then
>             Call BattleMsg(Index, "You have maxed your speed!", BRIGHTRED, LEFT)
>
>             Exit Sub
>         End If
>
>         Call SetPlayerSPEED(Index, GetPlayerSPEED(Index) + 1)
>         Call BattleMsg(Index, "You have gained more speed!", WHITE, LEFT)
>
>       Case STAT_MAGIC
>         If GetPlayerMAGI(Index) + 1 >= MAX_STAT Then
>             Call BattleMsg(Index, "You have maxed your magic!", BRIGHTRED, LEFT)
>
>             Exit Sub
>         End If
>
>         Call SetPlayerMAGI(Index, GetPlayerMAGI(Index) + 1)
>         Call BattleMsg(Index, "You have gained more magic!", WHITE, LEFT)
>        
>
>       Case Else
>         Call PlayerMsg(Index, "Unknown stat type.", BRIGHTRED)
>
>         Exit Sub
>   End Select
>
>   Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) - 1)
> End Sub


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