Results 1 to 9 of 9

Thread: Player variables

  1. #1
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55

    Player variables

    Hey Graalians,
    I'm doing a custom GUI profiles and I'm having problems.
    So I'm just asking what are the player variable for kills and deaths because player.deaths and player.kills don't work.
    Thanks for your answers,
    Joe.

  2. #2
    Post the code you are using or used to determine playerkills and playerdeaths don't work (those are the default variable names).

    Also: http://wiki.graal.net/index.php/Serv...file_Variables

    That is for the default profile gui however.
    Last edited by Torankusu; 04-07-2014 at 05:34 PM.

  3. #3
    Street Boss John's Avatar
    Join Date
    Jun 2013
    Location
    Lebanon
    Posts
    825
    Using the default variables is bad practice... How about you create your own? :O
    -Johnaudi

  4. #4
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55
    I can do it but I'm always thinking what to use, database? database npc, clientr variables, or file storage, I never know what to use for what Can you help me with the choice?

  5. #5
    Yes. Clientr. Variables.

    Example:

    Kills.
    When a player kills another, simply do something like:

    player.clientr.kills += 1;
    //depending on how you set it up, you will need to reference the player object specifically.

    Note: it will have to be done serverside since it is a clientr flag.

    Clientr flags can be READ on the clientside, but can only be CHANGED serverside.

    With a custom combat system, it is even possible to differentiate between spar wins, melee kills, magic kills, etc...

    clientr.kills_melee
    clientr.kills_magic
    clientr.spar_wins
    clientr.spar_losses

  6. #6
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55
    Okay thanks you much.
    And how delete the old one?

  7. #7
    Quote Originally Posted by Joe View Post
    Okay thanks you much.
    And how delete the old one?
    Can you elaborate with what you mean by "the old one"?

    Are you talking about the default stats (playerkills and playerdeaths)?

    If so, you can remove them from the Default Profile as such:
    Profile Variables
    profilevars=comma seperated list of profile variables
    Selects what is to be displayed in a Player's profile. The default variables are: playerkills, playerdeaths, playerfullhearts, playerrating, playerap, playerrupees, playerswordpower, canspin, largely modelled after Old GScript. Custom string variables can be added in the format `name=stringname'. If name is not specified, stringname is used.
    from the website I previously linked you to:
    http://wiki.graal.net/index.php/Serv...file_Variables

    you would want something like:

    profilevars=playerfullhearts,playerrating,playerap ,playerrupees

    would show in the default profile:
    MaxPower: #
    Rating: ####/###
    Alignment: ##
    Gralat: ##


    To expand on what I had showed you earlier with the clientr.flags to store kills, etc, you could even do something like:

    profilevars=playerfullhearts,playerrating,playerap ,playerrupees,Melee Kills:=clientr.kills_melee,Magic Kills:=clientr.kills_magic

    would show in the default profile:
    MaxPower: #
    Rating: ####/###
    Alignment: ##
    Gralat: ##
    Melee Kills: ##
    Magic Kills: ##
    Last edited by Torankusu; 04-07-2014 at 08:03 PM.

  8. #8
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55
    Well thanks you about your answers, but how I remove the basics system like old hp system?

  9. #9
    Soldier
    Join Date
    Jun 2013
    Location
    France
    Posts
    55
    *I would like to remove this basics system because I made mine but the Basics System are still in and I have no clue how to remove them

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •