[Question] Lua and Gold menu

Shout-Out

User Tag List

Results 1 to 12 of 12
  1. #1
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Lua and Gold

    Hey there.
    I am trying to make a vendor who sells reputation to the different factions.
    However I would like it to cost gold. What set of commands should I use in order to make the Vendor (Made in Lua) take money from the user? And if the user doesn't have the required money, then deny and do nothing?

    We can use this as an example:

    Code:
    function On_Gossip (pUnit, event, player)
    pUnit:GossipCreateMenu(100, player)
    pUnit:GossipMenuAddItem(player, 0, "Alliance Reputation", 1, 0)
    pUnit:GossipSendMenu(player)
    end
    
    function Gossip_Submenus (pUnit, event, player, id, intid, code)
    if(intid == 1) then
    pUnit:GossipCreateMenu(99, player)
    pUnit:GossipMenuAddItem(player, 5, "Stormwind", 14, 0)
    pUnit:MenuSendToPlayer(player)
    end
    
    if(intid == 14) then
    The help I ask for goes here xD
    end
    I know that its something like player:SetReputation(faction,value) (I think) and then I need it to check if the person got the gold asked for, and if not display a message.

    The only think I really need to know is how you make the NPC reach down in the pocket of the player checks for the amount of gold, and takes it if the player got what it takes :b

    I will of course give +Rep to the person who can give me the right answer ^^
    Thanks in advance.

    [Question] Lua and Gold
  2. #2
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Download GastricPenguin's GUA engine and use the extra commands created there
    http://www.mmowned.com/forums/emulat...ua-engine.html

    And btw this belongs in Emu Questions


  3. #3
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Vindicated View Post
    Download GastricPenguin's GUA engine and use the extra commands created there
    http://www.mmowned.com/forums/emulat...ua-engine.html

    And btw this belongs in Emu Questions
    I couldn't see any section specified for Emu questions.
    Can you point me in the right direction?

  4. #4
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Emulator Questions - MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides

    But don't make another thread there, I will get a moderator to move this


  5. #5
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks heh (:
    But is it only his Engine that would support such a set of commands?

  6. #6
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it is. Unless you want to script your own


  7. #7
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha.
    I wouldn't be able to make my own Engine ^^

  8. #8
    Jotox's Avatar Contributor
    Reputation
    250
    Join Date
    Mar 2008
    Posts
    282
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually you can set/get gold using the current arc lua engine

    To get a player's gold use this:
    Code:
    player:GetUInt32Value(1546)
    To modify gold use this:
    Code:
    player:ModUInt32Value(1546, amount)
    And to set gold use this:
    Code:
    player:SetUInt32Value(1546, value)

  9. #9
    Gastricpenguin's Avatar Legendary
    Reputation
    980
    Join Date
    Feb 2007
    Posts
    2,236
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jotox1 View Post
    actually you can set/get gold using the current arc lua engine

    To get a player's gold use this:
    Code:
    player:GetUInt32Value(1546)
    To modify gold use this:
    Code:
    player:ModUInt32Value(1546, amount)
    And to set gold use this:
    Code:
    player:SetUInt32Value(1546, value)

    Why would you do all that nonsense when you could just do AddCoinage(gold, silver, copper) with my engine!
    Life Puzzler WoW - Website | Forums

  10. #10
    Jotox's Avatar Contributor
    Reputation
    250
    Join Date
    Mar 2008
    Posts
    282
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    xD it's so much easier to just use the existing one!

    i guess there's some merit to yours tho.

  11. #11
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would use your engine Gastric, buuuut...it keeps freezing the Aspire Core of the server that I play on..so..yeah. Its Aspire-Hearstone. Any help to get? I think he did use your guide to do it but..yeah <.<
    Originally Posted by Jotox1 View Post
    actually you can set/get gold using the current arc lua engine

    To get a player's gold use this:
    Code:
    player:GetUInt32Value(1546)
    To modify gold use this:
    Code:
    player:ModUInt32Value(1546, amount)
    And to set gold use this:
    Code:
    player:SetUInt32Value(1546, value)
    Can you explain these SetUInt32Value's ? Never seen those before heh
    I have an idea of what they do. They obviously can confirm and modify a value. Can you elaborate a bit more as too how they work?
    Last edited by AngelSandy; 04-29-2009 at 01:39 AM.

  12. #12
    AngelSandy's Avatar Member
    Reputation
    19
    Join Date
    Jan 2009
    Posts
    330
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *Bump*
    Please? Anyone?

Similar Threads

  1. [N00b question] LUA and mangos????
    By jeremy7271 in forum WoW EMU Questions & Requests
    Replies: 9
    Last Post: 07-04-2009, 06:58 AM
  2. Lua and Death state questions
    By stoneharry in forum WoW EMU Questions & Requests
    Replies: 7
    Last Post: 10-26-2008, 02:34 PM
  3. Uldaman For Shards and Gold
    By Jechob in forum World of Warcraft Exploits
    Replies: 15
    Last Post: 04-30-2007, 04:10 PM
  4. Earn easy AD rep and gold
    By KuRIoS in forum World of Warcraft Exploits
    Replies: 2
    Last Post: 08-10-2006, 01:47 PM
All times are GMT -5. The time now is 01:30 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