Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-02-2018, 09:46 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default Rebuilding the Old Bazaar

I seem to have gotten to a point now where I am not sure what to do, and hoping someone can point me in the right direction.

At the moment I can/have...

Zone into the old Bazaar (although not where I want!)
Most NPC's in place (think I am just missing the gnome that sells spells on the second floor of the trades building now)
All merchants loaded
Trader stalls working (Thanks N0ctrnl for your work on that in your Old Bazaar post)

Problems I am running into...

/bazaar brings up the bazaar search window, but does not work (won't list traders or find items, find trader and update traders buttons stay grayed out).

Also I get both "Welcome to The Bazaar!" messages when entering the zone. The original for /bazaar and /trader and the newer one for /barter and /buyer. The message pops up in my chat box 3 times in a row on zone in.

For both of these I have no clue where to start.

M̶y̶ ̶n̶e̶x̶t̶ ̶p̶r̶o̶b̶l̶e̶m̶ ̶i̶s̶ ̶m̶y̶ ̶z̶o̶n̶e̶ ̶l̶i̶n̶e̶s̶ ̶a̶r̶e̶ ̶o̶f̶f̶.̶ ̶I̶s̶ ̶t̶h̶i̶s̶ ̶j̶u̶s̶t̶ ̶a̶ ̶f̶i̶x̶ ̶o̶f̶ ̶g̶o̶i̶n̶g̶ ̶i̶n̶t̶o̶ ̶t̶h̶e̶ ̶z̶o̶n̶e̶_̶p̶o̶i̶n̶t̶s̶ ̶t̶a̶b̶l̶e̶ ̶a̶n̶d̶ ̶c̶h̶a̶n̶g̶i̶n̶g̶ ̶t̶h̶e̶ ̶x̶,̶ ̶y̶,̶ ̶z̶ ̶a̶n̶d̶/̶o̶r̶ ̶t̶a̶r̶g̶e̶t̶_̶x̶,̶y̶,̶z̶ ̶f̶o̶r̶ ̶T̶h̶e̶ ̶B̶a̶z̶a̶a̶r̶,̶ ̶S̶h̶a̶d̶o̶w̶ ̶H̶a̶v̶e̶n̶,̶ ̶T̶h̶e̶ ̶N̶e̶x̶u̶s̶ ̶a̶n̶d̶ ̶P̶o̶K̶?̶

The last thing would be the missing doors on the two small bank buildings (I think I remember there being doors on them?). Again for this I am not sure where to start.

After writing this and thinking about other stuff still needed I realize I am not as close to done as I thought! :(
Reply With Quote
  #2  
Old 01-02-2018, 10:04 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

I got Nexus zone in working so I should be able to get the other zone lines figured out.
Reply With Quote
  #3  
Old 01-02-2018, 11:19 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

There may be posts around here for this info..but, here's a couple of bits of what I remember when I was working on it...


There is something hard-coded in the client (newer ones?) that looks for zone id. Might have to do with the client's '/trader' command (memory fails for absolute use...)

I believe that every zone change packet sent by the client is also accompanied by a bazaar status update packet - not sure which clients affect this behavior.

Reliable purchasing is still unavailable for RoF+ clients due to the lack of item guid tags in the server code. Older clients have a bug in regards to certain stackable items
and this change did resolve that issue.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #4  
Old 01-03-2018, 06:42 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

Quote:
There may be posts around here for this info..but, here's a couple of bits of what I remember when I was working on it...
Yes I have spent the last couple days reading and re-reading anything I can find on this. It's starting to seem most of the remaining stuff will just be out of my league, with what little I have learned so far over the past few months.

Here is a screenshot of the repeating message I get on zoning into the Bazaar. Would anyone be able to explain why this is occurring and if this is something I could fix? I don't think this helps at all, but I deleted the buyer table to see what would happen. It did remove the "There are 0 Buyers......use /buyer to set up your own Buy Lines." text (while giving me an SQL error in game).

https://imgur.com/a/1YjGh

I am guessing this is linked also to why my Bazaar window does not work properly?
Reply With Quote
  #5  
Old 01-03-2018, 08:38 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

https://github.com/EQEmu/Server/blob...ding.cpp#L1750

https://github.com/EQEmu/Server/blob...cket.cpp#L1094

Those will get you into the neighborhood of the buyers message.


https://github.com/EQEmu/Server/blob...cket.cpp#L3657

https://github.com/EQEmu/Server/blob...ding.cpp#L1754

Same for bazaar search...


I definitely can't guarantee that anything you change in those functions will help you along the way..but, that is where both activities are handled.

You might try turning on 'gmsay' log output and watching any related messages.

When I work on a system, I usually do that so that I can monitor actual packet flow associated with any activity.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #6  
Old 01-03-2018, 09:58 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

Yep way out of my league! On the bright side, you have given me something to do now for the foreseeable future.

While I am extremely grateful for things like EoC and Akkas Server Installer (without it I probably would have never tried any of this), it's a double edge sword for me. Feeling like I should know a lot of things that I don't (like #log!).

I wasn't sure what you meant by gmsay logs but I found the Logging System Overhaul wiki page.

I hope you don't mind me asking one more question? How do I access the client_packet and trading.cpp files?
Reply With Quote
  #7  
Old 01-03-2018, 10:44 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Assuming you're on windows, you'll need to (at least...)


http://wiki.eqemulator.org/p?Complet...top-windows-7-

http://wiki.eqemulator.org/p?Complet...or-windowsnbsp

http://wiki.eqemulator.org/p?Complet...load-cmakenbsp


http://wiki.eqemulator.org/p?Complet...indows-desktop

http://wiki.eqemulator.org/p?Complet...-to-everything
(git and cmake only)


http://wiki.eqemulator.org/p?Complet...ing-the-server


That's a heavy-handed description of what's left..but, I believe those are the only things not included in Akkadius's installer script.

At this point, you will no longer need to download pre-compiled binaries through the script..though, you can overwrite any local compiles by using the script downloads.

Step 4d of "Compiling the server" says to 'compile' the server. You want to make any changes to the source code prior to compiling and copying the binaries.

Additionally, any future changes (including code reversions) will need to be recompiled and copied as well.


EDIT:

If you have never compiled source code, the task can seem quite daunting...

It is relatively easy, however. You can start with just compiling the base source code.

To get your feet wet, you can make little changes to messages sent to the client so that you can see the results of what you are doing.

Visual Studio is fairly decent at telling you what is legal coding syntax.

Code:
char a[8] = "1234567"; // correct

char b[8] = "1234567; // complains about missing closing quote
__________________
Uleat of Bertoxxulous

Compilin' Dirty

Last edited by Uleat; 01-03-2018 at 10:50 PM..
Reply With Quote
  #8  
Old 01-03-2018, 11:55 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

Thank you Uleat. I really appreciate your time doing all this.
Reply With Quote
  #9  
Old 01-05-2018, 10:53 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

Just wondering if I am on the correct path to understanding some of this. Sorry that the code snippet is so long.

Code:
	void Client::SendBazaarResults(uint32 TraderID, uint32 Class_, uint32 Race, uint32 ItemStat, uint32 Slot, uint32 Type,
					char Name[64], uint32 MinPrice, uint32 MaxPrice) {

	std::string searchValues = " COUNT(item_id), trader.*, items.name ";
	std::string searchCriteria = " WHERE trader.item_id = items.id ";

	if(TraderID > 0) {
		Client* trader = entity_list.GetClientByID(TraderID);

		if(trader)
			searchCriteria.append(StringFormat(" AND trader.char_id = %i", trader->CharacterID()));
	}

	if(MinPrice != 0)
		searchCriteria.append(StringFormat(" AND trader.item_cost >= %i", MinPrice));

	if(MaxPrice != 0)
		searchCriteria.append(StringFormat(" AND trader.item_cost <= %i", MaxPrice));

	if(strlen(Name) > 0) {
		char *safeName = RemoveApostrophes(Name);
		searchCriteria.append(StringFormat(" AND items.name LIKE '%%%s%%'", safeName));
		safe_delete_array(safeName);
	}

	if(Class_ != 0xFFFFFFFF)
		searchCriteria.append(StringFormat(" AND MID(REVERSE(BIN(items.classes)), %i, 1) = 1", Class_));

	if(Race != 0xFFFFFFFF)
		searchCriteria.append(StringFormat(" AND MID(REVERSE(BIN(items.races)), %i, 1) = 1", Race));

	if(Slot != 0xFFFFFFFF)
		searchCriteria.append(StringFormat(" AND MID(REVERSE(BIN(items.slots)), %i, 1) = 1", Slot + 1));

	switch(Type){
        case 0xFFFFFFFF:
            break;
        case 0:
            // 1H Slashing
            searchCriteria.append(" AND items.itemtype = 0 AND damage > 0");
            break;
        case 31:
            searchCriteria.append(" AND items.itemclass = 2");
            break;
        case 46:
            searchCriteria.append(" AND items.spellid > 0 AND items.spellid < 65000");
            break;
        case 47:
            searchCriteria.append(" AND items.spellid = 998");
            break;
        case 48:
            searchCriteria.append(" AND items.spellid >= 1298 AND items.spellid <= 1307");
            break;
        case 49:
            searchCriteria.append(" AND items.focuseffect > 0");
            break;

        default:
            searchCriteria.append(StringFormat(" AND items.itemtype = %i", Type));
    }

	switch(ItemStat) {

		case STAT_AC:
			searchCriteria.append(" AND items.ac > 0");
			searchValues.append(", items.ac");
			break;

		case STAT_AGI:
			searchCriteria.append(" AND items.aagi > 0");
			searchValues.append(", items.aagi");
			break;

		case STAT_CHA:
			searchCriteria.append(" AND items.acha > 0");
			searchValues.append(", items.acha");
			break;

		case STAT_DEX:
			searchCriteria.append(" AND items.adex > 0");
			searchValues.append(", items.adex");
			break;

		case STAT_INT:
			searchCriteria.append(" AND items.aint > 0");
			searchValues.append(", items.aint");
			break;

		case STAT_STA:
			searchCriteria.append(" AND items.asta > 0");
			searchValues.append(", items.asta");
			break;

		case STAT_STR:
			searchCriteria.append(" AND items.astr > 0");
			searchValues.append(", items.astr");
			break;

		case STAT_WIS:
			searchCriteria.append(" AND items.awis > 0");
			searchValues.append(", items.awis");
			break;

		case STAT_COLD:
			searchCriteria.append(" AND items.cr > 0");
			searchValues.append(", items.cr");
			break;

		case STAT_DISEASE:
			searchCriteria.append(" AND items.dr > 0");
			searchValues.append(", items.dr");
			break;

		case STAT_FIRE:
			searchCriteria.append(" AND items.fr > 0");
			searchValues.append(", items.fr");
			break;

		case STAT_MAGIC:
            searchCriteria.append(" AND items.mr > 0");
			searchValues.append(", items.mr");
			break;

		case STAT_POISON:
			searchCriteria.append(" AND items.pr > 0");
			searchValues.append(", items.pr");
			break;

		case STAT_HP:
			searchCriteria.append(" AND items.hp > 0");
			searchValues.append(", items.hp");
			break;

		case STAT_MANA:
			searchCriteria.append(" AND items.mana > 0");
			searchValues.append(", items.mana");
			break;

		case STAT_ENDURANCE:
			searchCriteria.append(" AND items.endur > 0");
			searchValues.append(", items.endur");
			break;

		case STAT_ATTACK:
			searchCriteria.append(" AND items.attack > 0");
			searchValues.append(", items.attack");
			break;

		case STAT_HP_REGEN:
			searchCriteria.append(" AND items.regen > 0");
			searchValues.append(", items.regen");
			break;

		case STAT_MANA_REGEN:
			searchCriteria.append(" AND items.manaregen > 0");
			searchValues.append(", items.manaregen");
			break;

		case STAT_HASTE:
			searchCriteria.append(" AND items.haste > 0");
			searchValues.append(", items.haste");
			break;

		case STAT_DAMAGE_SHIELD:
			searchCriteria.append(" AND items.damageshield > 0");
			searchValues.append(", items.damageshield");
			break;

		default:
			searchValues.append(", 0");
			break;
	}

    std::string query = StringFormat("SELECT %s, SUM(charges), items.stackable "
                                    "FROM trader, items %s GROUP BY items.id, charges, char_id LIMIT %i",
                                    searchValues.c_str(), searchCriteria.c_str(), RuleI(Bazaar, MaxSearchResults));
    auto results = database.QueryDatabase(query);
    if (!results.Success()) {
		return;
    }

    Log(Logs::Detail, Logs::Trading, "SRCH: %s", query.c_str());

    int Size = 0;
    uint32 ID = 0;

    if (results.RowCount() == static_cast<unsigned long>(RuleI(Bazaar, MaxSearchResults)))
			Message(15, "Your search reached the limit of %i results. Please narrow your search down by selecting more options.",
					RuleI(Bazaar, MaxSearchResults));

    if(results.RowCount() == 0) {
	    auto outapp2 = new EQApplicationPacket(OP_BazaarSearch, sizeof(BazaarReturnDone_Struct));
	    BazaarReturnDone_Struct *brds = (BazaarReturnDone_Struct *)outapp2->pBuffer;
	    brds->TraderID = ID;
	    brds->Type = BazaarSearchDone;
	    brds->Unknown008 = 0xFFFFFFFF;
	    brds->Unknown012 = 0xFFFFFFFF;
	    brds->Unknown016 = 0xFFFFFFFF;
	    this->QueuePacket(outapp2);
	    safe_delete(outapp2);
	    return;
	}

    Size = results.RowCount() * sizeof(BazaarSearchResults_Struct);
    auto buffer = new uchar[Size];
    uchar *bufptr = buffer;
    memset(buffer, 0, Size);

    int Action = BazaarSearchResults;
    uint32 Cost = 0;
    int32 SerialNumber = 0;
    char temp_buffer[64] = {0};
    int Count = 0;
    uint32 StatValue = 0;

    for (auto row = results.begin(); row != results.end(); ++row) {
	    VARSTRUCT_ENCODE_TYPE(uint32, bufptr, Action);
	    Count = atoi(row[0]);
	    VARSTRUCT_ENCODE_TYPE(uint32, bufptr, Count);
	    SerialNumber = atoi(row[3]);
	    VARSTRUCT_ENCODE_TYPE(int32, bufptr, SerialNumber);
	    Client *Trader2 = entity_list.GetClientByCharID(atoi(row[1]));
	    if (Trader2) {
		    ID = Trader2->GetID();
		    VARSTRUCT_ENCODE_TYPE(uint32, bufptr, ID);
	    } else {
		    Log(Logs::Detail, Logs::Trading, "Unable to find trader: %i\n", atoi(row[1]));
		    VARSTRUCT_ENCODE_TYPE(uint32, bufptr, 0);
	    }
	    Cost = atoi(row[5]);
	    VARSTRUCT_ENCODE_TYPE(uint32, bufptr, Cost);
	    StatValue = atoi(row[8]);
	    VARSTRUCT_ENCODE_TYPE(uint32, bufptr, StatValue);
	    bool Stackable = atoi(row[10]);
	    if (Stackable) {
		    int Charges = atoi(row[9]);
		    sprintf(temp_buffer, "%s(%i)", row[7], Charges);
	    } else
		    sprintf(temp_buffer, "%s(%i)", row[7], Count);

	    memcpy(bufptr, &temp_buffer, strlen(temp_buffer));

	    bufptr += 64;

	    // Extra fields for SoD+
	    //
	    if (Trader2)
		    sprintf(temp_buffer, "%s", Trader2->GetName());
	    else
		    sprintf(temp_buffer, "Unknown");

	    memcpy(bufptr, &temp_buffer, strlen(temp_buffer));

	    bufptr += 64;

	    VARSTRUCT_ENCODE_TYPE(uint32, bufptr, atoi(row[1])); // ItemID
    }

    auto outapp = new EQApplicationPacket(OP_BazaarSearch, Size);

    memcpy(outapp->pBuffer, buffer, Size);

    this->QueuePacket(outapp);

    safe_delete(outapp);
    safe_delete_array(buffer);

    auto outapp2 = new EQApplicationPacket(OP_BazaarSearch, sizeof(BazaarReturnDone_Struct));
    BazaarReturnDone_Struct *brds = (BazaarReturnDone_Struct *)outapp2->pBuffer;

    brds->TraderID = ID;
    brds->Type = BazaarSearchDone;

    brds->Unknown008 = 0xFFFFFFFF;
    brds->Unknown012 = 0xFFFFFFFF;
    brds->Unknown016 = 0xFFFFFFFF;

    this->QueuePacket(outapp2);

    safe_delete(outapp2);
}
Does void basically cancel out this whole function then? And by removing void it allows all the information in the function to be sent to the client (or vice versa?)? And am I correct that all of that is actually one function?
Reply With Quote
  #10  
Old 01-05-2018, 11:52 PM
The_Beast's Avatar
The_Beast
Discordant
 
Join Date: May 2016
Location: Under a rock
Posts: 290
Default

Here's a good read for you.

http://www.cplusplus.com/doc/tutorial/
Reply With Quote
  #11  
Old 01-06-2018, 12:19 AM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

Thanks, I will add that to the other tutorial I have been reading. I am having a hard time understanding the term void.

Code:
void Client::SendBazaarResults(uint32 TraderID, uint32 Class_, uint32 Race, uint32 ItemStat, uint32 Slot, uint32 Type,
					char Name[64], uint32 MinPrice, uint32 MaxPrice) {
Can I read it as such then...

Void says to Client::SendBazaarReults I do not need you to return any values for the following (uint32 TraderID, uint32 Class_, uint32 Race, uint32 ItemStat, uint32 Slot, uint32 Type, char Name[64], uint32 MinPrice, uint32 MaxPrice) Just show this information
Reply With Quote
  #12  
Old 01-06-2018, 12:21 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Do you mean the
Code:
void Client::SendBazaarResults(...)
..declaration?

The 'void' in that case just indicates the type of object that is expected to be returned once the function has reached a termination point.

For instance:
Code:
void Foo() {
    return;
}
..returns absolutely nothing.

Code:
short Foo() {
    short number = 12345;
    return number;
}
..returns an explicitly declared 'short-'sized value

Code:
short Foo() {
    return 12345;
}
..returns an implicitly converted (coerced) 'short-'sized value

Code:
const char* Foo() {
    return "Hello World!";
}
..returns a const char pointer to the address where "Hello World!" is stored
(known as a c-string and is essentially just an array of chars with a null terminator character at the end.)


In the case of the bazaar function, no return is expected. Any action is predicated on the values passed into the function and by the Client object itself.

I'm really only seeing one fail point in the generation code that would cause an early return:
Code:
if (!results.Success()) {
	return;
}
You've also got these two points:
Code:
if (results.RowCount() == static_cast<unsigned long>(RuleI(Bazaar, MaxSearchResults)))
	Message(15, "Your search reached the limit of %i results. Please narrow your search down by selecting more options.", RuleI(Bazaar, MaxSearchResults));

if(results.RowCount() == 0) {
	auto outapp2 = new EQApplicationPacket(OP_BazaarSearch, sizeof(BazaarReturnDone_Struct));
	BazaarReturnDone_Struct *brds = (BazaarReturnDone_Struct *)outapp2->pBuffer;
...

Even if all of the functional server code if working properly, there could still be an issue with the client translator function - if it has one.

(assuming RoF2...)

We want to look for this opcode
Code:
auto outapp = new EQApplicationPacket(OP_BazaarSearch, Size);
..in the translator.

(ENCODE tranlates server->client packets, DECODE translates client->server packets)

https://github.com/EQEmu/Server/blob.../rof2.cpp#L396


If you have query logging turned on, I'm pretty sure that gms receive the queries (or use to) that are generated.

You should be able to run those directly from HeidiSQL and see the results as well.


None of this really says how to fix any issue..but, it does give you most all of the places to look
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #13  
Old 01-07-2018, 03:42 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

I'm going to take a step back from that part of the Bazaar while studying the tutorial Beast posted. It's way out of my league and at least I can come back to it with hopefully a bit more of an understanding.

With my "fun time" working on stuff I figured I would try and get the 4 doors back in on the banks. I read over Akkadius Placing Doors page on the wiki. Not sure if I don't have it installed right or what, but I can not get it working. Here are the steps I took.

Perl Package Manager says I have both DBI and DBD-mysql installed (not sure how else to test this?)
Have MySQL.pl configured and in my plugins folder
Installed the Mysql table `cust_obj_data` to my database
Installed the NPC Types ID 51,52,53,54 for the 'Reference NPC's'

I did have to make changes to the NPC Types IDs to get the query to run.

Code:
REPLACE INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `mana`, `gender`, `texture`, `helmtexture`, `herosforgemodel`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `alt_currency_id`, `npc_spells_id`,
`npc_spells_effects_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `attack_count`, `npcspecialattks`, `special_abilities`, `aggroradius`, `assistradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`,
`drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `ammo_idfile`, `prim_melee_type`, `sec_melee_type`, `ranged_type`, `runspeed`, `MR`, `CR`, `DR`, `FR`, `PR`, `Corrup`,
`PhR`, `see_invis`, `see_invis_undead`, `qglobal`, `AC`, `npc_aggro`, `spawn_limit`, `attack_speed`, `attack_delay`, `findable`, `STR`, `STA`, `DEX`, `AGI`, `_INT`, `WIS`, `CHA`, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, `ATK`, `Accuracy`, `Avoidance`, `slow_mitigation`,
`version`, `maxlevel`, `scalerate`, `private_corpse`, `unique_spawn_by_name`, `underwater`, `isquest`, `emoteid`, `spellscale`, `healscale`, `no_target_hotkey`, `raid_target`, `armtexture`, `bracertexture`, `handtexture`, `legtexture`, `feettexture`, `light`, `walkspeed`, `peqid`, `unique_`, `fixed`, `ignore_despawn`, `show_name`, `untargetable`) 
VALUES (51, '-X', NULL, 1, 127, 1, 11, 31, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 'ZiGH', NULL, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 7, 1.25, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, 80, 75, 75, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);

REPLACE INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `mana`, `gender`, `texture`, `helmtexture`, `herosforgemodel`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `alt_currency_id`, `npc_spells_id`,
`npc_spells_effects_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `attack_count`, `npcspecialattks`, `special_abilities`, `aggroradius`, `assistradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`,
`drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `ammo_idfile`, `prim_melee_type`, `sec_melee_type`, `ranged_type`, `runspeed`, `MR`, `CR`, `DR`, `FR`, `PR`, `Corrup`,
`PhR`, `see_invis`, `see_invis_undead`, `qglobal`, `AC`, `npc_aggro`, `spawn_limit`, `attack_speed`, `attack_delay`, `findable`, `STR`, `STA`, `DEX`, `AGI`, `_INT`, `WIS`, `CHA`, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, `ATK`, `Accuracy`, `Avoidance`, `slow_mitigation`,
`version`, `maxlevel`, `scalerate`, `private_corpse`, `unique_spawn_by_name`, `underwater`, `isquest`, `emoteid`, `spellscale`, `healscale`, `no_target_hotkey`, `raid_target`, `armtexture`, `bracertexture`, `handtexture`, `legtexture`, `feettexture`, `light`, `walkspeed`, `peqid`, `unique_`, `fixed`, `ignore_despawn`, `show_name`, `untargetable`) 
VALUES (52, '-X', NULL, 1, 127, 1, 11, 31, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 'ZiGH', NULL, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 7, 1.25, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, 80, 75, 75, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);

REPLACE INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `mana`, `gender`, `texture`, `helmtexture`, `herosforgemodel`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `alt_currency_id`, `npc_spells_id`,
`npc_spells_effects_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `attack_count`, `npcspecialattks`, `special_abilities`, `aggroradius`, `assistradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`,
`drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `ammo_idfile`, `prim_melee_type`, `sec_melee_type`, `ranged_type`, `runspeed`, `MR`, `CR`, `DR`, `FR`, `PR`, `Corrup`,
`PhR`, `see_invis`, `see_invis_undead`, `qglobal`, `AC`, `npc_aggro`, `spawn_limit`, `attack_speed`, `attack_delay`, `findable`, `STR`, `STA`, `DEX`, `AGI`, `_INT`, `WIS`, `CHA`, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, `ATK`, `Accuracy`, `Avoidance`, `slow_mitigation`,
`version`, `maxlevel`, `scalerate`, `private_corpse`, `unique_spawn_by_name`, `underwater`, `isquest`, `emoteid`, `spellscale`, `healscale`, `no_target_hotkey`, `raid_target`, `armtexture`, `bracertexture`, `handtexture`, `legtexture`, `feettexture`, `light`, `walkspeed`, `peqid`, `unique_`, `fixed`, `ignore_despawn`, `show_name`, `untargetable`) 
VALUES (53, '-X', NULL, 1, 127, 1, 11, 31, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 'ZiGH', NULL, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 7, 1.25, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, 80, 75, 75, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);

REPLACE INTO `npc_types` (`id`, `name`, `lastname`, `level`, `race`, `class`, `bodytype`, `hp`, `mana`, `gender`, `texture`, `helmtexture`, `herosforgemodel`, `size`, `hp_regen_rate`, `mana_regen_rate`, `loottable_id`, `merchant_id`, `alt_currency_id`, `npc_spells_id`,
`npc_spells_effects_id`, `npc_faction_id`, `adventure_template_id`, `trap_template`, `mindmg`, `maxdmg`, `attack_count`, `npcspecialattks`, `special_abilities`, `aggroradius`, `assistradius`, `face`, `luclin_hairstyle`, `luclin_haircolor`, `luclin_eyecolor`, `luclin_eyecolor2`, `luclin_beardcolor`, `luclin_beard`,
`drakkin_heritage`, `drakkin_tattoo`, `drakkin_details`, `armortint_id`, `armortint_red`, `armortint_green`, `armortint_blue`, `ammo_idfile`, `prim_melee_type`, `sec_melee_type`, `ranged_type`, `runspeed`, `MR`, `CR`, `DR`, `FR`, `PR`, `Corrup`,
`PhR`, `see_invis`, `see_invis_undead`, `qglobal`, `AC`, `npc_aggro`, `spawn_limit`, `attack_speed`, `attack_delay`, `findable`, `STR`, `STA`, `DEX`, `AGI`, `_INT`, `WIS`, `CHA`, `see_hide`, `see_improved_hide`, `trackable`, `isbot`, `exclude`, `ATK`, `Accuracy`, `Avoidance`, `slow_mitigation`,
`version`, `maxlevel`, `scalerate`, `private_corpse`, `unique_spawn_by_name`, `underwater`, `isquest`, `emoteid`, `spellscale`, `healscale`, `no_target_hotkey`, `raid_target`, `armtexture`, `bracertexture`, `handtexture`, `legtexture`, `feettexture`, `light`, `walkspeed`, `peqid`, `unique_`, `fixed`, `ignore_despawn`, `show_name`, `untargetable`) 
VALUES (54, '-X', NULL, 1, 127, 1, 11, 31, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 'ZiGH', NULL, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 7, 1.25, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 75, 75, 75, 80, 75, 75, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
After making the corrections to the errors I was getting it did load into my database.

I have Doors_Manip.pl saved in my plugins folder
I added the code...

Code:
sub EVENT_CLICKDOOR{
    if($status > 200){
        plugin::Doors_Manipulation_EVENT_CLICKDOOR(); # Door Manipulation Plugin
    }
}
 
sub EVENT_SAY{
    if($status > 200){
        plugin::Doors_Manipulation_EVENT_SAY(); # Door Manipulation Plugin
    }
}
... to my global_player.pl

Rebooted server and nothing.

Any suggestions or am I just not doing something simple here?
Reply With Quote
  #14  
Old 01-07-2018, 07:16 PM
Minirva
Fire Beetle
 
Join Date: Nov 2012
Posts: 19
Default

Okay I got it to work by adding the code...

Code:
sub EVENT_CLICKDOOR{
    if($status > 200){
        plugin::Doors_Manipulation_EVENT_CLICKDOOR(); # Door Manipulation Plugin
    }
}
 
sub EVENT_SAY{
    if($status > 200){
        plugin::Doors_Manipulation_EVENT_SAY(); # Door Manipulation Plugin
    }
}
...to a player.pl in the zone I was testing with. Caught this going back over everything I tried earlier today, so must have just missed trying this the first time.

Why does it only work with a player.pl in the zone and not with using global_player.pl?
Reply With Quote
  #15  
Old 01-07-2018, 08:59 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Player.pl in your zone folder has precedence over the global folder's global_player.pl, as is such for an NPC's script in the zone folder having precedence over a global version of the NPC script. Which means, if you have a player.pl in your zone folder, even if it's empty, it will take precedence over your global_player.pl.
Reply With Quote
Reply

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 06:20 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3