EOSERV Forum > EOSERV > Mining with exp guide.
Topic is locked.
Page: << 1 2 >>
Mining with exp guide.
Author Message
Post #74933 Re: Mining with exp guide.

I cannot really help with that :/ I always use deathx map editor. you must place instead of a wall on an unknown tile on the maps to let it work. but im not sure how with rena map editor.

14 years, 2 weeks ago
Post #75553 Re: Mining with exp guide.

error: 'PACKET_STOCK' was not declared in this scope


and this error is in: void Map::Mine(Character*)

---
stay tuned.
14 years, 1 week ago
Post #77496 Re: Mining with exp guide.

O.O Have you added it correctly? Because packet_stock has nothing to do with the code. That is for EO+ and law & marriage.

EDIT: I forget to add something, I edited the 1st post. (Code also works without it)

13 years, 51 weeks ago
Post #77510 Re: Mining with exp guide.

Heres the code i put in and i'll bold the PACKET_STOCK;

            ++from->mlevel;

        }


        builder.SetID(PACKET_RECOVER, PACKET_REPLY);

        builder.AddInt(from->mexp);

        builder.AddShort(from->karma);

        if (!from->mining_exp)

        {

            from->mining_exp = true;

            from->ServerMsg("Switching to mining exp mode");

            builder.AddChar(from->mlevel);

        }

        else

        {

            if (level_up)

            {

                builder.AddChar(from->mlevel);

                PacketBuilder reply(PACKET_ITEM, PACKET_ACCEPT);

                reply.AddShort(from->player->id);

                UTIL_PTR_LIST_FOREACH(this->characters, Character, character)

                {

                    if (*character != from && character->InRange(from))

                    {

                        character->player->client->SendBuilder(reply);

                    }

                }

            }

            else

                builder.AddChar(0);

        }

        from->player->client->SendBuilder(builder);


        if (from->AddItem(drop->item, 1))

        {

            from->CalculateStats();

            PacketBuilder builder(PACKET_ITEM, PACKET_STOCK);

            builder.AddShort(drop->item);

            builder.AddThree(1);

            builder.AddChar(from->weight);

            from->player->client->SendBuilder(builder);

        }

    }

    else

    {

        from->ServerMsg("You failed to mine anything");

    }


    builder.Reset();

    builder.SetID(PACKET_ATTACK,PACKET_PLAYER);

builder.AddShort(from->player->id);

builder.AddChar(from->direction);


UTIL_PTR_LIST_FOREACH(this->characters, Character, character)

{

if (from->InRange(*character))

{

character->player->client->SendBuilder(builder);

}

}

}

---
stay tuned.
13 years, 51 weeks ago
Post #77758 Re: Mining with exp guide.

Add the packet_stock in packet.cpp and .hpp

13 years, 51 weeks ago
Post #86392 Re: Mining with exp guide.

I get this error
..\src\character.hpp|244|error: 'class Character' has no member named 'mlevel'|
||=== Build finished: 1 errors, 0 warnings ===|

And it takes me to this line:
SCRIPT_REGISTER_VARIABLE("uint8", mlevel);
Which is under
SCRIPT_REGISTER_VARIABLE("int", exp);

13 years, 44 weeks ago
Post #89798 Re: Mining with exp guide.

Anyone find a fix for the warning?...

[WRN] skipping invalid mine drop data for item #0

It tends to crash the server about every 5mins or so.

---
http://www.torn.com/478456
13 years, 41 weeks ago
Post #99494 Re: Mining with exp guide.

Hollow you missed out quite a few things, you should look over it if you want and add some things in. And I am not sure but this may have something to do with the Mine_Drop

Mine_Drop *drop = 0;

Idk though :/

But my server doesn't seem to crash at all, so ;D

13 years, 36 weeks ago
Post #123713 Re: Mining with exp guide.

Does this work in rev264?

13 years, 15 weeks ago
Post #123763 Re: Mining with exp guide.
Pine posted: (17th Jan 2012, 12:15 am)

Does this work in rev264?



No.
---
stay tuned.
13 years, 15 weeks ago
Page: << 1 2 >>
Topic is locked.
EOSERV Forum > EOSERV > Mining with exp guide.