WarCraft: Source

 

GetNextXp

Page history last edited by freddukes@... 1 yr ago

Get Next XP


GetNextXp is a command to retrieve the total xp the user will need to to the next level. Once the user's race XP has reached this, he will increase in another level.

 

The correct syntax is:

 

<variable> = wcs.Command(<userid>).GetNextXp()

 

  • variable - A local variable that you wish to store the value of the next level's xp inside
  • Userid - The players ID from which you are retrieveing their next level xp.


Example:

 

def player_say(ev):

    if ev["text"] == "nextxp":

        next_xp = wcs.Command(ev["userid"]).GetNextXp()

        es.msg("When you reach %s XP, you will level up!"%next_xp)

Comments (0)

You don't have permission to comment on this page.