Welcome to JadaDev

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • JadaDev

      Themes   10/08/2018

      You're able to change theme in the bottom of the site.
Sign in to follow this  
Followers 0

[C++ GossipTutroial] for ac-web [Old Rev]

Hello guys I have made my first C++ for ac-webians, which is a CreatureScript, With custom options, so I hope so you guys like it, and appreciate this release. if you suggest, some gossip menus I'll be Glad  to update C++ with new suggest's, or review my code to help further benefit my learning.

This Script Specially made for Ac-web Orginal post

Preview of that Script


/*Creator Minodev's*/


	#include "ScriptMgr.h"

	#include "Creature.h"

	#include "Player.h"

	#include "SpellHistory.h"

	#include "ScriptedGossip.h"

	#include "WorldSession.h"


	const std::vector<uint32> buffSpells =  { 33077,33078,33079,33080,33081,33082,42995,48161,25898 };


	enum spells


	    RIDING_SPELL = 90266



	class GossipTutroial : public CreatureScript



	    GossipTutroial() : CreatureScript("GossipTutroial") { }


	    bool OnGossipHello(Player * player, Creature * creature)


	        player->ADD_GOSSIP_ITEM(0, "|TInterface/ICONS/Spell_Holy_SurgeOfLight:30:30:-18|t Heal me", GOSSIP_SENDER_MAIN, 1);

	        player->ADD_GOSSIP_ITEM(0, "|TInterface/ICONS/Spell_Nature_TimeStop:30:30:-18|t Reset My CD", GOSSIP_SENDER_MAIN, 2);

	        player->ADD_GOSSIP_ITEM(0, "|TInterface/ICONS/INV_Misc_Bandage_Netherweave:30:30:-18|t Buff Me", GOSSIP_SENDER_MAIN, 3);

	        player->ADD_GOSSIP_ITEM(0, "|TInterface/ICONS/Ability_Marksmanship:30:30:-18|t Reset My Talents", GOSSIP_SENDER_MAIN, 4);

	        player->ADD_GOSSIP_ITEM(0, "|TInterface/ICONS/Ability_SteelMelee:30:30:-18|t Max my Weapon Skills", GOSSIP_SENDER_MAIN, 5);

	        player->ADD_GOSSIP_ITEM(0, "|TInterface/ICONS/spell_nature_swiftness:30:30:-18|t Learn Riding", GOSSIP_SENDER_MAIN, 6);

	        player->PlayerTalkClass->SendGossipMenu(player->GetGossipTextId(creature), creature->GetGUID());

	        return true;



	    bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) override


	        switch (action)


	        case 1:



	            player->GetSession()->SendAreaTriggerMessage("You Healed");



	        case 2:



	            player->GetSession()->SendAreaTriggerMessage("Your Spells Has been Reseted");



	        case 3:


	            for (const uint32& spell : buffSpells)

	            creature->CastSpell(player, spell, true);

	            player->GetSession()->SendAreaTriggerMessage("You Buffed");


	        case 4:



	            player->GetSession()->SendAreaTriggerMessage("Your Talents Reseted");



	        case 5:



	            player->GetSession()->SendAreaTriggerMessage("You Maxed Weapon Skills");



	        case 6:


	            player->CastSpell(player, RIDING_SPELL, true);

	            player->GetSession()->SendAreaTriggerMessage("Riding Spell Learned");



	        return true;






	    void AddSC_GossipTutroial()


	        new GossipTutroial();


Edited by XxtryxX

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0