Recreation [F2P Remake!]

NVM I WAS BLIND!!!\

EDIT AGAIn

While I was doing the tutorial, I go to the fisher guide and ask her for some stuff but my Invetory Icon isn’t available… If this is an anti-leach where can I locate it?

It’s not an anti-leach. It’s simply unfinished. To make that work just go to the dialogue where she gives you the items and add c.packetSender().showSideBar(3, ID); or something like that.

Still abit stuck.

/**

  • Resets animation
    */

What I do with that?

^ That’s just a comment which you can put above a piece of code to remind yourself what it does.

You can also use it to comment out codes like;

/**
*System.out.println(“Comment”);
*/

Or
// System.out.println(“Comment”);

Why did you release this?

This doesn’t makes sense to me at all. Can somebody change this for me so I see what to do?


package com.rs2;

public class Constants {

/**
 * Cycle time.
 */
public static final int CYCLE_TIME = 600;

/**
 * Maximum item ID.
 */
public static final int MAX_ITEMS = 8000;

/**
 * Player member status.
 */
public static final int IS_MEMBER = 1;

/**
 * The Exp rate.
 */
public static final int XP_RATE = 5;

/**
 * The Server name.
 */
public static final String SERVER_NAME = "Recreation F2P";

/**
 * The Server version.
 */
public static final double SERVER_VERSION = 1.0;

/**
 * Members' only message.
 */
public static final String MEMBER = "Login to a members' server to use this feature.";

/**
 * Can pickup items from ground.
 */
public static final boolean CAN_PICKUP = true;

/**
 * Maximum connections.
 */
public static final int MAX_CONNECTIONS = 100000;

/**
 * Server port.
 */
public static final int SERVER_PORT = 43594;

/**
 * Maximum item amount.
 */
public static final int MAX_ITEM_AMOUNT = 1; //2147000000

/**
 * Starter location.
 */
public static int STARTER_X = 0; //3094
public static int STARTER_Y = 0; //3107

/**
 * Buffer size.
 */
public static final int BUFFER_SIZE = 30000;

/**
 * Packet sizes.
 */
public static final byte PACKET_SIZES[] = { 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, // 0
		0, 0, 0, 0, 8, 0, 6, 2, 2, 0, // 10
		0, 2, 0, 6, 0, 12, 0, 0, 0, 0, // 20
		0, 0, 0, 0, 0, 8, 4, 0, 0, 2, // 30
		2, 6, 0, 6, 0, -1, 0, 0, 0, 0, // 40
		0, 0, 0, 12, 0, 0, 0, 8, 8, 0, // 50
		8, 8, 0, 0, 0, 0, 0, 0, 0, 0, // 60
		6, 0, 2, 2, 8, 6, 0, -1, 0, 6, // 70
		0, 0, 0, 0, 0, 1, 4, 6, 0, 0, // 80
		0, 0, 0, 0, 0, 3, 0, 0, -1, 0, // 90
		0, 13, 0, -1, 0, 0, 0, 0, 0, 0,// 100
		0, 0, 0, 0, 0, 0, 0, 6, 0, 0, // 110
		1, 0, 6, 0, 0, 0, -1, 0, 2, 6, // 120
		0, 4, 6, 8, 0, 6, 0, 0, 0, 2, // 130
		0, 0, 0, 0, 0, 6, 0, 0, 0, 0, // 140
		0, 0, 1, 2, 0, 2, 6, 0, 0, 0, // 150
		0, 0, 0, 0, -1, -1, 0, 0, 0, 0,// 160
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 170
		0, 8, 0, 3, 0, 2, 0, 0, 8, 1, // 180
		0, 0, 12, 0, 0, 0, 0, 0, 0, 0, // 190
		2, 0, 0, 0, 0, 0, 0, 0, 4, 0, // 200
		4, 0, 0, 0, 7, 8, 0, 0, 10, 0, // 210
		0, 0, 0, 0, 0, 0, -1, 0, 6, 0, // 220
		1, 0, 0, 0, 6, 0, 6, 8, 1, 0, // 230
		0, 4, 0, 0, 0, 0, -1, 0, -1, 4,// 240
		0, 0, 6, 6, 0, 0, 0 // 250
};

}

If you’d look, the starter coordinates are 0, 0 so you’re going to log in at a black area. The coordinates for tutorial island are clearly noted next to it.

