Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 20:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Fix CSROR [CSRO] MALL_ITEM source

Discussion on Fix CSROR [CSRO] MALL_ITEM source within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2019
Posts: 87
Received Thanks: 76
Talking Fix CSROR [CSRO] MALL_ITEM source

I have fixed them a long time ago and I will share my source code




 
int maxstack = GetRefMaxStack(package_item_codename);
int scrdata = GetScrData(package_item_codename);
 
if ((maxstack <= 1) && (nItems == 1))
{
WriterClass cb = new WriterClass();
Packet inventory = new Packet(0xB034);
inventory.WriteUInt8(1);
inventory.WriteUInt8(24);
inventory.WriteUInt16(uint1);
inventory.WriteUInt8(b1);
inventory.WriteUInt8(b2);
inventory.WriteUInt8(b3);
inventory.WriteUInt8(1);
inventory.WriteUInt8(res);
inventory.WriteUInt16(nItems);
inventory.WriteUInt32(0);
this.client_socket.Send(inventory);
Packet inventory2 = new Packet(0xB034);
////------------------------------------------
WriterClass cb1 = new WriterClass();
Packet inventory2 = new Packet(0xB034);
inventory2.WriteUInt8(1);
inventory2.WriteUInt8(7);
inventory2.WriteUInt8((byte)(res));
this.client_socket.Send(inventory2);
Console.WriteLine("ItemMall OK ->" + username);
flag = true;
}
if ((maxstack <= 1) && (nItems > 1))
{
WriterClass cb = new WriterClass();
Packet inventory = new Packet(0xB034);
inventory.WriteUInt8(1);
inventory.WriteUInt8(24);
inventory.WriteUInt16(uint1);
inventory.WriteUInt8(b1);
inventory.WriteUInt8(b2);
inventory.WriteUInt8(b3);
inventory.WriteUInt8(1);
inventory.WriteUInt8(res);
inventory.WriteUInt16(nItems);
inventory.WriteUInt32(0);
this.client_socket.Send(inventory);
Packet inventory2 = new Packet(0xB034);
////------------------------------------------
WriterClass cb1 = new WriterClass();
Packet inventory2 = new Packet(0xB034);
inventory2.WriteUInt8(1);
inventory2.WriteUInt8(7);
inventory2.WriteUInt8((byte)(res));
this.client_socket.Send(inventory2);
Console.WriteLine("ItemMall OK ->" + username);
flag = true;
}
if ((maxstack > 1) && scrdata <= 1)
{
WriterClass cb = new WriterClass();
Packet inventory = new Packet(0xB034);
inventory.WriteUInt8(1);
inventory.WriteUInt8(24);
inventory.WriteUInt16(uint1);
inventory.WriteUInt8(b1);
inventory.WriteUInt8(b2);
inventory.WriteUInt8(b3);
inventory.WriteUInt8(1);
inventory.WriteUInt8(res);
inventory.WriteUInt16(nItems);
inventory.WriteUInt32(0);
this.client_socket.Send(inventory);
Packet inventory2 = new Packet(0xB034);
////------------------------------------------
WriterClass cb1 = new WriterClass();
Packet inventory2 = new Packet(0xB034);
inventory2.WriteUInt8(1);
inventory2.WriteUInt8(7);
inventory2.WriteUInt8((byte)(res));
this.client_socket.Send(inventory2);
Console.WriteLine("ItemMall OK ->" + username);
flag = true;
}
if ((maxstack > 1) && scrdata > 1)
{
WriterClass cb = new WriterClass();
Packet inventory = new Packet(0xB034);
inventory.WriteUInt8(1);
inventory.WriteUInt8(24);
inventory.WriteUInt16(uint1);
inventory.WriteUInt8(b1);
inventory.WriteUInt8(b2);
inventory.WriteUInt8(b3);
inventory.WriteUInt8(1);
inventory.WriteUInt8(res);
inventory.WriteUInt16(nItems);
inventory.WriteUInt32(0);
this.client_socket.Send(inventory);
Packet inventory2 = new Packet(0xB034);
////------------------------------------------
WriterClass cb1 = new WriterClass();
Packet inventory2 = new Packet(0xB034);
inventory2.WriteUInt8(1);
inventory2.WriteUInt8(7);
inventory2.WriteUInt8((byte)(res));
this.client_socket.Send(inventory2);
Console.WriteLine("ItemMall OK ->" + username);
flag = true;
}
}
}
return flag;
}
 
