Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #37  
Old 04-01-2018, 04:57 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

It's probably best if you work out a way to do it programatically and to log your changes so you can easily revert with granular control. I'm slowly putting together something for similar reasons myself. I'll be looking for any item not currently obtainable via drops, tradeskills, quests, etc and will be giving them a small chance at dropping globally via script instead of global loot tables.

Code:
use Modern::Perl;

# custom modules
use EQEmu::Database;
use EQEmu::Util 'debug';
no warnings 'EQEmu::Database::empty';
my $dbh = EQEmu::Database->new;

# logging
use FileHandle;
my $log = FileHandle->new("> test_SQL.out");
$log->autoflush(1);

# variables
my $sql = ''; # for queries
my $res = (); # for results

# get all item ids and names
$sql = 'SELECT id, Name FROM items';
my $all_items = {
    map {
        $_->{id},
        $_->{Name}
    } @{$dbh->Query($sql)}
};

while (my ($itemID, $itemName) = each $all_items) {

    # look for lootdrop entries for current item
    $sql = "SELECT lootdrop_id FROM lootdrop_entries WHERE lootdrop_entries.item_id = $itemID";
    $res = $dbh->Query($sql);

    # no lootdrop entry found
    unless ($res) {
        say $log "INFO: no lootdrop entry found for $itemID [ $itemName ]";
        # TODO: check tradeskill yields (parse output from another query)
        # TODO: check quest rewards (parse scripts for summoning of itemID)
        next;
    }

    # lootdrop entry found
    say $log "INFO: ".@$res." lootdrop entries found for $itemID [ $itemName ]";
    # TODO: validate lootdrop entry
    # TODO: validate loottable entry
    # TODO: validate spawn, etc
}
__________________
I muck about @ The Forge.
say(rand 99>49?'try '.('0x'.join '',map{unpack 'H*',chr rand 256}1..2):'incoherent nonsense')while our $Noport=1;
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:43 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3