Yonko Posted October 1, 2014 Group: Members Topic Count: 166 Topics Per Day: 0.03 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Share Posted October 1, 2014 (edited) I have a custom skill how will i make it usable if a certain other skill is being used?example scenarioI used increase agility as my skill on my self then the custom skill can now be used once.Thanks Edited October 1, 2014 by Yonko Quote Link to comment Share on other sites More sharing options...
Playtester Posted October 1, 2014 Group: Developer Topic Count: 37 Topics Per Day: 0.01 Content Count: 897 Reputation: 248 Joined: 01/30/13 Last Seen: 3 hours ago Share Posted October 1, 2014 Well, you have to work with status changes. Basically you do: if(sc && sc->data[SC_MYSTATUSCHANGE]) skillcode;Check skill.c, you can look at Monk combos to see examples: case MO_CHAINCOMBO: if(!sc) return false; if(sc->data[SC_BLADESTOP]) break; if(sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == MO_TRIPLEATTACK) break; return false; case MO_COMBOFINISH: if(!(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == MO_CHAINCOMBO)) return false; break; case CH_TIGERFIST: if(!(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == MO_COMBOFINISH)) return false; break; case CH_CHAINCRUSH: if(!(sc && sc->data[SC_COMBO])) return false; if(sc->data[SC_COMBO]->val1 != MO_COMBOFINISH && sc->data[SC_COMBO]->val1 != CH_TIGERFIST) return false; break; case MO_EXTREMITYFIST: // if(sc && sc->data[SC_EXTREMITYFIST]) //To disable Asura during the 5 min skill block uncomment this... // return false; if( sc && (sc->data[SC_BLADESTOP] || sc->data[SC_CURSEDCIRCLE_ATKER]) ) break; if( sc && sc->data[SC_COMBO] ) { switch(sc->data[SC_COMBO]->val1) { case MO_COMBOFINISH: case CH_TIGERFIST: case CH_CHAINCRUSH: break; default: return false; } }in function "skill_check_condition_castbegin".If you just want the increase agi status change to be a requirement to use another skill you can just check for that status change, very easy. But if you only want to allow the other skill if you used increase agi yourself, then you need to make increase agi give the SC_COMBO status change to yourself and set "val1" to AL_INCAGI. 1 Quote Link to comment Share on other sites More sharing options...
Yonko Posted October 1, 2014 Group: Members Topic Count: 166 Topics Per Day: 0.03 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Author Share Posted October 1, 2014 so sc->data[SC_COMBO]->MYCUSTOM_SKILL)? Quote Link to comment Share on other sites More sharing options...
Playtester Posted October 1, 2014 Group: Developer Topic Count: 37 Topics Per Day: 0.01 Content Count: 897 Reputation: 248 Joined: 01/30/13 Last Seen: 3 hours ago Share Posted October 1, 2014 Well you need to do two things: 1. Make the required skill start SC_COMBO. This can be doen by adding the skill to skill_combo: void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){This one is pretty self-explanatory. In section "Start new combo", add the required skill and give it a duration. void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){ case AL_INCAGI: if (pc_checkskill(sd, MYCUSTOM_SKILL) > 0) duration=1; break;That means during AL_INCAGI effect you can do a combo. You can also set a fixed duration like 2000, that means you can do the combo until 2 seconds after the cast of AL_INCAGI.2. Now when using your new skill, add the code as explained above (see part I quoted). It would look like this: case MYCUSTOM_SKILL: if(!(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI)) return false; break;That way you check if the combo was triggered by AL_INCAGI. If it's not the case you return false = "skill not possible".If you don't like the negation you can also do it the other way around: case MYCUSTOM_SKILL: if(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI) break; return false; 1 Quote Link to comment Share on other sites More sharing options...
Yonko Posted October 1, 2014 Group: Members Topic Count: 166 Topics Per Day: 0.03 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Author Share Posted October 1, 2014 Well you need to do two things: 1. Make the required skill start SC_COMBO. This can be doen by adding the skill to skill_combo: void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){This one is pretty self-explanatory. In section "Start new combo", add the required skill and give it a duration. void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){ case AL_INCAGI: if (pc_checkskill(sd, MYCUSTOM_SKILL) > 0) duration=1; break;That means during AL_INCAGI effect you can do a combo. You can also set a fixed duration like 2000, that means you can do the combo until 2 seconds after the cast of AL_INCAGI.2. Now when using your new skill, add the code as explained above (see part I quoted). It would look like this: case MYCUSTOM_SKILL: if(!(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI)) return false; break;That way you check if the combo was triggered by AL_INCAGI. If it's not the case you return false = "skill not possible".If you don't like the negation you can also do it the other way around: case MYCUSTOM_SKILL: if(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI) break; return false; Thank you i'll test it when i get home Well you need to do two things: 1. Make the required skill start SC_COMBO. This can be doen by adding the skill to skill_combo: void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){This one is pretty self-explanatory. In section "Start new combo", add the required skill and give it a duration. void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){ case AL_INCAGI: if (pc_checkskill(sd, MYCUSTOM_SKILL) > 0) duration=1; break;That means during AL_INCAGI effect you can do a combo. You can also set a fixed duration like 2000, that means you can do the combo until 2 seconds after the cast of AL_INCAGI.2. Now when using your new skill, add the code as explained above (see part I quoted). It would look like this: case MYCUSTOM_SKILL: if(!(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI)) return false; break;That way you check if the combo was triggered by AL_INCAGI. If it's not the case you return false = "skill not possible".If you don't like the negation you can also do it the other way around: case MYCUSTOM_SKILL: if(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI) break; return false; Thank you i'll test it when i get home Well you need to do two things: 1. Make the required skill start SC_COMBO. This can be doen by adding the skill to skill_combo: void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){This one is pretty self-explanatory. In section "Start new combo", add the required skill and give it a duration. void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick){ case AL_INCAGI: if (pc_checkskill(sd, MYCUSTOM_SKILL) > 0) duration=1; break;That means during AL_INCAGI effect you can do a combo. You can also set a fixed duration like 2000, that means you can do the combo until 2 seconds after the cast of AL_INCAGI.2. Now when using your new skill, add the code as explained above (see part I quoted). It would look like this: case MYCUSTOM_SKILL: if(!(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI)) return false; break;That way you check if the combo was triggered by AL_INCAGI. If it's not the case you return false = "skill not possible".If you don't like the negation you can also do it the other way around: case MYCUSTOM_SKILL: if(sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == AL_INCAGI) break; return false; Thanks it works =) just another out of topic question I know that this source will change animation effect of a certain skill. clif_specialeffect(bl, 405, AREA); clif_specialeffect(src, 405, AREA); My question is how will i do a certain skill effect using source which display a certain shape example the sanctuary which is literally a rectangular pattern, how will i modify the sanctuary into a magnus exorcismus effect which the skill's effect display many sanctuary effect. Hope you get it lol sorry for the bad english =) Quote Link to comment Share on other sites More sharing options...
Question
Yonko
I have a custom skill how will i make it usable if a certain other skill is being used?
Edited by Yonkoexample scenario
I used increase agility as my skill on my self then the custom skill can now be used once.
Thanks
Link to comment
Share on other sites
4 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.