Jump to content

Question

Posted

Hey, guys!

Does anyone know where to find the main script file for bonus scripts of items, like cards bonuses scripts for example (tags: bonus, bonus2)? Something like the src/map/atcommand.cpp is.

I was trying to figure out how the bonus bNoGemStone from Mistress Card works, to develop something similar with other skill tough. But I didn't find the main script file for this bonus.

 

Thanks in advance. I appreciate any help! ❤️

2 answers to this question

Recommended Posts

  • 0
Posted

pc.hpp:

case SP_NO_GEMSTONE:
			if(sd->state.lr_flag != 2 && sd->special_state.no_gemstone != 2)
				sd->special_state.no_gemstone = 1;

 

skill.cpp

// Check requirement for gemstone.
				if (itemdb_group.item_exists(IG_GEMSTONE, req.itemid[i])) {
					if( sd->special_state.no_gemstone == 2 ) // Remove all Magic Stone required for all skills for VIP.
						req.itemid[i] = req.amount[i] = 0;
					else {
						if( sd->special_state.no_gemstone || (sc && sc->getSCE(SC_INTOABYSS)) )
						{	// All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica
							if (skill_id != SA_ABRACADABRA && skill_id != HW_GANBANTEIN)
		 						req.itemid[i] = req.amount[i] = 0;
							else if( --req.amount[i] < 1 )
								req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
						}
					}
				}

There are a lot of checks, just search no_gemstone

 

  • Love 1
  • 0
Posted
11 minutes ago, Scanty said:

pc.hpp:

case SP_NO_GEMSTONE:
			if(sd->state.lr_flag != 2 && sd->special_state.no_gemstone != 2)
				sd->special_state.no_gemstone = 1;

 

skill.cpp

// Check requirement for gemstone.
				if (itemdb_group.item_exists(IG_GEMSTONE, req.itemid[i])) {
					if( sd->special_state.no_gemstone == 2 ) // Remove all Magic Stone required for all skills for VIP.
						req.itemid[i] = req.amount[i] = 0;
					else {
						if( sd->special_state.no_gemstone || (sc && sc->getSCE(SC_INTOABYSS)) )
						{	// All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica
							if (skill_id != SA_ABRACADABRA && skill_id != HW_GANBANTEIN)
		 						req.itemid[i] = req.amount[i] = 0;
							else if( --req.amount[i] < 1 )
								req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
						}
					}
				}

There are a lot of checks, just search no_gemstone

 

Geez.. I was searching for NoGemStone alias.

Thank you so much, @Scanty!

 

-- Solved.

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...