Newspaper Item menu

User Tag List

Results 1 to 5 of 5
  1. #1
    Sokoloft's Avatar Corporal
    Reputation
    1
    Join Date
    Aug 2010
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Newspaper Item

    I want to make something to were I can make like a newspaper and put text into it and make it so it goes to every players inventory in the realm. Almost like a newspaper type thing, and how do I make it so I can update it every week? What i'm trying to say is that I want pretty much a piece of paper to spawn in players inventory every week, that I can put information like updates and stuff like that. Or if I could use the mailboxes that would work to. Please help! PS, i'm using arcemu.
    Last edited by Sokoloft; 12-25-2010 at 07:53 PM.

    Newspaper Item
  2. #2
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You could do something like this:
    Code:
    local News_ID = 192 -- Change to the ID of your newspaper
    
    function Update_Newspaper_Timer()
        for a, plrs in pairs(GetPlayersInWorld()) do -- Get all the players in the world
            if plrs:HasItem(News_ID) == false then
                plrs:AddItem(News_ID, 1) -- Add 1 of the news ID if the player doesn't have one already
                plrs:SendBroadcastMessage("The latest newspaper was added to your inventory!")
                plrs:SendAreaTriggerMessage("The latest newspaper was added to your inventory!")
            end
        end
    end
    
    RegisterTimedEvent("Update_Newspaper_Timer", 30000, 0) -- Call the function every 30 seconds
    That directly adds to inventory, if you find out how the mail system works you could use:
    Code:
    CharDBQuery("INSERT INTO `mail` VALUES `"..player:GetGUID()..",1,2525,Hello,This Is a message")
    etc etc

    That would currently work as a Lua script, although take it as pseudo code.

    If it was used as a Lua script then you could use the reloading function to reload the script when you change the item ID so you don't need to restart the server for changes to take effect.

    Alternatively, you could simply have it read the first line of a text file and get the ID from that every x seconds. You wouldn't need to read it every 30 seconds either (as that puts more load on server resources if you care about that sort of thing). Have a separate function that calls every 600 seconds instead and have that update the local variable to the ID read from the text file.
    Last edited by stoneharry; 12-26-2010 at 05:37 AM.

  3. #3
    Sokoloft's Avatar Corporal
    Reputation
    1
    Join Date
    Aug 2010
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, so that would pretty much insert it into there inventory. So what I could do is go on wow-v and make a book item, put that ever text I wanted into that item and put an id for it, like say 21 and change the code from
    Code:
    local News_ID = 21 -- Change to the ID of your newspaper
    and btw, i'm kinda new at lua coding, so would I keep the information thats after the --

  4. #4
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Yes and up to you. -- = a comment, so wherever there is -- anything after that on the same line is ignored (only for you to read as it explains stuff).

  5. #5
    Sokoloft's Avatar Corporal
    Reputation
    1
    Join Date
    Aug 2010
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, thanks very much!

Similar Threads

  1. Dupe Quest items,
    By Krazzee in forum World of Warcraft Exploits
    Replies: 30
    Last Post: 12-28-2006, 02:50 PM
  2. Full Guide for Dungeon Set 1 items (all classes)
    By Cush in forum World of Warcraft Guides
    Replies: 13
    Last Post: 09-07-2006, 03:07 PM
  3. Informative WoW Items Site
    By Lonsdale in forum World of Warcraft General
    Replies: 1
    Last Post: 05-31-2006, 12:17 AM
  4. Double Disenchant items MAKE TONS OF GOLD
    By Matt in forum World of Warcraft Exploits
    Replies: 16
    Last Post: 04-05-2006, 03:07 AM
  5. Replies: 1
    Last Post: 03-20-2006, 12:16 AM
All times are GMT -5. The time now is 10:44 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