Interface Ids
ctx.ids.
Private servers renumber content: Elorin plays OSRS animation 426 as 19426, and Impact
sends OSRS graphic 3244 as 7473. Write a plugin against OSRS ids and translate at the
boundary instead of keeping one constant table per server:
// what does this server call OSRS animation 426?
OptionalInt bow = ctx.ids.animation(426);
// which OSRS graphic is the one this actor just played? (prefer this direction for comparisons)
boolean telegraph = ctx.ids.osrsGraphic(spotAnimId).orElse(-1) == 3244;
Every method returns an empty OptionalInt when it cannot translate: the server's rule is not
documented with evidence, the id is outside the range the rule covers, or (forward only) several server ids
stand for the same OSRS id, so no single answer is safe to compare with ==. Empty never means
"the id does not exist"; it means "cannot say". A translation is a namespace rule, not proof that the server
defines that id.
Animations here are actor (player and NPC) sequences. Object animations can use another namespace. Which servers translate which ids is in the SDK docs, Compatibility.
-
Method Summary
Modifier and TypeMethodDescriptionanimation(int osrsId) This server's actor animation (sequence) id for OSRS animationosrsId.graphic(int osrsId) This server's spot graphic / graphics object / projectile id for OSRS graphicosrsId.osrsAnimation(int serverId) The OSRS animation id for this server's animationserverId.osrsGraphic(int serverId) The OSRS graphic id for this server's graphicserverId.osrsVarbit(int serverId) The OSRS varbit id for this server's varbitserverId.server()The server whose ids these are.varbit(int osrsId) This server's varbit id for OSRS varbitosrsId.
-
Method Details
-
server
ServerId server()The server whose ids these are. -
animation
This server's actor animation (sequence) id for OSRS animationosrsId. -
graphic
This server's spot graphic / graphics object / projectile id for OSRS graphicosrsId. -
varbit
This server's varbit id for OSRS varbitosrsId. -
osrsAnimation
The OSRS animation id for this server's animationserverId. -
osrsGraphic
The OSRS graphic id for this server's graphicserverId. -
osrsVarbit
The OSRS varbit id for this server's varbitserverId.
-