unusable items clientside

01/18/2013 10:50 go for it#1
im trying to use lottery ticket to get 3 small lottery tickets
i've done it on my old source but don't know what's wrong this time
handling the packet is correct
here is the server/client itemtype
at this last try i copied the exppotion info with changing the id/name (as exppotion is usable item)
but still getting same error at client "failed to use this item!"
Quote:
710212@@LotteryTicket@@0@@0@@0@@0@@0@@0@@0@@0@@11@ @0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@1@@1@@0@@0@@0@@0@@0 @@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@0@@ 0@@0@@0@@0@@0@@0@@0@@0@@0@@asdasd@@asd~asd.@@5@@0@ @0@@
01/18/2013 15:04 Super Aids#2
The client does not give you any messages regarding item usage, it is the server that is sending you that message.

Maybe an exception is thrown and in your catch block you have it send that message to the client. If I was you then I'd breakpoint the item usage handler.
01/20/2013 07:52 go for it#3
lets clear things out
if you added an action for the meteor it will still be not usable and everytime you try to use it you get "failed to use this item" on client

no there isn't any exceptions thrown because the server doesn't even receive a packet for it , broke on server handlers and used wpe to sniff client packets

so im 100% sure it's client side which im asking how to bypass it or edit it but sounds no one got the answer :\
01/20/2013 09:05 pro4never#4
Quote:
Originally Posted by go for it View Post
lets clear things out
if you added an action for the meteor it will still be not usable and everytime you try to use it you get "failed to use this item" on client

no there isn't any exceptions thrown because the server doesn't even receive a packet for it , broke on server handlers and used wpe to sniff client packets

so im 100% sure it's client side which im asking how to bypass it or edit it but sounds no one got the answer :\
This is false.

All items which can be used (right clicked) send an item usage packet to the server. In 99.99 percent of sources, any item ID which is not handled will return a message such as you are describing.

Breakpoint the item usage packet (1009) and see what happens when you right click the item (make sure it's not a ping packet. Aka subtype 27) and you should be on the right track. Alternatively just search for the message itself in your source and you can likely find where item usage is handled (if you are not aware)
01/20/2013 09:38 go for it#5
Quote:
Originally Posted by pro4never View Post
This is false.

All items which can be used (right clicked) send an item usage packet to the server. In 99.99 percent of sources, any item ID which is not handled will return a message such as you are describing.

Breakpoint the item usage packet (1009) and see what happens when you right click the item (make sure it's not a ping packet. Aka subtype 27) and you should be on the right track. Alternatively just search for the message itself in your source and you can likely find where item usage is handled (if you are not aware)
im talking about items that can't be used , thanks for flamming :)
i want to convert the item that couldn't be used to be usable
for ex. meteor and make it possible to use meteor
01/20/2013 12:34 Super Aids#6
Every item can be used like we already said. You just need to add a handle for it on your server.
01/20/2013 14:08 Korvacs#7
Quote:
Originally Posted by go for it View Post
im talking about items that can't be used , thanks for flamming :)
i want to convert the item that couldn't be used to be usable
for ex. meteor and make it possible to use meteor
Your such a moron, good luck getting help now :rolleyes:
01/20/2013 17:03 nTL3fTy#8
Actually, working on the latest patch, the client doesn't send the packet for unusable items (like Meteor).
01/20/2013 18:18 pro4never#9
Quote:
Originally Posted by nTL3fTy View Post
Actually, working on the latest patch, the client doesn't send the packet for unusable items (like Meteor).
Then he just needs to change the usability flag in the itemtype... We're still correct that all items can be used. Just copy the information from a usable item (I'd strongly suggest looking at potions because they are fairly generic and simple) and he'd be good to go.

We explained the server side process and he then gets all offended and throws it back in our faces so yahhh why would anyone help him now?
01/20/2013 18:38 nTL3fTy#10
Quote:
Originally Posted by pro4never View Post
Then he just needs to change the usability flag in the itemtype... We're still correct that all items can be used. Just copy the information from a usable item (I'd strongly suggest looking at potions because they are fairly generic and simple) and he'd be good to go.

We explained the server side process and he then gets all offended and throws it back in our faces so yahhh why would anyone help him now?
The thing is, there is no such flag in the itemtype. The closest field in the itemtype that refers to action, is the action id - but last I checked that field had no impact on the client because the itemtype is just a dump of TQs server-side table (which uses it).

As far as I can tell, the client has a few itemtypes hardcoded, for example:
Code:
.text:006C8F99                 cmp     eax, 1088000
.text:006C8F9E                 jb      short loc_6C8FD3 ; jump around
.text:006C8FA0                 cmp     eax, 1088002
.text:006C8FA5                 jbe     short loc_6C8FBC ; cannot use
.text:006C8FA7                 cmp     eax, 1100003
.text:006C8FAC                 jz      short loc_6C8FBC ; cannot use
.text:006C8FAE                 cmp     eax, 1100006
.text:006C8FB3                 jz      short loc_6C8FBC ; cannot use
.text:006C8FB5                 cmp     eax, 1100009
.text:006C8FBA                 jnz     short loc_6C8FD3 ; jump around
.text:006C8FBC
.text:006C8FBC loc_6C8FBC:                             ; CODE XREF: sub_6C8DB0+1F5j
.text:006C8FBC                                         ; sub_6C8DB0+1FCj ...
.text:006C8FBC                 push    offset STR_CANNOT_USE_ITEM ; "STR_CANNOT_USE_ITEM"
01/20/2013 23:56 go for it#11
Quote:
Your such a moron, good luck getting help now
i didn't mean to be rude but either ways i never get that help :) no one ever did it for me and it end up i do it all on own :)

Quote:
We explained the server side process and he then gets all offended and throws it back in our faces so yahhh why would anyone help him now?
nope i didn't mean to throw it back to your face not just because i've always respect you and how you help others but because you was trying to help me and you don't worth anything back in your face but smile , maybe my english couldn't help me but ill work on that , thanks again

back on topic

Quote:
Actually, working on the latest patch, the client doesn't send the packet for unusable items (like Meteor).
Quote:
Then he just needs to change the usability flag in the itemtype... We're still correct that all items can be used. Just copy the information from a usable item (I'd strongly suggest looking at potions because they are fairly generic and simple) and he'd be good to go.
Quote:
The thing is, there is no such flag in the itemtype. The closest field in the itemtype that refers to action, is the action id - but last I checked that field had no impact on the client because the itemtype is just a dump of TQs server-side table (which uses it).

As far as I can tell, the client has a few itemtypes hardcoded, for example:
there isn't a flag in the item type for item being able to use or not (usable)
and yes most likely it's as "nTL3fTy" said it's hard coded in the client side and as no one know how to edit this then ill just try to get better on RE and do it on my own


once more i didn't mean to be rude maybe my english couldn't help me , all i meant to say in rephrase should be "thanks for helping but that wasn't helping and nope im sure of what i've said" :)