[Help] Add command source code

crazzybg

New Member
Joined
Sep 24, 2009
Messages
172
Reaction score
20
Здравейте.

Бих искал да попитам дали някой има възможност да даде sorce или dll за
add command ?

Благодаря предварително.
 

crazzybg

New Member
Joined
Sep 24, 2009
Messages
172
Reaction score
20
Да живеят чуждите форуми ... никакво помощ от санародниците .. браво
 

Wikko0

Well-Known Member
Joined
Oct 17, 2012
Messages
659
Reaction score
261
Е виж че има само 11 виждания и сигурно 3-4 твои....
ЪП-вай си темата щото докато ти я одобрят.... и не може се намери :)
 

KR373N

Well-Known Member
Joined
May 18, 2008
Messages
1,943
Reaction score
446
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.");
 
  • Like
Reactions: ThunderMu

Roman

New Member
Joined
Dec 20, 2008
Messages
58
Reaction score
3
Това къде се поставя?
 

Deadman

Banned
Joined
Mar 17, 2014
Messages
323
Reaction score
281
в C и си правиш ново длл което хукваш към гс или ако имаш сорса направо си го слагаш там