Jump to content
  • 0
Sign in to follow this  
dreinor

adding gemstone requirement for turnundead

Question

good day.. i customized the turn undead skill for it to be useable on any race.. but i want it to consume gemstones whenever the target is not an undead race or element.. can someone help me on this? this is the block which makes the skill require items in specific condition.. i don't know the code to be added for the gemstone requirement..
 

case PR_TURNUNDEAD:
if( itemid_isgemstone(skill->db[idx].itemid) && !battle->check_undead(tstatus->race, tstatus->def_ele) );
continue;
break;

 

the code in red doesn't seem to work.. it says after rebuilding tstatus is no a member of interference.. can someone help me on the code? thanks..

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

already found the answer to this..:D here is the code..:D
 

case PR_TURNUNDEAD:
if ((tstatus->race == RC_DEMON || tstatus->race == RC_DEMIHUMAN || tstatus->race == RC_ANGEL || tstatus->race == RC_BRUTE || tstatus->race == RC_PLANT || tstatus->race == RC_FORMLESS || tstatus->race == RC_INSECT || tstatus->race == RC_DRAGON || tstatus->race == RC_FISH) && (pc->search_inventory(sd, ITEMID_BLUE_GEMSTONE) == INDEX_NOT_FOUND || pc->delitem(sd,pc->search_inventory(sd,717),1,0,0,LOG_TYPE_CONSUME)))
break;
skill->attack(BF_MAGIC, src, src, bl, skill_id, skill_lv, tick, flag);
break;

Share this post


Link to post
Share on other sites
  • 0

hi.. thanks for the reply..:D but the effect that it consumes gemstones is not exactly the effect that i want... i want it too work that if the target is undead, the skill will not consume any gemstone, but if the target is not undead eg. demi-human, insect, brute etch., it will consume a gemstone..:D

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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