• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Where & how in the source can I make an item only visible for one vocation? (8.60 - Nekiro)

Rugged Mage

Lua Scripter
Joined
Mar 8, 2010
Messages
1,182
Solutions
2
Reaction score
73
As the title states : Where & how in the source files can I make an item only visible for one vocation?

I'm trying to make item id (3613) only visible for paladins, but can't figure out how to do it or which cpp file to edit for this to be possible.

Anyone have ideas or suggestions?
 
Last edited:
OP
OP
Rugged Mage

Rugged Mage

Lua Scripter
Joined
Mar 8, 2010
Messages
1,182
Solutions
2
Reaction score
73
BUMP. I’m thinking it could be something like /ghost where certain people see the god but some people can’t depending on group number.
 
OP
OP
Rugged Mage

Rugged Mage

Lua Scripter
Joined
Mar 8, 2010
Messages
1,182
Solutions
2
Reaction score
73
Not actually solved, the client keeps crashing, anyone have solutions for that? I'm posting the error below. Also, I don't feel like it's impolite to not post the solution if I would have solved it by myself without anyone giving advice at all. BUT, now that I know that is the community standard, once I do solve it, even if it's on my own, I'll post the solution.

The only change I made was in Player.h lines 648 - 674ish
C++:
        void sendAddTileItem(const Tile* tile, const Position& pos, const Item* item) {
            if (client) {
                int32_t stackpos = tile->getStackposOfItem(this, item);
                if (stackpos != -1) {
//BEGINNING OF CHANGE
                    if (item->getID() == 3613 && (vocation->getId() != 3 || vocation->getId() != 7)){
                        int tileID = tile->getGround()->getID();
                        Item* testItem = Item::CreateItem(tileID, 1);
                        client->sendAddTileItem(pos, stackpos, testItem);
                    }
//END OF CHANGE
                    else{
                    client->sendAddTileItem(pos, stackpos, item);
                    }
                }
            }
        }
        void sendUpdateTileItem(const Tile* tile, const Position& pos, const Item* item) {
            if (client) {
                int32_t stackpos = tile->getStackposOfItem(this, item);
                if (stackpos != -1) {
//BEGINNING OF CHANGE
                    if (item->getID() == 3613 && (vocation->getId() != 3 || vocation->getId() != 7)){
                        int tileID = tile->getGround()->getID();
                        Item* testItem = Item::CreateItem(tileID, 1);
                        client->sendUpdateTileItem(pos, stackpos, testItem);
                    }
//END OF CHANGE
                    else{
                    client->sendUpdateTileItem(pos, stackpos, item);
                    }
                }
            }
        }
 

Attachments

Last edited:
Top