Jump to content
  • 0
ThyroDree

Forcibly Strip by Goddameit

Question

Can someone help me how can i lower the chance of per Strip?

 

here is the patch 

 

Index: skill.c
===================================================================
--- skill.c (revision 17132)
+++ skill.c (working copy)
@@ -6127,6 +6127,7 @@
  case SC_STRIPACCESSARY: {
  unsigned short location = 0;
  int d = 0;
+ unsigned char ii = 0;
 
  //Rate in percent
  if ( skill_id == ST_FULLSTRIP ) {
@@ -6139,6 +6140,8 @@
 
  if (i < 5) i = 5; //Minimum rate 5%
 
+ ii = i;
+
  //Duration in ms
  if( skill_id == GC_WEAPONCRUSH){
  d = skill_get_time(skill_id,skill_lv);
@@ -6184,6 +6187,42 @@
  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, 7139):-1;
+ if( idx >= 0 )
+ {
+ struct status_change *sc_ = status_get_sc(src);
+ if( sc_->data[sC_SPIRIT] )
+ {
+ if( sc_->data[sC_SPIRIT]->val2 == SL_ROGUE )
+ {
+ if (rnd()%100 >= ii)
+ {
+ enum sc_type sc_atk;
+ if( skill_id == RG_STRIPWEAPON )
+ sc_atk = SC_STRIPWEAPON;
+ else if( skill_id == RG_STRIPSHIELD )
+ sc_atk = SC_STRIPSHIELD;
+ else if( skill_id == RG_STRIPARMOR )
+ sc_atk = SC_STRIPARMOR;
+ else if( skill_id == RG_STRIPHELM )
+ sc_atk = SC_STRIPHELM;
+ 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);
 

 

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Well see that line

     ii = i;

ii is the rate, if you want it to be constant you can replace i with number.

ii should be between 1-100

Edited by Dastgir Pojee

Share this post


Link to post
Share on other sites
  • 0

100 is 100%?

If you set ii to 100, then it will be 100% success.

Share this post


Link to post
Share on other sites
  • 0

if i want 10% i will change 

 

the if (rnd()%100 >= ii) into if (rnd()%10 >= ii) ??

Share this post


Link to post
Share on other sites
  • 0

if i want 10% i will change 

 

the if (rnd()0 >= ii) into if (rnd() >= ii) ??

if want 10%

Change ii=i;

To

ii = 10;

Dont change that rand() line.

Share this post


Link to post
Share on other sites
  • 0
		//Attempts to strip at rate i and duration d		if( (i = skill_strip_equip(bl, location, i, skilllv, d)) || (skillid != ST_FULLSTRIP && skillid != GC_WEAPONCRUSH ) )			clif_skill_nodamage(src,bl,skillid,skilllv,i); 					if( !i && ( skillid == RG_STRIPWEAPON || skillid == RG_STRIPSHIELD || skillid == RG_STRIPARMOR || skillid == RG_STRIPHELM ) )			{				int idx = sd?pc_search_inventory (sd, 7139):-1;				if( idx >= 0 )				{					struct status_change *sc_ = status_get_sc(src);					if( sc_->data[SC_SPIRIT] )					{						if( sc_->data[SC_SPIRIT]->val2 == SL_ROGUE )						{							if (rnd()%100 >= ii)							{								enum sc_type sc_atk;								if( skillid == RG_STRIPWEAPON )									sc_atk = SC_STRIPWEAPON;								else if( skillid == RG_STRIPSHIELD )									sc_atk = SC_STRIPSHIELD;								else if( skillid == RG_STRIPARMOR )									sc_atk = SC_STRIPARMOR;								else if( skillid == RG_STRIPHELM )									sc_atk = SC_STRIPHELM;								else									sc_atk = SC_NONE;								if( sc_atk != SC_NONE )								{									sc_start(bl, sc_atk, 100, skilllv, d);									clif_skill_nodamage(src,bl,skillid,skilllv,i);									i = 1;								}							}							pc_delitem(sd, idx, 1, 0, 1, LOG_TYPE_NONE);						}					}				}			}		

 

^^^^

 

 what will i change there if i want the strip rate is only 10%? confuse o-o

Share this post


Link to post
Share on other sites
  • 0

 

===================================================================
--- skill.c   (revision 17132)
+++ skill.c   (working copy)
@@ -6127,6 +6127,7 @@
case SC_STRIPACCESSARY: {
unsigned short location = 0;
int d = 0;
+   unsigned char ii = 0;
 
//Rate in percent
if ( skill_id == ST_FULLSTRIP ) {
@@ -6139,6 +6140,8 @@
 
if (i < 5) i = 5; //Minimum rate 5%
 
+   ii = i; // Change to ii=10;
+
//Duration in ms
if( skill_id == GC_WEAPONCRUSH){
d = skill_get_time(skill_id,skill_lv);
@@ -6184,6 +6187,42 @@
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, 7139):-1;
+   if( idx >= 0 )
+   {
+   struct status_change *sc_ = status_get_sc(src);
+   if( sc_->data[sC_SPIRIT] )
+   {
+   if( sc_->data[sC_SPIRIT]->val2 == SL_ROGUE )
+   {
+   if (rnd()%100 >= ii)
+   {
+   enum sc_type sc_atk;
+   if( skill_id == RG_STRIPWEAPON )
+   sc_atk = SC_STRIPWEAPON;
+   else if( skill_id == RG_STRIPSHIELD )
+   sc_atk = SC_STRIPSHIELD;
+   else if( skill_id == RG_STRIPARMOR )
+   sc_atk = SC_STRIPARMOR;
+   else if( skill_id == RG_STRIPHELM )
+   sc_atk = SC_STRIPHELM;
+   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);

Edited by quesoph

Share this post


Link to post
Share on other sites
  • 0

but its already 5% in there( without link?? ) .

 

my stalker got linked and can strip 1 by 1 with FCP [ The Stalker Can Strip ] like 80% chance o-o

Share this post


Link to post
Share on other sites
  • 0

but its already 5% in there( without link?? ) .

 

my stalker got linked and can strip 1 by 1 with FCP [ The Stalker Can Strip ] like 80% chance o-o

Well of course. 5% is the minimum rate:

 

//Rate in percent

if ( skill_id == ST_FULLSTRIP ) {

@@ -6139,6 +6140,8 @@

 

         if (i < 5) i = 5; //Minimum rate 5%

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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