Ek Commands
It is possible make command like this.
/addek (playername) 10
and then
/deleteek (playername) 10 if dont got enough eks, hg tolds it to gm.
I mean this is command for gms, easier way transf eks.
/setek, can set player or gm eks.
Want someone help me make this?
I think this is old idea.
/addek (playername) 10
and then
/deleteek (playername) 10 if dont got enough eks, hg tolds it to gm.
I mean this is command for gms, easier way transf eks.
/setek, can set player or gm eks.
Want someone help me make this?
I think this is old idea.
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
Code: Select all
if (memcmp (cp, "/setek ", 7) == 0)
{
AdminOrder_SetEK (iClientH, cp, dwMsgSize - 21);
return;
}
Code: Select all
void
CGame::AdminOrder_SetEK (int iClientH, char *pData, DWORD dwMsgSize)
{
char seps[] = "= \t\n";
char *token, cBuff[256];
class CStrTok *pStrTok;
char *pk;
char cNick[20];
char cPK[5];
char notice[100];
int oldpk;
int i;
if (m_pClientList[iClientH] == NULL)
return;
if ((dwMsgSize) <= 0)
return;
if (m_pClientList[iClientH]->m_iAdminUserLevel == 0)
{
SendNotifyMsg (NULL, iClientH, DEF_NOTIFY_ADMINUSERLEVELLOW, NULL, NULL,
NULL, NULL);
return;
}
ZeroMemory (cBuff, sizeof (cBuff));
memcpy (cBuff, pData, dwMsgSize);
pStrTok = new class CStrTok (cBuff, seps);
token = pStrTok->pGet ();
token = pStrTok->pGet ();
if (token == NULL)
{
delete pStrTok;
return;
}
strcpy (cNick, token);
pk = pStrTok->pGet ();
if (pk == NULL)
{
delete pStrTok;
return;
}
strcpy (cPK, pk);
for (i = 0; i < DEF_MAXCLIENTS; i++)
{
if ((m_pClientList[i] != NULL)
&& (memcmp (m_pClientList[i]->m_cCharName, cNick, strlen (cNick)) ==
0))
{
oldpk = m_pClientList[i]->m_iEnemyKillCount;
m_pClientList[i]->m_iEnemyKillCount = atoi (cPK);
SendNotifyMsg (NULL, i, DEF_NOTIFY_ENEMYKILLS,
m_pClientList[i]->m_iEnemyKillCount, NULL, NULL,
NULL);
wsprintf (notice,
"EK Count has been changed for player %s from %d to %d.",
m_pClientList[iClientH]->m_cCharName, oldpk, atoi (cPK));
ShowNotice (iClientH, notice);
}
}
delete pStrTok;
}
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Thx
Ok this is enough.
If you got time can you make other cmds?
Ok this is enough.
If you got time can you make other cmds?
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
/deleteek would be good for doing EK trade.
/deleteek 500 and you get a zerk wand for it?
but for that
change this part:
m_pClientList->m_iEnemyKillCount = atoi (cPK);
to
m_pClientList->m_iEnemyKillCount -= atoi (cPK);
right?
/deleteek 500 and you get a zerk wand for it?

but for that
change this part:
m_pClientList->m_iEnemyKillCount = atoi (cPK);
to
m_pClientList->m_iEnemyKillCount -= atoi (cPK);
right?
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Tafka, right the /addek works, but if I write /deleteek GM1 1000, and GM1 got only 900 eks, it delete 1000eks, and then I got -100 eks.
I think this need some security check?
Or people can piss gms?
Or tilt characters?
If write deleteek 1000, and guy got only 900, HGserver says, not enough eks?
I think this need some security check?
Or people can piss gms?
Or tilt characters?
If write deleteek 1000, and guy got only 900, HGserver says, not enough eks?
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
if (ek < 0) ek = 0;
This will remove the negative EKs bug
This will remove the negative EKs bug

<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
lol thats it
very simply
very simply

