Jump to content
  • 0

Help make this possible... (item bonus)


Question

Posted

Gems.png


the idea is, to create a custom card type item that can be slotted to Helm/Armor or Garment
but will have different effect depending where it is slotted...

for now, i have this item bonus working 
 

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

but the problem is that, when you equipped both Armor and Garment instead of giving only
+5 AGI and VIT, it gives you double so +10 AGI and VIT.... 

so if anyone here whos good enough pls help ? :<


im using custom card script btw, to be enable to slot on Head/Armor/Garment 



bump.. T_T


any good custom scripters here?

3 answers to this question

Recommended Posts

Posted

try to use this

 

 

getequipisequiped(<equipment slot>)


This functions will return 1 if there is an equipment placed on the specified
equipment slot and 0 otherwise. For a list of equipment slots
 

 

Posted (edited)

that works... now the problem is the same as i have, it doubles the bonus when you have both equipped.. even tho the other
one doesnt have the bonus (card)

 

for example.

I have garment, slotted with this effect.

4002,Fabre_Card,Fabre Card,6,20,,10,,,,,,,,789,,,,,{ if (getequipisequiped(EQI_ARMOR)) { bonus bVit,5; } if (getequipisequiped(EQI_GARMENT)) { bonus bAgi,5; } },{},{}

i get the + AGI only but...

when i equipped any armor i get the "Armor bonus" too ( +VIT )


now i noticed that as long as you have something equipped on the equipment slot (for ex Armor)
it will also read the bonus effect for the armor even tho the "card bonus" is slotted on the garment.

 

============================================================================================================================================================================
 

 

 

Can somebody here make this item bonus script stackable???

 

{ if (getiteminfo(getequipid(EQI_ARMOR),5)==16 && @bgiven == 0) { bonus bAgi,5; set @bgiven,1;} if (getiteminfo(getequipid(EQI_GARMENT),5)==4 && @bgiven2 == 0) {bonus bVit,5; set @bgiven2,1;}  },{},{set @bgiven,0; set @bgiven2,0;}
Edited by Critica
Posted (edited)

Use else if instead of only if:

 

4002,Fabre_Card,Fabre Card,6,20,,10,,,,,,,,789,,,,,{ if (getequipisequiped(EQI_ARMOR)) { bonus bVit,5; } else if (getequipisequiped(EQI_GARMENT)) { bonus bAgi,5; } },{},{}
Why you don't create two cards, one for each equipment slot? Eg: Headgear, Armor, Garment... Edited by Digos

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...