Jump to content

Razzor_X

Members
  • Posts

    1
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Razzor_X's Achievements

Newbie

Newbie (1/3)

0

Reputation

  1. #include "precompiled.h" bool GossipHello_resetnpc(Player *player, Creature *_Creature) { player->ADD_GOSSIP_ITEM(7,"Want to reset (lvl-170 only)",GOSSIP_SENDER_MAIN,1201); player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); return true; } void SendDefaultMenu_resetnpc(Player *player, Creature *_Creature,uint32 action) { if (player->getLevel() < 170) { player->CLOSE_GOSSIP_MENU(); player->Say("I must be level 170 to reset",LANG_UNIVERSAL); return; } switch(action) { case 1201: if (player->GetMoney() < 2500000) { player->CLOSE_GOSSIP_MENU(); player->Say("I must have 250 gold to reset",LANG_UNIVERSAL); }else{ player->ModifyMoney(-2500000); player->GiveLevel(1); player->CLOSE_GOSSIP_MENU(); } break; } } bool GossipSelect_resetnpc(Player *player, Creature *_Creature, uint32 sender, uint32 action) { if (sender == GOSSIP_SENDER_MAIN) { SendDefaultMenu_resetnpc(player,_Creature,action); } return true; } void AddSC_resetnpc() { Script *newscript; newscript = new Script; newscript->Name = "resetnpc"; newscript->pGossipHello = &GossipHello_resetnpc; newscript->pGossipSelect = &GossipSelect_resetnpc; newscript->RegisterSelf(); } Now no compile errors. // Edit: Script works correctly now
×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use