Jump to content
  • 0

Single strip with low chance


Patskie

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Hello rAthena, I have problem with this piece of codes. It's working though and you can strip a player even he/she is in fcp. But the chance is 100%. Can anyone edit this code to 20% chance.


//Special message when trying to use strip on FCP [Jobbie]
if( sd && skillid == ST_FULLSTRIP && tsc && tsc->data[sC_CP_WEAPON] && tsc->data[sC_CP_HELM] && tsc->data[sC_CP_ARMOR] && tsc->data[sC_CP_SHIELD])
{
clif_gospel_info(sd, 0x28);
break;
}
if ( sd && tsc && sd->sc.data[sC_SPIRIT] && sd->sc.data[sC_SPIRIT]->val2 == SL_ROGUE &&
( skillid == RG_STRIPWEAPON && tsc->data[sC_CP_WEAPON] ||
skillid == RG_STRIPSHIELD && tsc->data[sC_CP_SHIELD] ||
skillid == RG_STRIPARMOR && tsc->data[sC_CP_ARMOR] ||
skillid == RG_STRIPHELM && tsc->data[sC_CP_HELM] ) ) {
int item_id = 7139; // Glistening Coat
int ii;
ARR_FIND( 0, MAX_INVENTORY, ii, sd->status.inventory[ii].nameid == item_id );
if ( ii < MAX_INVENTORY ) {
pc_delitem( sd, ii, 1, 0, 0, LOG_TYPE_CONSUME);
switch ( skillid ) {
case RG_STRIPWEAPON:
status_change_end( bl, SC_CP_WEAPON, INVALID_TIMER );
sc_start( bl, SC_STRIPWEAPON, 100, skilllv, d );
break;
case RG_STRIPSHIELD:
status_change_end( bl, SC_CP_SHIELD, INVALID_TIMER );
sc_start( bl, SC_STRIPSHIELD, 100, skilllv, d );
break;
case RG_STRIPARMOR:
status_change_end( bl, SC_CP_ARMOR, INVALID_TIMER );
sc_start( bl, SC_STRIPARMOR, 100, skilllv, d );
break;
case RG_STRIPHELM:
status_change_end( bl, SC_CP_HELM, INVALID_TIMER );
sc_start( bl, SC_STRIPHELM, 100, skilllv, d );
break;
}
clif_skill_nodamage( src, bl, skillid, skilllv, i );
break;
}
}

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

bump

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

I already fixed this. Thanks just workaround with annie's single strip source. anyway thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

sir? how does this work?

does it needs to be Soul linked to be able to success single stripping??

where to put this? ty

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

I already fixed this. Thanks just workaround with annie's single strip source. anyway thanks

 

how did you fixed it?

want to share? thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

I already fixed this. Thanks just workaround with annie's single strip source. anyway thanks

 

how did you fixed it?

want to share? thanks!

Just add rand() % <chance> in the script to activate chance in single strip.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

what part of the script? please share ty!

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