• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

OnUse ItemScript does not work

Status
Not open for further replies.

Darthye

Enthusiast
Hello, im creating a new script but noticed that OnUse function on ItemScripts is not working, or im doing something wrong.
Something as simple as:

Code:
#include "ScriptPCH.h"

class comando_dnd : public ItemScript
{
public:
    comando_dnd() : ItemScript("comando_dnd") { }

    bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
    {
        player->AddItem(23832, 1);
        return true;
    }
};

void AddSC_comando_dnd()
{
    new comando_dnd();
}

with the scriptname propertly added, and flags 64 is not working.

Any tips?
 
Last edited:
Status
Not open for further replies.
Top