Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 15:06

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

Advertisement



[Help] check if scroll used packet

Discussion on [Help] check if scroll used packet within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2009
Posts: 152
Received Thanks: 28
[Help] check if scroll used packet

hello guys,
i searching for a way to check if a specific scroll was used to do an action, i was trying to do it through 0x704c packet but it couldnt help since it only retrieve slot and itemtype

so is there any specific packet i can use to do an action based on this specific scroll been used ?

Thanks in advance
memoxl is offline  
Old 06/09/2018, 13:58   #2
 
InPanic Kev's Avatar
 
elite*gold: 80
Join Date: Feb 2011
Posts: 766
Received Thanks: 249
so where is the problem if u know the slot ?
USE SRO_VT_SHARD

DECLARE @D int , @ smallint

SET @ = 13
SET @D = (select CharID from _Char where CharName16 = '<GET CHARNAME FROM FILTER>')

SELECT RefItemID FROM _Inventory as inv
join _Items as i on i.ID64 = inv.ItemID
where Slot = @ and CharID = @D
InPanic Kev is offline  
Old 06/11/2018, 16:30   #3
 
elite*gold: 0
Join Date: Jan 2009
Posts: 152
Received Thanks: 28
Quote:
Originally Posted by InPanic Kev View Post
so where is the problem if u know the slot ?
USE SRO_VT_SHARD

DECLARE @D int , @ smallint

SET @ = 13
SET @D = (select CharID from _Char where CharName16 = '<GET CHARNAME FROM FILTER>')

SELECT RefItemID FROM _Inventory as inv
join _Items as i on i.ID64 = inv.ItemID
where Slot = @ and CharID = @D
Thank you bro for your reply, but iam talking about the packet used to do an action based on the scroll used, not about the slot of the scroll in inventory
memoxl is offline  
Old 06/12/2018, 04:58   #4
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Well, you can do any action using that very easily if I really got it!

Code:
byte slot = _pck.ReadUInt8();
int ReadItemID = 0;
SqlDataReader reader1 = new SqlCommand("Select top 1 RefItemID from [SRO_VT_SHARD].[dbo].[_Items] where ID64 in (select top 1 ItemID from [SRO_VT_SHARD].[dbo].[_Inventory] where Slot = '" + slot + "' and CharID in (select CharID from [SRO_VT_SHARD].[dbo].[_Char] where CharName16 = '" + this.charname + "'))", sqlCon.con).ExecuteReader();

if (reader1.Read())
{
   ReadItemID = Convert.ToInt32(reader1["RefItemID"]);
}

if (ReadItemID != 0)
{
   // conditions here now!
}
#HB is offline  
Thanks
1 User
Old 06/12/2018, 08:52   #5
 
InPanic Kev's Avatar
 
elite*gold: 80
Join Date: Feb 2011
Posts: 766
Received Thanks: 249
Quote:
Originally Posted by memoxl View Post
Thank you bro for your reply, but iam talking about the packet used to do an action based on the scroll used, not about the slot of the scroll in inventory
You can use the slot to find out which item was used to perform an action afterwards.

But better use the S -> C opcode : 0xB04C

Maybe you can tell us what you are planning, then we can help you more easily.
InPanic Kev is offline  
Old 06/13/2018, 11:16   #6
 
elite*gold: 0
Join Date: Jan 2009
Posts: 152
Received Thanks: 28
Quote:
Originally Posted by #HB View Post
Well, you can do any action using that very easily if I really got it!

Code:
byte slot = _pck.ReadUInt8();
int ReadItemID = 0;
SqlDataReader reader1 = new SqlCommand("Select top 1 RefItemID from [SRO_VT_SHARD].[dbo].[_Items] where ID64 in (select top 1 ItemID from [SRO_VT_SHARD].[dbo].[_Inventory] where Slot = '" + slot + "' and CharID in (select CharID from [SRO_VT_SHARD].[dbo].[_Char] where CharName16 = '" + this.charname + "'))", sqlCon.con).ExecuteReader();

if (reader1.Read())
{
   ReadItemID = Convert.ToInt32(reader1["RefItemID"]);
}

if (ReadItemID != 0)
{
   // conditions here now!
}
Thank you so much bro for your help , but i think this will return always the refitemid of slot 13 ... what if the scroll is in any other slot ? what if there is more than 1 scroll in the inventory

Quote:
Originally Posted by InPanic Kev View Post
You can use the slot to find out which item was used to perform an action afterwards.

But better use the S -> C opcode : 0xB04C

Maybe you can tell us what you are planning, then we can help you more easily.
i was planning to create a scroll and wanted to put some obstacles to prevent the scroll from running if those obstacle were true
so i wanted to define if the scroll used was scroll i have created not other one
memoxl is offline  
Old 06/17/2018, 13:46   #7
 
#HB's Avatar
 
elite*gold: 100
Join Date: Sep 2017
Posts: 1,097
Received Thanks: 889
Quote:
Originally Posted by memoxl View Post
but i think this will return always the refitemid of slot 13 ... what if the scroll is in any other slot ? what if there is more than 1 scroll in the inventory
You look beginner...

The slot will return its slot. If it was in the first slot it will return 13, because packet's Int8 is 13. Every packet has properties, writings and readings.. you can write a variable in a packet, you can read it!

Most of packets are already written in sro_client and the sro_client just sends it to the server with information, so what we're doing now is reading the packets information and using it in our own!

So, if you read what I've written above, you'll understand that (CLIENT_PLAYER_HANDLE) packet is sent every time you use an item, and it's always sent with Int8 (its slot), so you can always read the Int8 which refers to the slot of the used item.
#HB is offline  
Reply


Similar Threads Similar Threads
[Selling] riot graves(used on eune),full metal rammus(used on eune,NA)
01/06/2014 - League of Legends Trading - 8 Replies
also would be interested in trading for arcade sona(eune)
used king Rammus code OR katarina kitty cat code (KR) → used PAX sivir code (NA / EU)
08/23/2012 - League of Legends Trading - 2 Replies
Hello Korea is my server users. I NA / EU servers have already been used in the "Pax Sivir Code" wants As a reward, "king Rammus code OR Katarina kitty cat code" I will send you to gift. Have already used the code, Feel free to do the exchange! Please send mail [email protected]
used king Rammus code OR katarina kitty cat code (KR) → used PAX sivir code (NA / EU)
08/21/2012 - League of Legends Trading - 1 Replies
your "already used in the NA / EU servers is Pax Sivir Code" Do you have? Want to exchange "Pax Sivir Code" I "king Rammus code OR Katarina kitty cat code" will provide I use this code in the NA / EU servers did not. just. South Korea on a server, you should not use Pax Sivir Code. If you are interested in this deal, contact me. e-mail: [email protected]
used king Rammus code OR katarina kitty cat code (KR) → used PAX sivir code (NA / EU)
08/20/2012 - League of Legends Trading - 0 Replies
Hello Korea is my server users. I NA / EU servers have already been used in the "Pax Sivir Code" wants As a reward, "king Rammus code OR Katarina kitty cat code" I will send you to gift. Have already used the code, Feel free to do the exchange! Please send mail [email protected]
WTT my used eu Pax sivir Skin for a used NA Pax Jay or Pax TF
02/20/2012 - League of Legends Trading - 0 Replies
Topic says it all got used Pax sivir Skin in EU and still usable in NA And i want to Trade for usable EU Pax Jax or Tf skin



All times are GMT +2. The time now is 15:06.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.