[req] /summonmaxlvl

Submit your code requests, and if you are good at coding come help others with their requests.
Post Reply
1+12
Member
Posts: 173
Joined: Sat Feb 04, 2006 5:05 pm

Post by 1+12 »

I want a command which will only summon max levels.

And then another command which wuold only summon ppl who are not max lvl.

This would be much better for managing events.
Max levels would have their own pvp
and ppl with lower levels would have their own.

The commands would be like this
/summonmax - would summon all max levels
/summonlow - would summon all lower levels.(Anything below the max, even 1 below it.)
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

If you TP someone that doesn't want to be in event?
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

wow... i will never have enough of time in a day to code all the commands requested by outpost members.


I'll try to make it when i'll wake up, i'm really tired now. Should not be really hard but i don't have time and i work on many codes at the same time.
<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 !
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

[/QUOTE]hey i havent tested it i dont got time atm but i copleted with no errors so here.

in game.cpp
if (memcmp(cp, "/summonmax ", 11) == 0) {
   AdminOrder_SummonMax(iClientH, cp, dwMsgSize - 21);
   return;
  }
void CGame::AdminOrder_SummonMax(int iClientH, char *pData, DWORD dwMsgSize)
{

char   seps[] = "= \t\n";
char   * token, * cp, cBuff[256], cLocation[11], cMapName[11];
WORD   *wp;
int    pX, pY, i;
class  CStrTok * pStrTok;
short sItemIndex;
if (m_pClientList[iClientH] == NULL) return;
if ((dwMsgSize) <= 0) return;
if (m_pClientList[iClientH]->m_bIsAdminCommandEnabled == FALSE) return;

if (m_pClientList[iClientH]->m_iAdminUserLevel < m_iAdminLevelSummonAll) {
   // Admin user levelÀÌ ³·¾Æ¼­ ÀÌ ±â´ÉÀ» »ç¿ëÇÒ ¼ö ¾ø´Ù.
   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;
}

pX = m_pClientList[iClientH]->m_sX;
pY = m_pClientList[iClientH]->m_sY;


memcpy(cMapName, m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cName, 11);




if (strlen(token) > 10)
memcpy(cLocation, token, 10);
else memcpy(cLocation, token, strlen(token));

for (i = 0; i < DEF_MAXCLIENTS; i++)
   if ((m_pClientList != NULL) && (strcmp(m_pClientList->m_cLocation, token) == 0)) {
     RequestTeleportHandler(i, "2   ", cMapName, pX, pY);
   }

if (m_pClientList == NULL);
if ((strcmp(m_pClientList->m_cLocation, "elvine") != 0) &&
     (strcmp(m_pClientList->m_cLocation, "elvhunter") != 0) &&
     (strcmp(m_pClientList->m_cLocation, "arehunter") != 0) &&
     (strcmp(m_pClientList->m_cLocation, "aresden") != 0) &&
     (m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_sLevelLimit > m_pClientList->m_iLevel >= 120));

wsprintf(G_cTxt,"GM Order(%s): PC(%s) Summoned to (%s)", m_pClientList[iClientH]->m_cLocation,
    cLocation, cMapName);
bSendMsgToLS(MSGID_GAMEMASTERLOG, iClientH, FALSE, G_cTxt);

ZeroMemory(cBuff, sizeof(cBuff));
cp = (char *)cBuff;
*cp = GSM_REQUEST_SUMMONALL;
cp++;

memcpy(cp, cLocation, 10);
cp += 10;

memcpy(cp, cMapName, 10);
cp += 10;

wp = (WORD *)cp;
*wp = m_pClientList[iClientH]->m_sX;
cp += 2;

wp = (WORD *)cp;
*wp = m_pClientList[iClientH]->m_sY;
cp += 2;

bStockMsgToGateServer(cBuff, 25);

delete pStrTok;
}


in game.h
void AdminOrder_SummonMax(int iClientH, char * pData, DWORD dwMsgSize);



tested it let me know if it works i just throw it togeather
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1+12
Member
Posts: 173
Joined: Sat Feb 04, 2006 5:05 pm

Post by 1+12 »

Thanks juggalo, I'll try it out as soon as I get home :D

To Loco:You have a point xD
ADDKiD
&lt;3 bd long time
Posts: 967
Joined: Tue Jul 12, 2005 8:07 pm
Location: Washington, USA
Contact:

Post by ADDKiD »

Just kill 'em?
1+12
Member
Posts: 173
Joined: Sat Feb 04, 2006 5:05 pm

Post by 1+12 »

But when you summon and kill ppl tend to get angry lol.
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

did teh code work ?
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1+12
Member
Posts: 173
Joined: Sat Feb 04, 2006 5:05 pm

Post by 1+12 »

Lmao, still havent gotten a chance to try it out, so much studies... =X
Post Reply