Jump to content

Recommended Posts

Posted (edited)
Hello guys, yesterday I saw on a server that mod, and ended up going to some research on it and found it, and there are people there selling this mod, beware! it's FREE !
compatible system with frozen! 
 
what mod do?
you go on the npc, and "put your item for sale" the person who wants to buy go there on NPC, click on its entry and purchase the amount you put!
coreside
Index: com/l2jfrozen/gameserver/GameServer.java
===================================================================
--- com/l2jfrozen/gameserver/GameServer.java (revisÆo 5307)
+++ com/l2jfrozen/gameserver/GameServer.java (c¢pia de trabalho)
@@ -42,6 +42,7 @@
 import com.l2jfrozen.gameserver.datatables.sql.HennaTable;
 
 import com.l2jfrozen.gameserver.datatables.sql.HennaTreeTable;
 
 import com.l2jfrozen.gameserver.datatables.sql.HeroSkillTable;
 
+import com.l2jfrozen.gameserver.datatables.sql.ItemMarketTable;
 
 import com.l2jfrozen.gameserver.datatables.sql.ItemTable;
 
 import com.l2jfrozen.gameserver.datatables.sql.LevelUpData;
 
 import com.l2jfrozen.gameserver.datatables.sql.NobleSkillTable;
 
 
@@ -342,6 +343,7 @@
  
        CastleManorManager.getInstance();
  
        L2Manor.getInstance();
  
        AuctionManager.getInstance();
 
+       ItemMarketTable.getInstance();
 
 
  Util.printSection("Olympiad");
 
  Olympiad.getInstance();
 
  Util.printSection("Dungeons");
 
 
datapack
Index: data/html/marketer/all.htm
===================================================================
--- data/html/marketer/all.htm (revisÆo 0)
+++ data/html/marketer/all.htm (revisÆo 0)
@@ -0,0 +1,12 @@
+<html><body>
+Marketer:<br>
+What kind of item grade?<br>
+<a action="bypass -h npc_%objectId%_See 0">No Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 1">D Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 2">C Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 3">B Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 4">A Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 5">S Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 6">S80 Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 7">All Grades</a><br>
+</body></html>
Index: data/html/marketer/weapon.htm
===================================================================
--- data/html/marketer/weapon.htm (revisÆo 0)
+++ data/html/marketer/weapon.htm (revisÆo 0)
@@ -0,0 +1,12 @@
+<html><body>
+Marketer:<br>
+What kind of item grade?<br>
+<a action="bypass -h npc_%objectId%_See 8">No Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 9">D Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 10">C Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 11">B Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 12">A Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 13">S Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 14">S80 Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 15">All Grades</a><br>
+</body></html>
Index: data/html/marketer/info.htm
===================================================================
--- data/html/marketer/info.htm (revisÆo 0)
+++ data/html/marketer/info.htm (revisÆo 0)
@@ -0,0 +1,8 @@
+<html><body>
+Marketer:<br>
+Well, the service I offer is very simple, you give a certain amount of an item and a price.
+I will sell it for you in the entire world.
+And the most important thing, it's for <font color="00FF00">free</font>! Whether will we someday charge a tax? Only Einhasad knows!
+<br>
+<a action="bypass -h npc_%objectId%_Main">Back.</a>
+</body></html>
Index: data/html/marketer/comfirm.htm
===================================================================
--- data/html/marketer/comfirm.htm (revisÆo 0)
+++ data/html/marketer/comfirm.htm (revisÆo 0)
@@ -0,0 +1,13 @@
+<html><body>
+<table width=270><tr>
+<td valign=top width=35><img src="%itemIcon%" width=32 height=32 align=left></td>
+<td valign=top width=235>
+<table border=0 width=100%>
+<tr><td><font color="A2A0A2">Name:</font> <font color="B09878">%itemName%</font></td></tr>
+<tr><td><font color="A2A0A2">Count:</font> <font color="B09878">%count%</font></td></tr>
+<tr><td><font color="A2A0A2">Price:</font> <font color="B09878">%price%</font></td></tr>
+<tr><td><button value="Comfirm" action="bypass -h npc_%objectId%_AddItem %itemObjId% %count% %iprice%" width=66 height=16 back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton"></td></tr>
+<tr><td><button value="Back" action="bypass -h npc_%objectId%_SelectItem %itemObjId%" width=66 height=16 back="L2UI.DefaultButton_click" fore="L2UI.DefaultButton"></td></tr>
+</table></td>
+</tr></table>
+</body></html>
\ No newline at end of file
Index: data/html/marketer/shot.htm
===================================================================
--- data/html/marketer/shot.htm (revisÆo 0)
+++ data/html/marketer/shot.htm (revisÆo 0)
@@ -0,0 +1,12 @@
+<html><body>
+Marketer:<br>
+What kind of item grade?<br>
+<a action="bypass -h npc_%objectId%_See 32">No Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 33">D Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 34">C Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 35">B Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 36">A Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 37">S Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 38">S80 Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 39">All Grades</a><br>
+</body></html>
Index: data/html/marketer/cash.htm
===================================================================
--- data/html/marketer/cash.htm (revisÆo 0)
+++ data/html/marketer/cash.htm (revisÆo 0)
@@ -0,0 +1,5 @@
+<html><body>
+You have got %money% of Adena.<br>
+<a action="bypass -h npc_%objectId%_Cash">Get the money.</a><br>
+<a action="bypass -h npc_%objectId%_Link marketer/deal.htm">Back.</a><br>
+</body></html>
Index: data/html/marketer/armor.htm
===================================================================
--- data/html/marketer/armor.htm (revisÆo 0)
+++ data/html/marketer/armor.htm (revisÆo 0)
@@ -0,0 +1,12 @@
+<html><body>
+Marketer:<br>
+What kind of item grade?<br>
+<a action="bypass -h npc_%objectId%_See 16">No Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 17">D Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 18">C Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 19">B Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 20">A Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 21">S Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 22">S80 Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 23">All Grades</a><br>
+</body></html>
Index: data/html/marketer/other.htm
===================================================================
--- data/html/marketer/other.htm (revisÆo 0)
+++ data/html/marketer/other.htm (revisÆo 0)
@@ -0,0 +1,12 @@
+<html><body>
+Marketer:<br>
+What kind of item grade?<br>
+<a action="bypass -h npc_%objectId%_See 48">No Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 49">D Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 50">C Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 51">B Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 52">A Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 53">S Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 54">S80 Grade</a><br>
+<a action="bypass -h npc_%objectId%_See 55">All Grades</a><br>
+</body></html>
Index: data/html/marketer/main.htm
===================================================================
--- data/html/marketer/main.htm (revisÆo 0)
+++ data/html/marketer/main.htm (revisÆo 0)
@@ -0,0 +1,8 @@
+<html><body>
+Marketer:<br>
+Welcome adventurer! I am a marketer, people from all the world give me various items to sell.<br>
+Are you interested?<br>
+<a action="bypass -h npc_%objectId%_Link marketer/info.htm">Tell me more.</a><br>
+<a action="bypass -h npc_%objectId%_Link marketer/search.htm">Show me your items.</a><br>
+<a action="bypass -h npc_%objectId%_Link marketer/deal.htm">My Market.</a><br>
+</body></html>
Index: data/html/marketer/deal.htm
===================================================================
--- data/html/marketer/deal.htm (revisÆo 0)
+++ data/html/marketer/deal.htm (revisÆo 0)
@@ -0,0 +1,7 @@
+<html><body>
+Marketer:<br>
+So, how can I help you?<br>
+<a action="bypass -h npc_%objectId%_ListInv">Add an item.</a><br>
+<a action="bypass -h npc_%objectId%_Private">See My Items.</a><br>
+<a action="bypass -h npc_%objectId%_SeeCash">My Cash.</a><br>
+</body></html>
Index: data/html/marketer/search.htm
===================================================================
--- data/html/marketer/search.htm (revisÆo 0)
+++ data/html/marketer/search.htm (revisÆo 0)
@@ -0,0 +1,12 @@
+<html><body>
+Marketer:<br>
+What kind of item would you like to see?<br>
+<a action="bypass -h npc_%objectId%_Link marketer/weapon.htm">Weapons</a><br>
+<a action="bypass -h npc_%objectId%_Link marketer/armor.htm">Armor</a><br>
+<a action="bypass -h npc_%objectId%_See 31">Recipe</a><br>
+<a action="bypass -h npc_%objectId%_Link marketer/shot.htm">Shots</a><br>
+<a action="bypass -h npc_%objectId%_See 47">Spellbooks</a><br>
+<a action="bypass -h npc_%objectId%_See 63">Material</a><br>
+<a action="bypass -h npc_%objectId%_Link marketer/other.htm">Other</a><br>
+<a action="bypass -h npc_%objectId%_Link marketer/all.htm">All Items</a>
+</body></html>
Index: data/html/marketer/addItem.htm
===================================================================
--- data/html/marketer/addItem.htm (revisÆo 0)
+++ data/html/marketer/addItem.htm (revisÆo 0)
@@ -0,0 +1,7 @@
+<html><body>Enter Quantity:<br>
+<edit var="count" width=110> Max of %aval%<br></td></tr>
+Enter Price (for each item):<br>
+<edit var="price" width=110><br></td></tr>
+<tr><td><button value="Enter" action="bypass -h npc_%objectId%_ComfirmAdd %itemObjId% $count $price" width=80 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_ct1.button_df"><br>
+<button value="Cancel" action="bypass -h npc_%objectId%_Link marketer/deal.htm" width=80 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_ct1.button_df">
+</body></html>
Add Item marketable Location:
com.l2jfrozen.gameserver.data tables.sql
 
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.l2jfrozen.gameserver.datatables.sql;
 
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Map;
import java.util.List;
 
import javolution.util.FastMap;
import javolution.util.FastList;
import java.util.logging.Logger;
 
import com.l2jfrozen.util.database.L2DatabaseFactory;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
import com.l2jfrozen.gameserver.model.L2ItemMarketModel;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
 
public class ItemMarketTable {
 
private static ItemMarketTable _instance = null;
private Map<Integer, String> _itemIcons = null;
private Map<Integer, List<L2ItemMarketModel>> _marketItems = null;
private Map<Integer, Integer> _sellers = null;
private static final Logger                             _log = Logger.getLogger(ItemMarketTable.class.getName());
private ItemMarketTable() {
}
 
public static ItemMarketTable getInstance() {
if (_instance == null) {
_instance = new ItemMarketTable();
_instance.load();
}
return _instance;
}
 
private void load() {
_marketItems = new FastMap<Integer, List<L2ItemMarketModel>>();
Connection con = null;
int mrktCount = 0;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Select * From item_market Order By ownerId");
ResultSet rset = statement.executeQuery();
 
while (rset.next()) { 
int ownerId = rset.getInt("ownerId");
String ownerName = rset.getString("ownerName");
int itemObjId = rset.getInt("itemObjId");
int itemId = rset.getInt("itemId");
String itemName = rset.getString("itemName");
String itemType = rset.getString("itemType");
String l2Type = rset.getString("l2Type");
int itemGrade = rset.getInt("itemGrade");
int enchLvl = rset.getInt("enchLvl");
int count = rset.getInt("_count");
int price = rset.getInt("price");
 
L2ItemMarketModel mrktItem = new L2ItemMarketModel();
mrktItem.setOwnerId(ownerId);
mrktItem.setOwnerName(ownerName);
mrktItem.setItemObjId(itemObjId);
mrktItem.setItemId(itemId);
mrktItem.setItemName(itemName);
mrktItem.setItemType(itemType);
mrktItem.setL2Type(l2Type);
mrktItem.setItemGrade(itemGrade);
mrktItem.setEnchLvl(enchLvl);
mrktItem.setCount(count);
mrktItem.setPrice(price);
if (_marketItems.containsKey(ownerId)) {
List<L2ItemMarketModel> list = _marketItems.get(ownerId);
list.add(mrktItem);
_marketItems.put(ownerId, list);
} else {
List<L2ItemMarketModel> list = new FastList<L2ItemMarketModel>();
list.add(mrktItem);
_marketItems.put(ownerId, list);
}
mrktCount++;
}
 
_log.finest("ItemMarketTable: Loaded "+mrktCount+" market items.");
 
rset.close();
statement.close();
} catch (Exception e) {
_log.warning("Error while loading market items " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
loadSellers();
loadIcons();
}
 
private void loadSellers() {
_sellers = new FastMap<Integer, Integer>();
Connection con = null;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Select * From market_seller");
ResultSet rset = statement.executeQuery();
 
while(rset.next()) {
int sellerId = rset.getInt("sellerId");
int money = rset.getInt("money");
_sellers.put(sellerId, money);
}
 
rset.close();
statement.close();
} catch(Exception e) {
_log.warning("Error while loading market sellers " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
}
 
private void loadIcons() {
_itemIcons = new FastMap<Integer, String>();
Connection con = null;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Select * From market_icons");
ResultSet rset = statement.executeQuery();
 
while(rset.next()) {
int itemId = rset.getInt("itemId");
String itemIcon = rset.getString("itemIcon");
_itemIcons.put(itemId, itemIcon);
}
 
rset.close();
statement.close();
} catch(Exception e) {
_log.warning("Error while loading market icons " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
}
 
public void addItemToMarket(L2ItemMarketModel itemToMarket, L2PcInstance owner) {
synchronized(this) {
if (_marketItems != null && owner != null && itemToMarket != null) {
List<L2ItemMarketModel> list = _marketItems.get(owner.getObjectId());
if (list != null) {
list.add(itemToMarket);
_marketItems.put(owner.getObjectId(), list);
} else {
list = new FastList<L2ItemMarketModel>();
list.add(itemToMarket);
_marketItems.put(owner.getObjectId(), list);
}
ThreadPoolManager.getInstance().scheduleGeneral(new SaveTask(itemToMarket), 2000);
}
}
}
 
public void removeItemFromMarket(int ownerId, int itemObjId, int count) {
L2ItemMarketModel mrktItem = getItem(itemObjId);
List<L2ItemMarketModel> list = getItemsByOwnerId(ownerId);
synchronized (this) {
if (list != null && mrktItem != null && !list.isEmpty()) {
if (mrktItem.getCount() == count) {
list.remove(mrktItem);
_marketItems.put(ownerId, list);
ThreadPoolManager.getInstance().scheduleGeneral(new DeleteTask(mrktItem), 2000);
} else {
list.remove(mrktItem);
mrktItem.setCount(mrktItem.getCount() - count);
list.add(mrktItem);
_marketItems.put(ownerId, list);
ThreadPoolManager.getInstance().scheduleGeneral(new UpdateTask(mrktItem), 2000);
}
}
}
}
 
public void addMoney(int sellerId, int money) {
synchronized(this) {
if (_sellers != null) {
if (_sellers.containsKey(sellerId)) {
int oldMoney = _sellers.get(sellerId);
money += oldMoney;
_sellers.put(sellerId, money);
ThreadPoolManager.getInstance().scheduleGeneral(new AddMoneyTask(sellerId, money), 2000);
} else {
_sellers.put(sellerId, money);
ThreadPoolManager.getInstance().scheduleGeneral(new AddSellerTask(sellerId, money), 2000);
}
}
}
}
 
public int getMoney(int sellerId) {
synchronized(this) {
if (_sellers != null && !_sellers.isEmpty()) {
if (_sellers.containsKey(sellerId)) {
return _sellers.get(sellerId);
} else {
return 0;
}
}
}
return 0;
}
 
public void takeMoney(int sellerId, int amount) {
synchronized(this) {
if (_sellers != null && !_sellers.isEmpty()) {
if (_sellers.containsKey(sellerId)) {
int oldMoney = _sellers.get(sellerId);
if (oldMoney >= amount) {
oldMoney -= amount;
_sellers.put(sellerId, oldMoney);
ThreadPoolManager.getInstance().scheduleGeneral(new AddMoneyTask(sellerId, oldMoney), 2000);
}
}
}
}
}
 
public List<L2ItemMarketModel> getItemsByOwnerId(int ownerId) {
synchronized(this) {
if (_marketItems != null && !_marketItems.isEmpty()) {
return _marketItems.get(ownerId);
}
}
return null;
}
 
public L2ItemMarketModel getItem(int itemObjId) {
List<L2ItemMarketModel> list = getAllItems();
synchronized (this) {
for (L2ItemMarketModel model : list) {
if (model.getItemObjId() == itemObjId) {
return model;
}
}
}
return null;
}
 
public List<L2ItemMarketModel> getAllItems() {
synchronized(this) {
if (_marketItems != null && !_marketItems.isEmpty()) {
List<L2ItemMarketModel> list = new FastList<L2ItemMarketModel>();
for (List<L2ItemMarketModel> lst : _marketItems.values()) {
if (lst != null && !lst.isEmpty()) {
for (L2ItemMarketModel auctItem : lst) {
if (auctItem != null) {
list.add(auctItem);
}
}
}
}
return list;
}
}
return null;
}
 
public String getItemIcon(int itemId) {
if (_itemIcons != null && !_itemIcons.isEmpty()) {
return _itemIcons.get(itemId);
}
return null;
}
 
private static class SaveTask implements Runnable {
 
private final L2ItemMarketModel _marketItem;
// private final static Log _log = LogFactory.getLog(SaveTask.class.getName());
 
public SaveTask(L2ItemMarketModel marketItem) {
this._marketItem = marketItem;
}
 
public void run() {
Connection con = null;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Insert Into item_market Values (?,?,?,?,?,?,?,?,?,?,?)");
statement.setInt(1, _marketItem.getOwnerId());
statement.setString(2, _marketItem.getOwnerName());
statement.setString(3, _marketItem.getItemName());
statement.setInt(4, _marketItem.getEnchLvl());
statement.setInt(5, _marketItem.getItemGrade());
statement.setString(6, _marketItem.getL2Type());
statement.setString(7, _marketItem.getItemType());
statement.setInt(8, _marketItem.getItemId());
statement.setInt(9, _marketItem.getItemObjId());
statement.setInt(10, _marketItem.getCount());
statement.setInt(11, _marketItem.getPrice());
statement.execute();
statement.close();
} catch (Exception e) {
_log.warning("Error while saving market item into DB " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
}
}
 
private static class DeleteTask implements Runnable {
 
private final L2ItemMarketModel _marketItem;
// private final static Log _log = LogFactory.getLog(DeleteTask.class.getName());
 
public DeleteTask(L2ItemMarketModel marketItem) {
this._marketItem = marketItem;
}
 
public void run() {
Connection con = null;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Delete From item_market Where ownerId = ? AND itemObjId = ?");
statement.setInt(1, _marketItem.getOwnerId());
statement.setInt(2, _marketItem.getItemObjId());
statement.execute();
statement.close();
} catch (Exception e) {
_log.warning("Error while deleting market item from DB " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
}
}
 
private static class UpdateTask implements Runnable {
private final L2ItemMarketModel _marketItem;
// private final static Log _log = LogFactory.getLog(UpdateTask.class.getName());
 
public UpdateTask(L2ItemMarketModel marketItem) {
this._marketItem = marketItem;
}
 
public void run() {
Connection con = null;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Update item_market Set _count = ? Where itemObjId = ? AND ownerId = ?");
statement.setInt(1, _marketItem.getCount());
statement.setInt(2, _marketItem.getItemObjId());
statement.setInt(3, _marketItem.getOwnerId());
statement.executeUpdate();
statement.close();
} catch (Exception e) {
_log.warning("Error while updating market item in DB " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
}
}
 
private static class AddMoneyTask implements Runnable {
private final int sellerId;
private final int money;
 
public AddMoneyTask(int sellerId, int money) {
this.sellerId = sellerId;
this.money = money;
}
 
public void run() {
Connection con = null;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Update market_seller Set money = ? Where sellerId = ?");
statement.setInt(1, money);
statement.setInt(2, sellerId);
statement.executeUpdate();
statement.close();
} catch (Exception e) {
_log.warning("Error while adding money in DB " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
}
}
 
private static class AddSellerTask implements Runnable {
private final int sellerId;
private final int money;
 
public AddSellerTask(int sellerId, int money) {
this.sellerId = sellerId;
this.money = money;
}
 
public void run() {
Connection con = null;
try {
con = L2DatabaseFactory.getInstance().getConnection(false);
PreparedStatement statement = con.prepareStatement("Insert Into market_seller(sellerId, money) Values (?,?)");
statement.setInt(1, sellerId);
statement.setInt(2, money);
statement.executeUpdate();
statement.close();
} catch (Exception e) {
_log.warning("Error while adding seller in DB " + e.getMessage());
} finally {
try {
if (con != null) {
con.close();
}
} catch (Exception e) {
}
}
}
}
}
Add L2ItemMarketerInstance the settlement:
com.l2jfrozen.gameserver.model.actor.instance:
 
 
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.l2jfrozen.gameserver.model.actor.instance;
 
import java.util.List;
import java.util.StringTokenizer;
 
import javolution.text.TextBuilder;
import javolution.util.FastList;
 
import com.l2jfrozen.gameserver.ai.CtrlIntention;
import com.l2jfrozen.gameserver.datatables.sql.ItemMarketTable;
import com.l2jfrozen.gameserver.datatables.sql.ItemTable;
import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance;
import com.l2jfrozen.gameserver.model.L2ItemMarketModel;
import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed;
import com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected;
import com.l2jfrozen.gameserver.network.serverpackets.ValidateLocation;
import com.l2jfrozen.gameserver.templates.L2NpcTemplate;
import com.l2jfrozen.gameserver.templates.L2EtcItemType;
import com.l2jfrozen.gameserver.templates.L2WeaponType;
import com.l2jfrozen.gameserver.util.Util;
 
public class L2ItemMarketerInstance extends L2FolkInstance {
 
private final int ITEMS_PER_PAGE = 4;
 
//Pack Method : pack (L2_Type << 3) | Grade
//Item L2 Type
private final int ALL = 0x00;
private final int WEAPON = 0x01;
private final int ARMOR = 0x02;
private final int RECIPE  = 0x03;
private final int SHOTS  = 0x04;
private final int BOOK  = 0x05;
private final int OTHER  = 0x06;
private final int MATERIAL = 0x07;
 
//Item Grade
private final int NO_G  = 0x00;
    private final int D_G  = 0x01;
private final int C_G  = 0x02;
private final int B_G  = 0x03;
private final int A_G  = 0x04;
private final int S_G  = 0x05;
private final int S80_G = 0x06;
private final int ALL_G = 0x07;
 
public L2ItemMarketerInstance(int objectId, L2NpcTemplate template) {
        super(objectId, template);
    }
 
@Override
public void onAction(L2PcInstance player) {
if (!canTarget(player)) {
return;
}
// Check if the L2PcInstance already target the L2NpcInstance
if (this != player.getTarget()) {
// Set the target of the L2PcInstance player
player.setTarget(this);
 
// Send a Server->Client packet MyTargetSelected to the L2PcInstance player
MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
player.sendPacket(my);
 
// Send a Server->Client packet ValidateLocation to correct the L2NpcInstance position and heading on the client
player.sendPacket(new ValidateLocation(this));
} else {
// Calculate the distance between the L2PcInstance and the L2NpcInstance
if (!canInteract(player)) {
// Notify the L2PcInstance AI with AI_INTENTION_INTERACT
player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
} else {
showMsgWindow(player);
}
}
// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
player.sendPacket(ActionFailed.STATIC_PACKET);
}
 
@Override
    public void onBypassFeedback(L2PcInstance player, String command) {
List<L2ItemMarketModel> list = null;
        StringTokenizer st = new StringTokenizer(command, " ");
        String actualCommand = st.nextToken();
if ("Private".equalsIgnoreCase(actualCommand)) {
list = getItemList(player);
int pId = 0;
if (st.hasMoreTokens()) {
pId = new Integer(st.nextToken());
}
showPrivateItemList(list, pId, player);
} else if ("See".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int bitmask = new Integer(st.nextToken());
int pgId = 0;
if (st.hasMoreTokens()) {
pgId = new Integer(st.nextToken());
}
list = ItemMarketTable.getInstance().getAllItems();
if (list != null) {
list = filterItemType(bitmask, list);
showItemList(list, pgId, player, bitmask);
} else {
sendMsg("There are no items for you", player);
return;
}
}
} else if ("BuyItem".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int itemObjId = Integer.parseInt(st.nextToken());
if (st.hasMoreTokens()) {
int count = new Integer(st.nextToken());
buyItem(player, itemObjId, count);
}
}
} else if ("AddItem".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int itemObjId = new Integer(st.nextToken());
if (st.hasMoreTokens()) {
int count = new Integer(st.nextToken());
if (st.hasMoreTokens()) {
int price = new Integer(st.nextToken());
if (price <=0) {
sendMsg("You can't sell an item for 0 or negative number.", player);
return;
}
L2ItemInstance item = player.getInventory().getItemByObjectId(itemObjId);
list = getItemList(player);
if (canAddItem(item, count, list, player)) {
player.destroyItem("Market Add", item.getObjectId(), count, null, true);
addItem(player, item, count, price);
} else {
sendMsg("Unable to add item or incorret item count.", player);
}
}
}
}
} else if ("ListInv".equalsIgnoreCase(actualCommand)) {
int pageId = 0;
if (st.hasMoreTokens()) {
pageId = new Integer(st.nextToken());
}
showInvList(player, pageId);
} else if ("ItemInfo".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int pgId = new Integer(st.nextToken());
if (st.hasMoreTokens()) {
int bitmask = new Integer(st.nextToken());
if (st.hasMoreTokens()) {
int itemObjId = new Integer(st.nextToken());
L2ItemMarketModel mrktItem = ItemMarketTable.getInstance().getItem(itemObjId);
if (mrktItem != null) {
showItemInfo(mrktItem, bitmask, pgId, player);
}
}
}
}
} else if ("Main".equalsIgnoreCase(actualCommand)) {
showMsgWindow(player);
} else if ("SelectItem".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int itemObjId = new Integer(st.nextToken());
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename = "data/html/marketer/addItem.htm";
NpcHtmlMessage html = new NpcHtmlMessage(1);
html.setFile(filename);
html.replace("%objectId%", String.valueOf(getObjectId()));
L2ItemInstance item = player.getInventory().getItemByObjectId(itemObjId);
html.replace("%aval%", ""+item.getCount());
html.replace("%itemObjId%", String.valueOf(itemObjId));
player.sendPacket(html);
}
} else if ("ItemInfo2".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int pgId = new Integer(st.nextToken());
if (st.hasMoreTokens()) {
int itemObjId = new Integer(st.nextToken());
L2ItemMarketModel mrktItem = ItemMarketTable.getInstance().getItem(itemObjId);
if (mrktItem != null) {
showItemInfo2(mrktItem, pgId, player);
}
}
}
} else if ("TakeItem".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int itemObjId = new Integer(st.nextToken());
L2ItemMarketModel mrktItem = ItemMarketTable.getInstance().getItem(itemObjId);
if (mrktItem != null && player.getObjectId() == mrktItem.getOwnerId()) {
ItemMarketTable.getInstance().removeItemFromMarket(mrktItem.getOwnerId(), mrktItem.getItemObjId(), mrktItem.getCount());
L2ItemInstance item = ItemTable.getInstance().createItem("Market Remove", mrktItem.getItemId(), mrktItem.getCount(), player);
item.setEnchantLevel(mrktItem.getEnchLvl());
player.getInventory().addItem("Market Buy", item, player, null);
sendMsg(mrktItem.getItemName()+" removed succesfully.", player);
}
}
} else if ("SeeCash".equalsIgnoreCase(actualCommand)) {
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename = "data/html/marketer/cash.htm";
NpcHtmlMessage html = new NpcHtmlMessage(1);
html.setFile(filename);
html.replace("%objectId%", String.valueOf(getObjectId()));
int money = ItemMarketTable.getInstance().getMoney(player.getObjectId());
html.replace("%money%", Util.formatAdena(money));
player.sendPacket(html);
} else if ("Cash".equalsIgnoreCase(actualCommand)) {
int amount = ItemMarketTable.getInstance().getMoney(player.getObjectId());
ItemMarketTable.getInstance().takeMoney(player.getObjectId(), amount);
player.getInventory().addAdena("Market Cash", amount, player, null);
sendMsg("You've earned "+Util.formatAdena(amount)+" Gold Bar", player);
} else if ("ComfirmAdd".equalsIgnoreCase(actualCommand)) {
if (st.hasMoreTokens()) {
int itemObjId = new Integer(st.nextToken());
L2ItemInstance item = player.getInventory().getItemByObjectId(itemObjId);
if (item == null) {
return;
}
 
if (st.hasMoreTokens()) {
int count = new Integer(st.nextToken());
if (count <= 0 || item.getCount() < count) {
sendMsg("Item count must be a valid value.", player);
return;
}
if (st.hasMoreTokens()) {
int price = new Integer(st.nextToken());
if (price <= 0) {
sendMsg("Price must be a valid value.", player);
return;
}
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename = "data/html/marketer/comfirm.htm";
NpcHtmlMessage html = new NpcHtmlMessage(1);
html.setFile(filename);
html.replace("%objectId%", String.valueOf(getObjectId()));
html.replace("%count%", ""+count);
html.replace("%itemName%", item.getName()+" +"+item.getEnchantLevel());
html.replace("%itemIcon%", getItemIcon(item.getItemId()));
html.replace("%price%", Util.formatAdena(price));
html.replace("%iprice%", Util.formatAdena(price));
html.replace("%itemObjId%", ""+itemObjId);
player.sendPacket(html);
}
}
}
}
super.onBypassFeedback(player, command);
    }
 
private void showMsgWindow(L2PcInstance player) {
player.sendPacket(ActionFailed.STATIC_PACKET);
String filename = "data/html/marketer/main.htm";
NpcHtmlMessage html = new NpcHtmlMessage(1);
html.setFile(filename);
html.replace("%objectId%", String.valueOf(getObjectId()));
player.sendPacket(html);
}
 
private void addItem(L2PcInstance player, L2ItemInstance item, int count, int price) {
L2ItemMarketModel itemModel = new L2ItemMarketModel();
itemModel.setOwnerId(player.getObjectId());
itemModel.setOwnerName(player.getName());
itemModel.setItemObjId(item.getObjectId());
itemModel.setItemId(item.getItemId());
itemModel.setPrice(price);
itemModel.setCount(count);
itemModel.setItemType(item.getItem().getItemType().toString());
itemModel.setEnchLvl(item.getEnchantLevel());
if (itemModel.getEnchLvl() > 0) {
itemModel.setItemName(item.getItemName()+" +"+itemModel.getEnchLvl());
} else {
itemModel.setItemName(item.getItemName());
}
itemModel.setItemGrade(item.getItem().getCrystalType());
if (item.isEquipable()) {
if (item.getItemType() == L2WeaponType.NONE) {
itemModel.setL2Type("Armor");
} else {
itemModel.setL2Type("Weapon");
}
 
} else if (item.isEquipable()) {
itemModel.setL2Type("Armor");
} else {
if (item.getItemType() == L2EtcItemType.MATERIAL) {
itemModel.setL2Type("Material");
} else if (item.getItemType() == L2EtcItemType.RECEIPE) {
itemModel.setL2Type("Recipe");
} else if (item.getItemType() == L2EtcItemType.SPELLBOOK) {
itemModel.setL2Type("Spellbook");
} else if (item.getItemType() == L2EtcItemType.SHOT) {
itemModel.setL2Type("Shot");
} else {
itemModel.setL2Type("Other");
}
}
ItemMarketTable.getInstance().addItemToMarket(itemModel, player);
sendMsg("You added "+count+" <font color=\"LEVEL\">"+item.getItemName()+"</font>.", player);
}
 
private boolean canAddItem(L2ItemInstance item, int count, List<L2ItemMarketModel> list, L2PcInstance activeChar) {
if (activeChar != null && activeChar.getActiveTradeList() != null) {
return false;
}
if (activeChar != null && activeChar.isProcessingTransaction()) {
return false;
}
if (list != null && !list.isEmpty()) {
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemId() == item.getItemId()) {
return false;
}
}
}
}
 
return (item.getItemType() != L2EtcItemType.HERB && item.getCount() >= count && item.getItem().getDuration() == -1 && item.getItemId() != 3470 && item.isTradeable() && !item.isEquipped() && !item.isAugmented());
}
 
private boolean canAddItem(L2ItemInstance item) {
return canAddItem(item, 0, null, null);
}
 
private String getItemIcon(int itemId) {
return "Icon." + ItemMarketTable.getInstance().getItemIcon(itemId);
}
 
private List<L2ItemMarketModel> getItemList(L2PcInstance player) {
return ItemMarketTable.getInstance().getItemsByOwnerId(player.getObjectId());
}
 
private void buyItem(L2PcInstance player, int itemObjId, int count) {
     L2ItemMarketModel mrktItem = ItemMarketTable.getInstance().getItem(itemObjId);
     if (mrktItem != null && mrktItem.getCount() >= count && (count > 0)) { 
L2ItemInstance adena = player.getInventory().getItemByItemId(3470);
if (adena.getCount() >= (mrktItem.getPrice() * count)) {
int itemId  = mrktItem.getItemId();
int price = mrktItem.getPrice() * count;
ItemMarketTable.getInstance().removeItemFromMarket(mrktItem.getOwnerId(), mrktItem.getItemObjId(), count);
player.destroyItem("Market Buy", adena.getObjectId(), price, null, true);
ItemMarketTable.getInstance().addMoney(mrktItem.getOwnerId(), price);
L2ItemInstance item = ItemTable.getInstance().createItem("Market Buy", itemId, count, player);
item.setEnchantLevel(mrktItem.getEnchLvl());
player.getInventory().addItem("Market Buy", item, player, null);
sendMsg("You bought "+count+" <font color=\"LEVEL\">"+mrktItem.getItemName()+"</font>.", player);
return;
}
sendMsg("You don't have enought Gold Bars.", player);
return;
}
sendMsg("Incorrect item count.", player);
}
 
private List<L2ItemMarketModel> filterItemType(int mask, List<L2ItemMarketModel> list) {
List<L2ItemMarketModel> mrktList = new FastList<L2ItemMarketModel>();
int itype = mask >> 3;
switch(itype) {
case ALL:
return filterItemGrade(mask, list);
case WEAPON:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getL2Type().equalsIgnoreCase("Weapon")) {
mrktList.add(model);
}
}
}
return filterItemGrade(mask, mrktList);
case ARMOR:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getL2Type().equalsIgnoreCase("Armor")) {
mrktList.add(model);
}
}
}
return filterItemGrade(mask, mrktList);
case RECIPE:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getL2Type().equalsIgnoreCase("Recipe")) {
mrktList.add(model);
}
}
}
return mrktList;
case BOOK:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getL2Type().equalsIgnoreCase("Spellbook")) {
mrktList.add(model);
}
}
}
return mrktList;
case SHOTS:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getL2Type().equalsIgnoreCase("Shot")) {
mrktList.add(model);
}
}
}
return filterItemGrade(mask, mrktList);
case OTHER:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getL2Type().equalsIgnoreCase("Other")) {
mrktList.add(model);
}
}
}
return filterItemGrade(mask, mrktList);
case MATERIAL:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getL2Type().equalsIgnoreCase("Material")) {
mrktList.add(model);
}
}
}
return mrktList;
}
 
return filterItemGrade(mask, list);
}
 
private List<L2ItemMarketModel> filterItemGrade(int mask, List<L2ItemMarketModel> list) {
List<L2ItemMarketModel> mrktList = new FastList<L2ItemMarketModel>();
int igrade = mask & 7;
switch(igrade) {
case ALL_G:
return list;
case NO_G:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemGrade() == NO_G) {
mrktList.add(model);
}
}
}
return mrktList;
case D_G:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemGrade() == D_G) {
mrktList.add(model);
}
}
}
return mrktList;
case C_G:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemGrade() == C_G) {
mrktList.add(model);
}
}
}
return mrktList;
case B_G:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemGrade() == B_G) {
mrktList.add(model);
}
}
}
return mrktList;
case A_G:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemGrade() == A_G) {
mrktList.add(model);
}
}
}
return mrktList;
case S_G:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemGrade() == S_G) {
mrktList.add(model);
}
}
}
return mrktList;
case S80_G:
for (L2ItemMarketModel model : list) {
if (model != null) {
if (model.getItemGrade() == S80_G) {
mrktList.add(model);
}
}
}
return mrktList;
}
return list;
}
 
private List<L2ItemInstance> filterInventory(L2ItemInstance[] inv) {
List<L2ItemInstance> filteredInventory = new FastList<L2ItemInstance>();
for(L2ItemInstance item : inv) {
if (canAddItem(item)) {
filteredInventory.add(item);
}
}
return filteredInventory;
}
 
private List<L2ItemMarketModel> filterList(List<L2ItemMarketModel> list, L2PcInstance player) {
List<L2ItemMarketModel> filteredList = new FastList<L2ItemMarketModel>();
if (!list.isEmpty()) {
for(L2ItemMarketModel model : list) {
if (model != null && model.getOwnerId() != player.getObjectId()) {
filteredList.add(model);
}
}
}
return filteredList;
}
 
private void showInvList(L2PcInstance player, int pageId) {
int itemsOnPage = ITEMS_PER_PAGE;
List<L2ItemInstance> list = filterInventory(player.getInventory().getItems());
int pages = list.size() / itemsOnPage;
if (list.isEmpty()) {
sendMsg("Your inventory is empty.", player);
return;
}
if (list.size() > pages * itemsOnPage) {
pages++;
}
if (pageId > pages) { 
pageId = pages;
}
int itemStart = pageId * itemsOnPage;
int itemEnd = list.size();
if (itemEnd - itemStart > itemsOnPage) {
itemEnd = itemStart + itemsOnPage;
}
NpcHtmlMessage npcReply = new NpcHtmlMessage(1);
TextBuilder reply = new TextBuilder("<html><body>");
reply.append("<center>Items in Inventory</center>");
reply.append("<img src=\"L2UI.SquareWhite\" width=270 height=1> <img src=\"L2UI.SquareBlank\" width=1 height=3>");
reply.append("<table width=270><tr>");
reply.append("<td width=66><button value=\"Back\" action=\"bypass -h npc_"+getObjectId()+((pageId==0)?"_Main ":"_ListInv ")+(pageId-1)+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td>");
reply.append("<td width=138></td>");
reply.append("<td width=66>"+((pageId+1<pages)?"<button value=\"Next\" action=\"bypass -h npc_"+getObjectId()+"_ListInv "+(pageId+1)+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\">":"")+"</td>");
reply.append("</tr></table>");
reply.append("<br>");
for (int i = itemStart; i < itemEnd; i++) {
L2ItemInstance item = list.get(i);
if (item == null) {
continue;
}
 
String itemIcon = getItemIcon(item.getItemId());
reply.append("<br>");
reply.append("<table width=270><tr>");
reply.append("<td valign=top width=35><button value=\"\" action=\"bypass -h npc_"+getObjectId()+"_SelectItem "+item.getObjectId()+"\" width=32 height=32 back=\""+itemIcon +"\" fore=\""+itemIcon +"\"></td>");
reply.append("<td valign=top width=235>");
reply.append("<table border=0 width=100%>");
reply.append("<tr><td><font color=\"A2A0A2\">"+item.getItemName()+" +"+item.getEnchantLevel()+"</font></td></tr>");
reply.append("<tr><td><font color=\"A2A0A2\">Quantity:</font> <font color=\"B09878\">"+item.getCount()+"</font></td></tr></table></td>");
reply.append("</tr></table>");
reply.append("<br>");
}
reply.append("</body></html>");
npcReply.setHtml(reply.toString());
player.sendPacket(npcReply);
}
 
private void showItemList(List<L2ItemMarketModel> list, int pageId, L2PcInstance player, int mask) {
int itemsOnPage = ITEMS_PER_PAGE;
list = filterList(list, player);
if (list.isEmpty()) {
sendMsg("There are no items for you", player);
return;
}
int pages = list.size() / itemsOnPage;
if (list.size() > pages * itemsOnPage) {
pages++;
}
if (pageId > pages) { 
pageId = pages;
}
int itemStart = pageId * itemsOnPage;
int itemEnd = list.size();
if (itemEnd - itemStart > itemsOnPage) {
itemEnd = itemStart + itemsOnPage;
}
NpcHtmlMessage npcReply = new NpcHtmlMessage(1);
TextBuilder reply = new TextBuilder("<html><body>");
reply.append("<center>Market</center>");
reply.append("<img src=\"L2UI.SquareWhite\" width=270 height=1> <img src=\"L2UI.SquareBlank\" width=1 height=3>");
reply.append("<table width=270><tr>");
reply.append("<td width=66><button value=\"Back\" action=\"bypass -h npc_"+getObjectId()+((pageId==0)?"_Main ":"_See ")+mask+" "+(pageId-1)+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td>");
reply.append("<td width=138></td>");
reply.append("<td width=66>"+((pageId+1<pages)?"<button value=\"Next\" action=\"bypass -h npc_"+getObjectId()+"_See "+mask+" "+(pageId+1)+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\">":"")+"</td>");
reply.append("</tr></table>");
reply.append("<br>");
 
for (int i = itemStart; i < itemEnd; i++) {
L2ItemMarketModel mrktItem = list.get(i);
if (mrktItem == null) {
continue;
}
 
if (mrktItem.getOwnerId() == player.getObjectId()) {
continue;
}
 
int _price = mrktItem.getPrice();
if (_price == 0) {
continue;
}
 
int _grade = mrktItem.getItemGrade();
String itemIcon = getItemIcon(mrktItem.getItemId());
reply.append("<br>");
reply.append("<table width=270><tr>");
reply.append("<td valign=top width=35><button value=\"\" action=\"bypass -h npc_"+getObjectId()+"_ItemInfo "+pageId+" "+mask+" "+mrktItem.getItemObjId()+"\" width=32 height=32 back=\""+itemIcon +"\" fore=\""+itemIcon +"\"></td>");
reply.append("<td valign=top width=235>");
reply.append("<table border=0 width=100%>");
reply.append("<tr><td><font color=\"A2A0A2\">"+mrktItem.getItemName()+"["+mrktItem.getCount()+"]"+"</font></td></tr>");
if ((mask & 7) == ALL_G) {
reply.append("<tr><td><font color=\"A2A0A2\">"+"Grade:"+getGrade(mrktItem.getItemGrade())+"</font></td></tr>");
}
reply.append("<tr><td><font color=\"A2A0A2\">Price:</font> <font color=\"B09878\">"+Util.formatAdena(mrktItem.getPrice())+"</font></td></tr></table></td>");
reply.append("</tr></table>");
reply.append("<br>");
}
 
reply.append("</body></html>");
npcReply.setHtml(reply.toString());
player.sendPacket(npcReply);
}
 
private void showItemInfo(L2ItemMarketModel mrktItem, int mask, int pageId, L2PcInstance player) {
NpcHtmlMessage npcReply = new NpcHtmlMessage(1);
TextBuilder reply = new TextBuilder("<html><body>");
reply.append("<center>Info</center>");
reply.append("<img src=\"L2UI.SquareWhite\" width=270 height=1> <img src=\"L2UI.SquareBlank\" width=1 height=3>");
reply.append("<table width=270><tr>");
reply.append("<td width=66><button value=\"Back\" action=\"bypass -h npc_"+getObjectId()+"_See "+mask+" "+pageId+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td>");
reply.append("<td width=138></td>");
reply.append("</tr></table>");
reply.append("<br>");
reply.append("<table width=270><tr>");
reply.append("<td valign=top width=35><img src="+getItemIcon(mrktItem.getItemId())+" width=32 height=32 align=left></td>");
reply.append("<td valign=top width=235>");
reply.append("<table border=0 width=100%>");
reply.append("<tr><td><font color=\"A2A0A2\">Name:</font> <font color=\"B09878\">"+mrktItem.getItemName()+"</font><font color=\"A2A0A2\">[<font color=\"B09878\">"+mrktItem.getCount()+"</font>]</td></tr>");
reply.append("<tr><td><font color=\"A2A0A2\">Price:</font> <font color=\"B09878\">"+Util.formatAdena(mrktItem.getPrice())+"</font><font color=\"A2A0A2\">     Seller:</font> <font color=\"B09878\">"+mrktItem.getOwnerName()+"</font></td></tr>");
reply.append("<tr><td><edit var=\"count\" width=110></td></tr>");
reply.append("<tr><td><button value=\"Buy\" action=\"bypass -h npc_"+getObjectId()+"_BuyItem "+mrktItem.getItemObjId()+" $count\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td></tr></table></td>");
reply.append("</tr></table>");
reply.append("</body></html>");
npcReply.setHtml(reply.toString());
player.sendPacket(npcReply);
}
 
private void showPrivateItemList(List<L2ItemMarketModel> list, int pageId, L2PcInstance player) {
int itemsOnPage = ITEMS_PER_PAGE;
if (list == null || list.isEmpty()) {
sendMsg("There are no items for you", player);
return;
}
int pages = list.size() / itemsOnPage;
if (list.size() > pages * itemsOnPage) {
pages++;
}
if (pageId > pages) { 
pageId = pages;
}
int itemStart = pageId * itemsOnPage;
int itemEnd = list.size();
if (itemEnd - itemStart > itemsOnPage) {
itemEnd = itemStart + itemsOnPage;
}
NpcHtmlMessage npcReply = new NpcHtmlMessage(1);
TextBuilder reply = new TextBuilder("<html><body>");
reply.append("<center>Private</center>");
reply.append("<img src=\"L2UI.SquareWhite\" width=270 height=1> <img src=\"L2UI.SquareBlank\" width=1 height=3>");
reply.append("<table width=270><tr>");
reply.append("<td width=66><button value=\"Back\" action=\"bypass -h npc_"+getObjectId()+((pageId==0)?"_Main ":"_Private ")+(pageId-1)+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td>");
reply.append("<td width=138></td>");
reply.append("<td width=66>"+((pageId+1<pages)?"<button value=\"Next\" action=\"bypass -h npc_"+getObjectId()+"_Private "+(pageId+1)+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\">":"")+"</td>");
reply.append("</tr></table>");
reply.append("<br>");
 
for (int i = itemStart; i < itemEnd; i++) {
L2ItemMarketModel mrktItem = list.get(i);
if (mrktItem == null) {
continue;
}
 
int _price = mrktItem.getPrice();
if (_price == 0) {
continue;
}
 
String itemIcon = getItemIcon(mrktItem.getItemId());
reply.append("<br>");
reply.append("<table width=270><tr>");
reply.append("<td valign=top width=35><button value=\"\" action=\"bypass -h npc_"+getObjectId()+"_ItemInfo2 "+pageId+" "+mrktItem.getItemObjId()+"\" width=32 height=32 back=\""+itemIcon +"\" fore=\""+itemIcon +"\"></td>");
reply.append("<td valign=top width=235>");
reply.append("<table border=0 width=100%>");
reply.append("<tr><td><font color=\"A2A0A2\">"+mrktItem.getItemName()+"["+mrktItem.getCount()+"]"+"</font></td></tr>");
reply.append("<tr><td><font color=\"A2A0A2\">Price:</font> <font color=\"B09878\">"+Util.formatAdena(mrktItem.getPrice())+"</font></td></tr></table></td>");
reply.append("</tr></table>");
reply.append("<br>");
}
 
reply.append("</body></html>");
npcReply.setHtml(reply.toString());
player.sendPacket(npcReply);
}
 
private void sendMsg(String message, L2PcInstance player) {
player.sendPacket(ActionFailed.STATIC_PACKET);
NpcHtmlMessage npcReply = new NpcHtmlMessage(1);
TextBuilder reply = new TextBuilder("<html><body>");
reply.append(message);
reply.append("<br><a action=\"bypass -h npc_"+getObjectId()+"_Main\">Back</a>");
reply.append("</body></html>");
npcReply.setHtml(reply.toString());
player.sendPacket(npcReply);
}
 
private void showItemInfo2(L2ItemMarketModel mrktItem, int pageId, L2PcInstance player) {
NpcHtmlMessage npcReply = new NpcHtmlMessage(1);
TextBuilder reply = new TextBuilder("<html><body>");
reply.append("<center>Info</center>");
reply.append("<img src=\"L2UI.SquareWhite\" width=270 height=1> <img src=\"L2UI.SquareBlank\" width=1 height=3>");
reply.append("<table width=270><tr>");
reply.append("<td width=66><button value=\"Back\" action=\"bypass -h npc_"+getObjectId()+"_Private "+pageId+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td>");
reply.append("<td width=138></td>");
reply.append("</tr></table>");
reply.append("<br>");
reply.append("<table width=270><tr>");
reply.append("<td valign=top width=35><img src="+getItemIcon(mrktItem.getItemId())+" width=32 height=32 align=left></td>");
reply.append("<td valign=top width=235>");
reply.append("<table border=0 width=100%>");
reply.append("<tr><td><font color=\"A2A0A2\">Name:</font> <font color=\"B09878\">"+mrktItem.getItemName()+"</font><font color=\"A2A0A2\">[<font color=\"B09878\">"+mrktItem.getCount()+"</font>]</td></tr>");
reply.append("<tr><td><font color=\"A2A0A2\">Price:</font> <font color=\"B09878\">"+Util.formatAdena(mrktItem.getPrice())+"</font><font color=\"A2A0A2\"></td></tr>");
reply.append("<tr><td><button value=\"Remove\" action=\"bypass -h npc_"+getObjectId()+"_TakeItem "+mrktItem.getItemObjId()+"\" width=66 height=16 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td></tr></table></td>");
reply.append("</tr></table>");
reply.append("</body></html>");
npcReply.setHtml(reply.toString());
player.sendPacket(npcReply);
}
 
private String getGrade(int grade) {
switch(grade) {
case D_G:
return "D Grade";
case C_G:
return "C Grade";
case B_G:
return "B Grade";
case A_G:
return "A Grade";
case S_G:
return "S Grade";
case S80_G:
return "S80 Grade";
default:
return "No Grade";
}
}
}
Add L2ItemMarketModel the settlement:
com.l2jfrozen.gameserver.model:
 
 
/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package com.l2jfrozen.gameserver.model;
 
public class L2ItemMarketModel {
 
private int ownerId;
private int enchLvl;
private int itemId;
private int itemGrade;
private int itemObjId;
private int price;
private int count;
private String ownerName = null;
private String itemName = null;
private String itemType = null;
private String l2Type = null;
 
public void setOwnerId(int ownerId) {
this.ownerId = ownerId;
}
 
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
 
public void setItemId(int itemId) {
this.itemId = itemId;
}
 
public void setItemObjId(int itemObjId) {
this.itemObjId = itemObjId;
}
 
public void setItemName(String itemName) {
this.itemName = itemName;
}
 
public void setEnchLvl(int enchLvl) {
this.enchLvl = enchLvl;
}
 
public void setItemGrade(int itemGrade) {
this.itemGrade = itemGrade;
}
 
public void setItemType(String itemType) {
this.itemType = itemType;
}
 
public void setL2Type(String l2Type) {
this.l2Type = l2Type;
}
 
public void setPrice(int price) {
this.price = price;
}
 
public void setCount(int count) {
this.count = count;
}
 
public int getOwnerId() {
return ownerId;
}
 
public String getOwnerName() {
return ownerName;
}
 
public int getItemId() {
return itemId;
}
 
public int getItemObjId() {
return itemObjId;
}
 
public String getItemName() {
return itemName;
}
 
public int getEnchLvl() {
return enchLvl;
}
 
public int getItemGrade() {
return itemGrade;
}
 
public String getItemType() {
return itemType;
}
 
public String getL2Type() {
return l2Type;
}
 
public int getPrice() {
return price;
}
 
public int getCount() {
return count;
}
 
} 

Sql part:

 

http://www.mediafire.com/download/k57kshzbh2nxuk3/market.sql

 

 

let's not forget that when you create the npc with the type:

  ~ ~ L2ItemMarketer ok?
 
credits: U3 Games (. He was told by our friend the topics below thank have researched on it.)

 

Some pic:

 

 

 

 

http://www.mediafire.com/convkey/cc0e/vjt15wmdm88s8gozg.jpg?size_id=7

http://www.mediafire.com/convkey/6dab/s3sc6b314mjwimbzg.jpg?size_id=7

http://www.mediafire.com/convkey/06cd/6axbioj2lva74qrzg.jpg?size_id=7

http://www.mediafire.com/convkey/969c/nzntdetjtnmk6z1zg.jpg?size_id=7

Edited by Tachi
Posted (edited)

Very insteresting you can check out and this one http://www.4shared.com/rar/5T1hoBbD/Item_Market_frozen_edit__.html

 

Its pretty good give many options 

Search Weapons,armors,jewerls,etc,misc,accessories,grades,D,C,B,A,S,no grades

Allow player put item on sale,allow player to get the item from shop back when they want etc /// 

 

I paste this not to flame you must check it out and maybe new ideas will come up ..

 

BTW excelent code dude !! :)

 

PS.Here is the post on mxc click me

Edited by L2LostWard
Posted

Very insteresting you can check out and this one http://www.4shared.com/rar/5T1hoBbD/Item_Market_frozen_edit__.html

 

Its pretty good give many options 

Search Weapons,armors,jewerls,etc,misc,accessories,grades,D,C,B,A,S,no grades

Allow player put item on sale,allow player to get the item from shop back when they want etc /// 

 

I paste this not to flame you must check it out and maybe new ideas will come up ..

 

BTW excelent code dude !! :)

 

PS.Here is the post on mxc click me

ty man i know this mod' and i think is nice to be online in many server's

 

I think it's exciting that someone can change a weapon augmented for another augmented wepoan :)

Posted

Too much db connections, Java 6 writting style, and it would benefit from using CBoard.

 

The filter section can be shortcuted by 73784733 with correct use of Java 8 streams.

Posted

Too much db connections, Java 6 writting style, and it would benefit from using CBoard.

 

The filter section can be shortcuted by 73784733 with correct use of Java 8 streams.

yes you're right, but I have given to share what I found and I thought it useful
 
people like you, who know Java can tell which variant is better :)
Posted

 

yes you're right, but I have given to share what I found and I thought it useful
 
people like you, who know Java can tell which variant is better :)

 

 

I don't blame you, or even code author, I simply point to possible optimizations. Do whatever you want from here.

Posted

I don't blame you, or even code author, I simply point to possible optimizations. Do whatever you want from here.

I know that I did not say that I've blamed myself but I shared what I found :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • To manually override it you got to use command //field_cycle set_step 1 11   1 is the field cycle id for hellbound island from db (fiy 2 & 3 are the seeds in gracia sod and soi) and 11 is the level you want to change it to. Anywhere from 1 to 11 will work for different stages.     
    • SMMTG.PRO — TELEGRAM SERVICES PROVIDER   PRICE LIST ★ Premium Subscribers for Bots Russia — from $5.6 / 1,000 subs Ukraine — from $5.6 / 1,000 subs USA — from $6.4 / 1,000 subs Israel — from $6.4 / 1,000 subs Uzbekistan — from $6.4 / 1,000 subs Turkey — from $6.4 / 1,000 subs China — from $6.4 / 1,000 subs Thailand — from $6.4 / 1,000 subs Europe — from $6.4 / 1,000 subs India — from $6.4 / 1,000 subs Other countries — from $13 / 1,000 subs OTHER SERVICES Telegram Boost — from $42 / 1,000 votes Premium Subscribers for Channels — from $2.9 / 1,000 Telegram Stars — from $16.9 / 1,000 stars Regular Subscribers for Channels — from $0.19 / 1,000 Regular Subscribers for Bots — from $0.25 / 1,000 Post Reactions — from $0.14 / 1,000 reactions Post Views — from $0.07 / 1,000 views EXCLUSIVE SERVICES ★ Telegram Search TOP Ranking | SEO Optimization ★ Aged Telegram Bots (registered accounts) — from $1.9 / bot ★ Telegram SEO & Search Training PAYMENT METHODS Heleket — any cryptocurrency CrystalPay — RUB | KZT | SBP | CryptoBot & more Payeer — multiple payment options ➤ Website (24/7): SMMTG.PRO ➤ Telegram Channel: t.me/+e_DKWnC5AFw0ZDhi ➤ 24/7 Support: t.me/smmtg_link
    • 📌 FORUM RULES (Revised – Legal Compliant) Η χρήση του forum προϋποθέτει την πλήρη αποδοχή των παρακάτω κανόνων. Οποιαδήποτε παραβίαση ενδέχεται να οδηγήσει σε περιορισμούς ή μόνιμο αποκλεισμό. 1. Spam & Κατάχρηση Δημοσιεύσεων Το spam απαγορεύεται. Μονολεκτικές, άσχετες ή πολλαπλές διαδοχικές δημοσιεύσεις δεν επιτρέπονται. Bumping επιτρέπεται μόνο στο Marketplace, μία φορά κάθε 24 ώρες. Απάντηση σε θέματα παλαιότερα των 6 μηνών δεν επιτρέπεται. Σχόλια τύπου «wrong section», «request lock» κ.λπ. απαγορεύονται — χρησιμοποιήστε το Report Section. 2. Συμπεριφορά & Τάξη Απαγορεύονται: βρισιές, trolling, drama, απειλές, ρατσισμός, flame posts. Οι κανόνες συμπεριφοράς ισχύουν και σε PMs, profile comments και λοιπές περιοχές. Πολιτικά θέματα επιτρέπονται μόνο εντός λογικών και πολιτισμένων ορίων. 3. Απαγορευμένο & Ακατάλληλο Περιεχόμενο Απαγορεύεται αυστηρά η δημοσίευση ή αναζήτηση περιεχομένου που είναι: Παράνομο βάσει ισχύουσας νομοθεσίας Πειρατικό (warez, cracks, serials, pirated software) Σεξουαλικό, πορνογραφικό ή βίαιο Προσβλητικό, ρατσιστικό ή εξτρεμιστικό Θρησκευτικά προκλητικό με σκοπό την ένταση ➡️ Όλα τα παραπάνω διαγράφονται άμεσα, χωρίς προειδοποίηση. 4. Διαφημίσεις & Προώθηση Απαγορεύεται κάθε μορφή διαφήμισης χωρίς έγκριση Administrator. Απαγορεύεται η προώθηση παράνομων ή μη αδειοδοτημένων υπηρεσιών. Affiliate links, referral systems και external promotions απαιτούν έγκριση. 5. Γλώσσα & Παρουσίαση Μην αναμειγνύετε γλώσσες (αγγλικά σε ελληνικά topics και αντίστροφα). Χρησιμοποιείτε tags [GR] ή [EN]. Τα Greeklish επιτρέπονται προσωρινά, ωστόσο προτιμάται η χρήση ελληνικών χαρακτήρων. 6. Credits & Πνευματικά Δικαιώματα Υποχρεωτική αναφορά πηγών και credits. Απαγορεύεται η αναδημοσίευση περιεχομένου χωρίς άδεια. Κάθε χρήστης είναι υπεύθυνος για τα δικαιώματα του περιεχομένου που δημοσιεύει. 7. Κυβερνοεγκλήματα & Επιβλαβείς Πρακτικές Απαγορεύεται αυστηρά: Hacking, DDoS, flooding, botnets, booters Οδηγίες, εργαλεία ή καθοδήγηση για παράνομες ψηφιακές επιθέσεις Αναζήτηση ή πώληση τέτοιων υπηρεσιών 8. Υπογραφές (Signatures) Μέγιστο μέγεθος: 800x300 pixels. Υπογραφές που παραβιάζουν τους κανόνες αφαιρούνται. 9. Λογαριασμοί & Ασφάλεια Ένας λογαριασμός ανά χρήστη. Κλεμμένοι, κοινόχρηστοι ή πολλαπλοί λογαριασμοί απαγορεύονται. Το forum διατηρεί το δικαίωμα άμεσης διαγραφής λογαριασμών. 10. Σεβασμός προς το Staff Υποτίμηση, απειλές ή προσβολές προς staff δεν γίνονται ανεκτές. Για διαφωνίες ή παραβάσεις χρησιμοποιήστε το Report Section. LEGAL POLICY (Updated – Strict Compliance) 1. Νομιμότητα Περιεχομένου Απαγορεύεται κάθε περιεχόμενο που: Παραβιάζει νόμους ή κανονισμούς Παραβιάζει copyright ή intellectual property Προωθεί παράνομες οικονομικές, τραπεζικές ή επενδυτικές υπηρεσίες Σχετίζεται με απάτη, phishing, money laundering 2. DMCA – Copyright Protection Το forum συμμορφώνεται πλήρως με τον DMCA. Έγκυρες αναφορές οδηγούν σε άμεση αφαίρεση περιεχομένου. Επαναλαμβανόμενες παραβιάσεις = μόνιμος αποκλεισμός. 3. AML / Financial Compliance Απαγορεύεται περιεχόμενο σχετικό με ξέπλυμα χρήματος. Απαγορεύεται η προώθηση μη αδειοδοτημένων χρηματοοικονομικών υπηρεσιών. Δεν παρέχεται καμία οικονομική ή επενδυτική συμβουλή. 4. User-Generated Content & Ευθύνη Όλο το περιεχόμενο δημιουργείται από τους χρήστες. Το forum δεν φέρει νομική ευθύνη, αλλά: Παρακολουθεί Διαγράφει Συμμορφώνεται με τον νόμο 5. AI Moderation Χρησιμοποιούνται AI-based εργαλεία για εντοπισμό παραβάσεων. Η τελική απόφαση λαμβάνεται πάντα από άνθρωπο. 6. Τελικές Διατάξεις Οι κανόνες μπορούν να τροποποιηθούν χωρίς προειδοποίηση. Η χρήση του forum συνεπάγεται αποδοχή όλων των πολιτικών. Η άγνοια των κανόνων δεν αποτελεί δικαιολογία.   ΠΟΛΙΤΙΚΗ ΑΠΟΡΡΗΤΟΥ (Privacy Policy) – Ελληνικά Η παρούσα Πολιτική Απορρήτου περιγράφει τον τρόπο με τον οποίο το forum συλλέγει, χρησιμοποιεί και προστατεύει τα προσωπικά δεδομένα των χρηστών του, σύμφωνα με τον Γενικό Κανονισμό Προστασίας Δεδομένων (GDPR – ΕΕ 2016/679). 1. Συλλογή Δεδομένων Το forum ενδέχεται να συλλέγει τα ακόλουθα δεδομένα: Όνομα χρήστη (username) Διεύθυνση email IP address Ημερομηνία και ώρα σύνδεσης Περιεχόμενο δημοσιεύσεων (posts, topics, private messages) Δεν συλλέγονται ευαίσθητα προσωπικά δεδομένα. 2. Χρήση Δεδομένων Τα δεδομένα χρησιμοποιούνται αποκλειστικά για: Τη λειτουργία και ασφάλεια του forum Τη διαχείριση λογαριασμών Τη βελτίωση της εμπειρίας χρήσης Την πρόληψη κατάχρησης, απάτης ή παράνομων ενεργειών Τη συμμόρφωση με νομικές υποχρεώσεις 3. User-Generated Content Όλο το περιεχόμενο που δημοσιεύεται στο forum δημιουργείται από τους χρήστες. Οι χρήστες φέρουν την αποκλειστική ευθύνη για τα δεδομένα που επιλέγουν να δημοσιεύσουν. 4. Cookies Το forum χρησιμοποιεί cookies μόνο για: Διατήρηση σύνδεσης χρήστη Βασική λειτουργικότητα Ασφάλεια Δεν χρησιμοποιούνται cookies για διαφημιστική παρακολούθηση τρίτων. 5. AI & Αυτοματοποιημένη Επεξεργασία Το forum ενδέχεται να χρησιμοποιεί αυτοματοποιημένα ή AI-based εργαλεία για: Ανίχνευση spam Εντοπισμό παραβιάσεων κανόνων ή παράνομου περιεχομένου ➡️ Οι αποφάσεις επιβολής λαμβάνονται πάντα από άνθρωπο. 6. Κοινοποίηση Δεδομένων Τα προσωπικά δεδομένα: Δεν πωλούνται Δεν διαμοιράζονται με τρίτους Εξαίρεση υπάρχει μόνο εφόσον απαιτείται από τον νόμο ή αρμόδιες αρχές. 7. Δικαιώματα Χρηστών (GDPR) Οι χρήστες έχουν δικαίωμα: Πρόσβασης στα δεδομένα τους Διόρθωσης ή διαγραφής Περιορισμού επεξεργασίας Υποβολής αιτήματος διαγραφής λογαριασμού 8. Ασφάλεια Δεδομένων Λαμβάνονται εύλογα τεχνικά και οργανωτικά μέτρα για την προστασία των δεδομένων, ωστόσο καμία πλατφόρμα δεν είναι απολύτως ασφαλής. 9. Τροποποιήσεις Η παρούσα πολιτική μπορεί να τροποποιηθεί χωρίς προηγούμενη ειδοποίηση. Η συνέχιση χρήσης του forum συνιστά αποδοχή των αλλαγών. ✅ Σημείωση Οποιοδήποτε παράνομο περιεχόμενο δεν επιτρέπεται πουθενά στο forum, ανεξαρτήτως ρόλου, πρόσβασης ή status (VIP / Donator / Staff). 📌 FORUM RULES (English – Legal Compliant) By accessing or using this forum, you agree to comply with the following rules. Violations may result in warnings, restrictions, or permanent account termination. 1. Spam & Abuse Spam is strictly prohibited. One-word, low-effort, off-topic, or consecutive posts are not allowed. Bumping is allowed only in the Marketplace, once every 24 hours. Replying to topics older than 6 months is not permitted. Posts such as “wrong section”, “request lock”, etc. are not allowed — use the Report Section instead. 2. Conduct & Behavior Insults, harassment, trolling, threats, racism, flame posts, and toxic behavior are prohibited. These rules apply to all areas, including private messages and profile comments. Political discussions are allowed only within reasonable and respectful limits. 3. Prohibited & Illegal Content The following content is strictly prohibited anywhere on the forum: Any content that violates applicable laws or regulations Pirated software, warez, cracks, serials, or copyright-infringing material Malware, hacking tools, exploits, or harmful code Sexual, pornographic, violent, or extremist material Hate speech, discrimination, or incitement Content intended to provoke religious or social conflict ➡️ Such content will be removed immediately, without notice. 4. Advertising & Promotion Advertising of any kind requires prior administrator approval. Promotion of illegal or unlicensed services is strictly forbidden. Affiliate links, referral systems, and external promotions require approval. 5. Language & Formatting Do not mix languages (English in non-English topics and vice versa). Use [GR] or [EN] tags when creating a topic. Greeklish is temporarily allowed, but native characters are preferred. 6. Credits & Intellectual Property Proper credit must be given when using third-party content. Reposting content without permission is prohibited. Users are solely responsible for the intellectual property rights of their posts. 7. Cybercrime & Harmful Activities Strictly prohibited: Hacking, DDoS, flooding, botnets, booters Requests, guides, tools, or services related to cyber attacks Buying, selling, or searching for such services 8. Signatures Maximum allowed size: 800x300 pixels. Non-compliant signatures will be removed. 9. Accounts & Security One account per user is allowed. Stolen, shared, or multiple accounts are prohibited. The forum reserves the right to suspend or delete accounts immediately. 10. Respect Toward Staff Disrespect, threats, or harassment toward moderators or administrators will not be tolerated. Use the Report Section to address issues. ⚖️ LEGAL POLICY (English – Strict Compliance) This policy defines the legal framework governing forum operation. 1. User-Generated Content & Liability All content is created by users. The forum and its staff are not legally responsible for user-generated content. Reasonable efforts are made to monitor, review, and remove unlawful material. 2. Legal Compliance Content that violates: Local, national, or international laws Intellectual property rights Terms of third-party services is strictly prohibited. 3. DMCA – Copyright Policy The forum complies fully with the Digital Millennium Copyright Act (DMCA). Valid takedown requests result in prompt content removal. Repeat copyright offenders will be permanently banned. 4. AML – Anti-Money Laundering Prohibited content includes: Money laundering schemes or instructions Fraud, scams, or financial manipulation Promotion of unlicensed or illegal financial services The forum cooperates with authorities when legally required. 5. FCS – Financial & Compliance Services The forum does not provide financial, investment, or legal advice. Promotion of unregulated banking, investment, or financial services is forbidden. 6. Privacy & GDPR Publishing personal data of others is prohibited. Sharing private communications without consent is forbidden. The forum operates in compliance with GDPR regulations. 7. AI-Assisted Moderation Automated and AI-based tools may be used to detect violations. All enforcement actions involve human review. 8. Final Provisions Policies may be updated without prior notice. Continued use of the forum constitutes acceptance of all rules. Ignorance of the rules is not an excuse. PRIVACY POLICY – English Version This Privacy Policy explains how the forum collects, uses, and protects user data, in accordance with the General Data Protection Regulation (GDPR – EU 2016/679). 1. Data Collection The forum may collect the following data: Username Email address IP address Login timestamps User-generated content (posts, topics, private messages) No sensitive personal data is intentionally collected. 2. Use of Data Data is used solely for: Forum operation and security Account management Improving user experience Preventing abuse, fraud, or illegal activity Legal and regulatory compliance 3. User-Generated Content All content posted on the forum is created by users. Users are solely responsible for any personal data they choose to publish. 4. Cookies Cookies are used only for: Session management Essential functionality Security purposes No third-party advertising or tracking cookies are used. 5. AI & Automated Processing The forum may use automated or AI-assisted tools to: Detect spam Identify rule violations or illegal content ➡️ All enforcement decisions are subject to human review. 6. Data Sharing Personal data is: Not sold Not shared with third parties Except where required by law or competent authorities. 7. User Rights (GDPR) Users have the right to: Access their personal data Request correction or deletion Request restriction of processing Request account deletion 8. Data Security Reasonable technical and organizational measures are implemented to protect data. However, no online platform can guarantee absolute security. 9. Policy Updates This policy may be updated at any time without prior notice. Continued use of the forum constitutes acceptance of the updated policy. ✅ Final Note If you have concerns regarding privacy or data protection, please contact the forum administration. ✅ Important Notice Illegal content is not allowed anywhere on the forum, regardless of user role, status, or access level.
    • Hello everyone, This topic has been created to report any content that is considered illegal under applicable law or in violation of the forum rules. This includes, but is not limited to: Illegal software (pirated, cracked, or unauthorized software) Copyright-infringing material Malware, viruses, or any harmful code Scams, fraud, phishing attempts, or impersonation Illegal banking or financial services Money laundering activities or related instructions Any other illegal, unethical, or rule-violating activity — you name it If you encounter any such content, please report it here so it can be reviewed and removed promptly. Legal Disclaimer All content published on this forum is created and posted by its users. The forum administration does not take responsibility for user-generated content. However, we make every reasonable effort to monitor, review, remove, and maintain the forum by deleting illegal or rule-violating content as soon as it is reported or identified. By using this forum, you acknowledge and agree to these terms.     Moderator Notice We would like to inform all users that we are currently developing a custom AI-powered API tool that will assist our moderation team in scanning the forum database for illegal or rule-violating activity. This system will be used strictly as a support tool to help identify potentially problematic content, which will then be reviewed by human moderators before any action is taken. The goal is to improve forum safety, compliance, and response time while maintaining fairness and transparency. 🚧 Coming soon — more details will be shared once the system is ready. Thank you for your cooperation and for helping us keep the forum clean and lawful.
  • 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