Jump to content
  • 0
PunkBuster

Expanding Mistress Effect

Question

The normal Mistress Card effect nullifies the Gemstone requirement for skills. I'd like to extend that effect into more things:

 

-Ninja Magic won't require their catalyst stones;

-Sorcerers won't need elemental stones for summoning their Spirits;

-Shadow Chasers won't need Paint Cans;

 

How do I script this?

Share this post


Link to post
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Just alter skill_require_db.txt, search for those skills that you're going to change requirements and alter them c:

// Structure of Database:// SkillID,HPCost,MaxHPTrigger,SPCost,HPRateCost,SPRateCost,ZenyCost,RequiredWeapons,RequiredAmmoTypes,RequiredAmmoAmount,RequiredState,SpiritSphereCost,RequiredItemID1,RequiredItemAmount1,RequiredItemID2,RequiredItemAmount2,RequiredItemID3,RequiredItemAmount3,RequiredItemID4,RequiredItemAmount4,RequiredItemID5,RequiredItemAmount5,RequiredItemID6,RequiredItemAmount6,RequiredItemID7,RequiredItemAmount7,RequiredItemID8,RequiredItemAmount8,RequiredItemID9,RequiredItemAmount9,RequiredItemID10,RequiredItemAmount10
Edited by pan

Share this post


Link to post
Share on other sites
  • 0

Oh sorry :x here are the changes that you need to do:

Open src/map/pc.c and search for:

case SP_NO_GEMSTONE:     val = sd->special_state.no_gemstone?1:0; break;
Add below it:
		case SP_NO_CATALYSTSTONES: val = sd->special_state.no_catalyststones?1:0; break;		case SP_NO_ELEMENTALSTONES:val = sd->special_state.no_elementalstones?1:0; break;		case SP_NO_PAINTCANS:	 val = sd->special_state.no_paintcans?1:0; break;		case SP_NO_FUEL:		 val = sd->special_state.no_fuel?1:0; break;
Search for:
        case SP_NO_GEMSTONE:            if(sd->state.lr_flag != 2)                sd->special_state.no_gemstone = 1;            break;
Add below it:
		case SP_NO_CATALYSTSTONES:			if(sd->state.lr_flag != 2)				sd->special_state.no_catalyststones = 1;			break;		case SP_NO_ELEMENTALSTONES:			if(sd->state.lr_flag != 2)				sd->special_state.no_elementalstones = 1;			break;		case SP_NO_PAINTCANS:			if(sd->state.lr_flag != 2)				sd->special_state.no_paintcans = 1;			break;		case SP_NO_FUEL:			if(sd->state.lr_flag != 2)				sd->special_state.no_fuel = 1;			break;
Now open src/map/map.h and search for:
SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST,  //2055-2058
Add below it:
	SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS,SP_NO_FUEL, // 2059-2062 [pan]
Open src/map/pc.h and search for:
unsigned int bonus_coma : 1;
Add below:
		unsigned int no_catalyststones : 1;		unsigned int no_elementalstones : 1;		unsigned int no_paintcans : 1;		unsigned int no_fuel : 1;