public static int GetRefMaxStack(string refpackagecode)
{
String connectionstring1 = "Data Source=" + Global.sqlsv + ";Initial Catalog=" + Global.sqldb + ";Integrated Security=false; User ID = " + Global.sqluser + "; Password = " + Global.sqlpw + ";";
// String connectionstring3 = "Data Source=" + Global.sqlsv + ";Initial Catalog=" + Global.sqldbAcc + ";Integrated Security=false; User ID = " + Global.sqluser + "; Password = " + Global.sqlpw + ";";
using (SqlConnection con1 = new SqlConnection(connectionstring1))
{
con1.Open();
int value = 0;
SqlCommand command = new SqlCommand
("select MaxStack from " + Global.sqldb + ".DBO._refobjitem where id in ( select link from " + Global.sqldb + ".DBO._refobjcommon where codename128 in "
+ "(select refitemcodename from " + Global.sqldb + ".DBO._RefScrapOfPackageItem where RefPackageItemCodeName='" + refpackagecode + "'))", con1);
IAsyncResult result = command.BeginExecuteReader();
try
{
using (SqlDataReader reader = command.EndExecuteReader(result))
{
while (reader.Read())
{
reader.GetValue(0);
value = Convert.ToUInt16(reader.GetValue(0));
}
}
}
catch (Exception)
{
// SystemClass.WriterTxT(DateTime.Now.ToString("yyyy-MM-dd") + ".Log", refpackagecode + "【获取MaxStack失败】:" + e.Message);
}
return value;
}
}
public static int GetScrData(string refpackagecode)
{
String connectionstring1 = "Data Source=" + Global.sqlsv + ";Initial Catalog=" + Global.sqldb + ";Integrated Security=false; User ID = " + Global.sqluser + "; Password = " + Global.sqlpw + ";";
// String connectionstring3 = "Data Source=" + Global.sqlsv + ";Initial Catalog=" + Global.sqldbAcc + ";Integrated Security=false; User ID = " + Global.sqluser + "; Password = " + Global.sqlpw + ";";
using (SqlConnection con1 = new SqlConnection(connectionstring1))
{
con1.Open();
int value = 0;
SqlCommand command = new SqlCommand("select data from " + Global.sqldb + ".DBO._RefScrapOfPackageItem where RefPackageItemCodeName='" + refpackagecode + "'", con1);
IAsyncResult result = command.BeginExecuteReader();
try
{
using (SqlDataReader reader = command.EndExecuteReader(result))
{
while (reader.Read())
{
reader.GetValue(0);
value = Convert.ToUInt16(reader.GetValue(0));
}
}
}
catch (Exception)
{
// SystemClass.WriterTxT(DateTime.Now.ToString("yyyy-MM-dd") + ".Log", refpackagecode + "【获取scrdata失败】:" + e.Message);
}
return value;
}
}
qq909047432 is offline  
Thanks
1 User
Old 02/12/2020, 22:14   #2
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,108
Received Thanks: 903
Holy, are you actually planning to create SQL connection per client request? Good luck with that, your tool will be dead with 25 ~ 40 user at same time.
#HB is offline  
Old 02/13/2020, 08:03   #3
 
elite*gold: 0
Join Date: Apr 2019
Posts: 87
Received Thanks: 76
Wink

Quote:
Originally Posted by #HB View Post
Holy, are you actually planning to create SQL connection per client request? Good luck with that, your tool will be dead with 25 ~ 40 user at same time.
My tool supports 3000 users online, so there should be no problems;)
qq909047432 is offline  
Old 02/13/2020, 12:24   #4
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,108
Received Thanks: 903
Quote:
Originally Posted by qq909047432 View Post
My tool supports 3000 users online, so there should be no problems;)
Sure, good luck.
#HB is offline  
Old 02/13/2020, 15:22   #5
 
elite*gold: 0
Join Date: Jan 2009
Posts: 314
Received Thanks: 685
Quote:
Originally Posted by #HB View Post
Holy, are you actually planning to create SQL connection per client request? Good luck with that, your tool will be dead with 25 ~ 40 user at same time.
There is a lot of stuff wrong with the code but it ain't the new SqlConnection per request. .
DaxterSoul is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
CSROR Mercenary Fix [The Real Fix]
07/20/2018 - SRO PServer Guides & Releases - 4 Replies
Hello guys ... Today i am gonna show you how to fix the guild mercenary scrolls. I found some fixes before but it was based on changing the scrolls to a pet scrolls. I have a CSROR server,I have made it work
Purchase CSROR or CSRO
04/28/2018 - Silkroad Online Trading - 1 Replies
Purchase CSROR or CSRO without BUG server files must be perfect, you have contacted me Tencent QQ:425566827
[POLL] how about Navifilter for csror ?
04/11/2017 - SRO Private Server - 3 Replies
As topic title said .. How about Navifilter for CSROR files ? - I see most of the greatest servers are using this filter to protect themselves from attacks and exploits , and the amazing features that found in this filter + the comfortable GUI too .. - so, Should Alexiuns* create a version of navifilter for CSRO-R files ? lets POLL for that !! :)
[04.09.13] GigaByte v2.6 [FIX, FIX, FIX, FIX AND FIX]
09/11/2013 - WarRock Hacks, Bots, Cheats & Exploits - 79 Replies
http://www.elitepvpers.com/forum/warrock-hacks-bot s-cheats-exploits/2843300-11-09-gigabyte-public-v2 -7-a.html



All times are GMT +1. The time now is 20:46.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.