scootersam
September 13th, 2010, 22:32
hey guys well this is a simple tutorial i made fast, because a fair few people on msn asked me howto use points and how to make things give points etc so here i go
Files programing:
- Player.java this can be found at src>come>rs2hd>model.
- And the files you want your points in
ok well first of all you need to declare you points in player.java so open it up
and scroll down a little
just after you will see some things like this
public int something declared;
something declared is where you point text will go also where other things are in the file
so first of all to keep it easy this is what you should base your point on
- Something to do with the name of what the point is.
ok so you want to add this
public int pcpoint;
please note - i was coding my pc points as i go along so thats why its called pcpoint
ok well now you can use that in most files
now
Getting the point to do something?
Well in this part i will shwo you how to add this point to add to your points by clicking an object? or a command?
well first off all this is what you program into your file to make it add points when you do what ever you want to do.
pcpoint += 1;
that basicly makes it add a point on
pcpoint -= 1;
that takes a point off the ones you allready have..
Using points in commands and other things!
ok well i will show you some coding for if you click an object and if you type a command..
so for the command
if (cmd[0].equals("pcpoint")) {
pcpoint += 1;
player.sm("You recieved a pestcontroll point!");
}
using it in an object?
case ####:
pcpoint += 1;
player.sm("You recieved a pestcontroll point!");
break;
ok well thats your tutorial
and ik its easy stuff dont flame me please this was just for the people who dont know how to use points for things
well enjoy and i hope i helped!
Files programing:
- Player.java this can be found at src>come>rs2hd>model.
- And the files you want your points in
ok well first of all you need to declare you points in player.java so open it up
and scroll down a little
just after you will see some things like this
public int something declared;
something declared is where you point text will go also where other things are in the file
so first of all to keep it easy this is what you should base your point on
- Something to do with the name of what the point is.
ok so you want to add this
public int pcpoint;
please note - i was coding my pc points as i go along so thats why its called pcpoint
ok well now you can use that in most files
now
Getting the point to do something?
Well in this part i will shwo you how to add this point to add to your points by clicking an object? or a command?
well first off all this is what you program into your file to make it add points when you do what ever you want to do.
pcpoint += 1;
that basicly makes it add a point on
pcpoint -= 1;
that takes a point off the ones you allready have..
Using points in commands and other things!
ok well i will show you some coding for if you click an object and if you type a command..
so for the command
if (cmd[0].equals("pcpoint")) {
pcpoint += 1;
player.sm("You recieved a pestcontroll point!");
}
using it in an object?
case ####:
pcpoint += 1;
player.sm("You recieved a pestcontroll point!");
break;
ok well thats your tutorial
and ik its easy stuff dont flame me please this was just for the people who dont know how to use points for things
well enjoy and i hope i helped!