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

Solved TFS 1.2 Item attributes

Status
Not open for further replies.

freaked1

Active Member
Joined
Jan 30, 2008
Messages
486
Solutions
5
Reaction score
29
Location
Sweden
Hello! Is there any list of all item attributes that can be used in items.xml?
Thanks in advance!
 
Solution
you can look through here, you don't have to understand the code, just see the uppercase text and see what string it goes with
https://github.com/otland/forgottenserver/blob/master/src/items.cpp
example: these are slot types (key="slottype") (the slot types are "head", "body", "legs", "feet", etc.)
C++:
} else if (tmpStrValue == "slottype") {
tmpStrValue = asLowerCaseString(valueAttribute.as_string());
if (tmpStrValue == "head") {
it.slotPosition |= SLOTP_HEAD;
} else if (tmpStrValue == "body") {
it.slotPosition |= SLOTP_ARMOR;
} else if (tmpStrValue == "legs") {
it.slotPosition |= SLOTP_LEGS;
} else if (tmpStrValue == "feet") {
it.slotPosition |= SLOTP_FEET;
} else if (tmpStrValue == "backpack") {
it.slotPosition |=...
you can look through here, you don't have to understand the code, just see the uppercase text and see what string it goes with
https://github.com/otland/forgottenserver/blob/master/src/items.cpp
example: these are slot types (key="slottype") (the slot types are "head", "body", "legs", "feet", etc.)
C++:
} else if (tmpStrValue == "slottype") {
tmpStrValue = asLowerCaseString(valueAttribute.as_string());
if (tmpStrValue == "head") {
it.slotPosition |= SLOTP_HEAD;
} else if (tmpStrValue == "body") {
it.slotPosition |= SLOTP_ARMOR;
} else if (tmpStrValue == "legs") {
it.slotPosition |= SLOTP_LEGS;
} else if (tmpStrValue == "feet") {
it.slotPosition |= SLOTP_FEET;
} else if (tmpStrValue == "backpack") {
it.slotPosition |= SLOTP_BACKPACK;
} else if (tmpStrValue == "two-handed") {
it.slotPosition |= SLOTP_TWO_HAND;
} else if (tmpStrValue == "right-hand") {
it.slotPosition &= ~SLOTP_LEFT;
} else if (tmpStrValue == "left-hand") {
it.slotPosition &= ~SLOTP_RIGHT;
} else if (tmpStrValue == "necklace") {
it.slotPosition |= SLOTP_NECKLACE;
} else if (tmpStrValue == "ring") {
it.slotPosition |= SLOTP_RING;
} else if (tmpStrValue == "ammo") {
it.slotPosition |= SLOTP_AMMO;
} else if (tmpStrValue == "hand") {
it.slotPosition |= SLOTP_HAND;
} else {
std::cout << "[Warning - Items::parseItemNode] Unknown slotType: " << valueAttribute.as_string() << std::endl;
}
 
Solution
Status
Not open for further replies.
Back
Top