mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 16:49:07 +00:00
Update Scrolls (#191)
* Fix local Parabot instructions * Add kick command, and force logout function * Update scroll handling
This commit is contained in:
@@ -927,18 +927,25 @@ public class NpcHandler {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (Misc.random(1, 256) == 1) {
|
|
||||||
int level = getNpcListCombat(npcs[i].npcType);
|
int level = getNpcListCombat(npcs[i].npcType);
|
||||||
if (level >= 2 && level <= 24) // easy
|
// higher level monsters have a better drop rate (max of 1/128)
|
||||||
Server.itemHandler.createGroundItem(c, 2677, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
int chance = Math.max(128, 512 - (level * 2));
|
||||||
|
if (Misc.random(1, chance) == 1) {
|
||||||
|
int scroll = -1;
|
||||||
|
if (level <= 1) // none
|
||||||
|
scroll = -1;
|
||||||
|
else if (level <= 24) // easy
|
||||||
|
scroll = 2677;
|
||||||
else if (level <= 40) // easy → medium
|
else if (level <= 40) // easy → medium
|
||||||
Server.itemHandler.createGroundItem(c, 2677 + Misc.random(0, 1), npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
scroll = 2677 + Misc.random(0, 1);
|
||||||
else if (level <= 80) // medium
|
else if (level <= 80) // medium
|
||||||
Server.itemHandler.createGroundItem(c, 2678, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
scroll = 2678;
|
||||||
else if (level <= 150) // medium → hard
|
else if (level <= 150) // medium → hard
|
||||||
Server.itemHandler.createGroundItem(c, 2678 + Misc.random(0, 1), npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
scroll = 2678 + Misc.random(0, 1);
|
||||||
else if (level > 150)// hard
|
else if (level > 150)// hard
|
||||||
Server.itemHandler.createGroundItem(c, 2679, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
scroll = 2679;
|
||||||
|
if (scroll >= 0)
|
||||||
|
Server.itemHandler.createGroundItem(c, scroll, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user