Jump to content
  • 0

Help make this possible... (item bonus)


Critica

Question


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

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?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

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
 

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  88
  • Reputation:   23
  • Joined:  01/30/12
  • Last Seen:  

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
Link to comment
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.   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.

×
×
  • Create New...