Question Sending Custom Dioleges to Client

03/15/2010 11:50 ~Yuki~#1
Is it possible to Send the Datapacket /RemoteCommand (116)/ to the Client To open a Box wif custom text in it?
03/15/2010 14:07 KraHen#2
You mean a messagebox?
03/15/2010 15:11 Korvacs#3
That wasnt something i ever tried, and when you look at the way the packet is layed out i cant imagine that you could, experiment i guess?
03/15/2010 18:13 hunterman01#4
I actually thought about this

I suggest take a look at the error code of the Socket talisment's code
03/15/2010 18:24 KraHen#5
I saw something at the packet wiki, maybe it`s what you search for?

In the general data packet enum :
// stuff
Dialog = 126,
// more stuff
03/15/2010 18:42 Korvacs#6
Dialog is for things like warehouse windows, crafting windows, etc. Not message boxes, again the packet structure doesnt have space for a string.
03/15/2010 18:53 ~Yuki~#7
Thanks, so ill just find a Dialogebox tht i dont need and add my text cleintside to it hah

#Edit

Korvacs: Datatype 116 Offset 2 (crafting)

Could yo help me code that?
03/15/2010 19:01 Korvacs#8
Its an unused system, so no one knows how it was designed to work, experiement with it if you like.
03/15/2010 19:05 KraHen#9
The auth packet has a string in it, which tells you when your pass is invalid, etc. Could it be used ingame? I can`t try it out now, I don`t have a client on my PC and my connection is hella slow.
03/15/2010 20:46 ~Yuki~#10
ima try that but i dont think i can send the authpacket to the client again wit an effect

#Edit: not working but meh...
03/16/2010 02:22 hunterman01#11
The crafting is what is used in chinese co

I honestly have no clue what it does cause they never implemented it into english co : /
03/16/2010 02:23 Arcо#12
Quote:
Originally Posted by hunterman01 View Post
The crafting is what is used in chinese co

I honestly have no clue what it does cause they never implemented it into english co : /
What does crafting do?
03/16/2010 02:57 .Guru#13
noone knows.. emme attempted at fixing it.. but its never been used.. i tested it alot.. it takes the items you enter.. and combine their strength to power the main item.. pretty much like compo.. cept you use ref/uni/eli/sup to make your main item +quality
03/16/2010 02:58 xScott#14
Quote:
Originally Posted by .Arco View Post
What does crafting do?
Wasnt the crafting thing where put gems in something and it gives u a chance to get a +1 stone or something, like talismans but with gems/gears and stuff.
03/16/2010 07:26 _Emme_#15
I've done the crafting, although I changed it so it didn't actually craft (whatever it is supposed to do), I made it an seller instead. What happens when you press the Craft button, I even think the chinese people spelled it wrong, like Cratf, it will loop through all item UID's in the window.

So basically what you need to do is read from the window and find the item from its UID.




Quote:
public static void HandleCraftingPacket(BasePacket Packet, GameClient Client)
{
Int32[] item;
uint reward = 0;
for (int i = 0; i < BitConverter.ToInt16(Packet.Buffer, 10); i++)
{
item = new Int32[BitConverter.ToInt16(Packet.Buffer, 10)];
item[i] = BitConverter.ToInt32(Packet.Buffer, 12 + (i * 4));
ItemDataPacket Item = Client.GetInventoryItemByUID((uint)item[i]);
if (Item.ID != 0)
{
reward += Kernel.ItemData[Item.ID].GoldPrice / 3;
Client.RemoveInventory((uint)item[i]);
}
}
Client.Send(new ChatPacket("You've sold items for " + reward + " silvers!", ChatType.TopLeft));
Client.Money += reward;
}
That's how I did it, experiment with it and I'm sure you nail it.

For the sending custom text, it is possible, atleast for logging in. I'm using a popup box (MessageBox) for banned accounts, which has my own text in it, not changed in StrRes.


Goodluck!