[Lua] Item Adder & Logging System menu

User Tag List

Results 1 to 13 of 13
  1. #1
    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)

    [Lua] Item Adder & Logging System

    Item Adder

    What is it?

    - It is a Script that allows certain ranks to input a item id into a npc and get that item back in return.
    - It logs the transaction with details of the character/account/time/item/date.

    Cool, Can I use it for players?

    Sure, you can just remove the requirement out of the script or change the rank requirement from a & az to a custom rank such as g for example which could be a VIP rank on your server.





    The SQL: *You need this to log the transactions!
    Code:
    SET FOREIGN_KEY_CHECKS=0;
    DROP TABLE IF EXISTS `item_logs`;
    CREATE TABLE `item_logs` (
      `Entry` int(10) unsigned NOT NULL auto_increment COMMENT 'Unique ID',
      `Character` text collate latin1_general_ci,
      `Account` text collate latin1_general_ci,
      `Rank` text collate latin1_general_ci,
      `Item ID` decimal(10,0) default NULL,
      `Date` date default NULL,
      `Time` time default NULL,
      PRIMARY KEY  (`Entry`)
    ) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
    The Script:
    Lua | local NPC_ID = 90000 functi - Ground Zero - xLzE5g86 - Pastebin.com


    Enjoy.

    Thanks to pedobear (stoneharry) for fixing sql fails.
    Last edited by Ground Zero; 03-21-2010 at 03:49 PM.

    [Lua] Item Adder & Logging System
  2. #2
    Allstar .ιllιlı.'s Avatar Banned
    Reputation
    284
    Join Date
    Jan 2009
    Posts
    481
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seen this system before. Still, great release.

  3. #3
    Hellgawd's Avatar Member
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks good, Ground Zero.
    Would be nice to see you implement more features into this as time progresses, but this is nice even within itself. +8

  4. #4
    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)
    I'm going to add some extra stuff in my spare time, considering adding something sexy which I havn't seen released yet, but it's a secret.

  5. #5
    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)
    You didn't mention which table to execute the query into... Also credits to who? >.>

  6. #6
    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)
    Originally Posted by stoneharry View Post
    You didn't mention which table to execute the query into... Also credits to who? >.>
    Obviously world. -.-

    And yes thank you for reminding me, you did help me fix damn sql fails.

  7. #7
    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)
    Originally Posted by Ground Zero View Post
    Obviously world. -.-

    And yes thank you for reminding me, you did help me fix damn sql fails.
    Well I always use char/logon DB for storing anything related to characters. xD So it's not obviously world.

  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)
    Originally Posted by stoneharry View Post
    Well I always use char/logon DB for storing anything related to characters. xD So it's not obviously world.

    You're just special.

  9. #9
    Aldun's Avatar Banned
    Reputation
    616
    Join Date
    Feb 2009
    Posts
    1,365
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An item* not a =] Anyone, nice job

  10. #10
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all, am I honestly the only one who does not see the point of this script? If they're admins or regular GMs they can add the items anyway. If you change it to a donation rank you're going to need to add some filters because you don't want donaters running around with 2 martin furies or something.

    Secondly, you can easily merge the two date/time columns together by allowing the mysql server itself to fill the data. (Although it's more of a cosmetic thing than anything)

    Thirdly, you're wasting performance by calling
    Code:
                            local PlayerName = player:GetName()
                            local AccountName = player:GetAccountName()
                            local Rank = player:GetGmRank()
    before checking whether the query returned something. You're not going to be using those values if the query didn't return anything thus you could've been saving memory and cpu.

    Fourthly, work on your indentation, although it is still part of your personal style of writing keep it consistent! Yours is all over the place.

    Fifthly, no need for additional concatenation on
    Code:
    "SELECT * FROM items WHERE entry = "..code..""
    Anyway, I'm not trying to sound like an ass and sorry if I do, but it seems like nowadays people get rewarded for being ignorant. I would have forgiven some of your mistakes if you were new to Lua - but you're not and I think I recall seeing some of the made mistakes before. Fix some of the points above and you'll have my rep.
    Last edited by Dynashock; 03-21-2010 at 04:59 PM.
    Ignorance is bliss.

  11. #11
    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)
    Well thanks for your honest feedback Dyna, I appreciate that, nobody else can be bothered or havn't got the guts to say that, so thanks.

    Thanks for the advice, i'll keep it in mind.

  12. #12
    trujillo's Avatar Member
    Reputation
    4
    Join Date
    Jun 2008
    Posts
    111
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is a very nice system groundzero
    a idea for additions could be spells also? just a thought
    or maybe something along those lines

    edit: i just thought of another idea that could be added in to this. have a table where there is 2 columns one column for the entry id of items, one for the name of the item so the player can manually add and delete items from the table and instead of checking for the item in the normal items table you can have it check in that table for the item, this just allows the server to set only certain items can be obtained through this script

    and you could also have a way to add the item to the table from the npc if your a gm
    Last edited by trujillo; 03-22-2010 at 03:02 PM.

  13. #13
    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)
    Ehhh, leaned-down exact copy of my "Bob the vendor" script, just in lua...

    p.s. The SQL in your script is insecure. I realize it's only for GMs, but if one of your GMs were to want to screw you...
    Last edited by Jotox; 03-22-2010 at 05:26 PM.

Similar Threads

  1. [Lua] Item Bank
    By Trle94 in forum WoW EMU General Releases
    Replies: 6
    Last Post: 12-20-2009, 06:31 AM
  2. [Request] Lua Item
    By Tikki100 in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 12-02-2009, 12:58 PM
  3. [RELEASE] Item Adder for ArcEmu 3.2.0
    By Blackboy0 in forum WoW EMU Programs
    Replies: 3
    Last Post: 09-24-2009, 11:04 PM
  4. [FrostTeam] LUA Item Teleporter
    By Edude in forum WoW EMU General Releases
    Replies: 45
    Last Post: 02-17-2009, 03:00 AM
  5. [Help!] Character items dissapear after logging out
    By username99 in forum World of Warcraft Emulator Servers
    Replies: 15
    Last Post: 02-20-2008, 12:22 PM
All times are GMT -5. The time now is 03:03 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