Make a Maxskills NPC. (Need Help plz) menu

Shout-Out

User Tag List

Results 1 to 4 of 4
  1. #1
    Ezrael's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Make a Maxskills NPC. (Need Help plz)

    Hi everobody,

    I need you're help to make my NPC for maxskills on my WoW server.

    I try to create lua script by myself but it doesn't work....

    I paste my script, and I hope someone can help me

    --[[ General NPC ]]

    local npcid = 91001

    function Menu_OnGossipTalk(pUnit, event, player, pMisc)
    if (player:IsInCombat() == true) then
    player:SendAreaTriggerMessage("You are in combat!")
    else
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(0, "Apprenez moi tout ce que je dois savoir.", 2, 0)
    pUnit:GossipSendMenu(player)
    end
    end

    if(intid == 2) then
    local plr = pUnit:GetClosestPlayer()
    player:UpdateSkillsToMaxSkillsForLevel();
    pUnit:SendChatMessage(12, 0, "Je vous ai appris tout ce que vous deviez savoir. Bon Jeu sur Suburia.")
    end

    RegisterUnitGossipEvent(npcid, 1, "Menu_OnGossipTalk")
    The function "UpdateSkillsToMaxSkillsForLevel();" was just here for the exemple, i don't know how can i do to do a MaxSkill....

    I just want that : Player come in front of the pnj, open NPC Menu , click on "Give me max skills" and NPC do a .maxskills lool


    Edit : I Use Ascent Panex Repack


    Thanks

    Make a Maxskills NPC. (Need Help plz)
  2. #2
    baptizein's Avatar Member
    Reputation
    16
    Join Date
    Jul 2008
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you weren't using a repack, this NPC can be created easily in C++. I can put one together for you, but you'll have to compile it along with your own server... As far as doing it in Lua, it may or may not even be possible... Would take some work.
    Lead Project Developer and Administrator of Team WoWfare · Developers of scripts and programs for World of Warcraft private servers

  3. #3
    ringkong's Avatar Member
    Reputation
    1
    Join Date
    Jul 2008
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I got the same needs

    I got the same needs but I got c++ and lua SO any shot u could help me ?

  4. #4
    fokui's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    here

    I wrote this real quick and didnt really test it out but im pretty positive it will compile without errors.

    Credits = Me (fokui) :P

    MaxSkill.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)// warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    
    class SCRIPT_DECL MaxSkill : public GossipScript
    {
    public:
        void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
        void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
        void GossipEnd(Object * pObject, Player* Plr);
    	void Destroy()
    	{
    		delete this;
    	}
    };
    void MaxSkill::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
        {
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    		{
    		Menu->AddItem(9, "Advance All Weapon Skills", 1);
    		}
    		if(AutoSend)
                Menu->SendTo(Plr);
        }
    
    void MaxSkill::GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        {
    	Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
    	if(pCreature==NULL)
    		return;
    
            GossipMenu * Menu;
            switch(IntId)
            {
            case 0:
    		GossipHello(pObject, Plr, true);
            break;
    				case 1: // Advance Weapon Skills
    		{
    		if (Plr->_HasSkillLine(43))
    			{Plr->_AdvanceSkillLine(43, 375);}
    		if (Plr->_HasSkillLine(55))
    			{Plr->_AdvanceSkillLine(55, 375);}
    		if (Plr->_HasSkillLine(44))
    			{Plr->_AdvanceSkillLine(44, 375);}
    		if (Plr->_HasSkillLine(95))
    			{Plr->_AdvanceSkillLine(95, 375);}
    		if (Plr->_HasSkillLine(54))
    			{Plr->_AdvanceSkillLine(54, 375);}
    		if (Plr->_HasSkillLine(45))
    			{Plr->_AdvanceSkillLine(45, 375);}
    		if (Plr->_HasSkillLine(46))
    			{Plr->_AdvanceSkillLine(46, 375);}
    		if (Plr->_HasSkillLine(136))
    			{Plr->_AdvanceSkillLine(136, 375);}
    		if (Plr->_HasSkillLine(160))
    			{Plr->_AdvanceSkillLine(160, 375);}
    		if (Plr->_HasSkillLine(162))
    			{Plr->_AdvanceSkillLine(162, 375);}
    		if (Plr->_HasSkillLine(172))
    			{Plr->_AdvanceSkillLine(172, 375);}
    		if (Plr->_HasSkillLine(173))
    			{Plr->_AdvanceSkillLine(173, 375);}
    		if (Plr->_HasSkillLine(176))
    			{Plr->_AdvanceSkillLine(176, 375);}
    		if (Plr->_HasSkillLine(226))
    			{Plr->_AdvanceSkillLine(226, 375);}
    		if (Plr->_HasSkillLine(228))
    			{Plr->_AdvanceSkillLine(228, 375);}
    		if (Plr->_HasSkillLine(229))
    			{Plr->_AdvanceSkillLine(229, 375);}
    		if (Plr->_HasSkillLine(473))
    			{Plr->_AdvanceSkillLine(473, 375);}
    			Plr->BroadcastMessage("Weapon skills advanced,Enjoy being lazy!");
    			Plr->Gossip_Complete();
    			}
     }
     }
    
    void MaxSkill::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupMaxSkill(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new MaxSkill();
        mgr->register_gossip_script(NPCID, gs);
    }
    Setup.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    #define SKIP_ALLOCATOR_SHARING 1
    #include <ScriptSetup.h>
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
    SetupMaxSkill(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif
    Setup.h
    Code:
    #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    void SetupMaxSkill(ScriptMgr * mgr);
    
    
    #endif

Similar Threads

  1. Confused on making server public(still need help)
    By smartkid34 in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 04-03-2008, 10:01 AM
  2. NEED HELP plz read
    By Kazard123 in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 03-05-2008, 06:08 AM
  3. Making an WoW account (need help ! )
    By Ukrainia in forum World of Warcraft General
    Replies: 14
    Last Post: 01-19-2008, 10:19 AM
  4. Need Help plz
    By pytos in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 12-14-2007, 04:59 PM
  5. Krazzee Fault ? Need Help Plz T-T
    By Nynynoob in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 07-21-2007, 09:49 AM
All times are GMT -5. The time now is 03:15 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search