Unstackable card effect

Random756

New member
Messages
50
Points
0
Hi everyone, i was wondering if it was possible to change the script of some card effect so that they can't stack with themselves. 

For exemple, if i want to boost Lord of the death card to 1% chance to coma, BUT if you equip multipl LoD card, the effect doesn't stack and you still have the 1% chance to coma, even if you've 4 LoD in your weapon. Is it possible ? If yes, can someone tell me how ?

Thanks in advance

 
Seems like this is what i need, but I can't download it even though i'm logged, it says that i don't have permissions for that. Do you have, or is it just too old ? 

Thanks anyway
default_smile.png


 
Last edited by a moderator:
 btw the card effect of lord of death card IS stacking. But it won't increase the chance directly, no matter how many cards you'll only get 4x 1% chance, not 4% chance (or how many cards you'll use).

 
Really interesting, i don't know the math behind that, what is the "total chance" of infliging coma if I have 4 LoD for exemple (for exemple, 1,01 x 1,01 x 1,01 x 1,01 or something else). Would be really helpful for me to know, I need to do some search on it too x). 

By the way, can anyone tell me if he has access to the download of this topic (the one that critica posted) https://rathena.org/...ct-stack-limit/ or is it too old (or my account on rathena is somehow restreined ?)

 
Last edited by a moderator:
Well, probability works as follows: each card has 99% chance to fail (0.99), so there's a 0.99^4 = ~0.9606 (96.06%) chance that not a single card will hit. Rest (0.0394/ 3.94%) is the chance that *at least one* card effect will proc.

ETA: Seems like file itself is deleted, I think? I can't get access to it as well.

 
Last edited by a moderator:
//callfunc "Card";

function script Card {
setarray .Card[0],25150,25151,25152,25153,25154,25155,25156,25157,25158,25159,25160,25161,25162,25163,25164,25165,25166,25167,25168,25169,25170,25171,25172,25173,25174;
for( set .@i,0; .@i<getarraysize(.Card); set .@i,.@i+1 ) {
if ( isequipped(.Card[.@i]) == 1 ) {
set @Card,@Card+1;
if ( @Card > 2){
dispbottom "You can't Wear more than 2 same Card at the same time.";
set @Card,0;
nude;
}
}
}
end;
}


this isnt mine, credits to owner i dont remember who, i just saw this in my old script collections.

im now sure if its still working, or compatible in herc.

 
you can try to install  OnPcStatCalcEvent

then

1. disable the item script of Lord of the death card in item_db.conf

2.

-    script    asdf1234    FAKE_NPC,{
OnPCStatCalcEvent:
    if(isequippedcnt(4276)) {
        bonus3 bAddEff,Eff_Stun,500,ATF_SHORT;
        bonus3 bAddEff,Eff_Curse,500,ATF_SHORT;
        bonus3 bAddEff,Eff_Silence,500,ATF_SHORT;
        bonus3 bAddEff,Eff_Poison,500,ATF_SHORT;
        bonus3 bAddEff,Eff_Bleeding,500,ATF_SHORT;
        bonus2 bWeaponComaRace,RC_NonBoss,1;

    }
end;
}
 
Last edited by a moderator:
Thanks a lot for all your answer, i'll try critica's solution first since it's easier to use, and if it doesn't work Angelmelody's one
default_smile.png
. Thanks a lot, i'll give some news about what worked once I try it !

 
Back
Top