Jump to content
Existing user? Sign In

Sign In



Sign Up

Despawning thieving stalls...


'Kyle

Recommended Posts

You're supposed to thieve a stall, the stall respawns a temporary empty stall object for "x" amount of seconds, then the original stall comes back.

So the original cached map objects -such as the ones in Draynor or East Ardougne- will respawn the stall with the items after the allotted time has been met.

 

Yet, with spawned in thieved stalls, this seems to not work. I have added some stalls around varrock, fally, etc.

Whenever you thieve the stall, it will spawn the temporary empty stall. Although, after its time to respawn the stall with the items it will despawn completely...

 

This is frustrating me. Any ideas? (P.S. Seed stall at Draynor works, but not anywhere I have spawned it)

346f726f8f425fc1d8b8b80c9e440ece.png

 

Here are some gifs of what is supposed to happen:

be4db412ce0b189c3823defb651a1ab5.gif

091f6b06cb5c0157decad09e81276ba1.gif

 

Instead, right before the stall comes back, it despawns. This method is involved, albiet I doubt it is the culprit.


	public static void handleStalls(final Player player,
			final WorldObject object) {
//		if (player.getAttackedBy() != null && player.getAttackedByDelay() > Utils.currentTimeMillis()) {
//			player.getPackets().sendGameMessage("You can't do this while you're under combat.");
//			return;
//		}
		for (final Stalls stall : Stalls.values()) {
			if (stall.getObjectId() == object.getId()) {
				final WorldObject emptyStall = new WorldObject(
						stall.getReplaceObject(), 10, object.getRotation(),
						object.getX(), object.getY(), object.getPlane());
				if (player.getSkills().getLevel(Skills.THIEVING) < stall
						.getLevel()) {
					player.getPackets().sendGameMessage(
							"You need a thieving level of " + stall.getLevel()
									+ " to steal from this.", true);
					return;
				}
				if (player.getInventory().getFreeSlots() <= 0) {
					player.getPackets().sendGameMessage(
							"Not enough space in your inventory.", true);
					return;
				}

				player.setNextAnimation(new Animation(881));
				player.lock(2);
				WorldTasksManager.schedule(new WorldTask() {
					boolean gaveItems;

					@Override
					public void run() {
						// prevents multiempty stall spawn if many ppl using
						// same spot and also checks if stall there still
						if (!World.getRegion(object.getRegionId())
								.containsObject(object.getId(), object)) {
							stop();
							return;
						}
						if (!gaveItems) {
							player.getInventory().addItem(
									stall.getItem(Utils
											.getRandom(stall.item.length - 1)),
									Utils.getRandom(stall.getAmount()));
							player.getSkills().addXp(Skills.THIEVING,
									stall.getExperience());
							gaveItems = true;
							checkGuards(player);
						} else {
							World.spawnTemporaryObject(emptyStall, (int) (1500 * stall.getTime()));
							stop();
						}
					}
				}, 0, 0);
			}
		}
	}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Contact

[email protected]

astra.security

What is a RSPS?

A RSPS, also known as RuneScape private server, is an online game based on RuneScape, and controlled by independent individuals.

Popular RSPS Servers

Runewild Ikov RedemptionRSPS

Disclaimer

Runesuite is not affiliated with runescape, jagex in any way & exists solely for educational purposes.

×
×
  • Create New...