Jump to content
  • 0
Sign in to follow this  
penciltea

Check if Player Uses Skill?

Question

Hi there!

 

Sorry if this is the wrong section for this question. I figured this was the best place.

 

I'm making some class-based quest scripts and I wanted to know if there was a way to check if a player uses a particular skill? For example, say the quest is "Go kill [monster] using Fire Bolt," is there a way to actually make that skill check in a script?

 

Thank you very much!

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
 src/map/mob.c | 6 ++++++ 1 file changed, 6 insertions(+)diff --git a/src/map/mob.c b/src/map/mob.cindex 0d6055b..91f3070 100644--- a/src/map/mob.c+++ b/src/map/mob.c@@ -2614,6 +2614,12 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { 			} else 				npc->event_do(md->npc_event); 		} else if( mvp_sd && !md->state.npc_killmonster ) {+			ShowDebug( "s1 %d", battle->get_current_skill(src) );+			ShowDebug( "s2 %d", battle->get_current_skill(&sd->bl) );+			ShowDebug( "s3 %d", battle->get_current_skill(&mvp_sd->bl) );+			ShowDebug( "s4 %d", unit->bl2ud(src)->skill_id );+			ShowDebug( "s5 %d", unit->bl2ud(&sd->bl)->skill_id );+			ShowDebug( "s6 %dn", unit->bl2ud(&mvp_sd->bl)->skill_id ); 			pc->setparam(mvp_sd, SP_KILLEDRID, md->class_); 			npc->script_event(mvp_sd, NPCE_KILLNPC); // PCKillNPC [Lance] 		}
hmm ... no idea, all value return 0 when I kill the poring with firebolt skill ... Edited by AnnieRuru

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.