PunkBuster 5 Posted January 24, 2014 I'd like to make the skill toggle on/off, for convenience sake. How can I do that? Quote Share this post Link to post Share on other sites
0 pan 87 Posted February 4, 2014 Open src/map/skill.c and find: case ST_PRESERVE: Remove itNow find: clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv)));break;Add below: case ST_PRESERVE: if( sd ) { if( sd->sc.count && sd->sc.data[SC_PRESERVE] ) { status_change_end(bl, SC_PRESERVE, INVALID_TIMER); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); } else { clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); } } break;Regards. 1 PunkBuster reacted to this Quote Share this post Link to post Share on other sites
0 PunkBuster 5 Posted February 12, 2014 Works perfectly. Thanks. Quote Share this post Link to post Share on other sites
0 PunkBuster 5 Posted August 9, 2014 I went back and tried to reapply this on a fresh reinstall, and I got an error saying that sc_start needed 6 parameters, but only 5 were given. I fixed it by changing... case ST_PRESERVE: if( sd ) { if( sd->sc.count && sd->sc.data[SC_PRESERVE] ) { status_change_end(bl, SC_PRESERVE, INVALID_TIMER); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); } else { clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start(bl,type,100,skill_lv,skill->get_time(skill_id,skill_lv))); } } break; into.... case ST_PRESERVE: if( sd ) { if( sd->sc.count && sd->sc.data[sC_PRESERVE] ) { status_change_end(bl, SC_PRESERVE, INVALID_TIMER); clif->skill_nodamage(src, bl, skill_id, skill_lv, 1); } else { 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; Quote Share this post Link to post Share on other sites
I'd like to make the skill toggle on/off, for convenience sake. How can I do that?
Share this post
Link to post
Share on other sites