Easy LUA question menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Easy LUA question

    I have this donor system that mails you the items. Now it seems some people want their gear on other characters or to change the gear. So to remedy this i scripted in lua an npc that will take the items and replace it with another. Here I ask 2 questions.

    How can I get it to another character? is there a command for the npc to mail an item? maybe a different clever idea.

    and last

    How do I make a gossip npc only open the menu if said player has a certain item (donor key)

    Easy LUA question
  2. #2
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    
    if player:HasItem(itemid) == true then
         Unit:GossipCreateMenu(100, player, 0)
         Unit:GossipMenuAddItem(0, "?", 1, 0)
         Unit:GossipSendMenu(player)
    else
         player:SendBroadcastMessage("You do not have the donation key")
    end
    
    That would take care of the item requirement problem.

    If you use Gua Engine you could probably use the Execute or Query command to insert mail into the appropriate table, while removing the selected item from the player. This would probably require using a codebox.

    Another thing you could look into is using Bind on Account items in some way or another(I'm not sure if there working though)

  3. #3
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Servers 2.4.3. Thanks anyway. if it was 3.0+ it WOULD work setting the items to account binding

  4. #4
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok quick one, if it costs more then one token, how do i make it give an error if theres only one? so no one ****s over the system?

  5. #5
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    player:GetItemCount(itemid)?

  6. #6
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Vision1000 View Post
    player:GetItemCount(itemid)?
    like this?

    GetItemCount(id) == 2 true then

Similar Threads

  1. [LUA] Question
    By Algorithm in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 04-14-2008, 02:50 PM
  2. LUA Question (advanced?)
    By CairiFEA in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 04-13-2008, 01:57 AM
  3. LUA Question
    By CairiFEA in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 04-10-2008, 08:10 PM
  4. script lua question
    By onilank in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 12-21-2007, 06:58 PM
  5. Easy Ascent question
    By sleepybilly in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 12-08-2007, 09:59 PM
All times are GMT -5. The time now is 05:18 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search