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

    • 🔥 Apresentação I present to you a new fully customized DressMe system, developed for DreamV2, inspired by the best servers and enhanced with unique features that guarantee performance, customization and stunning visuals. ✨ Funcionalidades ✅ Aplicação de visual de armas e armaduras sem alterar o item real equipado. ✅ Compatível com qualquer tipo de arma/armadura (ex: skins de bow visíveis apenas com bows equipados). ✅ Remoção automática do visual quando parte do set real é desequipada. ✅ Efeitos visuais (skills) aplicados com suporte a: Aplicação única ou recorrente Intervalo configurável via XML Remoção automática ao desativar o visual ✅ Interface limpa e lógica modular, fácil de expandir com novos visuais ou efeitos.     <?xml version="1.0" encoding="UTF-8"?> <dressMeList> <dress skillId="9100" name="Draconic Armor" type="ARMOR" isVip="false" > <visualSet chest="6379" legs="0" gloves="6380" feet="6381" helmet="6841" /> <visualEffect skillId="445" level="1" recurring="true" interval="35" /> </dress> <dress skillId="9102" name="Cloak Style Armor" type="CLOAK" isVip="false"> <visualSet chest="7000" legs="0" gloves="0" feet="0" helmet="0" /> <visualEffect skillId="10005" level="1" recurring="false" /> </dress> <dress skillId="9103" name="Valakas Style Weapon" type="WEAPON" isVip="false"> <visualWep type="bow" rhand="7575" lhand="0" lrhand="0" /> <visualEffect skillId="10005" level="1" recurring="false" /> </dress> </dressMeList> 📸 Imagens & Vídeo 🛠️ Detalhes Técnicos Desenvolvido com base no L2J DreamV2 Integração direta com L2PcInstance, Inventory, ThreadPoolManager e SkillTable Sistema de gerenciamento central via DressMeEffectManager Agendamento e cancelamento seguro de efeitos recorrentes Totalmente thread-safe e compatível com jogadores offline 📂 Instalação A instalação é feita via patch e inclui: Classes: DressMeHolder, DressMeEffectManager, modificações em L2PcInstance XML de exemplo Suporte completo à expansão por armas, cloaks e visuais parciais 📎 Download https://pastebin.com/raw/7i843yKh 💬 Feedback & Sugestões Sinta-se à vontade para comentar abaixo com sugestões, dúvidas ou feedbacks. Toda contribuição é bem-vinda para futuras versões!
    • @Tinker123aa Guytis, I have nothing against you, but it's very clear to me who is behind this files. I'm talking about the one that came with the captcha anti-bot system. I personally bought it from the real owner, who was one of the administrators of L2Gold.cc. This can be confirmed by him if he wishes. 😊 Maybe you worked on the files, but they didn’t start from you.   To the people trying to buy the files I’m just advising you not to waste your money. This is 100% verified information.   I honestly don't know how people believe you. 🙂 I'll share the link to the guy's topic below.   ps  
    • Hello,  Anyone knows how I can communicate to purchase this emulator.  Nobody answered in the forum of eternity neither Kate neither lord winter.    Thanks in advance.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock