-
/make command source
Hi. :)
I have written /make command. ;)
There is the source:
Code:
void UseMakeCommand(DWORD gObjId, char * msg)
{
if(strlen(msg) < 18)
{
return;
}
int spaces = 0;
for(int i=0; i < strlen(msg); i++)
{
if(msg[i] == ' ')
spaces++;
}
if(spaces < 7)
return;
if(IsObjectGM(gObjId) == false)
{
return;
}
char * PosA;
PosA = strchr( msg , ' ' );
char * PosB;
PosB = strchr( PosA+1 , ' ' );
char * PosC;
PosC = strchr( PosB+1 , ' ' );
char * PosD;
PosD = strchr( PosC+1 , ' ' );
int ItemType, ItemNr, ItemLevel;
if(*(PosA+2) != ' ')
{
ItemType = (int)(*(PosA+1) - 48) * 10 + (int)(*(PosA+2) - 48);
}
else
{
ItemType = (*(PosA+1)) - 48;
}
if(*(PosB+2) != ' ')
{
ItemNr = (int)(*(PosB+1) - 48) * 10 + (int)(*(PosB+2) - 48);
}
else
{
ItemNr = (*(PosB+1)) - 48;
}
if(*(PosC+2) != ' ')
{
ItemLevel = (int)(*(PosC+1) - 48) * 10 + (int)(*(PosC+2) - 48);
}
else
{
ItemLevel = (*(PosC+1)) - 48;
}
int ItemSkill = (*(PosD+1)) - 48;
int ItemLuck = (*(PosD+3)) - 48;
int ItemOpt = (*(PosD+5)) - 48;
int ItemExc = (*(PosD+7)) - 48;
DWORD Item = ItemType * 512 + ItemNr;
InvItemCreate ( gObjId , GetObjectMap(gObjId) , GetObjectPosX(gObjId) , GetObjectPosY(gObjId) , Item , ItemLevel , 0 ,ItemSkill , ItemLuck, ItemOpt , -1 , ItemExc , 0 );
GCServerMsgStringSend("[Make]: You have made an item.", gObjId, 1);
}
-
Re: [Release] /make command source
-
Re: [Release] /make command source
You can put a guide to how to put this in a dll?
-
Re: [Release] /make command source
can i put this command to 1.02K server, if yes how to do it ?
-
Re: [Release] /make command source
Quote:
Originally Posted by
Dragon124
can i put this command to 1.02K server, if yes how to do it ?
I think it can put in every server
-
Re: [Release] /make command source
-
Re: [Release] /make command source
-
Re: [Release] /make command source
-
Re: [Release] /make command source
I will try it working , rate after test.
-
Re: [Release] /make command source
Good Release 10/10
Applicable to version?
thanks
-
Re: [Release] /make command source
Quote:
Originally Posted by
michael_admin
Good Release 10/10
Applicable to version?
thanks
all 1.0.0.16 + older i think ... tested with DMT not released yet S2 files based on clean 1.0.0.16 GS's and working fine except ancient's :) ... in other words You can add this to any server files.
Code:
/make 1 2 3 4 5 6 7
1 - item type - from 1 to 15
2 - item index - various selection from various items
3 - item lvl - 1 - 13
4 - item skill - 1 - skill/0 - no skill
5 - item luck - 1 - luck/0 - w/o luck
6 - item option - 0 - 4 (4,8,12,16)
7 - excellent opt - 0 to 8 (where 0-8 test by Yourself :) )
-
Re: [Release] /make command source
-
Re: [Release] /make command source
not bad, 9/10, took me a few to get it going
-
Re: [Release] /make command source
-
Re: [Release] /make command source
Thanks .. u can xplain more about this ... and u somebody have a guide for hook one dll to any gs? :juggle:
-
Re: [Release] /make command source
Search for FeN$x Hooking DLL Guide on the forum.
-
Re: [Release] /make command source
Thanks man i'll try later :) ...:poster_ss
-
Re: [Release] /make command source
plz post a guide how to add this to a server files
and GREAT JOB 10/10:poster_ss:juggle:
Sorry for my bad english...
-
Re: [Release] /make command source
-
Re: [Release] /make command source
-
Re: [Release] /make command source
easy release, is there a way to make it in .asm format for easier compilation? (Atleast its easier for me lol).
-
Re: [Release] /make command source
what about the ancient items value....how does that work in this ?
-
Re: [Release] /make command source
OK, there is .h file:
Code:
//gObj
#define gObjSize 0x195C
#define gObj 0x065E3F58
#define gObj_CTLCODE 0x1C4
// Void | Message, gObjId, Type
#define GCServerMsgStringSend ((void(*) ( char*, DWORD, int )) 0x405d8f)
#define InvItemCreate ((int(*) ( DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD ) ) 0x4036BB )
And function:
Code:
bool IsObjectGM(DWORD gObjId)
{
if(*(short int*)(gObjId * gObjSize + gObj + gObj_CTLCODE) == 32 || *(short int*)(gObjId * gObjSize + gObj + gObj_CTLCODE) == 8)
{
return true;
}
else
{
return false;
}
}
-
Re: [Release] /make command source
Quote:
Originally Posted by
DMCahir
OK, there is .h file:
Code:
//gObj
#define gObjSize 0x195C
#define gObj 0x065E3F58
#define gObj_CTLCODE 0x1C4
// Void | Message, gObjId, Type
#define GCServerMsgStringSend ((void(*) ( char*, DWORD, int )) 0x405d8f)
#define InvItemCreate ((int(*) ( DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD , DWORD ) ) 0x4036BB )
And function:
Code:
bool IsObjectGM(DWORD gObjId)
{
if(*(short int*)(gObjId * gObjSize + gObj + gObj_CTLCODE) == 32 || *(short int*)(gObjId * gObjSize + gObj + gObj_CTLCODE) == 8)
{
return true;
}
else
{
return false;
}
}
this code can work on 97:smilie_tu Version ???
and please any help my tell pls in icq 213334578
:groupwave:
-
Re: [Release] /make command source
i have some errors :S need help i am new...
.\make.cpp(137) : error C3861: 'GetObjectMap': no se encontr
-
Re: [Release] /make command source
It seems you need more defines in the .h file.
Like the lpObj of the map, and the lpObj of X and Y.
-
Re: [Release] /make command source