Register for your free account! | Forgot your password?

You last visited: Today at 02:09

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

Advertisement



[Help] about ReadUInt

Discussion on [Help] about ReadUInt within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
karemsa's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 268
Received Thanks: 41
[Help] about ReadUInt

Hello guys,

i want to read (03)
from
Quote:
[S -> C][B150]
01 ................
02 ................
01 ................
22 "...............
00 00 00 00 ................
4D 00 00 00 M...............
03 ................
00 00 00 00 00 00 00 00 ................
47 00 00 00 G...............
00 ................
01 ................
00 ................
02 ................
00
how i can read this with out read all lines
using C#

sorry my english is bad
karemsa is offline  
Old 11/19/2014, 17:44   #2
 
LastThief*'s Avatar
 
elite*gold: 60
Join Date: Feb 2012
Posts: 3,942
Received Thanks: 6,475
IF the packet is not dynamic it should be like that
packet.ReadUIntArray(12);
byte value = packet.ReadUInt8();
LastThief* is offline  
Old 11/19/2014, 18:53   #3
 
karemsa's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 268
Received Thanks: 41
Quote:
Originally Posted by LastThief* View Post
IF the packet is not dynamic it should be like that
packet.ReadUIntArray(12);
byte value = packet.ReadUInt8();
i need to make max plus using packet filter ,what i need is to read the Plus of item using opcode B150.

edit

like
Quote:
if (packet.Opcode == 0xB150)
{
if (packet.ReadUInt8() =>12)
{
do something
}
}
karemsa is offline  
Old 11/22/2014, 02:33   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 43
Received Thanks: 5
from ur code u wana ur program to do ..... (what ever u want ) when the plus word >= 12 ,iam not c# programer put first u must convert word value from hex to dec

u will not get 12 in packet u will get 0C
theking200051 is offline  
Old 11/22/2014, 13:25   #5
 
elite*gold: 8
Join Date: Sep 2014
Posts: 625
Received Thanks: 177
Quote:
Originally Posted by theking200051 View Post
from ur code u wana ur program to do ..... (what ever u want ) when the plus word >= 12 ,iam not c# programer put first u must convert word value from hex to dec

u will not get 12 in packet u will get 0C
Its a single byte and you dont have to do that. Not in C#
qqdev is offline  
Old 11/22/2014, 19:09   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 43
Received Thanks: 5
Quote:
Originally Posted by qqdev View Post
Its a single byte and you dont have to do that. Not in C#
yea ,its a byte not word . (my mistake ,i using autoit so no need to declare variables any more in my tools ,i think its fine now if i forget it )

i make such thing in one of my tools in autoit , if it can help him i can give him the code lines (in autoit) of this function .
theking200051 is offline  
Thanks
1 User
Old 11/23/2014, 13:24   #7
 
karemsa's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 268
Received Thanks: 41
i got it already thank's guys .
karemsa is offline  
Reply




All times are GMT +2. The time now is 02:09.


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.