veryscary21 Posted November 22, 2012 Posted November 22, 2012 (edited) im having troubles on enabling single strip bypass codes. I saw this code from AnnieRuru Index: skill.c =================================================================== --- skill.c (revision 14829) +++ skill.c (working copy) @@ -4510,7 +4510,38 @@ 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 = 501; // red potion + 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); + 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; + } + } //Attempts to strip at rate i and duration d if( (i = skill_strip_equip(bl, location, i, skilllv, d)) || skillid != ST_FULLSTRIP ) clif_skill_nodamage(src,bl,skillid,skilllv,i); Did this but as i recompile, this error comes up CC skill.c skill.c: In function 'skill_castend_nodamage_id': skill.c:6095: error: too few arguments to function 'pc_delitem' skill.c:17600:2: warning: no newline at end of file make[1]: *** [obj_sql/skill.o] Error 1 make[1]: Leaving directory `/root/rathena/src/map' make: *** [map_sql] Error 2 [root@gramer-ro rathena]# [root@gramer-ro rathena]# This is what my skill.c looks like //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 = 501; // red potion 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); 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; } } //Attempts to strip at rate i and duration d if( (i = skill_strip_equip(bl, location, i, skilllv, d)) || skillid != ST_FULLSTRIP ) clif_skill_nodamage(src,bl,skillid,skilllv,i); Hope someone can help me with this Thanks! Edited November 22, 2012 by veryscary21 Quote
Lighta Posted November 22, 2012 Posted November 22, 2012 - pc_delitem( sd, ii, 1, 0, 0); + pc_delitem( sd, ii, 1, 0, 0, LOG_TYPE_CONSUME); or whatever type you want from e_log_pick_type, just make sure they're defined as enum type for logging item Quote
veryscary21 Posted November 22, 2012 Author Posted November 22, 2012 (edited) My god!!! At last! Thank you so much!! @Lighta The chance of the player getting stripped depends on that 100 right? so if i will decrease that number the chance will also decrease.. sir one last thing.. After getting stripped, Creators usually FCPs their mates to cancel the stripped state. But in my case, when i FCP a stripped player, still they cant put the equipment on.. and the strip icon doesn't disappear.. is there a way to do this? Thanks Edited November 22, 2012 by veryscary21 Quote
malufett Posted November 22, 2012 Posted November 22, 2012 After getting stripped, Creators usually FCPs their mates to cancel the stripped state. But in my case, when i FCP a stripped player, still they cant put the equipment on.. and the strip icon doesn't disappear.. is there a way to do this? Thanks this was an official behavior and had been fixed in rA since r16560 and r16567..just revert if you prefer so.. Quote
veryscary21 Posted November 23, 2012 Author Posted November 23, 2012 Oh i see.. We have to move forward right? What's the use of using rathena if you gonna use the old files.. so imma stick with the new and fixed version.. It can be cancelled by gospel anyway.. Thanks for the info! malufett Quote
Question
veryscary21
im having troubles on enabling single strip bypass codes. I saw this code from AnnieRuru
Index: skill.c
===================================================================
--- skill.c (revision 14829)
+++ skill.c (working copy)
@@ -4510,7 +4510,38 @@
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 = 501; // red potion
+ 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);
+ 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;
+ }
+ }
//Attempts to strip at rate i and duration d
if( (i = skill_strip_equip(bl, location, i, skilllv, d)) || skillid != ST_FULLSTRIP )
clif_skill_nodamage(src,bl,skillid,skilllv,i);
Did this but as i recompile, this error comes up
CC skill.c
skill.c: In function 'skill_castend_nodamage_id':
skill.c:6095: error: too few arguments to function 'pc_delitem'
skill.c:17600:2: warning: no newline at end of file
make[1]: *** [obj_sql/skill.o] Error 1
make[1]: Leaving directory `/root/rathena/src/map'
make: *** [map_sql] Error 2
[root@gramer-ro rathena]#
[root@gramer-ro rathena]#
This is what my skill.c looks like
//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 = 501; // red potion
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);
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;
}
}
//Attempts to strip at rate i and duration d
if( (i = skill_strip_equip(bl, location, i, skilllv, d)) || skillid != ST_FULLSTRIP )
clif_skill_nodamage(src,bl,skillid,skilllv,i);
Hope someone can help me with this Thanks!
Edited by veryscary214 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.