@name RPG Game
@inputs EGP:wirelink
@outputs 
@persist Name:string Class:string Hp Mana AD AP Armor Res Crit Gold
@trigger 

runOnTick(1)
runOnChat(1)
if(first()){
    MHP = 100
    MM = 100
    }

if(chatClk(owner())){
    Chat = owner():lastSaid():explode(" ")
    Me = owner()
    if(Chat:string(1)=="/n"){
        Name = Me:lastSaid():sub(4)
        hideChat(1)
    }
    if(Chat:string(1)=="/c"){
        if(Me:lastSaid():sub(4)=="1"){
            Class = "Warrior"
            
            }
    
    }
}

function void initMenu(){
        EGP:egpText(1, "Your name is... " + Name,vec2(10,10))
}


initMenu()
