Jump to content

Utility: @getskill


Recommended Posts


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

Allows Administrators to give themself a skill by entering the command @getskill as if it were the "skill" script command.

-    script    getskill    -1,{
    
OnInit:
        bindatcmd "getskill",strnpcinfo(3)+"::OnAtcommand",99,99;

        
OnAtcommand:
        set .@SkillID, .@atcmd_parameters$[0];
        set .@SkillLv, .@atcmd_parameters$[1];
        set .@SkillFlag, .@atcmd_parameters$[2];
    if(.@atcmd_numparameters < 3) {
        message strcharinfo(0),"Invalid Syntax (usage: @getskill <skill id> <level> <flag>).";
        message strcharinfo(0),.@atcmd_command$+" failed.";
    } else  if(.@SkillLv >= 11){
        message strcharinfo(0),"Invalid Syntax (Max Skill level is 10.)";
        message strcharinfo(0),.@atcmd_command$+" failed.";
        end;
    } else if(.@SkillFlag >=5){
        message strcharinfo(0),"Invalid Syntax (Max Skill flag is 4.)";
        message strcharinfo(0),.@atcmd_command$+" failed.";
        end;
    } else {
        skill .@SkillID,.@SkillLv,.@SkillFlag;
    }
    end;
}

I wanted to make it check the skill DB for class only skills..but I don't know how to do that lol..

Edited by Pneuma
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...