Jump to content

Recommended Posts

Posted (edited)


-stm = con.prepareStatement("INSERT INTO items VALUES (?,?,?,?,?,?,?,?,?,?,?,?)");

+stm = con.prepareStatement("INSERT INTO items VALUES (?,?,?,?,?,?,?,?,?,?,?)");

stm.setInt(1, playerId);

stm.setInt(2, IdFactory.getInstance().getNextId());

stm.setInt(3, itemId);

stm.setInt(4, count);

stm.setInt(5, 0);

stm.setString(6, "INVENTORY");

stm.setInt(7, 0);

stm.setInt(8, 0);

stm.setInt(9, 0);

stm.setInt(10, 0);

stm.setInt(11, -1);

-stm.setInt(12, 0);

 

Edited by Tony360
  • 1 month later...
Posted (edited)

What if exception is thrown in add/delete when trying to update database?
Correct me if I am wrong but shouldn't these operations act as transactions or otherwise you will have possibility of duplicated/lost items?

 

edit:

ah I see it was updated

all fine for me now

 

edit2:

Why is no one complaining about missing IconTable?

Edited by bistabil
Posted (edited)
On 7/17/2017 at 11:44 PM, bistabil said:
edit2:

Why is no one complaining about missing IconTable?

 

Because everyone can make IconTable i think...

Edited by Tony360
Posted (edited)

I am testing this and reading the code.

 

Seller will lose adena if sum of price and adena he currently owns exceeds max adena amount.

 

Also, way the pagination is implemented worries me.

 

Another feature that this auction should have is expiration otherwise list could get full of trash fast.

 

edit:

 

First I thing that bothered me about pagination was performance but now I see that it wont work because order of inserts is not preserved thus one can't predict end result.

Edited by bistabil
  • 4 weeks later...
Posted

Hello, how would you put it to sell also the weapons with skill of argumets to sell?

 

I can put some of my girlfriends there so you can argument all the day.

  • 2 years later...
Posted (edited)


Hi guys.
Sorry for my English.
My Java is bad too.))


I am using 382 aCis.

There is no XMLDocumentFactory.java 

(which, as I understand it, is used for parsing icons for an auction.)

ACis 382 have IXmlReader.java method

is there an option to use IXmlReader.java?.

Pulled with (368)
XMLDocumentFactory.java.  the norm works


And please tell me.
How to limit items allowed for sale at auctions?

Edited by alexmaghym
Posted

Hey.

 

Regarding your XML issue, it's not really used in this code, except for the icon table which I basically don't have anymore in order to provide a fix/help for you. But IXmlReader is much easier and cleaner to use than previous methods for reading xml (on aCis always). Try to see some examples in datatables.xml.

 

As for a limit on the items one can add on the shop, it's quite simple really, you just need to add a method in AuctionTable to read how many items a player has for auction like so:

 

https://pastebin.com/XANukcpm

 

Then just add a check under else if (command.startsWith("addit2"))

to check if player exceeded the limit: if (AuctionTable.getInstance().getNumberOfAuctions(player) >= YOUR_LIMIT

Posted
4 hours ago, Fanky said:

Glad to see you around here,dud.

 

Been a long time since gaming paradise :D

 

Good to see you too bro

Posted (edited)
On 4/8/2020 at 6:44 AM, An4rchy said:

Привет.

 

Что касается вашей проблемы с XML, она не используется в этом коде, за исключением таблицы значков, которая может предоставить вам исправление / помощь. Но IXmlReader гораздо проще, чем предыдущие методы чтения XML (всегда в aCis). Попробуйте увидеть некоторые примеры в datatables.xml.

 

Что касается ограничения на количество предметов, которые можно добавить в магазин, то можно просто добавить метод в AuctionTable, чтобы узнать, сколько предметов у игрока на аукционе, например:

 

https://pastebin.com/XANukcpm

 

Затем просто добавьте проверку в  else if (command.startsWith ("addit2"))

проверить, превысил ли игрок лимит: if (AuctionTable.getInstance (). getNumberOfAuctions (player)> = YOUR_LIMIT

 

 

my English is not very good ((( thanks a lot !!!

but

I want the auction to have only certain items in inventory.

For example - armor weapons jewelry
 

 

 


Error: for (AuctionItem item : items)

Error: Can only iterate over an array or an instance of java.lang.Iterable

 

  1.     public int getNumberOfAuctions(Player player)
  2.     {
  3.         int i = 0;
  4.         for (AuctionItem item : items)
  5.             if (item.getOwnerId() == player.getObjectId())
  6.                 i++;
  7.         return i;
  8.     }

 

 

 

Сan tell me a piece of code: to charge for the services of an auction?

For example, adena

 

 

Edited by alexmaghym
  • 10 months later...
Posted

Everything that @Tryskell cited has not been done yet, I organized a few things and redid AuctionTable, I still need to paginate the pages and optimize the AuctionManager.

 

AuctionManager - https://pastebin.com/YGmT4Uv2

AuctionTable - https://pastebin.com/TnXjWFdi

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • We are taking new orders. DM us on Telegram! We are taking new orders. DM us on Telegram!
    • Hello guys.Im looking for a simple autoclicker that works for servers with anticheat
    • Thank you for the reply. I know that this issue is due to L2 being so old. I was just wondering if there was an external way to fix the UI scaling. Like a patch or some settings.
    • Bro the game is so old it doesn't have a native option to scale the UI like in modern MMOs
    • Dear players, From April 19 to April 27 inc., the Bonus Start event will be active. It’s designed to help new and low-level characters get started more easily.   All characters that meet one of the following conditions: — created less than 3 days ago (regardless of level), — currently level 20 or below, — created during the event period, will receive upon login: — 10 sets of buff scrolls (phys or mage, depending on class), — 10 packs of +50% Drop/Spoil runes (2 hours each), — 10 packs of +50% Exp runes (2 hours each). Characters between level 21 and 30 will receive upon login: — 6 sets of buff scrolls, — 6 packs of +50% Drop/Spoil runes (2h each), — 6 packs of +50% Exp runes (2h each).   Event items will be removed approx. 09.05.2025 Server rates will be increased to x2.25. Take this chance to start your journey with ease or bring an old hero back into the fight — it’s the perfect time to test your strength! Open Beta Test is started!  Helper cats are waiting in towns — talk to them to receive the necessary equipment and level up your character. Siege Schedule:  - April 13 at 16:00 (GMT+2) – Innadrile Castle - April 14 at 20:00 (GMT+2) – Bandit Stronghold - April 15 at 20:00 (GMT+2) – Devastated Castle 📌 During the OBT, players who report bugs will receive CoL:   - 1 CoL for each reported staticmeshes bug (e.g., walking through textures, stairs, etc.) - 2 CoL or more for server-related issues (depending on severity) You can report bugs on the forum. The Open Beta Test will run approximately until April 15 at 23:00 (GMT+2). Your activity and feedback will help us improve the game.   Download links: Download client | Download updater 
  • Topics

×
×
  • Create New...