LUA type vendor (Not really a vendor, but relative) menu

User Tag List

Results 1 to 6 of 6
  1. #1
    _DEFiANT's Avatar Member
    Reputation
    44
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    LUA type vendor (Not really a vendor, but relative)

    Well, it's not really a vendor, but it is relative. I can understand how the LUA script would work, but I don't know the commands. What I am trying to do, is make an LUA script so that when you talk to the NPC, he gives you a list of items. To buy those items, you have to have tokens. So the script would be something like...
    Code:
    player:RemoveItem(xxxxx)  
    player:AddItem(xxxxxx)
    But I am not sure. Is there a script like this? Just thought it would be unique instead of a quest or a vendor
    Also, is there a way to make the NPC say something in the chat window (Not SendMessage, I mean when you talk to her and it brings up her window.)

    Oh, and if there is, how do I set the amount of items it takes from the player inventory?

    Sorry for all the questions!
    Someone will get a +rep cookie!
    Last edited by _DEFiANT; 09-08-2008 at 11:26 PM.

    Need help? add me on MSN - [email protected]
    Have questions? email me - [email protected]

    LUA type vendor (Not really a vendor, but relative)
  2. #2
    _DEFiANT's Avatar Member
    Reputation
    44
    Join Date
    Aug 2008
    Posts
    240
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No one?

    Need help? add me on MSN - [email protected]
    Have questions? email me - [email protected]

  3. #3
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a really cool idea. Not sure why you would want it though? But that doesn't really matter.
    It just makes my head hurt even thinking about where to start.

  4. #4
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    should be something like this:
    -------------------------------------------------------------------------
    -- SCRIPTED BY EXACUTE FOR Zila |
    -- IF U USE PLEASE LEAVE COMMENTS! |
    -------------------------------------------------------------------------


    local npcid = XXXXXXXXXXXX

    function NPC_main_menu(pUnit, player)
    pUnit:GossipCreateMenu(3543, player, 0)
    pUnit:GossipMenuAddItem(3, "Buy stuff for your tokens:", 1, 0)
    pUnit:GossipMenuAddItem(3, "The death blade -- Token of Death", 2, 0)
    pUnit:GossipMenuAddItem(0, "Token Of killing Spree -- Token Of Death", 3, 0)
    pUnit:GossipSendMenu(player)
    end
    function NPC_on_gossip_talk(pUnit, event, player)
    NPC_main_menu(pUnit, player)
    end
    function NPC_on_gossip_select(pUnit, event, player, id, intid, code, pMisc)
    if(intid == 2) then
    pUnit:SendChatMessage(12, 0, "Enjoy the weapon")
    player:RemoveItem(xxxxx)
    player:AddItem(xxxxxx)
    player:GossipComplete()
    end
    if(intid == 3) then
    pUnit:SendChatMessage(12, 0, "Enjoy the Token")
    player:RemoveItem(xxxxx)
    player:AddItem(xxxxxx)
    player:GossipComplete()
    end
    intid = 0
    end
    RegisterUnitGossipEvent(XXXXXXXX, 1, "NPC_on_gossip_talk")
    RegisterUnitGossipEvent(XXXXXXXX, 2, "NPC_on_gossip_select"
    )
    [/COLOR]

  5. #5
    The [Bapes]'s Avatar Banned
    Reputation
    14
    Join Date
    Aug 2008
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would check to make sure that they have the required tokens first.

  6. #6
    Exacute's Avatar Active Member
    Reputation
    67
    Join Date
    Mar 2008
    Posts
    337
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ou didnt get that.. the script is only for removing and adding the other.. Will look into it later :P
    [/COLOR]

Similar Threads

  1. Not really a bug but a question.
    By brantley55 in forum Report Bugs
    Replies: 1
    Last Post: 09-19-2013, 08:10 AM
  2. LUA, Talking vendor problem
    By XinuX in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 04-12-2009, 06:26 PM
  3. Not really MMOwned news - But good news
    By KuRIoS in forum OC News
    Replies: 32
    Last Post: 07-01-2008, 04:54 PM
  4. Not really a scam, but full of win.
    By momthinksimcool in forum WoW Scam Prevention
    Replies: 14
    Last Post: 06-29-2008, 11:32 PM
  5. Not really an Exploration, but fits in this category, I guess..
    By seanminion in forum World of Warcraft General
    Replies: 6
    Last Post: 12-06-2007, 09:59 PM
All times are GMT -5. The time now is 09:24 AM. 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