EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Alternate Currency merchant limits (https://www.eqemulator.org/forums/showthread.php?t=40090)

chrsschb 10-12-2015 04:47 PM

Alternate Currency merchant limits
 
I'm wondering if they retain the same 80(?) item limit as regular merchants or do they have a different limitation (hopefully higher) due to their different window and sorting features.

I found this but haven't had a chance to test yet (currently populating slowly):

Quote:

Originally Posted by NatedogEZ (Post 231182)
I think this is limited because the client can only see a certain number of items on a merchant.. but not 100% sure on that.. if you want to mess with it.. you can though :p


client_process.cpp
Code:

void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
        const Item_Struct* handyitem = nullptr;
        uint32 numItemSlots=80; //The max number of items passed in the transaction.
        const Item_Struct *item;
        std::list<MerchantList> merlist = zone->merchanttable[merchant_id];



It seems other merchants like alternate currency ones can list up to 255 items.. (i think)

I'm on the UF client, so if that 255 item limit applies that'd be super nice.

Thanks!

demonstar55 10-12-2015 05:22 PM

asdhjkiofwjuiopbtrhu9w3hipe


Try it :P

Kingly_Krab 10-12-2015 05:24 PM

Well, according to that code snippet, it seems to be hard-coded at 80 regardless of merchant type, so putting 255 items on an NPC may not even work; however, if you want to remove that limitation you can try the below Perl file that auto-generates merchant entries to a .SQL file using the first 255 items (1001-1255).
Code:

sub A {
    open $file, ">test.sql";
    my $n = 1;
    for ($i = 1001; $i < 1256; $i++) {
        say $file "INSERT INTO `merchantlist` VALUES ('1', '$n', '$i', '-1100', '0', '0', '65535', '100');";
        $n++;
    }
    close $file;
}
A();


chrsschb 10-12-2015 06:00 PM

Quote:

Originally Posted by demonstar55 (Post 244201)
asdhjkiofwjuiopbtrhu9w3hipe


Try it :P

Working on it, I have 120 items to put on this currency. Gonna take a while to create them all though :D

Kingly_Krab 10-12-2015 06:16 PM

Likely a better idea to test the limitations first using placeholder items so you know how many you can put on each NPC.

chrsschb 10-12-2015 06:20 PM

I already have a solution in place if I can't. Not a huge deal. Soon as I hit 81 gonna reboot and test. I have to do this work anyways, so it's not any extra time.

Noport 10-12-2015 07:03 PM

chrmgold.pl
Code:

sub EVENT_SCALE_CALC {
  my $money = $client->GetCarriedMoney();

  if($money < 0) {
    $money = 0;
  }
  if($money > 64425000) {
    $money = 64425000
  }

  $questitem->SetScale($money/64425000);
}


Kingly_Krab 10-12-2015 07:40 PM

Don't think that's related to what he's wanting to do, haha.


All times are GMT -4. The time now is 04:47 PM.

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