Don't like ads? PRO users don't see any ads ;-)
Guest

HSL script sample

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 1.12 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. shared function HE_ProcessCommandInput( account as NodeRef, input as String )
  2.   args as List of String
  3.   Tokenize( input, args )
  4.  
  5.   pc as NodeRef of Class E_playerCharacter = account.GetMyChar()
  6.  
  7.   partialMatch toLower( args[1] )
  8.     to "/wealth"
  9.       $CHAT.ChatPlayer( account, "game", "Your current wealth is: " + pc.E_wealth + " gold." )
  10.     .
  11.     to "/experience"
  12.       goto xp
  13.     .
  14.     to "/xp"
  15.       label xp
  16.       if pc.E_level < 1
  17.         pc.E_level = 1
  18.       .
  19.       $CHAT.ChatPlayer( account, "game", "You are level " + pc.E_level + ".")
  20.       $CHAT.ChatPlayer( account, "game", "Your current XP is: " + pc.E_experiencePoints )
  21.       next as Integer = pc.E_level + 1
  22.       $CHAT.ChatPlayer( account, "game", "XP needed for level " + next + ": " + pc.NeededXPforLevel( next ) )
  23.       pc.E_experiencePoints = pc.E_experiencePoints + 20
  24.       pc.ProcessXPGain()
  25.     .
  26.     to "/reset"
  27.       pc.E_experiencePoints = 0
  28.       pc.E_isDead = false
  29.       pc.E_level = 1
  30.       pc.E_hitPoints = 100
  31.       pc.E_wealth = 0
  32.     .
  33.     default
  34.       HE_CommandUsage( account, input )
  35.       return
  36.     .
  37.   .
  38. .