Okay downloaded, gonna give constructive criticism.

  • Why is processing still handled in a while loop, when you have Grahams Task Manager implemented?? There is no need for the ‘Process’ class once you use that task system.

  • you could use grahams task system to run garbage collecting instead of a while loop/system timers…

  • don’t really like the way you handled music, not that big of a deal though, your method could become extremely messy with a lot of music

  • I hate how there’s player saving every , horrible way to do this, pm me and I’ll show you a much easier way that doesn’t require you to save every

Okay with all that said, I can now say this is very impressive, the code is clean, this seems like an easy base to work around, and I just might rip clipping and door handling from this >.> (You will be accredited accordingly obviously). But yeah you have my support, If you guys are gonna use Delta I’d recommend this. Great job unholy. and if you ever want me to elaborate on anything I’ve stated just pm/msn me.

[quote=“Clawz fury, post:28, topic:470482”]Okay downloaded, gonna give constructive criticism.

  • Why is processing still handled in a while loop, when you have Grahams Task Manager implemented?? There is no need for the ‘Process’ class once you use that task system.

  • you could use grahams task system to run garbage collecting instead of a while loop/system timers…

  • don’t really like the way you handled music, not that big of a deal though, your method could become extremely messy with a lot of music

  • I hate how there’s player saving every , horrible way to do this, pm me and I’ll show you a much easier way that doesn’t require you to save every

Okay with all that said, I can now say this is very impressive, the code is clean, this seems like an easy base to work around, and I just might rip clipping and door handling from this >.> (You will be accredited accordingly obviously). But yeah you have my support, If you guys are gonna use Delta I’d recommend this. Great job unholy. and if you ever want me to elaborate on anything I’ve stated just pm/msn me.[/quote]

This does not save every player and one time, and as I said on my Delta++ thread, I was not sure if it would be better to process with Task Scheduler or Process class

oh, I must have read it wrong, hold on:

[code=java] /**
* A task to handle player saving
*/
public static void saveEvent(final Client c, final int ticks) {
Server.getTaskScheduler().schedule(new Task(ticks, false) {
@Override
protected void execute() {
if (!c.disconnected) {
Save©;
}
stop();
}
});
}

/**
 * Restarts the save task
 */
public static void Save(final Client c) {
	if (c.disconnected) {
		return;
	}
	if (!c.inTrade) {
		savegame(c, false);// saved player
		saveEvent(c, 40 + Misc.random(120));
	} else {
		saveEvent(c, 40 + Misc.random(120));
		// failed to save player.
	}
}[/code]

what’s that for then?

Also, I hope your not getting offended by that post, I was just trying to give some insight on how this can be improved :frowning:

It refuses to compile…

That’s not what I asked.

Can you please edit it for me so I can see?

Is there something preventing the survival expert from talking?

[quote=“Clawz fury, post:30, topic:470482”][quote author=enzo42 link=topic=587965.msg4171484#msg4171484 date=1354407618]
This does not save every player and one time
[/quote]
oh, I must have read it wrong, hold on:

[code=java] /**
* A task to handle player saving
*/
public static void saveEvent(final Client c, final int ticks) {
Server.getTaskScheduler().schedule(new Task(ticks, false) {
@Override
protected void execute() {
if (!c.disconnected) {
Save©;
}
stop();
}
});
}

/**
 * Restarts the save task
 */
public static void Save(final Client c) {
	if (c.disconnected) {
		return;
	}
	if (!c.inTrade) {
		savegame(c, false);// saved player
		saveEvent(c, 40 + Misc.random(120));
	} else {
		saveEvent(c, 40 + Misc.random(120));
		// failed to save player.
	}
}[/code]

what’s that for then?

Also, I hope your not getting offended by that post, I was just trying to give some insight on how this can be improved :([/quote]

It’s not exactly the best way to save players, but it prevents mass saving.

Can’t find the login coordinates.

Constants.java

It still wont work, seeing that dark area with that demon right there…

Change STARTER_X and STARTER_Y. After that, every NEW account will spawn at the said coordinates. Make sure you’re not logging in on an old account after changing them and if so just change the X and Y coordinates of your character in the CharData.

I downloaded this source to check it out, and as soon as I login I am in an all black area, the tutorial island dialog pops up, and theres nothing but black and a lesser demon lol

Still wont work, i have try it 2 times.