Jump to content

Recommended Posts

Posted

my first time doing this so please bare with me. i only have few knowledge on programming C. but what it does is when soul linked you can use single strip on a fcp'd player. basically others do to their src code is dispell the FCP and then strip goes in. in my code i do is dispell the FCP temporarily and revert it back to 1min duration. it is good on woe maps where alot of stalkers arent soul linked. it is also a way to dispel strip by creators.

 

Now on to Skill.c

Find

 
     case SC_STRIPACCESSARY: {
        unsigned short location = 0;
        int d = 0;

Add

case SC_STRIPACCESSARY: {
        unsigned short location = 0;
        int d = 0;
        unsigned char ii = 0;

Find

//Attempts to strip at rate i and duration d
        if( (i = skill_strip_equip(src,bl, location, i, skill_lv, d)) || (skill_id != ST_FULLSTRIP && skill_id != GC_WEAPONCRUSH ) )
            clif_skill_nodamage(src,bl,skill_id,skill_lv,i);

Add

ii = i;
        
//Attempts to strip at rate i and duration d
   if( (i = skill_strip_equip(src,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_ = status_get_sc(src);
                    if( sc_->data[SC_SPIRIT] )
                    {
                        if( sc_->data[SC_SPIRIT]->val2 == SL_ROGUE )
                        {
                            if (rnd()%100 >= ii)
                            {                        
                                if( skill_id == RG_STRIPWEAPON ){
                                    status_change_end( bl, SC_CP_WEAPON, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_WEAPON, ii, skill_lv, d);
                                    sc_start(src,bl,(sc_type)(SC_CP_WEAPON),100,skill_lv,60000);
                                }
                                else if( skill_id == RG_STRIPSHIELD ){
                                    status_change_end( bl, SC_CP_SHIELD, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_SHIELD, ii, skill_lv, d);
                                    sc_start(src,bl,(sc_type)(SC_CP_SHIELD),100,skill_lv,60000);
                                }
                                else if( skill_id == RG_STRIPARMOR ){
                                    status_change_end( bl, SC_CP_ARMOR, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_ARMOR, ii, skill_lv, d);
                                    sc_start(src,bl,(sc_type)(SC_CP_ARMOR),100,skill_lv,60000);
                                }
                                else if( skill_id == RG_STRIPHELM ){
                                    status_change_end( bl, SC_CP_HELM, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_HELM, ii, skill_lv, d);
                                    sc_start(src,bl,(sc_type)(SC_CP_HELM),100,skill_lv,60000);
                                }
                                    clif_skill_nodamage(src,bl,skill_id,skill_lv,ii);
                                    break;
                            }
                            pc_delitem(sd, idx, 1, 0, 1, LOG_TYPE_NONE);
                            
                        }
                    }
                }
            }

Find

case AM_CP_HELM:
		{
			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
			
			if( sd && ( bl->type != BL_PC || ( dstsd && pc_checkequip(dstsd,equip[skill_id - AM_CP_WEAPON]) < 0 ) ) ){
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				map_freeblock_unlock(); // Don't consume item requirements
				return 0;
			}
			status_change_end(bl, scid, INVALID_TIMER);
			clif_skill_nodamage(src,bl,skill_id,skill_lv,
				sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)));
		}
		break;

Edit

case AM_CP_HELM:
		{
			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
			enum sc_type scid = (sc_type)(SC_STRIPWEAPON + (skill_id - AM_CP_WEAPON));
			
			if( sd && ( bl->type != BL_PC /*|| ( dstsd && pc_checkequip(dstsd,equip[skill_id - AM_CP_WEAPON]) < 0 )*/ ) ){
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				map_freeblock_unlock(); // Don't consume item requirements
				return 0;
			}
			status_change_end(bl, scid, INVALID_TIMER);
			clif_skill_nodamage(src,bl,skill_id,skill_lv,
				sc_start(src,bl,type,100,skill_lv,skill_get_time(skill_id,skill_lv)));
		}
		break;

Find

case CR_FULLPROTECTION:
		{
			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
			int i_eqp, s = 0, skilltime = skill_get_time(skill_id,skill_lv);

			for (i_eqp = 0; i_eqp < 4; i_eqp++) {
				if( bl->type != BL_PC || ( dstsd && pc_checkequip(dstsd,equip[i_eqp]) < 0 ) )
					continue;
				sc_start(src,bl,(sc_type)(SC_CP_WEAPON + i_eqp),100,skill_lv,skilltime);
				s++;
			}
			if( sd && !s ){
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				map_freeblock_unlock(); // Don't consume item requirements
				return 0;
			}
			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
		}
		break;

Edit

case CR_FULLPROTECTION:
		{
			unsigned int equip[] = {EQP_WEAPON, EQP_SHIELD, EQP_ARMOR, EQP_HEAD_TOP};
			int i_eqp, s = 0, skilltime = skill_get_time(skill_id,skill_lv);

			for (i_eqp = 0; i_eqp < 4; i_eqp++) {
				if( bl->type != BL_PC /*|| ( dstsd && pc_checkequip(dstsd,equip[i_eqp]) < 0 )*/ )
					continue;
				status_change_end(bl, (sc_type)(SC_STRIPWEAPON + i), INVALID_TIMER);
				status_change_end(bl, (sc_type)(SC_STRIPHELM + i), INVALID_TIMER);
				status_change_end(bl, (sc_type)(SC_STRIPSHIELD + i), INVALID_TIMER);
				status_change_end(bl, (sc_type)(SC_STRIPARMOR + i), INVALID_TIMER);
				sc_start(src,bl,(sc_type)(SC_CP_WEAPON + i_eqp),100,skill_lv,skilltime);
				s++;
			}
			if( sd && !s ){
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
				map_freeblock_unlock(); // Don't consume item requirements
				return 0;
			}
			clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
		}
		break;

Sorry if its messy..

  • Upvote 2
  • 1 month later...
Posted (edited)

yes, when youve done those fcp can disable the strip status.

how to remove the timer revert? you said that 

"basically others do to their src code is dispell the FCP and then strip goes in. in my code i do is dispell the FCP temporarily and revert it back to 1min duration."

    

so I means is when you got strip with the Stalker with Soul Link (means you been bypass strip even you have FCP Buff) you can just remove the strip status permanently when you are being skill by FCP of Creator. and vice versa

example

Stalker ---use strip ---> LK with FCP (then he/she is strip already) ---Creator use FCP on strip LK------> the Strip Status cancelled and replaced by FCP Status and so on the scenario will repeat as long as stalker with soul link strip up players with fcp it stripped right then the strip status cancel out when the player receive another FCP Buff from creator 

Thank you =) hope you get me sorry for the bad english :P/no1

 

