• 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!

New Slot

Noupz

New Member
Joined
Jul 13, 2010
Messages
126
Reaction score
1
Guys, I need help to create a new slot, I tried to copy the original ring slot, but with the amount received different, and did not, so I tried to create as Ringa, these are the files that I modified
items.h

#define SLOTP_WHEREEVER 0xFFFFFFFF

#define SLOTP_HEAD 1 << 0
#define SLOTP_NECKLACE 1 << 1
#define SLOTP_BACKPACK 1 << 2
#define SLOTP_ARMOR 1 << 3
#define SLOTP_RIGHT 1 << 4
#define SLOTP_LEFT 1 << 5
#define SLOTP_LEGS 1 << 6
#define SLOTP_FEET 1 << 7
#define SLOTP_RING 1 << 8
#define SLOTP_AMMO 1 << 9
#define SLOTP_DEPOT 1 << 10
#define SLOTP_TWO_HAND 1 << 11
#define SLOTP_RINGA 1 << 12
#define SLOTP_HAND SLOTP_LEFT | SLOTP_RIGHT



items.cpp

else if(tmpStrValue == "ringa")
{
it.slotPosition |= SLOTP_RINGA;
it.wieldPosition = SLOT_RINGA;
}



movement.cpp

case SLOT_RINGA:
slotp = SLOTP_RINGA;
break;
else if(tmpStrValue == "ringa")
slot = SLOTP_RINGA;

player.cpp
ReturnValue ret = RET_NOERROR;
if((item->getSlotPosition() & SLOTP_HEAD) || (item->getSlotPosition() & SLOTP_NECKLACE) ||
(item->getSlotPosition() & SLOTP_BACKPACK) || (item->getSlotPosition() & SLOTP_ARMOR) ||
(item->getSlotPosition() & SLOTP_LEGS) || (item->getSlotPosition() & SLOTP_FEET) ||
(item->getSlotPosition() & SLOTP_RING) || (item->getSlotPosition() & SLOTP_RINGA))
ret = RET_CANNOTBEDRESSED;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_PUTTHISOBJECTINBOTHHANDS;
else if((item->getSlotPosition() & SLOTP_RIGHT) || (item->getSlotPosition() & SLOTP_LEFT))
ret = RET_PUTTHISOBJECTINYOURHAND;
case SLOT_RINGA:
if(item->getSlotPosition() & SLOTP_RINGA)
ret = RET_NOERROR;
break;

creature.h
enum slots_t
{
SLOT_PRE_FIRST = 0,
SLOT_WHEREEVER = SLOT_PRE_FIRST,
SLOT_FIRST = 1,
SLOT_HEAD = SLOT_FIRST,
SLOT_NECKLACE = 2,
SLOT_BACKPACK = 3,
SLOT_ARMOR = 4,
SLOT_RIGHT = 5,
SLOT_LEFT = 6,
SLOT_LEGS = 7,
SLOT_FEET = 8,
SLOT_RING = 9,
SLOT_AMMO = 10,
SLOT_RINGA = 11,
SLOT_DEPOT = 12,
SLOT_LAST = SLOT_DEPOT,
SLOT_HAND = 13,
SLOT_TWO_HAND = SLOT_HAND
};

enums.h
enum ConditionId_t
{
CONDITIONID_DEFAULT = -1,
CONDITIONID_COMBAT = 0,
CONDITIONID_HEAD,
CONDITIONID_NECKLACE,
CONDITIONID_BACKPACK,
CONDITIONID_ARMOR,
CONDITIONID_RIGHT,
CONDITIONID_LEFT,
CONDITIONID_LEGS,
CONDITIONID_FEET,
CONDITIONID_RING,
CONDITIONID_RINGA,
CONDITIONID_AMMO,
CONDITIONID_OUTFIT
};
 
Back
Top