ThyroDree 3 Posted March 1, 2014 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); Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted March 1, 2014 (edited) 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 March 1, 2014 by Dastgir Pojee Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 1, 2014 100 is 100%? Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted March 1, 2014 100 is 100%? If you set ii to 100, then it will be 100% success. Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 2, 2014 o thank you! Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 2, 2014 if i want 10% i will change the if (rnd()%100 >= ii) into if (rnd()%10 >= ii) ?? Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted March 2, 2014 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. Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 2, 2014 //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 Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 2, 2014 (edited) ===================================================================--- 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 March 2, 2014 by quesoph Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 2, 2014 not full strip o-o Quote Share this post Link to post Share on other sites
0 quesoph 105 Posted March 2, 2014 What exactly do you want to do with this diff? Quote Share this post Link to post Share on other sites
0 Mystery 594 Posted March 2, 2014 From the diff... it affects full strip and the individual stripping skills. Quote Share this post Link to post Share on other sites
0 ThyroDree 3 Posted March 3, 2014 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 Quote Share this post Link to post Share on other sites
0 Mystery 594 Posted March 3, 2014 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% Quote Share this post Link to post Share on other sites
Can someone help me how can i lower the chance of per Strip?
here is the patch
Share this post
Link to post
Share on other sites