Edited by Yonko
Posted (edited)

 

yes, when youve done those fcp can disable the strip status.

how to remove the timer revert? you said that 

"basically others do to their src code is dispell the FCP and then strip goes in. in my code i do is dispell the FCP temporarily and revert it back to 1min duration."

    

so I means is when you got strip with the Stalker with Soul Link (means you been bypass strip even you have FCP Buff) you can just remove the strip status permanently when you are being skill by FCP of Creator. and vice versa

example

Stalker ---use strip ---> LK with FCP (then he/she is strip already) ---Creator use FCP on strip LK------> the Strip Status cancelled and replaced by FCP Status and so on the scenario will repeat as long as stalker with soul link strip up players with fcp it stripped right then the strip status cancel out when the player receive another FCP Buff from creator 

Thank you =) hope you get me sorry for the bad english :P/no1

 

//Attempts to strip at rate i and duration d
   if( (i = skill_strip_equip(src,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_ = status_get_sc(src);
                    if( sc_->data[SC_SPIRIT] )
                    {
                        if( sc_->data[SC_SPIRIT]->val2 == SL_ROGUE )
                        {
                            if (rnd()%100 >= ii)
                            {                        
                                if( skill_id == RG_STRIPWEAPON ){
                                    status_change_end( bl, SC_CP_WEAPON, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_WEAPON, ii, skill_lv, d);
                                   // sc_start(src,bl,(sc_type)(SC_CP_WEAPON),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPSHIELD ){
                                    status_change_end( bl, SC_CP_SHIELD, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_SHIELD, ii, skill_lv, d);
                                  //  sc_start(src,bl,(sc_type)(SC_CP_SHIELD),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPARMOR ){
                                    status_change_end( bl, SC_CP_ARMOR, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_ARMOR, ii, skill_lv, d);
                                   // sc_start(src,bl,(sc_type)(SC_CP_ARMOR),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPHELM ){
                                    status_change_end( bl, SC_CP_HELM, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_HELM, ii, skill_lv, d);
                                  //  sc_start(src,bl,(sc_type)(SC_CP_HELM),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                    clif_skill_nodamage(src,bl,skill_id,skill_lv,ii);
                                    break;
                            }
                            pc_delitem(sd, idx, 1, 0, 1, LOG_TYPE_NONE);
                            
                        }
                    }
                }
            }
Edited by kevin1109
  • Upvote 1
Posted

 

 

yes, when youve done those fcp can disable the strip status.

how to remove the timer revert? you said that 

"basically others do to their src code is dispell the FCP and then strip goes in. in my code i do is dispell the FCP temporarily and revert it back to 1min duration."

    

so I means is when you got strip with the Stalker with Soul Link (means you been bypass strip even you have FCP Buff) you can just remove the strip status permanently when you are being skill by FCP of Creator. and vice versa

example

Stalker ---use strip ---> LK with FCP (then he/she is strip already) ---Creator use FCP on strip LK------> the Strip Status cancelled and replaced by FCP Status and so on the scenario will repeat as long as stalker with soul link strip up players with fcp it stripped right then the strip status cancel out when the player receive another FCP Buff from creator 

Thank you =) hope you get me sorry for the bad english :P/no1

 

//Attempts to strip at rate i and duration d
   if( (i = skill_strip_equip(src,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_ = status_get_sc(src);
                    if( sc_->data[SC_SPIRIT] )
                    {
                        if( sc_->data[SC_SPIRIT]->val2 == SL_ROGUE )
                        {
                            if (rnd()%100 >= ii)
                            {                        
                                if( skill_id == RG_STRIPWEAPON ){
                                    status_change_end( bl, SC_CP_WEAPON, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_WEAPON, ii, skill_lv, d);
                                   // sc_start(src,bl,(sc_type)(SC_CP_WEAPON),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPSHIELD ){
                                    status_change_end( bl, SC_CP_SHIELD, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_SHIELD, ii, skill_lv, d);
                                  //  sc_start(src,bl,(sc_type)(SC_CP_SHIELD),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPARMOR ){
                                    status_change_end( bl, SC_CP_ARMOR, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_ARMOR, ii, skill_lv, d);
                                   // sc_start(src,bl,(sc_type)(SC_CP_ARMOR),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPHELM ){
                                    status_change_end( bl, SC_CP_HELM, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_HELM, ii, skill_lv, d);
                                  //  sc_start(src,bl,(sc_type)(SC_CP_HELM),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                    clif_skill_nodamage(src,bl,skill_id,skill_lv,ii);
                                    break;
                            }
                            pc_delitem(sd, idx, 1, 0, 1, LOG_TYPE_NONE);
                            
                        }
                    }
                }
            }

Thank you so i will not apply first your Post#1? or Straight on this Code provided in #5?

Posted

Thanks I'll try that :D


 

 

yes, when youve done those fcp can disable the strip status.

how to remove the timer revert? you said that 

"basically others do to their src code is dispell the FCP and then strip goes in. in my code i do is dispell the FCP temporarily and revert it back to 1min duration."
    


so I means is when you got strip with the Stalker with Soul Link (means you been bypass strip even you have FCP Buff) you can just remove the strip status permanently when you are being skill by FCP of Creator. and vice versa

example

Stalker ---
use strip ---> LK with FCP (then he/she is strip already) ---Creator use FCP on strip LK------> the Strip Status cancelled and replaced by FCP Status and so on the scenario will repeat as long as stalker with soul link strip up players with fcp it stripped right then the strip status cancel out when the player receive another FCP Buff from creator 

Thank you =) hope you get me sorry for the bad english :P/no1

 

//Attempts to strip at rate i and duration d
   if( (i = skill_strip_equip(src,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_ = status_get_sc(src);
                    if( sc_->data[SC_SPIRIT] )
                    {
                        if( sc_->data[SC_SPIRIT]->val2 == SL_ROGUE )
                        {
                            if (rnd()%100 >= ii)
                            {                        
                                if( skill_id == RG_STRIPWEAPON ){
                                    status_change_end( bl, SC_CP_WEAPON, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_WEAPON, ii, skill_lv, d);
                                   // sc_start(src,bl,(sc_type)(SC_CP_WEAPON),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPSHIELD ){
                                    status_change_end( bl, SC_CP_SHIELD, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_SHIELD, ii, skill_lv, d);
                                  //  sc_start(src,bl,(sc_type)(SC_CP_SHIELD),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPARMOR ){
                                    status_change_end( bl, SC_CP_ARMOR, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_ARMOR, ii, skill_lv, d);
                                   // sc_start(src,bl,(sc_type)(SC_CP_ARMOR),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                else if( skill_id == RG_STRIPHELM ){
                                    status_change_end( bl, SC_CP_HELM, INVALID_TIMER );
                                    skill_strip_equip(src,bl, EQP_HELM, ii, skill_lv, d);
                                  //  sc_start(src,bl,(sc_type)(SC_CP_HELM),100,skill_lv,60000); <-------------------------------- Comment this out
                                }
                                    clif_skill_nodamage(src,bl,skill_id,skill_lv,ii);
                                    break;
                            }
                            pc_delitem(sd, idx, 1, 0, 1, LOG_TYPE_NONE);
                            
                        }
                    }
                }
            }

Thanks it's working Perfectly your a life saver! Many Thanks :D/no1

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...