Thread: How to get the ::commands note

Results 1 to 4 of 4
  1. #1 How to get the ::commands note 
    Registered Member iTzFAKERZ's Avatar
    Join Date
    Jan 2012
    Posts
    47
    Thanks given
    2
    Thanks received
    1
    Rep Power
    11
    Okay, this is a note that pops up when you type(like) ::commands(change it yourself).
    I'm using palidino76 source(508)

    Hard? No, just copy paste stuff.
    Credits: 50 % to me, and 50% to Ryan

    Okay, what we're going to do first, is go to Source(your source name)>Src>palidino76>rs2>io>packets>commands

    Now open commands.JAVA(i use notepad++), add this code:
    Spoiler for Code:
    } else if (cmd[0].equals("put the command name here(no :")) {
    p.frames.showInterface(p, 220);
    p.frames.setString(p, "<col=0000FF>NetherScape 508 commands list:", 220, 1);
    p.frames.setString(p, "Edit evrything between the quotes!", 220, 3); //these are line numbers, the 3 stands for line 3, you can edit these aswell!!
    p.frames.setString(p, "Commands: ::food,::banking,::afk,::back,::cook", 220, 4);
    p.frames.setString(p, "Training: ::train,::wood,::fishing,::hangout", 220, 5);
    p.frames.setString(p, "Magic: ::magic,::lunar,::ancientstaff,::runes,::ahrims", 220, 6);
    p.frames.setString(p, "Owner: <img=1>Joris", 220, 8);
    p.frames.setString(p, "Moderators: <img=0>Pur3 Pker<img=0>Rickinator & <img=1>Marijn", 220, 9);
    p.frames.setString(p, "This server runs 24/7, updates will be posted on the website.", 220, 11);
    p.frames.setString(p, "<col=0000FF>The Forums: Home - | Visit it now!", 220, 13);
    p.frames.sendMessage(p, "<col=0000FF>This is the command list.");


    Save, close and compile!
    Reply With Quote  
     

  2. #2  
    Registered Member zzzfishstick's Avatar
    Join Date
    Jan 2011
    Posts
    455
    Thanks given
    34
    Thanks received
    21
    Rep Power
    22
    This was really not necessary, nevertheless thanks for releasing.
    Reply With Quote  
     

  3. #3  
    PhoenixPk - Nothing is impossible
    T3rminator's Avatar
    Join Date
    Feb 2012
    Posts
    327
    Thanks given
    31
    Thanks received
    14
    Rep Power
    16
    Not good, you should say, where to put it under
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Feb 2012
    Posts
    141
    Thanks given
    16
    Thanks received
    15
    Rep Power
    40
    Why write all of the setString method calls? Couldn't you just create a sort of gateway method that read a longer string of text, then individually calls that method when a character limit is reached, each time it's reached? (assuming that you know the character limit, and I'd think you could just test it out)

    Here's what I mean:
    1. Call method printStrings(String text), text being the long string of text that all of this would be. If you don't want to sacrifice readability, then you can just make a concatenation at the end of each line ( + ) and continue on the line after
    2. Have this method do the following:
    a. Split the string every ## characters (## being your char. limit, which I don't exactly know, however you can just forloop a random number, then just keep adjusting it until you hit the max per line to figure this out), and create a new String object to represent each of these split strings
    b. Create an array of strings as an index, the bound would just be the number of lines - 1 (due to 0 also being a valid index)
    c. Use the pattern you see in the setString method, and loop. For example, this likely would work: p.frames.setString(p, lines[index], 220, index);


    Just a though
    Thanks for reading I'm new to this community and to RSPS, so if I ask a silly question here and there, please forgive me!
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Note/Unnote
    By Ty13r in forum Help
    Replies: 2
    Last Post: 12-21-2011, 10:23 PM
  2. Another PI note dupe.
    By Spooky in forum Snippets
    Replies: 14
    Last Post: 02-12-2011, 05:46 PM
  3. [PI] Note Dupe
    By Joshua F in forum Help
    Replies: 4
    Last Post: 11-26-2010, 09:42 PM
  4. Replies: 7
    Last Post: 01-16-2010, 02:14 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •