Silverlight explained


99 Def Send PM

Member

Posts: 6

For the longest time i always thought i was getting an advantage by /curse/weaken/confuse, before using silverlight, thinking it would stack haha.

so i did some digging in "a" source code to see how it actually works.

How Silverlight's Demon Interaction Works
Trigger Condition (shouldExecute)
The script fires if both of these are true:

The player has Silverlight equipped (hasEquipped(ItemId.SILVERLIGHT.id()))

The NPC is a demon - determined by either:
The NPC's name contains the string "demon" (case-insensitive) — catches any generic demon NPC
The NPC's ID matches a hardcoded list of named demons: DELRITH, OTHAINIAN, DOOMION, HOLTHION, NEZIKCHENED
The check works both ways - player attacking demon, or demon attacking player (the equipped check is always on the player's side).

Effect (executeScript)
Each combat round it applies a 15% stat drain to the demon's first 3 skills (indices 0, 1, 2  - which in RSC are Attack, Defense, and Strength):


int newStat = maxStat - (int)(maxStat * 0.15);
npc.getSkills().setLevel(i, newStat);
And the player sees the message: "As you strike the demon with silverlight he appears to weaken a lot"

Key Notes
The drain is applied per-hit against the demon's max stat, not the current stat - so it doesn't stack/spiral, it just caps the demon at 85% of its base each strike.
There's no damage bonus - only the stat debuff. The combat damage increase comes implicitly because the demon's Defense stat is drained, making it easier to hit.
The named demon list (OTHAINIAN, DOOMION, HOLTHION, NEZIKCHENED) covers the Legends Quest demons that don't have "demon" in their name.


int maxStat = npc.getSkills().getMaxStat(i);  // uses BASE stat, not current
int newStat = maxStat - (int) (maxStat * 0.15);
npc.getSkills().setLevel(i, newStat);          // SETS to 85% of max
Silverlight sets the stat to exactly 85% of max - it doesn't subtract from whatever the current value is. That means if you cast Weaken first (bringing Defense to 95% of max), Silverlight then overwrites it to 85% and your spell is wasted.

L

How the Stacking Actually Works
The spells check at line 1590:


if (affectedMob.getSkills().getLevel(affectsStat) < affectedMob.getSkills().getMaxStat(affectsStat)) {
    // "Your opponent already has weakened [stat]"
    return;  // spell blocked
}
The spell is blocked if the current level is ANY amount below max - it doesn't care how it got that way. Silverlight drains all 3 stats to 85% of max, so after even one Silverlight hit, all three debuff spells (Confuse/Weaken/Curse) are individually blocked.

The spells reduce from current, not max (line 1587):


int lowerBy = (int) Math.ceil(affectedMob.getSkills().getLevel(affectsStat) * 0.05);
So if you successfully land a spell first, Silverlight then overwrites the spell's work with a flat maxStat * 0.85 set. You'd end up at exactly 85% either way.

Optimal Strategy
Cast all three spells first, then switch to Silverlight.

Confuse (Attack -5%), Weaken (Strength -5%), Curse (Defense -5%) each drain from current level
Once all three land, the demon is at 95% Attack / 95% Strength / 95% Defense
Then Silverlight hits and resets each to 85% of max - effectively overwriting the spells
The spells give you zero net benefit once Silverlight fires because Silverlight always forces each stat to exactly 85% of base. The only window where spells matter is before your first Silverlight hit connects - and even then the gain is small (95% vs 85%, briefly).

Bottom line: Don't bother with the debuff spells at all. Silverlight alone gives a bigger reduction (15%) than any individual spell (5%), and the game actively blocks casting them after Silverlight hits anyway. Just attack with Silverlight from the start."

Sly Steeler Send PM

Member

Posts: 10

Also thought the only stat drain was when you first hit the demon then u switch to main weapon? i thought it didn't matter if it was 0 or 15

99 Def Send PM

Member

Posts: 6

Sly Steeler said:

Also thought the only stat drain was when you first hit the demon then u switch to main weapon? i thought it didn't matter if it was 0 or 15


It applies 15% reduction upon attacking or being attacked as long as silverlight is equipt.

each first round - i know it says each combat round.

gojv Send PM

Member

Posts: 11

I wouldnt really trust the bottom line part since you didnt really specify what source code you looked at, this whole post might not even be relevant to rev2 at all

However this is a great opportunity for the rev admins to clarify how silverlight works so we dont have to speculate from an unknown source code.

Sly Steeler Send PM

Member

Posts: 10

gojv said:

I wouldnt really trust the bottom line part since you didnt really specify what source code you looked at, this whole post might not even be relevant to rev2 at all

However this is a great opportunity for the rev admins to clarify how silverlight works so we dont have to speculate from an unknown source code.


Half the private server's the silverlight effects don't even work properly anyway.

gojv Send PM

Member

Posts: 11

Sly Steeler said:

gojv said:

I wouldnt really trust the bottom line part since you didnt really specify what source code you looked at, this whole post might not even be relevant to rev2 at all

However this is a great opportunity for the rev admins to clarify how silverlight works so we dont have to speculate from an unknown source code.


Half the private server's the silverlight effects don't even work properly anyway.

Yea Im not surprised by this. Much more simple to just ignore silverlight and balance demons so you can clap them without it xD

99 Def Send PM

Member

Posts: 6

gojv said:

Sly Steeler said:

gojv said:

I wouldnt really trust the bottom line part since you didnt really specify what source code you looked at, this whole post might not even be relevant to rev2 at all

However this is a great opportunity for the rev admins to clarify how silverlight works so we dont have to speculate from an unknown source code.


Half the private server's the silverlight effects don't even work properly anyway.

Yea Im not surprised by this. Much more simple to just ignore silverlight and balance demons so you can clap them without it xD

Yeah forsure! I wonder if the admins can touch on the code and if it actually works. ?

99 Def Send PM

Member

Posts: 6

gojv said:

I wouldnt really trust the bottom line part since you didnt really specify what source code you looked at, this whole post might not even be relevant to rev2 at all

However this is a great opportunity for the rev admins to clarify how silverlight works so we dont have to speculate from an unknown source code.

Source code is from turnip from their github. But who knows what rev2 is running lol