Jump to content
  • 0

Script Request> Last Hit on MOB event


BabaVoss

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.03
  • Content Count:  79
  • Reputation:   0
  • Joined:  06/17/20
  • Last Seen:  

Good day Rathena! Im trying to create an event, which is Last Hit event.
Basically it works just like a normal player killing a mob, but the last hit will get the prize.

im using a mob that takes 1 damage only, for example @monster 1915, and put a item drop on it.
but the problem is, the player that made the last hit/killed it, doesnt get the prize. but the one who made too much damage.

can anyone help me to create this event? thank you

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

When you use the monster command with a label, the rid of the player that killed the mob is already attached to it, so you can execute all commands like he started the script himself.
For example, you can give him an item with getitem.

-	script	LAST_HIT_MONSTER	FAKE_NPC,{
    OnInit:
        monster("prontera", 0, 0, "Demo Poring", 1002, 10, strnpcinfo(3) + "::OnDemoPoringDead");
    end;

    OnDemoPoringDead:
        getitem(502, 1);
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.03
  • Content Count:  79
  • Reputation:   0
  • Joined:  06/17/20
  • Last Seen:  

10 hours ago, Winterfox said:

When you use the monster command with a label, the rid of the player that killed the mob is already attached to it, so you can execute all commands like he started the script himself.
For example, you can give him an item with getitem.

-	script	LAST_HIT_MONSTER	FAKE_NPC,{
    OnInit:
        monster("prontera", 0, 0, "Demo Poring", 1002, 10, strnpcinfo(3) + "::OnDemoPoringDead");
    end;

    OnDemoPoringDead:
        getitem(502, 1);
}

 

Thank you for your help! it work!
@Winterfox
 

 -    script    LAST_HIT_MONSTER    FAKE_NPC,{
    OnInit:

 

 

Edited by BabaVoss
Link to comment
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.   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.

×
×
  • Create New...