This is a discord bot that I put together that will look up an in game item and generate the proper syntax for adding the item to your advloot filter files located in your game client userdata folder.
ie.
In discord type: !advlookup Blue Diamond
it returns: 22503^9644^Blue Diamond
[CODE lang="python" title="ADVLootBot"]
#!/usr/bin/python3.6
# Program Name: ADVLoot-Discord.py
# 'ADVLoot Discord Bot for EverQuest'
# Original Author: TheDank
# Python Version: 3.6
# Original Date: 5/7/2020
# Last Revision: 5/7/2020
# Purpose: This program will parse item input from discord and return the proper ADVLoot loot ini file item syntax.
# Dependencies: Python 3 && discord module
# python3 -m pip install --user -U discord.py[voice] # discord module
# Note: This program requires the items.txt file from "http://items.sodeq.org/download.php"
# This file is part of ADVLoot-Discord.py.
# ADVLoot-Discord is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# ADVLoot-Discord is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# see <http://www.gnu.org/licenses/>.
import subprocess
import time
import sys
import os
import discord
import asyncio
import csv
from discord.ext import commands
#### MAIN PROGRAM ####
### USER DEFINED SETTINGS ###
## Discord specific settings ##
## Obtain via 'developer mode' in Discord and by right clicking on the channel, then choose copy id ##
# general chat channel ID on discord server
CHAT_ID = <insert your channel ID here>
# Discord Bot TOKEN - DO NOT SHARE!
# Obtained from your Discord applications page under your registered Bot for this application
TOKEN = '<insert your bot token ID here>'
### END USER DEFINED SETTINGS ###
# program banner
print("\n\nStarting The EverQuest ADVLoot Item Discord Bot\n")
print("Press Ctrl+C to exit\n")
# start up the bot and log in to discord
client = discord.Client()
# start up the bot
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('----------')
# some bot commands for testing and information
@client.event
async def on_message(message):
if message.content.startswith('!test'):
counter = 0
channel = message.channel
tmp = await channel.send('Calculating messages...')
async for message in channel.history(limit=100):
if message.author == client.user:
counter += 1
await channel.send(counter)
# Lookup DKP
elif message.content.startswith('!advhelp'):
channel = message.channel
await channel.send('Hello, my name is ADVLootBot and my creator is TheDank. I am here to help you populate your LF_AN_<CHARNAME>_server.ini file with the proper item syntax. Use the following format to request the item line to insert into the file: !advlookup <itemname>', tts=False)
elif message.content.startswith('!advlookup'):
channel = message.channel
msg = message.content.split(" ")
msglist = msg[1:]
itemSearch = ' '.join(map(str, msglist))
print(itemSearch)
# open and parse items.txt file
with open('items.txt', 'r', newline='') as csvfile:
readCSV = csv.reader(csvfile, delimiter='|')
for row in readCSV:
itemName = row[1]
itemID = row[5]
itemIconID = row[13]
if itemName.lower() == itemSearch.lower():
advline = itemID+'^'+itemIconID+'^'+itemName
await channel.send(advline)
# run the bot using the TOKEN
client.run(TOKEN)
[/CODE]
Enjoy!
ie.
In discord type: !advlookup Blue Diamond
it returns: 22503^9644^Blue Diamond
[CODE lang="python" title="ADVLootBot"]
#!/usr/bin/python3.6
# Program Name: ADVLoot-Discord.py
# 'ADVLoot Discord Bot for EverQuest'
# Original Author: TheDank
# Python Version: 3.6
# Original Date: 5/7/2020
# Last Revision: 5/7/2020
# Purpose: This program will parse item input from discord and return the proper ADVLoot loot ini file item syntax.
# Dependencies: Python 3 && discord module
# python3 -m pip install --user -U discord.py[voice] # discord module
# Note: This program requires the items.txt file from "http://items.sodeq.org/download.php"
# This file is part of ADVLoot-Discord.py.
# ADVLoot-Discord is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# ADVLoot-Discord is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# see <http://www.gnu.org/licenses/>.
import subprocess
import time
import sys
import os
import discord
import asyncio
import csv
from discord.ext import commands
#### MAIN PROGRAM ####
### USER DEFINED SETTINGS ###
## Discord specific settings ##
## Obtain via 'developer mode' in Discord and by right clicking on the channel, then choose copy id ##
# general chat channel ID on discord server
CHAT_ID = <insert your channel ID here>
# Discord Bot TOKEN - DO NOT SHARE!
# Obtained from your Discord applications page under your registered Bot for this application
TOKEN = '<insert your bot token ID here>'
### END USER DEFINED SETTINGS ###
# program banner
print("\n\nStarting The EverQuest ADVLoot Item Discord Bot\n")
print("Press Ctrl+C to exit\n")
# start up the bot and log in to discord
client = discord.Client()
# start up the bot
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('----------')
# some bot commands for testing and information
@client.event
async def on_message(message):
if message.content.startswith('!test'):
counter = 0
channel = message.channel
tmp = await channel.send('Calculating messages...')
async for message in channel.history(limit=100):
if message.author == client.user:
counter += 1
await channel.send(counter)
# Lookup DKP
elif message.content.startswith('!advhelp'):
channel = message.channel
await channel.send('Hello, my name is ADVLootBot and my creator is TheDank. I am here to help you populate your LF_AN_<CHARNAME>_server.ini file with the proper item syntax. Use the following format to request the item line to insert into the file: !advlookup <itemname>', tts=False)
elif message.content.startswith('!advlookup'):
channel = message.channel
msg = message.content.split(" ")
msglist = msg[1:]
itemSearch = ' '.join(map(str, msglist))
print(itemSearch)
# open and parse items.txt file
with open('items.txt', 'r', newline='') as csvfile:
readCSV = csv.reader(csvfile, delimiter='|')
for row in readCSV:
itemName = row[1]
itemID = row[5]
itemIconID = row[13]
if itemName.lower() == itemSearch.lower():
advline = itemID+'^'+itemIconID+'^'+itemName
await channel.send(advline)
# run the bot using the TOKEN
client.run(TOKEN)
[/CODE]
Enjoy!

