Populate AH or Set a NPC Seller

Post Reply
User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Populate AH or Set a NPC Seller

Post by demolish » Fri Dec 12, 2014 10:31 am

look at existing shop npcs such as https://github.com/DarkstarProject/dark ... hb.lua#L23 to get an idea of how to do this
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
demolish
Developer
Posts: 262
Joined: Thu Jul 26, 2012 7:12 am

Re: Populate AH or Set a NPC Seller

Post by demolish » Fri Dec 12, 2014 10:54 am

it's the itemid (converted from decimal to hex)
if you were to add a Giant Donko (itemid 4306), you would convert that to hexadecimal to get 0x10D2
<Giblet[NewBrain]> kj with this first step would be fine on my shit
Click here for a guide on scripting missions.

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Populate AH or Set a NPC Seller

Post by tagban » Wed Dec 24, 2014 9:48 am

Happy Holidays:
Make a new file under scripts/commands
tools.lua

After you make that copy code below.

The first ID is the itemID, second # is the price (in gil). The @tools command will then be added, this does NOT require a restart of the server. Works fine. Enjoy!

Code: Select all

---------------------------------------------------------------------------------------------------
-- func: tools.lua
-- auth: Tagban
-- desc: Ninja Tools Shop Command @tools
---------------------------------------------------------------------------------------------------

cmdprops =
{
    permission = 0,
    parameters = "iiii"
};
function onTrigger(player)
	player:PrintToPlayer("All the ninja Tools you need for your adventure!");
stock = {
		5869, 500, -- Chonofuda
		5312, 500, -- Hiraishin
		5867, 500, -- Inoshishinofuda
		5864, 500, -- Jinko
		5315, 500, -- Jusatsu
		5863, 500, -- Kabenro
		5316, 500, -- Kaginawa
		5310, 500, -- Kawahori-Ogi
		5318, 500, -- Kodoku
		5311, 500, -- Makibishi
		5313, 500, -- Mizu-Deppo
		5866, 500, -- Mokukin
		5865, 500, -- Ryuno
		5317, 500, -- Sairui-Ran
		5417, 500, -- Sanjaku-Tenugui
		5314, 500, -- Shihei
		5868, 500, -- Shikanofuda
		5319, 500, -- Shinobi-Tabi
		5734, 500, -- Soshi
		5309, 500, -- Tsurara
		5308, 500, -- Uchitake
		
	}
 
showShop(player, STATIC, stock);
end

RenO
Posts: 10
Joined: Thu Dec 18, 2014 4:56 am

Re: Populate AH or Set a NPC Seller

Post by RenO » Mon Dec 29, 2014 6:00 pm

Hello. I want to insert some data in auction_house but what is the relationship between an auction_house record and the Auction house of a town (the bastok AH should not share items with jeudo AH in the retail game).

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Populate AH or Set a NPC Seller

Post by kjLotus » Mon Dec 29, 2014 6:04 pm

RenO wrote:Hello. I want to insert some data in auction_house but what is the relationship between an auction_house record and the Auction house of a town (the bastok AH should not share items with jeudo AH in the retail game).
all auction houses share auctions for a few years now (on retail)

it was a conscious decision to mimic this on DSP, especially because the player base is usually lower than retail worlds when auction houses were separate
if you wanted to add it back yourself, you'd have to add a column in the auction house table and check a players region when they request the auction house list (in the search server's code)

RenO
Posts: 10
Joined: Thu Dec 18, 2014 4:56 am

Re: Populate AH or Set a NPC Seller

Post by RenO » Tue Dec 30, 2014 3:31 am

kjLotus wrote:
RenO wrote:Hello. I want to insert some data in auction_house but what is the relationship between an auction_house record and the Auction house of a town (the bastok AH should not share items with jeudo AH in the retail game).
all auction houses share auctions for a few years now (on retail)
Oh sorry! My knowledge of this game is deprecated :(

I must have made a mistake because i do not see any of my inserted item in the AH. Plus, i don't see any of my own item i put through the game in the AH (but may be it's a feature).

RenO
Posts: 10
Joined: Thu Dec 18, 2014 4:56 am

Re: Populate AH or Set a NPC Seller

Post by RenO » Tue Dec 30, 2014 6:34 am

I might have a problem with my search-server. Actually i don't see any configuration to modify the search server ip (only the port).

edit : problem solved, i have now redirected the port 54002 on the search server and not connect searcher (i use one docker container per server).

Post Reply