-
My /add command code :P
Here is my /add command :P
thanks to Yukura & leo123 for the help :p
here is it:
Code:
void AddStats(int aIndex)
{
if (!IsAddCmd) return;
cObj->Init(aIndex);
if (!strcmpi(Message, "/add"))
{
MessageOutput(aIndex, "Useage: /add <Type> <Amount>");
MessageOutput(aIndex, "The price for Add is: %d, Maximum stats: %d", AddPrice, AddMax);
return;
}
if (cObj->Money < AddPrice)
{
MessageOutput(aIndex, "You are lacking zen! %d", AddPrice - cObj->Money);
return;
}
char Param1[100];
memset(Param1, 0x00, 100);
GetParam(1, Message, Param1);
int AddType = 0;
if (!strcmpi(Param1, "str")) AddType = 0xB8;
if (!strcmpi(Param1, "agi")) AddType = 0xBA;
if (!strcmpi(Param1, "vit")) AddType = 0xBC;
if (!strcmpi(Param1, "eng")) AddType = 0xBE;
if (!strcmpi(Param1, "cmd")) AddType = 0xD8;
if (!AddType)
{
MessageOutput(aIndex, "You have selected wrong type! The types are: str, agi, vit, eng, cmd");
return;
}
if (cObj->Class != 4 && AddType == 0xD8)
{
MessageOutput(aIndex, "Only Dark Lords can use the add cmd type.");
return;
}
char Param2[100];
memset(Param2, 0x00, 100);
GetParam(2, Message, Param2);
int StatsToAdd = atoi(Param2);
if (cObj->LvlUpPoints < StatsToAdd)
{
MessageOutput(aIndex, "You are lacking level up points! %d", StatsToAdd - cObj->LvlUpPoints);
return;
}
int NowStats = cObj->GetWord(AddType);
if ((StatsToAdd + NowStats) > AddMax)
{
MessageOutput(aIndex, "You are not allowed to add more than %d points!", AddMax);
return;
}
BYTE Packet[5] = {0xC1, 0x05, 0x0F3, 0x06};
Packet[4] = ((AddType % 16) ^ 8) / 2; // Nice algorithm by coNsept to convert from gObj Offsets to the add types :P
if (AddType == 0xD8) Packet[4] = 0x04;
if (StatsToAdd <= 100)
for (int i=0; i<StatsToAdd; i++)
CGLevelUpPointAdd(Packet, aIndex);
else
{
int Amount = (cObj->LvlUpPoints - StatsToAdd - 1);
cObj->SetInt(0xA4, Amount);
cObj->AddInt(AddType, StatsToAdd - 1);
CGLevelUpPointAdd(Packet, aIndex);
}
cObj->SetInt(0xB4, cObj->Money - AddPrice);
CGMoneySend(aIndex, cObj->Money - AddPrice);
cObj->Init(aIndex);
MessageOutput(aIndex, "You've added %d points. You have now %d points left.", StatsToAdd, cObj->LvlUpPoints);
if (StatsToAdd > 100)
MessageOutput(aIndex, "Please relog and your stats will be updated.");
}
I'm using CzF's 1.00.08 GS.. :P
Enjoy xD
-
Re: [Release] My /add command code :P
GOod job very good using now ;D
-
Re: [Release] My /add command code :P
-
Re: [Release] My /add command code :P
Good job liad :).
Quote:
Originally Posted by
AccDenied
/add what ? :)
His code is for add points of str, agi, ene, etc.
-
Re: [Release] My /add command code :P
Wows thank you i will try to add it into the Luciano's last release.
-
Re: [Release] My /add command code :P
-
Re: [Release] My /add command code :P
-
Re: [Release] My /add command code :P
-
Re: [Release] My /add command code :P
this works fine? not need swith character, right?
PD: kudo if you add the code to luciano files can upload it pls? Thanks
-
Re: [Release] My /add command code :P
Nope, i am not a C++ coder but yes an ASM coder, and i can easily understand the code and this part says:
Code:
MessageOutput(aIndex, "You've added %d points. You have now %d points left.", StatsToAdd, cObj->LvlUpPoints);
if (StatsToAdd > 100)
MessageOutput(aIndex, "Please relog and your stats will be updated.");
}
That if you put more than 100 points you need to relog the character, if not you don
-
Re: [Release] My /add command code :P
cool, now i could understand, thanks holy.
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
G4L3ON
this works fine? not need swith character, right?
PD: kudo if you add the code to luciano files can upload it pls? Thanks
without relog it will take alot of CPU and cause some lags...
because if you add below 100 points its doing loop that doing the function when you click on the plus button in the character menu, so if you add 32000 points with it, it will do a loop of 32000 times and there will be alot of lags and waste of CPU...
-
Re: [Release] My /add command code :P
With my 1 month of c++ i understood most of it xP
To make it infinite (32767) just edit:
if (StatsToAdd > XXX)
MessageOutput(aIndex, "Please relog and your stats will be updated.");
}
Put 32768 there if u want unlimited
BYTE Packet[5] = {0xC1, 0x05, 0x0F3, 0x06};
Packet[4] = ((AddType % 16) ^ 8) / 2; // Nice algorithm by coNsept to convert from gObj Offsets to the add types :P
if (AddType == 0xD8) Packet[4] = 0x04;
if (StatsToAdd <= XXXXXX)
for (int i=0; i<StatsToAdd; i++)
CGLevelUpPointAdd(Packet, aIndex);
Put 32767 there for unlimited.
/Edit: Enjoy xD
-
Re: [Release] My /add command code :P
hey, that's nice, but how to add it? could u post guide?
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
RayOfLight
With my 1 month of c++ i understood most of it xP
To make it infinite (32767) just edit:
if (StatsToAdd > XXX)
MessageOutput(aIndex, "Please relog and your stats will be updated.");
}
Put 32768 there if u want unlimited
BYTE Packet[5] = {0xC1, 0x05, 0x0F3, 0x06};
Packet[4] = ((AddType % 16) ^ 8) / 2; // Nice algorithm by coNsept to convert from gObj Offsets to the add types :P
if (AddType == 0xD8) Packet[4] = 0x04;
if (StatsToAdd <= XXXXXX)
for (int i=0; i<StatsToAdd; i++)
CGLevelUpPointAdd(Packet, aIndex);
Put 32767 there for unlimited.
/Edit: Enjoy xD
Yes :P
And if you want it always be the max stats, you can just do
If (StatsToAdd <= AddMax)
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
Fe3lPalN
hey, that's nice, but how to add it? could u post guide?
you need find offsets
make hook on protocol core.. etc.
-
Re: [Release] My /add command code :P
WOW.. i didnot understand anything. im not a coder, please tell me how to add this; Skype: tautviux55884
-
Re: [Release] My /add command code :P
hehe me too can anybody copy/paste this codes into the lucianoairbar files?
PD: where can i learn to be a coder C++? =P
-
Re: [Release] My /add command code :P
zolamu, about the offsets.. what offset i know to find? and.. i compile this code in one dll?
-
Re: [Release] My /add command code :P
how to add this to czf season1 full???
-
Re: [Release] My /add command code :P
...Erm you know that the /str /dex /ene /vit and /cmd
all exist in the CZF files? You don't need any extra code to make it work ...
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
RayOfLight
With my 1 month of c++ i understood most of it xP
To make it infinite (32767) just edit:
if (StatsToAdd > XXX)
MessageOutput(aIndex, "Please relog and your stats will be updated.");
}
Put 32768 there if u want unlimited
BYTE Packet[5] = {0xC1, 0x05, 0x0F3, 0x06};
Packet[4] = ((AddType % 16) ^ 8) / 2; // Nice algorithm by coNsept to convert from gObj Offsets to the add types :P
if (AddType == 0xD8) Packet[4] = 0x04;
if (StatsToAdd <= XXXXXX)
for (int i=0; i<StatsToAdd; i++)
CGLevelUpPointAdd(Packet, aIndex);
Put 32767 there for unlimited.
/Edit: Enjoy xD
do you think you are the smartest person around ... try to send more than 200 packets to the client in a loop ... and you will recieve Disconect ... -.- ...
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
Tezca
...Erm you know that the /str /dex /ene /vit and /cmd
all exist in the CZF files? You don't need any extra code to make it work ...
I know there is those commands...
I'm recoding the dll of it..
And I'm releasing the code for someone that really need it, if he got stucked in coding this command, he can use my code :P
-
Re: [Release] My /add command code :P
I hooked the DLL... I get NoProc error :S
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
RoRRe
do you think you are the smartest person around ... try to send more than 200 packets to the client in a loop ... and you will recieve Disconect ... -.- ...
fun fun fun, that is true ^^
-
Re: [Release] My /add command code :P
is that work with 1.02Q ?
How to add it ? I don't understand (witch file ?...)
thx for help
Sry for my english
-
Re: [Release] My /add command code :P
please post a guide before realeasing something like this !!
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
Fe3lPalN
please post a guide before realeasing something like this !!
guide ?
-
Re: [Release] My /add command code :P
he wants to know how to get the offsets from the gameserver.
-
Re: [Release] My /add command code :P
Use OllyDBG with GameServer + PDB.
-
Re: [Release] My /add command code :P
Any link for the pdb or how to get it? (new to mu online and server side reverse engineering)
-
Re: [Release] My /add command code :P
Hmm Its command guide me about .. Its Client command /add agility count ?
-
Re: [Release] My /add command code :P
the gameserver you add this command. I got the .pdb from a friend for 99.60T, anyone needs it i have it. just pm me and ill send you a upload link.
-
Re: [Release] My /add command code :P
Quote:
Originally Posted by
Dev-Star
the gameserver you add this command. I got the .pdb from a friend for 99.60T, anyone needs it i have it. just pm me and ill send you a upload link.
how to debug 1.00.08, it has bad addresses if use 99.60 pdb =\
when debugging 99.62, olly always stucks at a breakpoint =(
can anyone help?
-
Re: [Release] My /add command code :P
im still noob to this myself. I open the .pdb file for 99.60T I see http://img250.imageshack.us/img250/3650/look1qv9.jpg
Here is the thing I was looking at in there
http://img213.imageshack.us/img213/209/look2if7.jpg
[quote=H
-
Re: [Release] My /add command code :P
Basically all you do is look for Shadow olly in google. Then unrar it to a folder and open up Ollydbg not Shadow. The gameserver and the pdb file will load all together. *may freeze olly for a bit so let it go* Then scroll all the way to the top and just follow the jmp functions to the lines of code ^^