[Lua] Account & Player Manager menu

User Tag List

Results 1 to 12 of 12
  1. #1
    Dr. Cheasterfield's Avatar Contributor

    Reputation
    89
    Join Date
    Jun 2009
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Account & Player Manager

    Account & Player Manager
    Hello my friends,
    I've found a new challenge And guess what, I succeeded it.
    It's called Account and Player Manager, a little NPC writed in Lua, with some SQL QUERY, who will give you the possibility to change :
    - Your login name.
    - Your account's password.
    - Your character's name.
    - Your character's gender.

    You will need to enable the Character DB Queries in your optional config.

    An amazing little script for your players, an AccManager in game.

    Code:
    --[[ 
    Account/Player Manager InGame 
    Script by  Dr. Cheasterfield 
    Please do not leech, or post on an other board.
    --]]
    
    local AccMan.NPC_ID = 99999
    
    --[[
    SQL QUERY SETTINGS DO NOT TOUCH !
    --]]
    
    local PLR-IN = player:GetName()
    local Plr_IDAcc = CharDBQuery("SELECT acct FROM characters WHERE name = '"..PLR-IN.."'", 0)
    local Plr_NAMEAcc = CharDBQuery("SELECT login FROM accounts WHERE acct = '"..Plr_IDAcc.."'", 0)
    local Plr_PASSWORDAcc = CharDBQuery("SELECT password FROM accounts WHERE acct = '"..Plr_IDAcc.."'", 0)
    local Verif_Name = CharDBQuery("SELECT login FROM accounts WHERE login ='"..code.."'", 0)
    local Verif_Plr.Name = CharDBQuery("SELECT name FROM characters WHERE name ='"..code.."'", 0)
    local Plr_Gender = player:GetGender()
    
    --[[
    Events
    --]]
    
    function AccMan_Gossip(pUnit, event, player)
            if (player:IsInCombat() == true) then
    			player:SendAreaTriggerMessage("You are in combat!")
    	    else
    			pUnit:GossipCreateMenu(50, player, 0)
    			pUnit:GossipMenuAddItem(0, "Manage your Account.", 1, 1) 
    			pUnit:GossipMenuAddItem(0, "Manage your Player ["..PLR-IN.."].", 2, 1)
    			pUnit:GossipMenuAddItem(0, "Leave", 3, 0)
    			pUnit:GossipSendMenu(player)
    		end
     end
    
    function AccMan_Actions(pUnit, event, player, id, intid, code)
    		if (intid == 1) then
    		-- Account Manage options
    		pUnit:GossipCreateMenu(50, player, 0)
    		pUnit:GossipMenuAddItem(0, "Change your Accountname.", 4, 1)
            pUnit:GossipMenuAddItem(0, "Change your Password.", 5, 1) 
            pUnit:GossipMenuAddItem(0, "Leave", 3, 0)
            pUnit:GossipSendMenu(player)		
            end
    		
            if (intid == 2) then
    		-- Player Manage options
    		pUnit:GossipCreateMenu(50, player, 0)
    		pUnit:GossipMenuAddItem(0, "Change your Name.", 6, 1)
    			if (Plr_Gender == 0) then
    			pUnit:GossipMenuAddItem(0, "Become a FEMALE.", 7, 1) 
    			else
    			pUnit:GossipMenuAddItem(0, "Become a MALE.", 7, 1)
    			end
            pUnit:GossipMenuAddItem(0, "Leave", 3, 0)
            pUnit:GossipSendMenu(player)		
            end
    					
    		if (intid == 3) then
    		-- Leave Gossip 
    		player:GossipComplete(player)
    		end
    		
    		if (intid == 4) then
    		-- Login Manage
    		if (Verif_Name == code) then
    		    player:SendBroadcastMessage("Login already used !")
    			player:GossipComplete()	
    		else
    			CharDBQuery("UPDATE accounts SET login = '"..code.."' WHERE acct = '"..Plr_IDAcc.."'", 0)
    			player:SendBroadcastMessage("Your login ["..Plr_NAMEAcc.."] is succesfully changed to ["..code.."]. It will take effect after your next connection.")
    			player:GossipComplete()
    		end
    		end
    		
    		if (intid == 5)
    		-- Password Manage
    		CharDBQuery("UPDATE accounts SET password = '"..code.."' WHERE acct = '"..Plr_IDAcc.."'", 0)
    		player:SendBroadcastMessage("Your password ["..Plr_PASSWORDAcc.."] is succesfully changed to ["..code.."]. It will take effect after your next connection.")
    		player:GossipComplete()
    		end
    		
    		if (intid == 6)
    		-- Character Name Manage
    		if (Verif_Plr.Name == code) then
    		    player:SendBroadcastMessage("Name already used !")
    			player:GossipComplete()	
    		else
    			CharDBQuery("UPDATE characters SET name = '"..code.."' WHERE acct = '"..Plr_IDAcc.."'", 0)
    			player:SendBroadcastMessage("Your character's name ["..PLR_IN.."] is succesfully changed to ["..code.."]. It will take effect after your next connection.")
    			player:GossipComplete()
    		end
    		
    		if (intid == 7)
    			if (Plr_Gender == 0) then
    			player:SetGender(1)
    			player:SendBroadcastMessage("Your character's gender is succesfully changed to FEMALE. It will take effect after your next connection.")
    		    player:GossipComplete()
    			else
    			player:SetGender(0)
    			player:SendBroadcastMessage("Your character's gender is succesfully changed to MALE. It will take effect after your next connection.")
    		    player:GossipComplete()
    		end
    	end
            
    RegisterUnitGossipEvent(AccMan.NPC_ID, 1, "AccMan_Gossip")
    RegisterUnitGossipEvent(AccMan.NPC_ID, 2, "AccMan_Actions")
    Enjoy !
    Last edited by Dr. Cheasterfield; 01-29-2010 at 04:17 PM.

    [Lua] Account & Player Manager
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    A grammar error, "Became" should be "Become". Also people may need to enable character DB queries in there optional config, but not sure if this was fixed in newer revisions of LuaHypArc.

  3. #3
    Dr. Cheasterfield's Avatar Contributor

    Reputation
    89
    Join Date
    Jun 2009
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Corrected. Yes, people will need to enable character DB queries, and It's working

  4. #4
    Hyldran0's Avatar Contributor
    Reputation
    118
    Join Date
    Nov 2008
    Posts
    374
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh damn that's sweet ! Nice one! +rep !

    Edit: Damn need to spread
    Last edited by Hyldran0; 01-29-2010 at 04:07 PM. Reason: I gotta Spread ! :( Sorry
    Shit's Gone Real

  5. #5
    Dr. Cheasterfield's Avatar Contributor

    Reputation
    89
    Join Date
    Jun 2009
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks dude, don't worry ! It's a pleasure !

    Script Updated :
    ++ Login & CharName : Some verifications added for no duplications.

  6. #6
    Reflection's Avatar Legendary
    Reputation
    783
    Join Date
    Mar 2008
    Posts
    3,377
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looking good! Don't think I can rep you again yet.

    Freelance Digital Artist
    https://reflectionartwork.deviantart.com
    You did not desert me
    My brothers in arms


  7. #7
    Dr. Cheasterfield's Avatar Contributor

    Reputation
    89
    Join Date
    Jun 2009
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man don't worry

  8. #8
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,503
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yet another brilliant release from you, keep it up.

  9. #9
    Dr. Cheasterfield's Avatar Contributor

    Reputation
    89
    Join Date
    Jun 2009
    Posts
    61
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yet another thanks =)

  10. #10
    kerovi's Avatar Member
    Reputation
    5
    Join Date
    Sep 2009
    Posts
    30
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got this error, unexpected symbol near "."
    Any way how to solve this?

  11. #11
    marijnz's Avatar Member
    Reputation
    4
    Join Date
    Mar 2007
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kerovi View Post
    I got this error, unexpected symbol near "."
    Any way how to solve this?
    Got the same problem..

    EDIT:

    THis is just one of many many probs, is this really compatible with Arcemu btw..?

    EDIT:

    Now I see it.. outdated :/
    Last edited by marijnz; 09-17-2010 at 07:21 PM.

  12. #12
    Meiya Stormsinger's Avatar Contributor

    Reputation
    163
    Join Date
    Mar 2009
    Posts
    196
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should be updated imo, it's a neat script...

Similar Threads

  1. [Selling] (SE)Mists of Pandaria Account - Vet Player looking to move on
    By Druidmoonkinkk in forum WoW-US Account Buy Sell Trade
    Replies: 9
    Last Post: 02-04-2013, 09:23 AM
  2. Free WoW Account...quiting player
    By VoiceofMMO in forum World of Warcraft General
    Replies: 4
    Last Post: 10-20-2012, 05:34 PM
  3. [LUA] - Distance between player and unit.
    By Synnoid in forum WoW UI, Macros and Talent Specs
    Replies: 1
    Last Post: 09-08-2012, 09:01 AM
  4. [MaNGOS] Account and character management
    By frostgetz in forum WoW EMU Questions & Requests
    Replies: 6
    Last Post: 04-08-2010, 02:04 PM
  5. PlrAcc [Advanced DB Player Management]
    By Envoke in forum WoW EMU Programs
    Replies: 13
    Last Post: 07-02-2009, 09:59 PM
All times are GMT -5. The time now is 01:34 PM. 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