StormRusher
New Member
- Joined
- Dec 23, 2009
- Messages
- 138
- Reaction score
- 0
I wanna know all the monster flags.
Thanks
Thanks
Last edited:
<flag summonable="1"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="1"/>
<flag pushable="0"/>
<flag canpushitems="0"/>
<flag canpushcreatures="0"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="5"/>
else if(!xmlStrcmp(p->name, (const xmlChar*)"flags"))
{
xmlNodePtr tmpNode = p->children;
while(tmpNode)
{
if(xmlStrcmp(tmpNode->name, (const xmlChar*)"flag") == 0)
{
if(readXMLString(tmpNode, "summonable", strValue))
mType->isSummonable = booleanString(strValue);
if(readXMLString(tmpNode, "attackable", strValue))
mType->isAttackable = booleanString(strValue);
if(readXMLString(tmpNode, "hostile", strValue))
mType->isHostile = booleanString(strValue);
if(readXMLString(tmpNode, "illusionable", strValue))
mType->isIllusionable = booleanString(strValue);
if(readXMLString(tmpNode, "convinceable", strValue))
mType->isConvinceable = booleanString(strValue);
if(readXMLString(tmpNode, "pushable", strValue))
mType->pushable = booleanString(strValue);
if(readXMLString(tmpNode, "canpushitems", strValue))
mType->canPushItems = booleanString(strValue);
if(readXMLString(tmpNode, "canpushcreatures", strValue))
mType->canPushCreatures = booleanString(strValue);
if(readXMLString(tmpNode, "hidename", strValue))
mType->hideName = booleanString(strValue);
if(readXMLString(tmpNode, "hidehealth", strValue))
mType->hideHealth = booleanString(strValue);
if(readXMLInteger(tmpNode, "lootmessage", intValue))
mType->lootMessage = (LootMessage_t)intValue;
if(readXMLInteger(tmpNode, "staticattack", intValue))
{
if(intValue < 0 || intValue > 100)
{
SHOW_XML_WARNING("staticattack lower than 0 or greater than 100");
intValue = 0;
}
mType->staticAttackChance = intValue;
}
if(readXMLInteger(tmpNode, "lightlevel", intValue))
mType->lightLevel = intValue;
if(readXMLInteger(tmpNode, "lightcolor", intValue))
mType->lightColor = intValue;
if(readXMLInteger(tmpNode, "targetdistance", intValue))
{
if(intValue > Map::maxViewportX)
SHOW_XML_WARNING("targetdistance greater than maxViewportX");
mType->targetDistance = std::max(1, intValue);
}
if(readXMLInteger(tmpNode, "runonhealth", intValue))
mType->runAwayHealth = intValue;
if(readXMLString(tmpNode, "lureable", strValue))
mType->isLureable = booleanString(strValue);
if(readXMLString(tmpNode, "walkable", strValue))
mType->isWalkable = booleanString(strValue);
if(readXMLString(tmpNode, "skull", strValue))
mType->skull = getSkull(strValue);
if(readXMLString(tmpNode, "shield", strValue))
mType->partyShield = getPartyShield(strValue);
}
tmpNode = tmpNode->next;
}
//if a monster can push creatures, it should not be pushable
if(mType->canPushCreatures && mType->pushable)
mType->pushable = false;
}
monster.cpp is in the tfs sources, you have to download it to edit itthanks Cykotitan, exactly what i needed
doubt: where is monster.cpp file? and how can i "read" .cpp files?
monster.cpp is in the tfs sources, you have to download it to edit it
you edit it with BloodShed DevC++, there is an edited one here for ots