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
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");
}
}
}
}
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.");
}
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
@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.
@mrextremez commented on GitHub (Dec 13, 2019):
This is what I use on my copy