I recommend that IF YOU DO, (well in the first place don't do it.. MySQL is faster if you can manage it) that you DO NOT USE Hadeset's ini class. It sucks...Quote:
then i need a guide how to unequip stuff automaticly + send to inv.
At a command
Really needed Guide:
How to move LOTF to INI´s away from MySQL?
heyhey u bish u didnt even gives me, infamous credits for helping :rolleyes:Quote:
Okay so here goes with the guide on how to add marriage...
Okay so first your going to need the packet for the MarriageMouse...:
Okay so assuming your using an NPC your gonna want to use Client.Send(Packets.MarriageMouse(Client.Char.UID) );Code:public static byte[] MarriageMouse(uint CharUID) { byte[] Mouse = new byte[24]; fixed (byte* Ptr = Mouse) { *(ushort*)(Ptr + 0) = 24; *(ushort*)(Ptr + 2) = 1010; *(uint*)(Ptr + 8) = CharUID; *(uint*)(Ptr + 12) = 1067; *(uint*)(Ptr + 22) = 116; return Mouse; } }
to make the mouse appear from the npc...
okay next step..
Make sure that the GetPacket function is unsafe otherwise you can use 1337 Pointers lul... e.g. public unsafe void GetPacket(byte[] Data)
sending the marriage request and accepting the marriage request is an attack type so your going to wan to search for case 1022: in the packets file and add the following code:.. (baring in mind that ive just tried and tested this in lotf cause i assume your all using it):
Then for accepting the proposal you need below the other code :Code:if (AttackType == 8)//Marriage Proposal { fixed (byte* Ptr = Data) { uint TargetUID = *(uint*)(Ptr + 12); Character Target = (Character)World.AllChars[TargetUID]; *(uint*)(Ptr + 8) = MyChar.UID; Target.MyClient.SendPacket(Data); } }
And if you don't have variables for spouse in lotf well im not gonna explain i made this in 5 minutes : added all the variables changed the char info and made the spouse save and load... so if you can't do that... don't even bother with a server :)Code:if (AttackType == 9)//Marriage Accept { fixed (byte* Ptr = Data) { uint UID = *(uint*)(Ptr + 12); Character Char = (Character)World.AllChars[UID]; Char.Spouse = MyChar.Name; MyChar.Spouse = Char.Name; } }
it's bad enough that your using lotf anyway. And even if your not using lotf you can adapt this code to work with any server
lies n00b yes u did on my serv :rolleyes:Quote:
Anyone tested the marriage code?.. cause i didnt lol
thats y i said mostly inf =xQuote:
erm you didnt help... i had two of the request offsets the wrong way around (12 and 4)... isnt exactly help
Oh yeah.. forgot about that... i just wrote that from memory refrence :P... and erm how did inf help :confused: the only thing i did wrong was the offsetsQuote:
lies n00b yes u did on my serv :rolleyes:
thats y i said mostly inf =x