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

Solved Error - Monsters::deserializeSpell] - spitnettle - Condition is not set for: condition

johnsamir

Banned User
Joined
Oct 13, 2009
Messages
555
Solutions
5
Reaction score
97
Location
Nowhere
Hello to everyone

Have converted cipsoft mon monster files from cipsoft to revscripts
in console im having the same problem with few monster but i can't identify very well where it's or how to solve it. Can someone give me hand please?

This is the original file in this case spitnettle
Lua:
# Tibia - graphical Multi-User-Dungeon
# MonsterRace File
# 2005/11/08 - 13:54:45

RaceNumber    = 221
Name          = "spit nettle"
Article       = "a"
Outfit        = (221, 0-0-0-0)
Corpse        = 4391
Blood         = Slime
Experience    = 20
SummonCost    = 0
FleeThreshold = 150
Attack        = 9
Defend        = 33
Armor         = 12
Poison        = 18
LoseTarget    = 0
Strategy      = (100, 0, 0, 0)

Flags         = {SeeInvisible,
                 Unpushable,
                 NoSummon,
                 NoIllusion,
                 NoConvince,
                 NoPoison,
                 NoEnergy,
                 NoLifeDrain,
                 NoParalyze}

Skills        = {(HitPoints, 150, 0, 150, 0, 0, 0),
                 (GoStrength, -1, -1, -1, 0, 0, 0),
                 (CarryStrength, 100, 0, 100, 0, 0, 0),
                 (FistFighting, 15, 15, 15, 50, 1000, 1)}

Spells        = {Actor (13) -> Healing (12, 4) : 8,
                 Victim (7, 15, 9) -> Damage (2, 27, 10) : 7,
                 Victim (7, 15, 9) -> Damage (32, 30, 8) : 4}

Inventory     = {(3031, 5, 100),
                 (3661, 1, 10),
                 (3740, 1, 100),
                 (3738, 1, 10),
                 (3738, 1, 50)}
here is how it looks converted to lua or revscripts
Code:
local mType = Game.createMonsterType("spitnettle")
local monster = {}

monster.name = "spit nettle"
monster.description = "a spit nettle"
monster.experience = 20
monster.outfit = {
    lookType = 221,
    lookHead = 0,
    lookBody = 0,
    lookLegs = 0,
    lookFeet = 0,
    lookAddons = 0,
    lookMount = 0
}

monster.health = 150
monster.maxHealth = 150
monster.runHealth = 0
monster.race = "blood"
monster.corpse = 4326
monster.speed = 0
monster.summonCost = 0

monster.changeTarget = {
    interval = 2000,
    chance = 0
}

monster.flags = {
    attackable = true,
    hostile = true,
    summonable = false,
    convinceable = false,
    illusionable = false,
    boss = false,
    ignoreSpawnBlock = false,
    pushable = false,
    canPushItems = false,
    canPushCreatures = false,
    staticAttackChance = 90,
    targetDistance = 1,
    healthHidden = false,
    canWalkOnEnergy = false,
    canWalkOnFire = false,
    canWalkOnPoison = false
}

monster.light = {
    level = 0,
    color = 0
}

monster.voices = {
    interval = 5000,
    chance = 10,
}

monster.immunities = {
    {type = "paralyze", condition = true},
    {type = "outfit", condition = false},
    {type = "invisible", condition = true},
    {type = "drunk", condition = true},
    {type = "bleed", condition = false}
}

monster.elements = {
    {type = COMBAT_PHYSICALDAMAGE, percent = 0},
    {type = COMBAT_ENERGYDAMAGE, percent = 100},
    {type = COMBAT_EARTHDAMAGE, percent = 100},
    {type = COMBAT_FIREDAMAGE, percent = 0},
    {type = COMBAT_LIFEDRAIN, percent = 100},
    {type = COMBAT_MANADRAIN, percent = 0},
    {type = COMBAT_DROWNDAMAGE, percent = 0},
    {type = COMBAT_ICEDAMAGE, percent = 0},
    {type = COMBAT_HOLYDAMAGE , percent = 0},
    {type = COMBAT_DEATHDAMAGE , percent = 0}
}

