Thread: How to adds a scoring system applied to all players

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 How to adds a scoring system applied to all players 
    Registered Member
    Bulby Strife's Avatar
    Join Date
    Jan 2008
    Age
    29
    Posts
    833
    Thanks given
    1
    Thanks received
    1
    Rep Power
    267
    Okay this is for a scoring system that applys to all players for a mini game such as caslte wars.

    In the castle wars tutorials you see out there the scoring sucks because it only shows your score go up and no one elses or the other teams, and it also resets to 0 when you log out. lol




    Difficulty: 1/10
    Classes Modified: Server.java/Client.java


    Step 1: Server.java
    add these ints

    Code:
    public static int ZammyScore = 0;
    public static int SaraScore = 0;
    under

    Code:
    public static int cycleTime = 500;
    Done with server.java!

    Step 2: Client.java

    Now we need to make a way for the scores to go up(idk what you will do) so I will give an example in a command way lol.

    add these commands

    Code:
    	if (command.equalsIgnoreCase("zammyup"))
    {
    server.ZammyScore += 1;
    }
    	if (command.equalsIgnoreCase("saraup"))
    {
    server.SaraScore += 1;
    }
    	if (command.equalsIgnoreCase("scores"))
    {
    scores();
    }
    now for a score board...

    add this void

    Code:
    public void scores() {
    clearQuestInterface();
    
    clearQuestInterface();
    sendQuest("Close Window", 1137);//Close text
    sendQuest("@[email protected]~Score Board~", 1139);//Line 1
    sendQuest("", 1140);//Line 2
    sendQuest("@[email protected]: " + server.ZammyScore, 1141);//Line 3
    sendQuest("@[email protected]: " + server.SaraScore, 1142);//Line 4
    sendQuest("", 1143);//Line 5
    sendQuest(""1144);//Line 6
    sendQuest("", 1145);//Line 7
    sendQuest("", 1146);//Line 8
    sendQuest("", 1147);//Line 9
    sendQuest("", 1148);//Line 10
    sendQuest("", 1149);//Line 11
    sendQuest("", 1150);//Line 12
    showInterface(1136);
    }

    And thats it!

    Now you just got to add it in your mini game or what ever!
    [Only registered and activated users can see links. ]
    ||||||||||||||||||||||||||||||

     

  2. #2  
    JavaNerd
    Guest
    Nice now post your minigame TUT
     

  3. #3  
    Registered Member
    Join Date
    Oct 2007
    Posts
    286
    Thanks given
    0
    Thanks received
    3
    Rep Power
    12
    Thanks man. Nice codes you've got, thanks alot, again for sharing.
     

  4. #4  
    Registered Member
    Bulby Strife's Avatar
    Join Date
    Jan 2008
    Age
    29
    Posts
    833
    Thanks given
    1
    Thanks received
    1
    Rep Power
    267
    Thanks for the nice feed back.
    [Only registered and activated users can see links. ]
    ||||||||||||||||||||||||||||||

     

  5. #5  
    Registered Member

    Join Date
    Jan 2008
    Posts
    1,338
    Thanks given
    243
    Thanks received
    85
    Rep Power
    250
    nice =P gonna add this
     

  6. #6  
    RyanH100
    Guest
    You Got An Error In public void scores() {

    public void scores() {
    clearQuestInterface();

    clearQuestInterface();
    sendQuest("Close Window", 1137);//Close text
    sendQuest("@[email protected]~Score Board~", 1139);//Line 1
    sendQuest("", 1140);//Line 2
    sendQuest("@[email protected]: " + server.ZammyScore, 1141);//Line 3
    sendQuest("@[email protected]: " + server.SaraScore, 1142);//Line 4
    sendQuest("", 1143);//Line 5
    sendQuest(""1144);//Line 6
    sendQuest("", 1145);//Line 7
    sendQuest("", 1146);//Line 8
    sendQuest("", 1147);//Line 9
    sendQuest("", 1148);//Line 10
    sendQuest("", 1149);//Line 11
    sendQuest("", 1150);//Line 12
    showInterface(1136);
    }

    It Was Line 6 u forgot the sendQuest("",1144);//Line 6
    ^ that u forgot so just replace line 6 with
    sendQuest("",1144);//Line 6
     

  7. #7  
    littleplop
    Guest
    gj not alot of poeple know they have to add values in to the server class to make them apply for all players and not for each new player
     

  8. #8  
    Sub
    Sub is offline
    sυввч

    Sub's Avatar
    Join Date
    Aug 2007
    Age
    21
    Posts
    4,325
    Thanks given
    1,082
    Thanks received
    346
    Discord
    View profile
    Rep Power
    2755
    you can add the int into client you know but easyer for new people to find the int in server.java so bacsily gj
     

  9. #9  
    Officially Retired


    Join Date
    Oct 2007
    Age
    27
    Posts
    5,456
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    nice man i love ur source ubt laging
     

  10. #10 leached! 
    deathdeath
    Guest
    you stupid noob this is leached !
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

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