NPC/item cast GM on command on player who interacts with it menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    scarfaze's Avatar Member
    Reputation
    9
    Join Date
    Aug 2008
    Posts
    79
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    NPC/item cast GM on command on player who interacts with it

    Hello all!

    The title pretty much describes it, I am wondering on how I can make an NPC or an item that casts a GM command on the player that interacts with it and chooses an item from a list of options..
    Would I have to script this in C++? If so, how would I approach this as I just compiled my trinity-server and I am new to this, though I have some experience in C++.

    The commands I was thinking of was .maxskill and .repair for now

    Thanks in advance for any help, Anton

    NPC/item cast GM on command on player who interacts with it
  2. #2
    Zymus's Avatar Active Member
    Reputation
    15
    Join Date
    Sep 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well depending on what you want to do, you would just copy the code of what youw ant to do, and add it to the specific Npc script. For example if you wanted to make the Npc repair all your equipment you would do something like this:

    Code:
    function npcRepair(player, npc) {
        npc.turnTo(player);
        menu = new GossipMenu(npc.getName(), "Hello there, what can I help you with today?");
        menu.addOption(GossipMenu.CHAT_BUBBLE, "Can you repair my equipment?");
        menu.addActionListener(new GossipMenuActionListener() {
            public void gossipOptionClicked(option) {
                if(option.getText() == "Can you repair my equipment?") {
                    menu = new GossipMenu(npc.getName(), "Of course I can.");
                    menu.addOption(menu.addOption(GossipMenu.CHAT_BUBBLE, "Thanks");
                    player.showGossipMenu(menu);
                } else if (option.getText() == "Thanks.") {
                    menu.close(player);
                    for(item : player.getEquipment()) {
                        item.setDurability(item.getMaxDurability());
                    }
                }
            }
        });
        player.showGossipMenu(menu);
    }

  3. #3
    thesixth's Avatar Member
    Reputation
    1
    Join Date
    Aug 2007
    Posts
    70
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool! Is it possible to have an NPC inviting ppl to guilds aswell?
    It's be socially great for smaller servers with less population, to have a low-level guild that people can join by talking to an npc at a starting location.
    =D

Similar Threads

  1. Gm punt command (kicks player far)
    By HaxorDarkness in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 07-29-2008, 01:29 AM
  2. how to make a npc talk/cast Mangos
    By hotandsekc in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-11-2008, 09:12 PM
  3. [Help] Need code 4 players to start with 1 item.
    By jokerjokes in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 12-21-2007, 11:18 PM
  4. Automatic NPC Item Buyer?
    By Snake2k in forum World of Warcraft General
    Replies: 3
    Last Post: 10-14-2007, 08:27 AM
  5. PICTURE Tutorial: Extract a list of all NPCS/ITEMS with ID and Display ID!
    By selulancie in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 09-26-2007, 08:26 AM
All times are GMT -5. The time now is 05:07 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