<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
I decleared ek BOOL ek;
And how this can show message, if dont got enough eks?
And how this can show message, if dont got enough eks?
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
lol
Code: Select all
void
CGame::AdminOrder_DelEK (int iClientH, char *pData, DWORD dwMsgSize)
{
char seps[] = "= \t\n";
char *token, cBuff[256];
class CStrTok *pStrTok;
char *pk;
char cNick[20];
char cPK[5];
char notice[100];
int oldpk;
int ek;
int i;
if (m_pClientList[iClientH] == NULL)
return;
if ((dwMsgSize) <= 0)
return;
if (m_pClientList[iClientH]->m_iAdminUserLevel == 0)
{
SendNotifyMsg (NULL, iClientH, DEF_NOTIFY_ADMINUSERLEVELLOW, NULL, NULL,
NULL, NULL);
return;
}
ZeroMemory (cBuff, sizeof (cBuff));
memcpy (cBuff, pData, dwMsgSize);
pStrTok = new class CStrTok (cBuff, seps);
token = pStrTok->pGet ();
token = pStrTok->pGet ();
if (token == NULL)
{
delete pStrTok;
return;
}
strcpy (cNick, token);
pk = pStrTok->pGet ();
if (pk == NULL)
{
delete pStrTok;
return;
}
strcpy (cPK, pk);
for (i = 0; i < DEF_MAXCLIENTS; i++)
{
if ((m_pClientList[i] != NULL)
&& (memcmp (m_pClientList[i]->m_cCharName, cNick, strlen (cNick)) ==
0))
{
oldpk = m_pClientList[i]->m_iEnemyKillCount;
ek=oldpk-atoi(cPK);
if (ek>0) {
m_pClientList[i]->m_iEnemyKillCount = ek;
SendNotifyMsg (NULL, i, DEF_NOTIFY_ENEMYKILLS,
m_pClientList[i]->m_iEnemyKillCount, NULL, NULL,
NULL);
wsprintf (notice,
"EK Count has been changed for player %s from %d to %d.",
m_pClientList[iClientH]->m_cCharName, oldpk, atoi (cPK));
ShowNotice (iClientH, notice);
}
}
else {
wsprintf (notice,
"Cannot delete ek from player %s!",
m_pClientList[i]->m_cCharName);
ShowNotice (iClientH, notice);
}
}
delete pStrTok;
}
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Oh thx my living angel ^^
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
I changed a message too low ek count, now it works, but always when i remove eks, it says too low ek count XD
And when I got 300 eks, and i write /deleteek GM1 300, it wont remove it:D
It shows player ek count is too low like 100 times
And when I got 300 eks, and i write /deleteek GM1 300, it wont remove it:D
It shows player ek count is too low like 100 times
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
just add else if where it checks if EK Count is higher than EK you want to remove and then gives a message.
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
Im not a coder, im copy paster just now XD
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>
if <span style='color:red'>(ek>0)</span> {
m_pClientList->m_iEnemyKillCount = ek;
SendNotifyMsg (NULL, i, DEF_NOTIFY_ENEMYKILLS,
m_pClientList->m_iEnemyKillCount, NULL, NULL,
NULL);
wsprintf (notice,
"EK Count has been changed for player %s from %d to %d.",
m_pClientList[iClientH]->m_cCharName, oldpk, atoi (cPK));
ShowNotice (iClientH, notice);
}
if <span style='color:red'>(ek>=0)</span> {
m_pClientList->m_iEnemyKillCount = ek;
SendNotifyMsg (NULL, i, DEF_NOTIFY_ENEMYKILLS,
m_pClientList->m_iEnemyKillCount, NULL, NULL,
NULL);
wsprintf (notice,
"EK Count has been changed for player %s from %d to %d.",
m_pClientList[iClientH]->m_cCharName, oldpk, atoi (cPK));
ShowNotice (iClientH, notice);
}
this will allow you to delete EKs if remaining amount is equal to Zero
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Nice it works.
Old Helbreath Nemesis Player<br><img src='http://img232.imageshack.us/img232/9784/dshakedqc5.jpg' border='0' alt='user posted image' /><br><img src='http://img232.imageshack.us/img232/6475 ... barqj0.jpg' border='0' alt='user posted image' /><br><a href='index.php?showtopic=7107&hl=' target='_blank'>MainServer Hexing Tutorial</a><br><a href='index.php?showtopic=7663&hl=x-mas' target='_blank'>My Files</a>