Jump to content

deadzero

Members
  • Content Count

    12
  • Joined

  • Last visited

Posts posted by deadzero


  1. Hi, i'm having this errors in my compilation after I change the host of my server.

     

     

     

    console.o (symbol from plugin): warning: memset used with constant zero length parameter; this could be due to transposed parameters

    In file included from ../common/timer.h:380:0,

    from :763:

    In function ‘do_close.part.5’,

    inlined from ‘do_close’ at socket.c:1234:6:

    socket.c:1240:2: warning: call to ‘__fdelt_warn’ declared with attribute warning: bit outside of fd_set selected [enabled by default]

    In file included from itemdb.h:658:0,

    from :800:

    socket.c: In function ‘do_sockets’:

    socket.c:841:6: warning: call to ‘__fdelt_warn’ declared with attribute warning: bit outside of fd_set selected [enabled by default]

    In file included from itemdb.h:652:0,

    from :800:

    socket.c: In function ‘make_listen_bind’:

    socket.c:555:2: warning: call to ‘__fdelt_warn’ declared with attribute warning: bit outside of fd_set selected [enabled by default]

    In file included from itemdb.h:651:0,

    from :800:

    socket.c: In function ‘make_connection’:

    socket.c:606:2: warning: call to ‘__fdelt_warn’ declared with attribute warning: bit outside of fd_set selected [enabled by default]

    In file included from itemdb.h:602:0,

    from :800:

    socket.c: In function ‘connect_client’:

    socket.c:505:2: warning: call to ‘__fdelt_warn’ declared with attribute warning: bit outside of fd_set selected [enabled by default]

    make[1]: Leaving directory `/home/emulador/src/map'

    building conf/import folder...

     

     

     

    Can anyone help me?


  2. Obrigado julio, irei fazer, se eu conseguir postarei a edição aqui.

     

    ok, consegui fazer oque queria

     

    arquivo unit.c

     

    procure por

     

    // Check if warping and not changing the map.

    if ( sd->state.warping && !sd->state.changemap ) {

    status_change_end(bl, SC_CLOAKING, INVALID_TIMER);

    status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER);

    }

     

    basta adicionar a linha

    status_change_end(bl, SC_CHASEWALK, INVALID_TIMER);

     

    vai ficar assim

    // Check if warping and not changing the map.

    if ( sd->state.warping && !sd->state.changemap ) {

    status_change_end(bl, SC_CLOAKING, INVALID_TIMER);

    status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER);

    status_change_end(bl, SC_CHASEWALK, INVALID_TIMER);

    }


  3. Olá, meu servidor está caindo randomincamente, o problema é que eu não sei o motivo de tal. pode ser uma skill ou um npc, ele apenas cai, gostaria de saber se existe alguma forma de ver o motivo que derrubou o map server, qual skill evento ou npc que o fez dar crash.


  4. Não sei se npc pode receber dano, mas você pode criar 3 monstros, ai quando 1 morre você invoca o outro.

     

    monster("turbo_n_1",147,375,"Pedra1",1906,1,"c_maluca::OnMATOU1MOB1");

    end;

     

    OnMATOU1MOB1:

    monster("turbo_n_1",147,375,"Pedra2",1907,1,"c_maluca::OnMATOU1MOB2");

    end;

     

    OnMATOU1MOB2:

    monster("turbo_n_1",147,375,"Pedra3",1908,1,"c_maluca::OnMATOU1MOB1");

    end;

     

    É só um exemplo de como fazer, você pode substituir os ids de monstros pelo que você criou.


  5. Hi, I modified my skill.c for MO_EXTREMITYFIST return to old animation.

     

    I replace this:

     

     

     

    case MO_EXTREMITYFIST:

    {

    short x, y, i = 2; // Move 2 cells for Issen(from target)

    struct block_list *mbl = bl;

    short dir = 0;

     

    skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);

     

    if( skill_id == MO_EXTREMITYFIST ) {

    mbl = src;

    i = 2; // for Asura(from caster)

    status->set_sp(src, 0, 0);

    status_change_end(src, SC_EXPLOSIONSPIRITS, INVALID_TIMER);

    status_change_end(src, SC_BLADESTOP, INVALID_TIMER);

    #ifdef RENEWAL

    sc_start(src, src,SC_EXTREMITYFIST2,100,skill_lv,skill->get_time(skill_id,skill_lv));

    #endif // RENEWAL

    } else {

    status_change_end(src, SC_NJ_NEN, INVALID_TIMER);

    status_change_end(src, SC_HIDING, INVALID_TIMER);

    #ifdef RENEWAL

    status->set_hp(src, max(status_get_max_hp(src)/100, 1), 0);

    #else // not RENEWAL

    status->set_hp(src, 1, 0);

    #endif // RENEWAL

    }

    dir = map->calc_dir(src,bl->x,bl->y);

    if( dir > 0 && dir < 4) x = -i;

    else if( dir > 4 ) x = i;

    else x = 0;

    if( dir > 2 && dir < 6 ) y = -i;

    else if( dir == 7 || dir < 2 ) y = i;

    else y = 0;

    if ((mbl == src || (!map_flag_gvg2(src->m) && !map->list[src->m].flag.battleground))) { // only NJ_ISSEN don't have slide effect in GVG

    if (!(unit->movepos(src, mbl->x+x, mbl->y+y, 1, 1))) {

    // The cell is not reachable (wall, object, ...), move next to the target

    if (x > 0) x = -1;

    else if (x < 0) x = 1;

    if (y > 0) y = -1;

    else if (y < 0) y = 1;

     

    unit->movepos(src, bl->x+x, bl->y+y, 1, 1);

    }

    clif->slide(src, src->x, src->y);

    clif->fixpos(src);

    clif->spiritball(src);

    }

    }

     

    break;

     

     

    For this:

     

    case MO_EXTREMITYFIST:

    if (skill_id == MO_EXTREMITYFIST)

    {

    status_change_end(src, SC_EXPLOSIONSPIRITS, INVALID_TIMER);

    status_change_end(src, SC_BLADESTOP, INVALID_TIMER);

    #ifdef RENEWAL

    sc_start(src,SC_EXTREMITYFIST2,100,skill_lv,skill_get_time(skill_id,skill_lv));

    #endif // RENEWAL

    }

    //Client expects you to move to target regardless of distance

    {

    struct unit_data *ud = unit->bl2ud(bl);

    short dx,dy;

    int i,speed;

    i = skill_id == MO_EXTREMITYFIST?1:2; //Move 2 cells for Issen, 1 for Asura

    dx = bl->x - src->x;

    dy = bl->y - src->y;

    if (dx < 0) dx-=i;

    else if (dx > 0) dx+=i;

    if (dy < 0) dy-=i;

    else if (dy > 0) dy+=i;

    if (!dx && !dy) dy++;

    status->set_sp(src, 0, 0);

    if (map->getcell(src->m, src->x + dx, src->y + dy, CELL_CHKNOPASS))

    {

    dx = bl->x;

    dy = bl->y;

    } else {

    dx = src->x + dx;

    dy = src->y + dy;

    }

     

    skill_attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);

     

    if (unit->walktoxy(src, dx, dy, 2) && ud) {

    //Increase can't walk delay to not alter your walk path

    ud->canmove_tick = tick;

    speed = status->get_speed(src);

    for (i = 0; i < ud->walkpath.path_len; i ++)

    {

    if(ud->walkpath.path&1)

    ud->canmove_tick+=7*speed/5;

    else

    ud->canmove_tick+=speed;

    }

    }

    }

    break;

     

     

    it works, but the damage was low with the modification.

    Can someone help me?


  6. The problem was in the script of resident evil.

     

     

    Index: atcommand.c

    ===================================================================

    --- atcommand.c (revision 15066)

    +++ atcommand.c (working copy)

    @@ -4432,6 +4432,8 @@

    strcat(atcmd_output, "PartyLock | ");

    if (map[m_id].flag.guildlock)

    strcat(atcmd_output, "GuildLock | ");

    + if (map[m_id].flag.resident)

    + strcat(atcmd_output, "Resident | ");

    clif_displaymessage(fd, atcmd_output);

     

    switch (list) {

    Index: battle.c

    ===================================================================

    --- battle.c (revision 15066)

    +++ battle.c (working copy)

    @@ -1013,6 +1013,11 @@

    sd = BL_CAST(BL_PC, src);

    tsd = BL_CAST(BL_PC, target);

     

    + if( sd && map[sd->bl.m].flag.resident && sd->state.resident && tsd && tsd->state.resident )

    + {

    + wd.damage = 1;

    + return wd;

    + }

    if(sd)

    wd.blewcount += battle_blewcount_bonus(sd, skill_num);

     

    @@ -3458,6 +3463,10 @@

    struct map_session_data *sd = BL_CAST(BL_PC, s_bl);

    if( s_bl != t_bl )

    {

    + if(map[sd->bl.m].flag.resident &&

    + ((sd->state.resident == 1 ) || (sd->state.resident == 2 && ((TBL_PC*)t_bl)->state.resident == 2))

    + || (!sd->state.resident && ((TBL_PC*)t_bl)->state.resident) || (sd->state.resident && !((TBL_PC*)t_bl)->state.resident))

    + return 0;

    if( sd->state.killer )

    {

    state |= BCT_ENEMY; // Can kill anything

    @@ -3483,6 +3492,8 @@

    if( !((agit_flag || agit2_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )

    return 0; // Disable guardians/emperium owned by Guilds on non-woe times.

     

    + if(((TBL_PC*)t_bl)->state.resident)

    + return 0;

    if( !md->special_state.ai )

    { //Normal mobs.

    if( t_bl->type == BL_MOB && !((TBL_MOB*)t_bl)->special_state.ai )

    Index: clif.c

    ===================================================================

    --- clif.c (revision 15066)

    +++ clif.c (working copy)

    @@ -9150,6 +9150,12 @@

    #ifndef TXT_ONLY

    mail_clear(sd);

    #endif

    + status_calc_pc(sd, true);

    + if(!map[sd->bl.m].flag.resident && sd->state.resident)

    + {

    + sd->state.resident = 0;

    + pc_disguise(sd,0);

    + }

     

    if(map[sd->bl.m].flag.loadevent) // Lance

    npc_script_event(sd, NPCE_LOADMAP);

    Index: map.h

    ===================================================================

    --- map.h (revision 15066)

    +++ map.h (working copy)

    @@ -492,6 +492,8 @@

    unsigned guildlock :1;

    unsigned src4instance : 1; // To flag this map when it's used as a src map for instances

    unsigned reset :1; // [Daegaladh]

    +

    + .flag.resident :1;

    } flag;

    struct point save;

    struct npc_data *npc[MAX_NPC_PER_MAP];

    Index: npc.c

    ===================================================================

    --- npc.c (revision 15066)

    +++ npc.c (working copy)

    @@ -3114,6 +3114,8 @@

    map[m].flag.guildlock=state;

    else if (!strcmpi(w3,"reset"))

    map[m].flag.reset=state;

    + else if(!strcmpi(w3,"resident"))

    + map[m].flag.resident=state;

    else

    ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').n", w3, filepath, strline(buffer,start-buffer));

     

    @@ -3300,6 +3302,7 @@

    {"Die Event",script_config.die_event_name},

    {"Kill PC Event",script_config.kill_pc_event_name},

    {"Kill NPC Event",script_config.kill_mob_event_name},

    + {"Damage Event",script_config.damage_event_name},

    };

     

    for (i = 0; i < NPCE_MAX; i++)

    Index: npc.h

    ===================================================================

    --- npc.h (revision 15066)

    +++ npc.h (working copy)

    @@ -97,6 +97,7 @@

    NPCE_DIE,

    NPCE_KILLPC,

    NPCE_KILLNPC,

    + NPCE_DAMAGE,

    NPCE_MAX

    };

    struct view_data* npc_get_viewdata(int class_);

    Index: pc.c

    ===================================================================

    --- pc.c (revision 15066)

    +++ pc.c (working copy)

    @@ -5661,7 +5661,9 @@

    pc_setstand(sd);

    skill_sit(sd,0);

    }

    -

    + if(map[sd->bl.m].flag.resident && sd->state.resident == 1)

    + {

    + npc_script_event(sd,NPCE_DAMAGE);

    + pc_stop_attack((TBL_PC*)src);

    + }

    +

    if( sd->progressbar.npc_id )

    clif_progressbar_abort(sd);

     

    @@ -7120,6 +7122,9 @@

     

    nullpo_ret(sd);

     

    + if(map[sd->bl.m].flag.resident)

    + return 0;

    +

    if( n < 0 || n >= MAX_INVENTORY ) {

    clif_equipitemack(sd,0,0,0);

    return 0;

    Index: pc.h

    ===================================================================

    --- pc.h (revision 15066)

    +++ pc.h (working copy)

    @@ -137,6 +137,7 @@

    unsigned short autolootid; // [Zephyrus]

    unsigned short autobonus; //flag to indicate if an autobonus is activated. [inkfish]

    struct guild *gmaster_flag;

    + unsigned int resident :2;

    } state;

    struct {

    unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;

    Index: script.c

    ===================================================================

    --- script.c (revision 15066)

    +++ script.c (working copy)

    @@ -232,6 +232,7 @@

    "OnPCLoadMapEvent", //loadmap_event_name

    "OnPCBaseLvUpEvent", //baselvup_event_name

    "OnPCJobLvUpEvent", //joblvup_event_name

    + "OnPCDamage",

    "OnTouch_", //ontouch_name (runs on first visible char to enter area, picks another char if the first char leaves)

    "OnTouch", //ontouch2_name (run whenever a char walks into the OnTouch area)

    };

    @@ -357,7 +358,8 @@

    MF_MONSTER_NOTELEPORT,

    MF_PVP_NOCALCRANK, //50

    MF_BATTLEGROUND,

    - MF_RESET

    + MF_RESET,

    + MF_RESIDENT

    };

     

    const char* script_op2name(int op)

    @@ -14963,7 +14965,25 @@

    return 0;

    }

     

    +BUILDIN_FUNC(resident)

    +{

    + struct map_session_data* sd;

    + int resident;

    + const char * name;

    +

    + name = script_getstr(st,2);

    + sd = map_nick2sd(name);

    +

    + if(sd)

    + {

    + resident = script_getnum(st,3);

    + sd->state.resident = (resident > 2?0:resident);

    + pc_disguise(sd,sd->state.resident == 2?1865:0);

    + }

    + return 0;

    +}

     

    +

    // declarations that were supposed to be exported from npc_chat.c

    #ifdef PCRE_SUPPORT

    BUILDIN_FUNC(defpattern);

    @@ -14976,6 +14996,8 @@

    /// for an explanation on args, see add_buildin_func

    struct script_function buildin_func[] = {

    // NPC interaction

    + BUILDIN_DEF(resident,"si"),

    +

    BUILDIN_DEF(mes,"s"),

    BUILDIN_DEF(next,""),

    BUILDIN_DEF(close,""),

    Index: script.h

    ===================================================================

    --- script.h (revision 15066)

    +++ script.h (working copy)

    @@ -26,6 +26,7 @@

    const char *loadmap_event_name;

    const char *baselvup_event_name;

    const char *joblvup_event_name;

    + const char *damage_event_name;

     

    const char* ontouch_name;

    const char* ontouch2_name;

    Index: status.c

    ===================================================================

    --- status.c (revision 15066)

    +++ status.c (working copy)

    @@ -3905,6 +3905,9 @@

    speed = speed * 100 / sc->data[sC_WALKSPEED]->val1;

    }

     

    + if(sd && map[sd->bl.m].flag.resident)

    + speed = 200;

    +

    return (short)cap_value(speed,10,USHRT_MAX);

    }

     

     

     

     

    Does someone knows where is the error?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.