Jump to content
  • 0
Random756

Unstackable card effect

Question

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

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

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 :)

Edited by Crousti

Share this post


Link to post
Share on other sites
  • 0

 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).

Share this post


Link to post
Share on other sites
  • 0

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 ?)

Edited by Crousti

Share this post


Link to post
Share on other sites
  • 0

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.

Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

//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.

Share this post


Link to post
Share on other sites
  • 0

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;
}

Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

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 :). Thanks a lot, i'll give some news about what worked once I try it !

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.