I'm so happy to see again someone who ask a LOTF script!
Becouse you do the "Major Step" I will help you!
Code:
SendPacket(General.MyPackets.Prof.Add([COLOR="Red"]450[/COLOR], [COLOR="DarkOrange"]0[/COLOR]));
MyChar.Save();
or
Code:
SendPacket(General.MyPackets.Prof([COLOR="Red"]450[/COLOR], [COLOR="DarkOrange"]0[/COLOR]));
MyChar.Save();
Depend on your LOTF version.
Legend:
/////-Prof ID
/////-Prof Exp
#UpDate
For All Who Want To Learn!
1.Why I use SendPacket and no MyChar or General?
Becouse you talk to a NPC and the expresions MyChar and General affect you directly, and for a NPC is wrong!.You can use this 2 expresions ONLY when you code a Command or when you are useing (MyChar) to define something.
2.So what is so special at SendPacket?
SendPacket is an expresion which send information to some packet's!
To take for example the Case: 74 (the login case) if you scroll down you will find this:
Code:
[COLOR="Red"] SendPacket[/COLOR](General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Welcome to ShadowCo [Ver 3.1]", [COLOR="#0000ff"]2011[/COLOR]));
[COLOR="#ff0000"]SendPacket[/COLOR](General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Please Reffer Us To Your Friends!", [COLOR="#0000ff"]2000[/COLOR]));
[COLOR="#ff0000"]SendPacket[/COLOR](General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Exp Rate: " + DataBase.ExpRate + "x.", [COLOR="#0000ff"]2000[/COLOR]));
[COLOR="#ff0000"]SendPacket[/COLOR](General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Prof Rate: " + DataBase.ProfExpRate + "x.", [COLOR="#0000ff"]2000[/COLOR]));
[COLOR="#ff0000"]SendPacket[/COLOR](General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Players Online: " + World.AllChars.Count, [COLOR="Blue"]2005[/COLOR]));
Now If you Read carefull you will see at the end of each line the expresion SendPacket is sending a MSG to the ChatPacket's with the specified ID (2000,2005,2011)
Now to end this short tutorial SendPacket is sending the prof ID and Exp to DB and that will save it with the expresion MyChar.Save();
#UpDate