Require certain amount of DEX before card affects

Hadeszeus

New member
Messages
651
Points
0
Location
Philippines
How to write this?

I want to check the amount of DEX before 2 Berze take effect. If one berze is equipped no need to check the DEX.

 
something like this
default_tongue.png


{ Id: 4145 AegisName: "Berzebub_Card" Name: "Berzebub Card" Type: 6 Buy: 20 Weight: 10 Loc: 136 Script: <" if(readparam(bDex) > 150 && countitem(4145) > 1) // if dex higher than 150 and card count higher than 1, gives -50 else gives -30 { bonus bVariableCastrate,-50; } bonus bVariableCastrate,-30; ">},
wrote on the fly
default_tongue.png


 
something like this
default_tongue.png


{ Id: 4145 AegisName: "Berzebub_Card" Name: "Berzebub Card" Type: 6 Buy: 20 Weight: 10 Loc: 136 Script: <" if(readparam(bDex) > 150 && countitem(4145) > 1) // if dex higher than 150 and card count higher than 1, gives -50 else gives -30 { bonus bVariableCastrate,-50; } bonus bVariableCastrate,-30; ">},
wrote on the fly
default_tongue.png
Should probably throw that else in there; currently, you'll get -30 no matter what lol

 
something like this
default_tongue.png


{ Id: 4145 AegisName: "Berzebub_Card" Name: "Berzebub Card" Type: 6 Buy: 20 Weight: 10 Loc: 136 Script: <" if(readparam(bDex) > 150 && countitem(4145) > 1) // if dex higher than 150 and card count higher than 1, gives -50 else gives -30 { bonus bVariableCastrate,-50; } bonus bVariableCastrate,-30; ">},
wrote on the fly
default_tongue.png
Should probably throw that else in there; currently, you'll get -30 no matter what lol
This script work if I have 2 Berze in my inventory + 2 berze compounded on 2 ACCESSORY.

But if the 2 Berze is inside the ACCESSORIES without 2 cards in my inventory it doent work.

The script only check the BERZE in my inventory not in my equipped items.

Code:
if(readparam(bDex) > 72 && countitem(4145) > 1) // if dex higher than 150 and card count higher than 1, gives -50 else gives -30		{			bonus bVariableCastrate,-100;		}		else {		bonus bVariableCastrate,-30;		} 
 
Last edited by a moderator:
What about checking the name of the item equip? instead of checking the card?

I tried this but its not working either..

Code:
Script:	<" if(readparam(bDex) > 72 && getequipname(8) = "of Bigmouth" && getequipname(128) = "of Bigmouth") {		bonus bVariableCastrate,-100;		}		else {		bonus bVariableCastrate,-30;		}	">
 
What about checking the name of the item equip? instead of checking the card?

I tried this but its not working either..

Script: <" if(readparam(bDex) > 72 && getequipname(8) = "of Bigmouth" && getequipname(128) = "of Bigmouth") { bonus bVariableCastrate,-100; } else { bonus bVariableCastrate,-30; } ">
This is an incorrect string comparison (it'd be an incorrect numerical comparison as well):

getequipname(8) = "of Bigmouth"
A proper comparison would be:

getequipname(8) == "of Bigmouth" 

In any case, this check wouldn't work at all for the purpose intended.


Check if two of the card is equipped:

if(readparam(bDex) < 72 || isequippedcnt(Berzebub_Card) < 2) { bonus bVariableCastrate, -30;} else { bonus bVariableCastrate, -30 * isequippedcnt(Berzebub_Card);}

However, I'd just write it like this:

if(readparam(bDex) < 72) { bonus bVariableCastrate, -30;} else { bonus bVariableCastrate, -30 * isequippedcnt(Berzebub_Card);}
or like this:

bonus bVariableCastrate, readparam(bDex) < 72 ? -30 : -30 * isequippedcnt(Berzebub_Card);

This effect multiplies the rate at which Berzebub Card takes effect according to the amount of Berzebub Cards they have equipped - but only if the player's DEX reads 72 or higher.

  • 1 Berzebub card is -30%
  • 2 Berzebub cards is -60%
  • 3 Berzebub cards is -90%

...and so on; if (for some reason) you could equip more than three, the effect's rate would increase in increments of -30.

 
Last edited by a moderator:
Oh My! No words! Thank you Mumbles you're a genius. Im a fan!

+1 Respect.

@evilpuncker thanks to you for giving the idea.. I really appreciate it.

 
Last edited by a moderator:
Back
Top