EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Questnpcs don't work in tutorial or beyond. (https://www.eqemulator.org/forums/showthread.php?t=41817)

Tegila 04-01-2018 01:36 AM

along those same lines and joining with the fabled discussion elsewehre, would this work for enabling the fableds taht at least have loottables and are spawned normally and setting their spawnrate to 3% (for yearround availability)?

Quote:

UPDATE spawn2 SET enabled = 1 WHERE npc_types.name LIKE '%Fabled%';
UPDATE spawnentry SET chance = 3 WHERE npc_types.name LIKE '%Fabled%' AND spawngroupid > 1;

GRUMPY 04-01-2018 02:52 AM

What you're looking at doing is not that simple. It's not just a matter of "enabling" the fabled mobs,
first they have to be added to the spawn tables. All those NPC's you see in the npc_types table,
they exist in the database, but in the case of some, like "fabled", they need to be added to
the spawn table BEFORE you can set the enabled value.(and other values within the spawn tables
that you created. There is mass queries that can be made to do the job, but every NPC in that
database has it's own unique npcID (number), so writing that whole query would take some time to
include ALL npc's with the name "fabled" and their assigned npcID.

Tegila 04-01-2018 03:09 AM

Quote:

Originally Posted by GRUMPY (Post 258085)
What you're looking at doing is not that simple. It's not just a matter of "enabling" the fabled mobs,
first they have to be added to the spawn tables. All those NPC's you see in the npc_types table,
they exist in the database, but in the case of some, like "fabled", they need to be added to
the spawn table BEFORE you can set the enabled value.(and other values within the spawn tables
that you created. There is mass queries that can be made to do the job, but every NPC in that
database has it's own unique npcID (number), so writing that whole query would take some time to
include ALL npc's with the name "fabled" and their assigned npcID.

thats why i was just turning on the ones that were in spawn2 in the first place and assuming if they dont get turned on they have no loottable or are scripted, though some in spawn2 have no loottable anyway im seeing, but not many.


im going through manually atm and writing down the ids of all the ones that actually have fabled loot on them, not jsut loottables (many have no fabled items in their loottables) but that'll be a lot more lines to enable, though prevents fabled mobs with no fabled loot lol.

im not expecting to run the "enabled = 1" line and every fabled in the database magically has a loottable and is fully populated in the spawn tables, i was just looking to turn on the ones that are already in the spawn tables. And I have....the most worthwhile group/solo-able ones (big raid ones are not completed or really even relevant to me atm) are present, like all the swarm-pet weapons and whatnot. might be 1 or 2 missing, i gotta dig into that but they appear to be all there.

a lot of the others i'm going to have to populate their loottables with their actual fabled items before i even bother

i am seeing the AND spawngroupid > 1 is completely pointless, but i didnt watn to jsut assume in that case. i know to be in spawn2 they must have a spawngroupid, but i wasnt sure when i wrote that if the qualifier was needed for spawnentry. however, the line to set their spawnrate is definitely not going to work without then subtracting 3 from its nonfabled version or some junk mob which would have to be in same line i would think because Math, but how to take a value in the table and add three... * + 3 ?. i may just want to do that one by hand. do a SELECT to pull up similar to that script, then with the npcid's alter 1 by 1. i may just leave the spawn chance alone for those with spawn groups, unless i find theyre too high.

So if wanting to write that it would be
Quote:

UPDATE spawnentry SET chance = * - 3 WHERE npc_types.name NOT LIKE '%Fabled%';
UPDATE spawnentry SET chance = 3 WHERE npc_types.name LIKE '%Fabled%';
being that the subtraction has to be before the addition, if it even matters, if that syntax would even remotely work ( would it be '* - 3' or `* - 3` or..i have no idea, and having it find a mob with same name as the fabled but without the_fabled...i dont think that can be done without some serious convolutedness. so, i could jsut run the second line there after subtracting 3 from nonfableds but thats kinda pointless. I could just do a query for the spawnentries then find the next rarest spawn and go from there, but al lthat is just silly. most if not all the fableds that DO have spawns set up, are already set at 5. that's good enough for me, but i can edit those easier in goerges if need be. but i do need to create all the rest of them, and put the right loot on the ones that dont even have loot and THEN their spawns, and finally add all the oens that arent even in teh db - thats the seriously tedium lol.

c0ncrete 04-01-2018 04:57 AM

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
}


Tegila 04-01-2018 05:08 AM

is there some modifier to merchant prices that's like 20x? been looking but cant find, however my 2pp stuff is 41+ pp and the 20k stuff has more digits than it can handle and goes negative lol
i know faction and charisma..but not 20x the price.

the merchant price update worked great otherwise. but 2000cp is not 41pp in any way shape or form


I am building the spawntables for those with actual fabled loot already there, 1 at a time but it's quick the way i have my list set up. the stuff that alreayd had spawntables i activated and got 1/3 of the rest already done. but thats still only about half of what's in the database, and thats about 1/3 of what's on Live so.. 1 step at a time. half the fableds in this list ive never even heard of, but im not oldschool eq, i started during TBS

GRUMPY 04-01-2018 07:47 AM

Quote:

Originally Posted by Tegila (Post 258089)
is there some modifier to merchant prices

Tegila - did you not see my reply to this post here ??

http://www.eqemulator.org/forums/sho...086#post258086

You're all over these boards with questions, you might want keep track of your posts.

Tegila 04-01-2018 10:07 PM

no i hadnt seen that particular response when i made that post. i'd figured out how to mass change the first line, then i found the modifier later and fixed without coming back here, just took a loooot of squinting lol.

i had been checking all the diff threads (also why i dont like starting new for each question) but id missed that one when i asked here. but i hadnt really asked for code there either, but a way to use tools like georges or shendares to do mass changes, so i didnt think it'd be relevant codewise and didnt look.


All times are GMT -4. The time now is 01:06 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.