monster.attacks = {
    {name ="melee", interval = 2000, chance = 100, skill = 15, attack = 9},
    {name ="combat", interval = 2000, chance = 14, type = COMBAT_EARTHDAMAGE, minDamage = -17, maxDamage = -37, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS},
    {name ="condition", interval = 2000, chance = 25, type = CONDITION_POISON, startDamage = 0, tick = 4000, minDamage = -22, maxDamage = -38, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS}
}

monster.defenses = {
    defense = 33,
    armor = 12,
    {name ="combat", interval = 2000, chance = 12, type = COMBAT_HEALING, minDamage = 8, maxDamage = 16, effect = CONST_ME_MAGIC_BLUE}
}

monster.loot = {
    {id = 2148, chance = 10000, maxCount = 5},
    {id = 2747, chance = 1000},
    {id = 2804, chance = 10000},
    {id = 2802, chance = 1000},
    {id = 2802, chance = 5000}
}

mType:register(monster)


thought that might be this but nor removing that part of code nor giving a value is removing the console error
Code:
startDamage = 0,

Regards
Post automatically merged:

or maybe
Lua:
{name ="condition"
to
Lua:
{name ="poisoncondition"
. but does not work


final edit (still need help. im not sure if this is ok or the proper fix) which attack should be?
i changed
Lua:
{name ="condition"
to this
Lua:
{name ="poisonfield"

thank
EDIT: i know that this is the proper solution, thread closed(hopefully this will help people in the future
here lua monster converted from cipsoft files, useable in nekiro datapack



changed
Lua:
{name ="condition"
to this
Lua:
{name ="poisonfield"

and removed this
Lua:
startDamage = 0,
 
Last edited:
OP
OP
J

johnsamir

Banned User
Joined
Oct 13, 2009
Messages
555
Solutions
5
Reaction score
97
Location
Nowhere
Lua:
{name ="condition", interval = 2000, chance = 33, type = CONDITION_ENERGY, startDamage = 0, tick = 10000, minDamage = -50, maxDamage = -90, range = 7, shootEffect = CONST_ANI_ENERGY},
to
Code:
{name ="energyfield", interval = 2000, chance = 33, type = CONDITION_ENERGY, startDamage = 0, tick = 10000, minDamage = -50, maxDamage = -90, range = 7, shootEffect = CONST_ANI_ENERGY},
and works the problem is still startDamage = 0 will have to check at which damage it begin, example cobra,bonebeast
 

Attachments

Sizaro

Advanced OT User
Joined
Aug 20, 2007
Messages
5,088
Solutions
4
Reaction score
157
Location
Sweden
GitHub
coldensjo
So the only problem seems to be the name? Is there a list somewhere with viable names?

Lua:
name ="condition",
Doesn't work
Lua:
name ="shitface",
Doesn't work
Lua:
name ="poisonfield",
Seems to work
 
OP
OP
J

johnsamir

Banned User
Joined
Oct 13, 2009
Messages
555
Solutions
5
Reaction score
97
Location
Nowhere
So the only problem seems to be the name? Is there a list somewhere with viable names?

Lua:
name ="condition",
Doesn't work
Lua:
name ="shitface",
Doesn't work
Lua:
name ="poisonfield",
Seems to work
Sources at monster cpp the values are poisonfield firefield energyfield, you will notice which one is requeried by the condition of the monster, for higher protocol just search at monster.cpp
 

Sizaro

Advanced OT User
Joined
Aug 20, 2007
Messages
5,088
Solutions
4
Reaction score
157
Location
Sweden
GitHub
coldensjo
C++:
} else if (tmpName == "firefield") {
            combat->setParam(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL);
        } else if (tmpName == "poisonfield") {
            combat->setParam(COMBAT_PARAM_CREATEITEM, ITEM_POISONFIELD_PVP);
        } else if (tmpName == "energyfield") {
            combat->setParam(COMBAT_PARAM_CREATEITEM, ITEM_ENERGYFIELD_PVP);
        } else if (tmpName == "firecondition" || tmpName == "energycondition" ||
                   tmpName == "earthcondition" || tmpName == "poisoncondition" ||
                   tmpName == "icecondition" || tmpName == "freezecondition" ||
                   tmpName == "deathcondition" || tmpName == "cursecondition" ||
                   tmpName == "holycondition" || tmpName == "dazzlecondition" ||
                   tmpName == "drowncondition" || tmpName == "bleedcondition" ||
                   tmpName == "physicalcondition") {
            ConditionType_t conditionType = CONDITION_NONE;
            uint32_t tickInterval = 2000;

            if (tmpName == "firecondition") {
                conditionType = CONDITION_FIRE;
                tickInterval = 10000;
            } else if (tmpName == "poisoncondition" || tmpName == "earthcondition") {
                conditionType = CONDITION_POISON;
                tickInterval = 4000;
            } else if (tmpName == "energycondition") {
                conditionType = CONDITION_ENERGY;
                tickInterval = 10000;
            } else if (tmpName == "drowncondition") {
                conditionType = CONDITION_DROWN;
                tickInterval = 5000;
            } else if (tmpName == "freezecondition" || tmpName == "icecondition") {
                conditionType = CONDITION_FREEZING;
                tickInterval = 10000;
            } else if (tmpName == "cursecondition" || tmpName == "deathcondition") {
                conditionType = CONDITION_CURSED;
                tickInterval = 4000;
            } else if (tmpName == "dazzlecondition" || tmpName == "holycondition") {
                conditionType = CONDITION_DAZZLED;
                tickInterval = 10000;
            } else if (tmpName == "physicalcondition" || tmpName == "bleedcondition") {
                conditionType = CONDITION_BLEEDING;
                tickInterval = 4000;
            }

            if ((attr = node.attribute("tick"))) {
                int32_t value = pugi::cast<int32_t>(attr.value());
                if (value > 0) {
                    tickInterval = value;
                }
            }

            int32_t minDamage = std::abs(sb.minCombatValue);
            int32_t maxDamage = std::abs(sb.maxCombatValue);
            int32_t startDamage = 0;

            if ((attr = node.attribute("start"))) {
                int32_t value = std::abs(pugi::cast<int32_t>(attr.value()));
                if (value <= minDamage) {
                    startDamage = value;
                }
            }

            Condition* condition = getDamageCondition(conditionType, maxDamage, minDamage, startDamage, tickInterval);
            combat->addCondition(condition);
        } else if (tmpName == "strength") {
            //
        } else if (tmpName == "effect") {
            //
        } else {
            std::cout << "[Error - Monsters::deserializeSpell] - " << description << " - Unknown spell name: " << name << std::endl;
            return false;
        }

So the name doesn't make a difference at all?I can name it energyfield if its a poison condition?
 
OP
OP
J

johnsamir

Banned User
Joined
Oct 13, 2009
Messages
555
Solutions
5
Reaction score
97
Location
Nowhere
The conversor named it condition but it's related to fields, where says condition it must go a field poison, fire, energy .... And you can know it because in the same line goes a variable named type and will display the requeried condition if poison field or energy
 

mano368

Well-Known Member
Joined
Sep 2, 2011
Messages
235
Solutions
30
Reaction score
99
Location
Brazil
Read the post above, reload website if you need to.
yo, just deleted my monster folder, replaced with your monster folder, changed condition and get this error on nekiro 1.5 downgrade 7.72

I noticed that the error happens from the hydra, the previous .lua don't have this error
 

Attachments

OP
OP
J

johnsamir

Banned User
Joined
Oct 13, 2009
Messages
555
Solutions
5
Reaction score
97
Location
Nowhere
try to load it again it happens to me too on windows, have to open exe more than once sometimes don't know why but it ends up loading,evilpuncked said that revscripts monster haven't been tested and seems to be or make the server unstable don't know yet, for that reasons have come back to xml monster
 
Top