
HSL script sample
By: a guest on
Apr 25th, 2012 | syntax:
None | size: 1.12 KB | hits: 17 | expires: Never
shared function HE_ProcessCommandInput( account as NodeRef, input as String )
args as List of String
Tokenize( input, args )
pc as NodeRef of Class E_playerCharacter = account.GetMyChar()
partialMatch toLower( args[1] )
to "/wealth"
$CHAT.ChatPlayer( account, "game", "Your current wealth is: " + pc.E_wealth + " gold." )
.
to "/experience"
goto xp
.
to "/xp"
label xp
if pc.E_level < 1
pc.E_level = 1
.
$CHAT.ChatPlayer( account, "game", "You are level " + pc.E_level + ".")
$CHAT.ChatPlayer( account, "game", "Your current XP is: " + pc.E_experiencePoints )
next as Integer = pc.E_level + 1
$CHAT.ChatPlayer( account, "game", "XP needed for level " + next + ": " + pc.NeededXPforLevel( next ) )
pc.E_experiencePoints = pc.E_experiencePoints + 20
pc.ProcessXPGain()
.
to "/reset"
pc.E_experiencePoints = 0
pc.E_isDead = false
pc.E_level = 1
pc.E_hitPoints = 100
pc.E_wealth = 0
.
default
HE_CommandUsage( account, input )
return
.
.
.