Thread: Writing a int to character files

Results 1 to 8 of 8
  1. #1 Writing a int to character files 
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    I will be using my barrows to explain this.

    Purpose: make it so certain data writes to a text file
    Difficulty 3/10
    Credits to me and only me


    First go into client.java and look for:
    Code:
          characterfile.write("character-height = ", 0, 19);
          characterfile.write(Integer.toString(heightLevel), 0, Integer.toString(heightLevel).length());
          characterfile.newLine();
    That is the part that writes the data to the char file.
    Code:
    character-height =
    That tells the server to write that into character files when they are created.
    Code:
    heightLevel
    That is the ints name you have to change all of them to the name of the int you want to use.

    Next find where all your other ints/public static boolean are
    and add some thing like
    Code:
    public static int barrowskillcount = 0;
    That tells what the server is spouse to log.

    Next find you might want to make a interface to show the kills but making a few different things like
    Code:
      public void BarrowsKillCountRegister() {
        sendFrame126("@whi@Barrows Kill Count", 8144); // Helpmenu title
        clearQuestInterface();
        sendFrame126("@whi@Kill Count:" + barrowskillcount, 8145);
    
        sendQuestSomething(8143);
        showInterface(8134);
      }
    Add this command to make it able to been seen
    Code:
    	if (command.startsWith("killcount")) {
     BarrowsKillCountRegister();
    }
    To make it go up from killing the barrows npcs add this in your NPCHandeler.java
    Code:
    						} else if (npcs[i].npcType == 2026){
    							npcs[i].animNumber = 0x900;//Barrows Dharok
    							client.barrowskillcount++;
    						} else if (npcs[i].npcType == 2025){
    							npcs[i].animNumber = 0x900;//Barrows Ahrim
    							client.barrowskillcount++;
    						} else if (npcs[i].npcType == 2027){
    							npcs[i].animNumber = 0x900;//Barrows Guthan
    							client.barrowskillcount++;
    						} else if (npcs[i].npcType == 2028){
    							npcs[i].animNumber = 0x900;//Barrows Karil
    							client.barrowskillcount++;
    						} else if (npcs[i].npcType == 2029){
    							npcs[i].animNumber = 0x900;//Barrows Torag
    							client.barrowskillcount++;
    						} else if (npcs[i].npcType == 2030){
    							npcs[i].animNumber = 0x900;//Barrows Verac
    							client.barrowskillcount++;
    						}  else if (npcs[i].npcType == 2036){ //Barrows Skeletons
    							npcs[i].animNumber = 0x900;
    						}
    Hope this helped and remember ***++ is always appreciated

    The server with these barrows is Evolutionscape.no-ip.org




    NOTE: this will **** your server if you try to log onto a recreated character.
    Level me up

    Not allowed
     

  2. #2  
    Registered Member
    Join Date
    Mar 2007
    Age
    31
    Posts
    145
    Thanks given
    6
    Thanks received
    4
    Rep Power
    41
    Quite nice, let's hope you get some *** for this lmao...cya on suba-studios lol
     

  3. #3  
    mr s' sock
    Guest
    Wtf? this is useless, tell them how to do it with booleans nub.
     

  4. #4  
    Thecowman
    Guest
    Hmmm Yes I see. good work. I know a friend that could do with this lmao.

    >Thecowman
     

  5. #5  
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    No this isn't you can use it to do a ton of stuff. You can make your server log more data to your account file like kill counters and other ****.
    Level me up

    Not allowed
     

  6. #6  
    Community Veteran

    Animato's Avatar
    Join Date
    Apr 2007
    Posts
    2,011
    Thanks given
    18
    Thanks received
    80
    Rep Power
    253
    Quote Originally Posted by mr s' sock View Post
    Wtf? this is useless, tell them how to do it with booleans nub.
    um exactly the same? just declare that the boolean is true or false and then put it in your character file... gj on the tut, it'll help some people i suppose.
     

  7. #7  
    Registered Member
    Join Date
    Feb 2007
    Posts
    308
    Thanks given
    0
    Thanks received
    1
    Rep Power
    72
    Integer.parseInt(String) is better.

    Quote Originally Posted by mr s' sock View Post
    Wtf? this is useless, tell them how to do it with booleans nub.
    It would be something like this,
    Code:
    boolean b;
    characterfile.write(Boolean.toString(b));
    RuneWiki - The ultimate source of technical RuneScape information.
     

  8. #8  
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    30
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    Well it works in the Dodian source I am using so I suppose it wont work for every one.
    Level me up

    Not allowed
     


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
  •