This was really not necessary, nevertheless thanks for releasing.
|
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:
Save, close and compile!
This was really not necessary, nevertheless thanks for releasing.
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
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |