Jump to content
  • 0
Sign in to follow this  
GM.PiXeL

[Help] How to Fix this Source Mod.

Question

Hi Hercules,
I wanted to add this patch on my server.
I tried it doing manually.
 
http://herc.ws/board/files/file/27-forcibly-strip/
 

Index: map/skill.c===================================================================--- map/skill.c	(revision 12238)+++ map/skill.c	(working copy)@@ -6397,6 +6397,7 @@ 		case SC_STRIPACCESSARY: { 			unsigned short location = 0; 			int d = 0;+			unsigned char ii = 0;  			//Rate in percent 			if ( skill_id == ST_FULLSTRIP ) {@@ -6450,10 +6451,48 @@ 				break; 			} +			ii = i;+ 			//Attempts to strip at rate i and duration d 			if( (i = skill->strip_equip(bl, location, i, skill_lv, d)) || (skill_id != ST_FULLSTRIP && skill_id != GC_WEAPONCRUSH ) ) 				clif->skill_nodamage(src,bl,skill_id,skill_lv,i); +			if( !i && ( skill_id == RG_STRIPWEAPON || skill_id == RG_STRIPSHIELD || skill_id == RG_STRIPARMOR || skill_id == RG_STRIPHELM ) )+			{+				int idx = sd?pc->search_inventory (sd, 7321):-1;+				if( idx >= 0 )+				{+					struct status_change *sc = iStatus->get_sc(src);+					if( sc->data[SC_SOULLINK] )+					{+						if( sc->data[SC_SOULLINK]->val2 == SL_ROGUE )+						{+							if (rnd()0 >= ii)+							{+								enum sc_type sc_atk;+								if( skill_id == RG_STRIPWEAPON )+									sc_atk = SC_NOEQUIPWEAPON;+								else if( skill_id == RG_STRIPSHIELD )+									sc_atk = SC_NOEQUIPSHIELD;+								else if( skill_id == RG_STRIPARMOR )+									sc_atk = SC_NOEQUIPARMOR;+								else if( skill_id == RG_STRIPHELM )+									sc_atk = SC_NOEQUIPHELM;+								else+									sc_atk = SC_NONE;+								if( sc_atk != SC_NONE )+								{+									sc_start(bl, sc_atk, 100, skill_lv, d);+									clif->skill_nodamage(src,bl,skill_id,skill_lv,i);+									i = 1;+								}+							}+							pc->delitem(sd, idx, 1, 0, 1, LOG_TYPE_NONE);+						}+					}+				}+			}+ 			//Nothing stripped. 			if( sd && !i ) 				clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);

 
But this are the errors:
 
1>..srcmapskill.c(6453): error C2065: 'i' : undeclared identifier
1>..srcmapskill.c(6459): error C2065: 'i' : undeclared identifier
1>..srcmapskill.c(6464): error C2065: 'iStatus' : undeclared identifier
1>..srcmapskill.c(6464): error C2223: left of '->get_sc' must point to struct/union
1>..srcmapskill.c(6485): error C2065: 'i' : undeclared identifier
1>..srcmapskill.c(6486): error C2065: 'i' : undeclared identifier

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

On a latest revision of Hercules.

 

i becomes rate

 

			//Attempts to strip at rate i and duration d			if( (rate = skill->strip_equip(bl, location, rate, skill_lv, d)) || (skill_id != ST_FULLSTRIP && skill_id != GC_WEAPONCRUSH ) )				clif->skill_nodamage(src,bl,skill_id,skill_lv,rate);

 
@ Line 6452 : ii = i;
ii = rate;
@ Line 6459 : if( !i && ( skill_id == RG_STRIPWEAPON || skill_id == RG_STRIPSHIELD || skill_id == RG_STRIPARMOR || skill_id == RG_STRIPHELM ) )
if( !rate && ( skill_id == RG_STRIPWEAPON || skill_id == RG_STRIPSHIELD || skill_id == RG_STRIPARMOR || skill_id == RG_STRIPHELM ) )

 

@ Line 6485 : clif->skill_nodamage(src,bl,skill_id,skill_lv,i);
 clif->skill_nodamage(src,bl,skill_id,skill_lv,rate);

 

@ Line 6486 : i = 1;
rate = 1;

 

Share this post


Link to post
Share on other sites
  • 0

change

 

iStatus->get_sc(src)

 

 

to

 

status->get_sc(src)

It lessens the error but still got this:

1>..srcmapskill.c(6453): error C2065: 'i' : undeclared identifier
1>..srcmapskill.c(6459): error C2065: 'i' : undeclared identifier
1>..srcmapskill.c(6485): error C2065: 'i' : undeclared identifier
1>..srcmapskill.c(6486): error C2065: 'i' : undeclared identifier
 
@ Line 6452 : ii = i;
 
@ Line 6459 : if( !i && ( skill_id == RG_STRIPWEAPON || skill_id == RG_STRIPSHIELD || skill_id == RG_STRIPARMOR || skill_id == RG_STRIPHELM ) )
 
@ Line 6485 : clif->skill_nodamage(src,bl,skill_id,skill_lv,i);
 
@ Line 6486 : i = 1;
Edited by GM.PiXeL

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.