[GH-ISSUE #249] Ring of life not working #3598

Closed
opened 2026-05-25 12:20:00 +00:00 by Dark98 · 2 comments
Owner

Originally created by @RedSparr0w on GitHub (Dec 9, 2019).
Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/249

Ring of life is not working as expected

Originally created by @RedSparr0w on GitHub (Dec 9, 2019). Original GitHub issue: https://github.com/2006-Scape/2006Scape/issues/249 Ring of life is not working as expected
Dark98 added the Difficulty: EasyNew Content labels 2026-05-25 12:20:00 +00:00
Author
Owner

@Gptaqbc commented on GitHub (Dec 9, 2019):

I've found this snippet... just have to figure out where to add it and if it works as expected. The methods aren't going to work with our code so they'll have to be changed by ours.

public void applyringoflife() {
		if (c.playerequipment[c.playerring] == 2570) {
			if (c.playerlevel[3] > 0 && c.playerlevel[3] <= c.getlevelforxp(c.playerxp[3]) / 10 && c.underattackby > 0) {
				int wildlvl = (((c.absy - 3520) / 8) + 1);
				if (wildlvl < 20) {
					c.getitems().deleteequipment(2570, c.playerring);
					c.getpa().startteleport(config.falador_x, config.falador_y, 0, "modern");
				}
			}
		}
	}
<!-- gh-comment-id:563443577 --> @Gptaqbc commented on GitHub (Dec 9, 2019): I've found this snippet... just have to figure out where to add it and if it works as expected. The methods aren't going to work with our code so they'll have to be changed by ours. public void applyringoflife() { if (c.playerequipment[c.playerring] == 2570) { if (c.playerlevel[3] > 0 && c.playerlevel[3] <= c.getlevelforxp(c.playerxp[3]) / 10 && c.underattackby > 0) { int wildlvl = (((c.absy - 3520) / 8) + 1); if (wildlvl < 20) { c.getitems().deleteequipment(2570, c.playerring); c.getpa().startteleport(config.falador_x, config.falador_y, 0, "modern"); } } } }
Author
Owner

@mrextremez commented on GitHub (Dec 13, 2019):

This is what I use on my copy

	public boolean savePlayer() {
		return (player.wildLevel < 20 && player.playerEquipment[ItemConstants.RING] == 2570 && player.playerLevel[3] > 0 && player.playerLevel[3] <= player.getLevelForXP(player.playerXP[3]) / 10 && player.underAttackBy > 0);
	}
	
	public void handleROL() {
		if (!savePlayer()) {
			return;
		}
		player.getItemAssistant().deleteEquipment(2570, ItemConstants.RING);
		player.getPlayerAssistant().startTeleport(3222, 3218, 0, "modern");
		player.getPacketSender().sendMessage("Your ring of life saves you.");
	}
<!-- gh-comment-id:565340401 --> @mrextremez commented on GitHub (Dec 13, 2019): This is what I use on my copy ``` public boolean savePlayer() { return (player.wildLevel < 20 && player.playerEquipment[ItemConstants.RING] == 2570 && player.playerLevel[3] > 0 && player.playerLevel[3] <= player.getLevelForXP(player.playerXP[3]) / 10 && player.underAttackBy > 0); } public void handleROL() { if (!savePlayer()) { return; } player.getItemAssistant().deleteEquipment(2570, ItemConstants.RING); player.getPlayerAssistant().startTeleport(3222, 3218, 0, "modern"); player.getPacketSender().sendMessage("Your ring of life saves you."); } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 2006-Scape/2006Scape#3598