Jump to content
  • 0

Bonus Main Script Path


Kouta

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.08
  • Content Count:  8
  • Reputation:   1
  • Joined:  02/25/25
  • Last Seen:  

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! ❤️

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  94
  • Reputation:   35
  • Joined:  11/08/15
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.08
  • Content Count:  8
  • Reputation:   1
  • Joined:  02/25/25
  • Last Seen:  

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.

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