Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class roulette_npc : public CreatureScript
- {
- public:
- roulette_npc() : CreatureScript("roulette_npc") { }
- bool OnGossipHello(Player * pPlayer, Creature * pCreature)
- {
- pPlayer->ADD_GOSSIP_ITEM(3, "I wish to play the game of luck!", GOSSIP_SENDER_MAIN, 0);
- pPlayer->ADD_GOSSIP_ITEM(1, "Nevermind", GOSSIP_SENDER_MAIN, 5);
- return true;
- }
- bool OnGossipSelect(Player * pPlayer, Creature * pCreature, uint32 sender, uint32 uiAction)
- {
- pPlayer->PlayerTalkClass->ClearMenus();
- if(uiAction == 0)
- {
- if (!pPlayer->isInCombat())
- {
- pPlayer->GetSession()->SendNotification("You are in combat");
- }
- else
- {
- switch (urand(1, 4)) // 5th should do what?
- {
- case 1:
- pPlayer->CastSpell(pPlayer, 31984);
- pCreature->MonsterSay("Hahahaha!", LANG_UNIVERSAL, NULL);
- pPlayer->PlayDirectSound(11965);
- break;
- case 2:
- pCreature->MonsterSay("You've won.. for now.", LANG_UNIVERSAL, NULL);
- pPlayer->PlayDirectSound(7914);
- break;
- case 3:
- pPlayer->CastSpell(pPlayer, 13566);
- pCreature->MonsterYell("YOU ARE NOT PREPARED!!", LANG_UNIVERSAL, NULL);
- pPlayer->PlayDirectSound(11466);
- break;
- case 4:
- pCreature->MonsterSay("Lets rock!", LANG_UNIVERSAL, NULL);
- pPlayer->PlayDirectSound(11803);
- break;
- }
- }
- OnGossipHello(pPlayer, pCreature);
- }
- else
- {
- pPlayer->CLOSE_GOSSIP_MENU();
- }
- return true;
- }
- };
- void AddSC_roulette_npc()
- {
- new roulette_npc();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement