View Full Version : Trade/Sell Disabled
Savageboiii
08-11-2021, 07:33 AM
Since disabling of trading, dueling and selling , barely any players have been playing on the server.. Come one guys fix the issue or atleast enable the trade and just control the server.. Its getting quite annoying.. You cant trade sell or duel, its just too boring all you do is grind.
Pro Noob
08-11-2021, 02:04 PM
Since disabling of trading, dueling and selling , barely any players have been playing on the server.. Come one guys fix the issue or atleast enable the trade and just control the server.. Its getting quite annoying.. You cant trade sell or duel, its just too boring all you do is grind.
Our mods are policing it while the issue persist.
supertje
08-11-2021, 02:17 PM
Our mods are policing it while the issue persist.
they are hardly online, so I would say appoint someone who is online regularly, and as far as I know dodian has trade logs, does it show the dupe or not? who has what before and after?
Savageboiii
08-11-2021, 03:31 PM
they are hardly online, so I would say appoint someone who is online regularly, and as far as I know dodian has trade logs, does it show the dupe or not? who has what before and after?
I agree.. Im on almost everyday and I can confirm that player count is dropping cuz you cant do shit on the server anymore except grind all day
Pro Noob
08-11-2021, 05:26 PM
they are hardly online, so I would say appoint someone who is online regularly, and as far as I know dodian has trade logs, does it show the dupe or not? who has what before and after?
We do have trade logs, but that do not hinder people as seen before.
I do not assign moderators so I would not know if they are online or not.
Jabast
08-11-2021, 07:55 PM
they are hardly online, so I would say appoint someone who is online regularly, and as far as I know dodian has trade logs, does it show the dupe or not? who has what before and after?
I do admit that I haven't been online, due to being allowed to leave quarantine again. I've managed to monitor trades quite well last week, however I am very busy with work. We will discuss this topic in staff chat asap, sorry for the inconvenience..
I notice this too, luckily you can drop trade so I have been using that method to transfer supplies from my gathering account to my main but I can see why players would avoid the server based off this
Nozemi
08-11-2021, 10:06 PM
I’m painfully aware of how annoying this is. At this point I’d say the options are:
1. Enable trading and eco (or full wipe) server once new one goes live.
2. Keep it as is, while we wait for new server to go live.
I’ve made an attempt to fix the dupe. I did not succeed, and it doesn’t seem to be a simple fix. Not that I’m the most experienced rsps developer around. I’m really just a web developer, but learning.
Reasons like this case is why Dodians source code is public. So anyone in the community could fix it. I know there are capable people in the community, or at least were. Apparently nobody is really interested in doing the work that is necessary to retain a remake of Dodian. Other than the current team of developers. For that reason things take an awful long time and things might never get fixed. I personally gave up messing with the current server, as it’s simply not worth spending couple days figuring out how to prevent this dupe for happening.
This said, I didn’t even expect people to be interested in playing Dodian this far out. It’s been over 3 years since this run went live. That’s probably over 2 years longer than any remake have ever run without having a reset. So my focus isn’t really to retain player count, I’m more focused on restoring player count once we have something I personally think is good, instead of this bugged out shot hole of a server.
I’m sorry for the inconveniences this situation causes. Sadly not in my power to have an immediate solution that has no consequences. So I’ll naturally pick the one I feel is best long term.
Nozemi
08-11-2021, 10:09 PM
Also! While we do have trade logs. They aren’t good enough to really detect if someone is duping. The only reason we noticed the duping in the first place, because it was massively abused. It became very obvious that nobody gathered that amount of resources.
When it comes to appointing other staff members that are more active, I guess it could be discussed. However I’m not too keen on that for a solution either. Option 1 and 2 form above are the only solutions to the problem in my personal opinion.
Aussol
11-09-2021, 12:23 AM
public void giveItems() {
client other = getClient(trade_reqId);
if (validClient(trade_reqId)) {
try {
CopyOnWriteArrayList<GameItem> offerCopy = new CopyOnWriteArrayList<GameItem>();
CopyOnWriteArrayList<GameItem> otherOfferCopy = new CopyOnWriteArrayList<GameItem>();
for (GameItem item : other.offeredItems) {
otherOfferCopy.add(new GameItem(item.id, item.amount));
}
for (GameItem item : offeredItems) {
offerCopy.add(new GameItem(item.id, item.amount));
}
if (dbId < other.dbId) {
CommManager.logTrade(dbId, other.dbId, offerCopy, otherOfferCopy, true);
saveItems();
other.saveItems();
//println("Sending trade to loginserver.");
}
for (GameItem item : other.offeredItems) {
if (item.id > 0) {
addItem(item.id, item.amount);
//println("TradeConfirmed, item=" + item.id);
}
}
closeInterface();
tradeResetNeeded = true;
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void acceptDuelWon(){
if (duelFight && duelWin) {
duelWin = false;
if (System.currentTimeMillis() - lastButton < 1000) {
lastButton = System.currentTimeMillis();
return;
} else {
lastButton = System.currentTimeMillis();
}
client other = getClient(duel_with);
CopyOnWriteArrayList<GameItem> offerCopy = new CopyOnWriteArrayList<GameItem>();
CopyOnWriteArrayList<GameItem> otherOfferCopy = new CopyOnWriteArrayList<GameItem>();
for (GameItem item : otherOfferedItems) {
otherOfferCopy.add(new GameItem(item.id, item.amount));
}
for (GameItem item : offeredItems) {
offerCopy.add(new GameItem(item.id, item.amount));
}
CommManager.logTrade(dbId, otherdbId, offerCopy, otherOfferCopy, false);
for(GameItem item : otherOfferedItems){
if(item.id > 0 && item.amount > 0){
if(Engine.itemManager.isStackable(item.id)){
addItem(item.id, item.amount);
} else {
addItem(item.id, 1);
}
}
}
for (GameItem item : offeredItems) {
if (item.id > 0 && item.amount > 0) {
addItem(item.id, item.amount);
}
}
resetDuel();
saveItems();
saveStats(false);
if (validClient(duel_with)) {
other.resetDuel();
other.saveStats(false);
}
}
}
public void saveItems() {
//println_debug("Saving items for: " + playerId + ", " + playerName);
try {
Statement statement = Database.conn.createStatement();
String inventory = "", equipment = "", bank = "";
for (int i = 0; i < playerItems.length; i++) {
if (playerItems[i] > 0) {
inventory += i + "-" + (playerItems[i] - 1) + "-"
+ playerItemsN[i] + " ";
}
}
for (int i = 0; i < bankItems.length; i++) {
if (bankItems[i] > 0) {
bank += i + "-" + (bankItems[i] - 1) + "-" + bankItemsN[i]
+ " ";
}
}
for (int i = 0; i < playerEquipment.length; i++) {
if (playerEquipment[i] > 0) {
equipment += i + "-" + (playerEquipment[i]) + "-"
+ playerEquipmentN[i] + " ";
}
}
statement.executeUpdate("UPDATE user SET x = " + absX + ", y = " + absY + ", equipment='" + equipment + "', inventory='" + inventory + "', bank='" + bank + "' WHERE userid = " + dbId);
statement.close();
} catch (Exception e) {
e.printStackTrace();
println_debug("Saving items Exception: " + playerId + ", " + playerName);
return;
}
}
public void pickUpItem(int id, int x, int y) {
for (GroundItem item : Ground.items) {
if (item.id == id && absX == x && absY == y && (item.visible || playerId == item.dropper) && playerHasItem(-1)) {
if (absX == item.x && absY == item.y) {
if (premiumItem(item.id) && !premium) {
sendMessage("You must be a premium member to use this item.");
return;
}
addItem(item.id, item.amount);
Ground.deleteItem(item, dbId);
saveItems();
break;
}
}
}
}
public void dropItem(int id, int slot) {
inventoryModified = true;
if (inTrade || inDuel || IsBanking) {
return;
}
if(!Engine.dropping){
sendMessage("Dropping has been disabled. Please try again later.");
return;
}
if(inCombat){
sendMessage("You can't drop items in combat!");
return;
}
int amount = 0;
if (System.currentTimeMillis() - session_start < 60000) {
sendMessage("You must be online 1 minute before you can drop an item.");
return;
}
if (hasPin && !pinValid) {
pinInterface = -1;
refreshPinScreen();
return;
}
for (int i = 0; i < noTrade.length; i++) {
if ((id == noTrade[i] && !premiumItem(id))) {
sendMessage("You can't drop this item!");
return;
}
}
if(!Engine.itemManager.isTradeable(id)){
sendMessage("You can't trade that item.");
return;
}
if (playerItems[slot] == (id + 1) && playerItemsN[slot] > 0) {
amount = playerItemsN[slot];
}
if (amount < 1) {
return;
}
deleteItem(id, slot, amount);
Ground.items.add(new GroundItem(absX, absY, id, amount, playerId, false));
saveItems();
}
public void dropItemSpecial(int id, int amount, int pid) {
inventoryModified = true;
if (!playerHasItem(id)) {
return;
}
int slot = findItem(id, playerItems, playerItemsN);
if (playerItems[slot] == (id + 1) && playerItemsN[slot] > 0) {
amount = playerItemsN[slot];
}
if (amount < 1) {
return;
}
deleteItem(id, slot, amount);
Ground.items.add(new GroundItem(absX, absY, id, amount, pid, false));
saveItems();
}
if (deathStage == 1) {
if(selectedNpc != null){
selectedNpc.removeEnemy(this);
}
ResetAttack();
resetAttackNpc();
deathStage = 2;
client p = getClient(duel_with);
if (duel_with > 0 && validClient(duel_with) && inDuel && duelFight) {
p.duelWin = true;
p.DuelVictory();
}else
if(wildyLevel > 0){
outStream.createFrameVarSize(104);
outStream.writeByteC(3);
outStream.writeByteA(0);
outStream.writeString("null");
outStream.endFrameVarSize();
died();
}
follow = null;
sendMessage("Oh dear, you have died!");
playerEnergy = 100;
saveItems();
pEmote = 2820;
updateRequired = true;
appearanceUpdateRequired = true;
deathTimer = systemTime;
currentHealth = playerLevel[playerHitpoints];
}
public synchronized static void logTrade(int p1, int p2, CopyOnWriteArrayList<GameItem> items, CopyOnWriteArrayList<GameItem> otherItems, boolean trade){
try{
int type = 0;
if(!trade)
type = 1;
nextTrade++;
String query = "";
query = "INSERT INTO uber3_trades SET p1=" + p1 + ", p2=" + p2 + ", type=" + type;
Database.statement.executeUpdate(query);
ResultSet inserted = Database.statement.getGeneratedKeys();
inserted.next();
int id = inserted.getInt(1);
//System.out.println("Auto-id: " + id);
for(GameItem item : items){
Database.statement.executeUpdate("INSERT INTO uber3_logs SET id = " + id + ", pid=" + p1 + ", item=" + item.id + ", amount=" + item.amount);
}
for(GameItem item : otherItems){
Database.statement.executeUpdate("INSERT INTO uber3_logs SET id = " + id + ", pid=" + p2 + ", item=" + item.id + ", amount=" + item.amount);
}
System.out.println("Sending trade " + id + " to login-server!");
} catch(Exception e){
System.out.println(e.getMessage());
e.printStackTrace();
}
}
supertje
11-09-2021, 02:07 AM
public void giveItems() {
client other = getClient(trade_reqId);
if (validClient(trade_reqId)) {
try {
CopyOnWriteArrayList<GameItem> offerCopy = new CopyOnWriteArrayList<GameItem>();
CopyOnWriteArrayList<GameItem> otherOfferCopy = new CopyOnWriteArrayList<GameItem>();
for (GameItem item : other.offeredItems) {
otherOfferCopy.add(new GameItem(item.id, item.amount));
}
for (GameItem item : offeredItems) {
offerCopy.add(new GameItem(item.id, item.amount));
}
if (dbId < other.dbId) {
CommManager.logTrade(dbId, other.dbId, offerCopy, otherOfferCopy, true);
saveItems();
other.saveItems();
//println("Sending trade to loginserver.");
}
for (GameItem item : other.offeredItems) {
if (item.id > 0) {
addItem(item.id, item.amount);
//println("TradeConfirmed, item=" + item.id);
}
}
closeInterface();
tradeResetNeeded = true;
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void acceptDuelWon(){
if (duelFight && duelWin) {
duelWin = false;
if (System.currentTimeMillis() - lastButton < 1000) {
lastButton = System.currentTimeMillis();
return;
} else {
lastButton = System.currentTimeMillis();
}
client other = getClient(duel_with);
CopyOnWriteArrayList<GameItem> offerCopy = new CopyOnWriteArrayList<GameItem>();
CopyOnWriteArrayList<GameItem> otherOfferCopy = new CopyOnWriteArrayList<GameItem>();
for (GameItem item : otherOfferedItems) {
otherOfferCopy.add(new GameItem(item.id, item.amount));
}
for (GameItem item : offeredItems) {
offerCopy.add(new GameItem(item.id, item.amount));
}
CommManager.logTrade(dbId, otherdbId, offerCopy, otherOfferCopy, false);
for(GameItem item : otherOfferedItems){
if(item.id > 0 && item.amount > 0){
if(Engine.itemManager.isStackable(item.id)){
addItem(item.id, item.amount);
} else {
addItem(item.id, 1);
}
}
}
for (GameItem item : offeredItems) {
if (item.id > 0 && item.amount > 0) {
addItem(item.id, item.amount);
}
}
resetDuel();
saveItems();
saveStats(false);
if (validClient(duel_with)) {
other.resetDuel();
other.saveStats(false);
}
}
}
public void saveItems() {
//println_debug("Saving items for: " + playerId + ", " + playerName);
try {
Statement statement = Database.conn.createStatement();
String inventory = "", equipment = "", bank = "";
for (int i = 0; i < playerItems.length; i++) {
if (playerItems[i] > 0) {
inventory += i + "-" + (playerItems[i] - 1) + "-"
+ playerItemsN[i] + " ";
}
}
for (int i = 0; i < bankItems.length; i++) {
if (bankItems[i] > 0) {
bank += i + "-" + (bankItems[i] - 1) + "-" + bankItemsN[i]
+ " ";
}
}
for (int i = 0; i < playerEquipment.length; i++) {
if (playerEquipment[i] > 0) {
equipment += i + "-" + (playerEquipment[i]) + "-"
+ playerEquipmentN[i] + " ";
}
}
statement.executeUpdate("UPDATE user SET x = " + absX + ", y = " + absY + ", equipment='" + equipment + "', inventory='" + inventory + "', bank='" + bank + "' WHERE userid = " + dbId);
statement.close();
} catch (Exception e) {
e.printStackTrace();
println_debug("Saving items Exception: " + playerId + ", " + playerName);
return;
}
}
public void pickUpItem(int id, int x, int y) {
for (GroundItem item : Ground.items) {
if (item.id == id && absX == x && absY == y && (item.visible || playerId == item.dropper) && playerHasItem(-1)) {
if (absX == item.x && absY == item.y) {
if (premiumItem(item.id) && !premium) {
sendMessage("You must be a premium member to use this item.");
return;
}
addItem(item.id, item.amount);
Ground.deleteItem(item, dbId);
saveItems();
break;
}
}
}
}
public void dropItem(int id, int slot) {
inventoryModified = true;
if (inTrade || inDuel || IsBanking) {
return;
}
if(!Engine.dropping){
sendMessage("Dropping has been disabled. Please try again later.");
return;
}
if(inCombat){
sendMessage("You can't drop items in combat!");
return;
}
int amount = 0;
if (System.currentTimeMillis() - session_start < 60000) {
sendMessage("You must be online 1 minute before you can drop an item.");
return;
}
if (hasPin && !pinValid) {
pinInterface = -1;
refreshPinScreen();
return;
}
for (int i = 0; i < noTrade.length; i++) {
if ((id == noTrade[i] && !premiumItem(id))) {
sendMessage("You can't drop this item!");
return;
}
}
if(!Engine.itemManager.isTradeable(id)){
sendMessage("You can't trade that item.");
return;
}
if (playerItems[slot] == (id + 1) && playerItemsN[slot] > 0) {
amount = playerItemsN[slot];
}
if (amount < 1) {
return;
}
deleteItem(id, slot, amount);
Ground.items.add(new GroundItem(absX, absY, id, amount, playerId, false));
saveItems();
}
public void dropItemSpecial(int id, int amount, int pid) {
inventoryModified = true;
if (!playerHasItem(id)) {
return;
}
int slot = findItem(id, playerItems, playerItemsN);
if (playerItems[slot] == (id + 1) && playerItemsN[slot] > 0) {
amount = playerItemsN[slot];
}
if (amount < 1) {
return;
}
deleteItem(id, slot, amount);
Ground.items.add(new GroundItem(absX, absY, id, amount, pid, false));
saveItems();
}
if (deathStage == 1) {
if(selectedNpc != null){
selectedNpc.removeEnemy(this);
}
ResetAttack();
resetAttackNpc();
deathStage = 2;
client p = getClient(duel_with);
if (duel_with > 0 && validClient(duel_with) && inDuel && duelFight) {
p.duelWin = true;
p.DuelVictory();
}else
if(wildyLevel > 0){
outStream.createFrameVarSize(104);
outStream.writeByteC(3);
outStream.writeByteA(0);
outStream.writeString("null");
outStream.endFrameVarSize();
died();
}
follow = null;
sendMessage("Oh dear, you have died!");
playerEnergy = 100;
saveItems();
pEmote = 2820;
updateRequired = true;
appearanceUpdateRequired = true;
deathTimer = systemTime;
currentHealth = playerLevel[playerHitpoints];
}
public synchronized static void logTrade(int p1, int p2, CopyOnWriteArrayList<GameItem> items, CopyOnWriteArrayList<GameItem> otherItems, boolean trade){
try{
int type = 0;
if(!trade)
type = 1;
nextTrade++;
String query = "";
query = "INSERT INTO uber3_trades SET p1=" + p1 + ", p2=" + p2 + ", type=" + type;
Database.statement.executeUpdate(query);
ResultSet inserted = Database.statement.getGeneratedKeys();
inserted.next();
int id = inserted.getInt(1);
//System.out.println("Auto-id: " + id);
for(GameItem item : items){
Database.statement.executeUpdate("INSERT INTO uber3_logs SET id = " + id + ", pid=" + p1 + ", item=" + item.id + ", amount=" + item.amount);
}
for(GameItem item : otherItems){
Database.statement.executeUpdate("INSERT INTO uber3_logs SET id = " + id + ", pid=" + p2 + ", item=" + item.id + ", amount=" + item.amount);
}
System.out.println("Sending trade " + id + " to login-server!");
} catch(Exception e){
System.out.println(e.getMessage());
e.printStackTrace();
}
}
Add it to the git please
KxWarrior
11-16-2021, 03:08 AM
so did it work?
supertje
11-16-2021, 03:55 AM
so did it work?
i think nobody try it,
maybe at the end of this week i got time to try something, but i dont think i can run it local
vBulletin® v3.8.11, Copyright ©2000-2024, vBulletin Solutions Inc.