Open src/map/skill.c, search for:
		if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN )		{			if( sd->special_state.no_gemstone )			{	// All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica				if( skill_id != SA_ABRACADABRA )					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			}			if(sc && sc->data[SC_INTOABYSS])			{				if( skill_id != SA_ABRACADABRA )					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			}		}
Add below it:
		// 7521 to 7524 ninja stones		if( (req.itemid[i] >= 7521 && req.itemid[i] <= 7524) && sd->special_state.no_catalyststones	)			req.itemid[i] = req.amount[i] = 0;		// 6120 to 6123 Paint related items		if( (req.itemid[i] >= 6120 && req.itemid[i] <= 6123) && sd->special_state.no_paintcans )			req.itemid[i] = req.amount[i] = 0;		// 6146 Magic fuel		if( req.itemid[i] == 6146 && sd->special_state.no_fuel )			req.itemid[i] = req.amount[i] = 0;
Now search for:
		case SO_EARTH_INSIGNIA:			req.itemid[skill_lv-1] = skill->db[idx].itemid[skill_lv-1];			req.amount[skill_lv-1] = skill->db[idx].amount[skill_lv-1];			break;	}
Add below:
	// 990 to 997 sorcerer stones only works when using summon skills	if( (req.itemid[skill_lv-1] >= 990 && req.itemid[skill_lv-1] <= 997) && sd->special_state.no_elementalstones		&& (skill_id >= SO_SUMMON_AGNI && skill_id <= SO_SUMMON_TERA) )		req.itemid[skill_lv-1] = req.amount[skill_lv-1] = 0;
Now open /db/const.txt and search for:
bVariableCast	2058
Add below:
bNoCatalystStones	2059bNoElementalStones	2060bNoPaintCans		2061bNoFuel		2062
Save all files and rebuild your map-server... Just add these codes to your mistress card:
bonus bNoCatalystStones,0; bonus bNoElementalStones,0; bonus bNoPaintCans,0; bonus bNoFuel,0;
It's done c: If you're having any trouble just post, ok?

 

Happy holidays

 

EDIT:

I corrected everything in this post, everything is worked and has been tested in-game.

Diff:

http://pastebin.com/vmxRZR8P

Edited by pan

Share this post


Link to post
Share on other sites
  • 0

I forgot to add in my last post, open src/map/pc.c and search for:

        case SP_NO_GEMSTONE:            if(sd->state.lr_flag != 2)                sd->special_state.no_gemstone = 1;            break;
Add below it:
        case SP_NO_CATALYSTSTONES:            if(sd->state.lr_flag != 2)                sd->special_state.no_catalyststones = 1;            break;        case SP_NO_ELEMENTALSTONES:            if(sd->state.lr_flag != 2)                sd->special_state.no_elementalstones = 1;            break;        case SP_NO_PAINTCANS:            if(sd->state.lr_flag != 2)                sd->special_state.no_paintcans = 1;            break;
Now it should be working just fine c: I also created a patch this time:

http://pastebin.com/Vuu7r9DE

I'll edit my other post as well

Edited by pan

Share this post


Link to post
Share on other sites
  • 0

Worked for Ninja Stones and Surface Pain skills from Shadow Chasers. For Sorcerers, and for Shadow Chaser's Facepaint skills(Masquerades) it doesn't work.

 

*edit*

 

Map server is returning this error:

 

pc_bonus: unknown type 0 1!

Edited by PunkBuster

Share this post


Link to post
Share on other sites
  • 0

Well, it depends on which item is required to use the skill, I didn't add "face paint" :x I don't know why this error is returning, maybe you're calling the script function bonus with a 'bonus' that isn't on dbconst.txt? Well I added all paint related items to the diff and to my last post c:

Share this post


Link to post
Share on other sites
  • 0

I re-applied everything you told me to, and now I can use the Shadow Chaser skills with Face Paint as well. The sorcerer skills still don't work.

 

Also, is it possible for me to extend this effect also into Magic Fuel for Mechanics?

Share this post


Link to post
Share on other sites
  • 0

Which skills are you trying to use? Only the ones that are in this range: 2458 to 2460 are working without stones, only skills that summon :x

Yes it is possible just open srcmapskill.c and search for:

		// 6120 to 6123 Paint related items		if( (req.itemid[i] >= 6120 && req.itemid[i] <= 6123) && sd->special_state.no_paintcans )			req.itemid[i] = req.amount[i] = 0;
Add below:
		// 6146 Magic fuel		if( req.itemid[i] == 6146 && sd->special_state.no_fuel )			req.itemid[i] = req.amount[i] = 0;
Now open src/map/pc.h and search for:
		unsigned int no_paintcans : 1;
Add below:
		unsigned int no_fuel : 1;
Now open src/map/map.h and search for:
SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS, // 2059-2061 [pan]
Replace it with:
	SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS,SP_NO_FUEL, // 2059-2062 [pan]
Now open src/map/pc.c and search for:
		case SP_NO_PAINTCANS:			if(sd->state.lr_flag != 2)				sd->special_state.no_paintcans = 1;			break;
Add below:
		case SP_NO_FUEL:			if(sd->state.lr_flag != 2)				sd->special_state.no_fuel = 1;			break;
Search for:
		case SP_NO_PAINTCANS:	 val = sd->special_state.no_paintcans?1:0; break;
Add below:
		case SP_NO_FUEL:		 val = sd->special_state.no_fuel?1:0; break;
Now open const.txt and search for:
bNoPaintCans		2061
Add below:
bNoFuel		2062
Here's the new patch: http://pastebin.com/GpKYdkU0

Share this post


Link to post
Share on other sites
  • 0

Which skills are you trying to use? Only the ones that are in this

range: 2458 to 2460 are working without stones, only skills that summon

:x

 

That's exactly what I am attempting. By the way, the IDs for the summoning skills are 2457~2460, so maybe that' incorrect? Still, at least 3 out of 4 of the skills should work, yet they don't.

 

*edit* Mechanic Fuel worked. Thank you so much.

Edited by PunkBuster

Share this post


Link to post
Share on other sites
  • 0

 

 

Which skills are you trying to use? Only the ones that are in this

range: 2458 to 2460 are working without stones, only skills that summon

:x

 

That's exactly what I am attempting. By the way, the IDs for the summoning skills are 2457~2460, so maybe that' incorrect? Still, at least 3 out of 4 of the skills should work, yet they don't.

 

*edit* Mechanic Fuel worked. Thank you so much.

 

 

2457,0,6,4,3,0x1,0,3,1,yes,0,0,0,none,0,	SO_SUMMON_AGNI,Summon Fire Spirit Agni2458,0,6,4,1,0x1,0,3,1,yes,0,0,0,none,0,	SO_SUMMON_AQUA,Summon Water Spirit Aqua2459,0,6,4,4,0x1,0,3,1,yes,0,0,0,none,0,	SO_SUMMON_VENTUS,Summon Wind Spirit Ventus2460,0,6,4,2,0x1,0,3,1,yes,0,0,0,none,0,	SO_SUMMON_TERA,Summon Earth Spirit Tera
Oh, sorry, they're indeed wrong, I forgot to add Summon Fire Spirit Agni in the list:
		// 990 to 997 sorcerer stones only works when using summon skills		if( (req.itemid[i] >= 990 && req.itemid[i] <= 997) && sd->special_state.no_elementalstones			&& (skill_id >= SO_SUMMON_AQUA && skill_id <= SO_SUMMON_TERA) )			req.itemid[i] = req.amount[i] = 0;
to:
		// 990 to 997 sorcerer stones only works when using summon skills		if( (req.itemid[i] >= 990 && req.itemid[i] <= 997) && sd->special_state.no_elementalstones			&& (skill_id >= SO_SUMMON_AGNI && skill_id <= SO_SUMMON_TERA) )			req.itemid[i] = req.amount[i] = 0;
Build and see if this works if it does I'll update my other post to add all this changes, ok?

 

Regards

Share this post


Link to post
Share on other sites
  • 0

I've decided to just remove the item requirement for the skill altogether. I'll try this later and tell you if it worked.

I've read my modifications again and I found what was wrong with those requirements... Now it's working, I tested in-game.

http://pastebin.com/vmxRZR8P

I'll correct my other post...

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

×
×
  • Create New...

Important Information

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