Adblock breaks this site

Some Coding Related Questions

Discussion in 'RuneScape Miscellaneous' started by Asperity, Jul 19, 2009.

Thread Status:
Not open for further replies.
  1. Asperity

    Asperity Member

    Joined:
    Jul 14, 2009
    Posts:
    46
    Referrals:
    0
    Sythe Gold:
    0
    Some Coding Related Questions

    Alright well first off. Sorry for basically "Lurking" for awhile. I signed up and was going to begin becoming part of the community, but I got dragged into and involved with another community.

    I'm not a huge coder. Infact I don't even know HOW to code exactly. I mean I can edit coding and such, but I'm not a Java Programmer or any other form of such. I did run a server way,way back called "Shawnscape".

    I'm coding a Dodian based server for the fun of it, and maybe for a future project. I need a few things though as I'm not a coder extactly, and thus I'm unsure of how to do the following.

    I wish to make a "Jail" system such as in "Unborn Server". I need a couple things.
    1) How can I make it so when this command is used you are teleported to XXXX,XXXX Cords with teleportation/magic,trading,talking,use of yell command, and un able to pick up any drops all disabled?
    2) How can I make a command that "reverses" said effects. This will be used in stead of a "Ban" system.

    I wish to make it so certain items are undroppable. I need to be able to do this. Along with this I need to make a place within certain XXXX,XXXX Cords that any droppable items are droppable. I would also need to disabld the use of the portal to go to this location if you had more then X of any of the items that are "Undroppable"

    That is all for now :)

    Thank you in advance for the help.
     
  2. coder dane

    coder dane Newcomer

    Joined:
    Aug 15, 2009
    Posts:
    2
    Referrals:
    0
    Sythe Gold:
    0
    Some Coding Related Questions

    Dodian [317]?
    if so here i got a code for jail and unjail
    Post this in youre Client.java(source)

    this is jail!

    Code:
    	if (command.startsWith("jail") && playerRights >= 1) {
    	try {
    		String otherPName = command.substring(5);
    		int otherPIndex = PlayerHandler.getPlayerID(otherPName);
    		if (otherPIndex != -1) {
    			client p = (client) server.playerHandler.players[otherPIndex];
    			p.toX = 2933;
    			p.toY = 3285;
    			p.action = 1;
    			p.sM( "You have been jailed by " + playerName);
    			sM("You have jailed "+p.playerName+".");
    			System.out.println("Command by: -TheImpureOne-");
    		} else {
    			sM("That player is ether offline or you misspelled the name.");
    		}
    	} catch (Exception e) {
    		sM("Try entering a name that you wish to unjail.");
    	}
    }
    this is unjail!
    Code:
    if(command.startsWith("unjail") && playerRights >= 2) {
    	try {
    		String otherName = command.substring(7);
    		int otherIndex = PlayerHandler.getPlayerID(otherName);
    		if(otherIndex != -1) {
    			client p = (client) server.playerHandler.players[otherIndex];
    			p.toX = 3089;
    			p.toY = 3502;
    			p.action = 0;
    			p.sM("You have been unjailed by: " + playerName);
    			sM("You have unjailed: " + p.playerName);
    			System.out.println("Command by: -TheImpureOne-");
    		} else {
    			sM("That player is ether offline or you misspelled the name.");
    		}
    	} catch (Exception e) {
    		sM("Try entering a name that you wish to unjail.");
    	}
    }
    Ok where u se PtoX and PtoY replace it with youre coords of jail and where u want to release them hope this helps :)
     
< Hamachi Pvp! 508! All Specs! Free Admin on first player! | ~ Would i be able to solo any GWD bosseS? ~ >
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site