Need help (item bonus)

Critica

New member
Messages
76
Points
0
Halow. just need a quick help

its this possible?

adds +5 to STR if equipped in HELM, if equipped with GARMENT +5 to AGI, if eqp with ARMOR +5 to VIT.

only 1 bonus will work, and depends on where it was equipped, this is a card bonus btw.


im making a custom card type item that can be slotted to HELM or GARMENT or ARMOR but will change bonus depends on where it is equp.

an example bonus would much be appriciated 
biggrin.png
 thanks!

 
Code:
if(getequipid(EQI_HEAD_TOP) || getequipid(EQI_HEAD_MID) || getequipid(EQI_HEAD_LOW)) { bonus bStr,5; } if (getequipid(EQI_ARMOR)) { bonus bVit,5;} if (getequipid(EQI_GARMENT)) { bonus bAgi,5;}
 
hmm ok i thought i got it,, but nope...

it works. not the problem is, it gives all the bonuses when i eqquiped the item..

i tried this

,{ if (getequipid(EQI_ARMOR)) bonus bVit,5; else if (getequipid(EQI_GARMENT)) bonus bAgi,5; },{},{}

it doesnt give the bonus AGI onyl VIT, but when slotted on garment it still gives VIT bonus which is supposed to be AGI



:>
 
Last edited by a moderator:
So you want if you equip your top headgear with card that has +5 str. low and mid headgear card effect wont work ?

 
YES.

so the card will have 2 different effects.
ex.
if its sloted on Armor ( +2 str )
if its sloted on Garment ( +2 vit )

on the card effect will be if (eqp armor) +2 STR; else if (eqp garment) + 2 VIT;

so far i have this bonus working

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) bonus bAgi,5; else if (getiteminfo(getequipid(EQI_GARMENT),5)==4) bonus bVit,5; } 
but the problem is it works on opposite, when armor is eqp it gives VIT and if garm is eqp it gives AGI

and when both item is eqp, the bonus is gone... (it is slotted by card with the effect btw)


Just for the heads up- i costumized the card to be able to slotted on Armor / Garment / HG's
 

4002,Fabre_Card,Fabre Card,6,20,,10,,,,,,,,789,,,,, 

"789" so it can be slotted to those equips,,, this card will have 3 different effects, and will only active depending on which equips it is slotted.

 
Last edited by a moderator:
Halow. just need a quick help

its this possible?

adds +5 to STR if equipped in HELM, if equipped with GARMENT +5 to AGI, if eqp with ARMOR +5 to VIT.

only 1 bonus will work, and depends on where it was equipped, this is a card bonus btw.

im making a custom card type item that can be slotted to HELM or GARMENT or ARMOR but will change bonus depends on where it is equp.

an example bonus would much be appriciated 
biggrin.png
 thanks!
Halow. just need a quick help

its this possible?

adds +5 to STR if equipped in HELM, if equipped with GARMENT +5 to AGI, if eqp with ARMOR +5 to VIT.

only 1 bonus will work, and depends on where it was equipped, this is a card bonus btw.

im making a custom card type item that can be slotted to HELM or GARMENT or ARMOR but will change bonus depends on where it is equp.

an example bonus would much be appriciated 
biggrin.png
 thanks!
try this

{ if (getequipid(EQI_ARMOR)) {  bonus bVit,5; } && if (getequipid(EQI_GARMENT)) { bonus bAgi,5; } && if (getequipid(EQI_ARMOR)) { bonus bVit,5; }   },{},{}

or removed the if in the 2nd and 3rd....

 
Last edited by a moderator:
got an error

Code:
script:add_word: invalid word. A word consists of undercores and/or alfanumeric characters, and valid variable prefixes/postfixes.*  317 : { if (getequipid(EQI_ARMOR)) bonus bVit,5; '&'& if (getequipid(EQI_GARMENT)) bonus bAgi,5; }[Error]: 
 
Last edited by a moderator:
try this one,

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5;}  else if (getiteminfo(getequipid(EQI_GARMENT),5)==4) {bonus bVit,5;}  }

ur missing only { } inside the effects

 
Yep ive tried that, thats one is working,, now the problem is

when you equipped both garment and the armor (with the effects)

it disregard the bonus of the garment, and doubles the effect of the armor,

Here's the result

Equipped with armor ( + 5 AGI ) no garment equipped
Equipped garment ( +5 VIT ) no armor equipped

Both armor and garment eqquiped ( + VIT gone AGI becomes +10
 

 
Ok now.. this works now

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5;} if (getiteminfo(getequipid(EQI_GARMENT),5)==4) {bonus bVit,5;} }
problem now is,,, it doubles both effects...

so it gives +10 VIT and +10 AGI when both equipped (with the card effect)
which is supposed to be only +5 VIT and AGI

 
yes it will gone because we use else if, try if only or use &&(and) or this two line ||

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5;}  && if(getiteminfo(getequipid(EQI_GARMENT),5)==4) {bonus bVit,5;}  }

 
yes it will gone because we use else if, try if only or use &&(and) or this two line ||

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5;}  && if(getiteminfo(getequipid(EQI_GARMENT),5)==4) {bonus bVit,5;}  }

 
im getting an error when using || and &&

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5;} || if (getiteminfo(getequipid(EQI_GARMENT),5)==4) {bonus bVit,5;} }

as i posted above, the only problem now is it doubled the bonus effect, 

 
yes it will gone because we use else if, try if only or use &&(and) or this two line ||

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5;}  && if(getiteminfo(getequipid(EQI_GARMENT),5)==4) {bonus bVit,5;}  }

 
yeah sorry, i will try later bcoz i feel sleepy and i want to share also the bifrost info here

 
Now.. id like to work it like this,,,

but instead of those it'll be like
something like this...

Helm(Top/Mid/Low) = +5 INT
Armor = +5 VIT
Garment = +5 AGI

Gems.png


so far this is the bonus that is working right now but there is still a problem

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5;} if (getiteminfo(getequipid(EQI_GARMENT),5)==4) {bonus bVit,5;} }
it doulbes the effect when you equipped both of them at the same time (the item with the same slotted card)

 
Last edited by a moderator:
sorry im wrong again, let me try it

{ { if (getiteminfo(getequipid(EQI_ARMOR),5)==16) { bonus bAgi,5; } } { if (getiteminfo(getequipid(EQI_GARMENT),5)==4) { bonus bVit,5; } } }

try this above

 
Last edited by a moderator:
Back
Top