Jump to content
  • 0

Give item after kill monster [c++]



Hi community,

How can i make in c++ system, when i kill a monster / boss, you get a reward for it?
(But only the one who killed in other words, the one who did last hit.)

I tried some stuff, but nothing works like i want.

If someone can help please i appreciate.

Link to post

4 answers to this question

Recommended Posts

  • 0


void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead)


add something like this,  and change mobvnum and ITEM


    if (true == IsMonster() && MOBVNUM == GetMobTable().dwVnum)
        if (pkKiller->IsPC() )

Link to post
  • 0
Posted (edited)

yy, i searched for that after 15 mins after i posted it,

Thanks anyway ! :D

Can close topic, solution founded.

For those who want, comment from "useless69".


Edited by Doose
Link to post
  • 0
  • Honorable Member

I think it's better to use quests for this kind of things.  No need to mess the src.

  • Good 1


Link to post
  • 0
23 hours ago, Mali61 said:

I think it's better to use quests for this kind of things.  No need to mess the src.

Ty, i also did the same and it worked too.

Can you explain me how to use a green potion and purple one per time for time of use?
I mean, if the potion takes 10 mins to be complitly used, how can i make a condition to make it only used 1 time per 10 mins?

In other words, i can only use 1 green potion every 10 minutes, even if die.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.