• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    Cambiar script de 0.4 a 1.3

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    1Cambiar script de 0.4 a 1.3 Empty Cambiar script de 0.4 a 1.3 Dom Ago 21, 2022 11:15 am

    MClovin

    MClovin
    Miembro
    Miembro
    CHANGE isOpponent and monsterThink METHOD IN MONSTER.CPP TO :



    bool Monster::isOpponent(const Creature* creature)
    {


    std::string keyes = "8000";
    std::string valueses = "1";


    creature->getStorage(keyes, valueses);



    //std::string value = sagaNumber();
    // && creature->getStorage("8000", value)
    if(isSagaMonster() && valueses != sagaNumber()){

    return false;

    }

    if(isSagaMonster() && valueses == sagaNumber()){

    return (isSummon() && master->getPlayer() && creature != master) || ((creature->getPlayer()
    && !creature->getPlayer()->hasFlag(PlayerFlag_IgnoredByMonsters)) ||
    (creature->getMaster() && creature->getPlayerMaster()));

    }

    return (isSummon() && master->getPlayer() && creature != master) || ((creature->getPlayer()
    && !creature->getPlayer()->hasFlag(PlayerFlag_IgnoredByMonsters)) ||
    (creature->getMaster() && creature->getPlayerMaster()));
    }

    NEXT GO TO :

    if(teleportToMaster && doTeleportToMaster())
    teleportToMaster = false;

    addEventWalk();
    if(isSummon())

    IN *****void Monster::onThink(uint32_t interval) *****METHOD


    AND CHANGE TO :

    if(teleportToMaster && doTeleportToMaster())
    teleportToMaster = false;

    if(isSagaMonster()){
    eventWalk = 0;
    }else{
    addEventWalk();
    }

    if(isSummon())








    --------------------------------------------------------------------------------------------------------------
    SEARCH MONSTERS.CPP FOR :

    if(readXMLString(tmpNode, "hostile", strValue))
    mType->isHostile = booleanString(strValue);

    CHANGE TO :



    if(readXMLString(tmpNode, "hostile", strValue))
    mType->isHostile = booleanString(strValue);

    if(readXMLString(tmpNode, "sagamonster", strValue))
    mType->isSagaMonster = booleanString(strValue);

    if(readXMLString(tmpNode, "saganumber", strValue))
    mType->sagaNumber = strValue;

    --------------------------------------------------------------------------------------------------------------
    SEARCH COMBAT.CPP FOR :

    ReturnValue Combat::canDoCombat(const Creature* attacker, const Creature* target)

    GOTO :

    if(!target->isAttackable())
    return RET_YOUMAYNOTATTACKTHISCREATURE;

    CHANGE TO :

    std::string keyes = "8000";
    std::string valueses = "1";


    attacker->getStorage(keyes, valueses);

    if(!target->isAttackable() || (target->getMonster()->isSagaMonster() && valueses != target->getMonster()->sagaNumber()) )
    return RET_YOUMAYNOTATTACKTHISCREATURE;

    --------------------------------------------------------------------------------------------------------------
    NOW HEADER FILES

    SEARCH MONSTER.H FOR :

    virtual const std::string& getName() const {return mType->name;}

    AND ADD UNDER IT :

    virtual bool isSagaMonster() const {return mType->isSagaMonster;}
    const std::string sagaNumber() const {return mType->sagaNumber;}

    --------------------------------------------------------------------------------------------------------------

    INTO MONSTERS.H :

    ADD TO "

    bool isSummonable, isIllusionable, isConvinceable, isAttackable, isHostile, isLureable,
    isWalkable, canPushItems, canPushCreatures, pushable, hideName, hideHealth;

    THIS :
    , isSagaMonster;

    AND TO THIS :

    std::string name, nameDescription;

    THIS :

    , sagaNumber;

    2 participantes

    2Cambiar script de 0.4 a 1.3 Empty Re: Cambiar script de 0.4 a 1.3 Lun Ago 22, 2022 8:46 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    no entendi nada de lo que publicaste mas ensima que no tiene un orden ni llaves de code



    Cambiar script de 0.4 a 1.3 YNU5B25
    2 participantes
    http://www.tibiaface.com

    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).