Jump to content
  • 0

Question

4 answers to this question

Recommended Posts

  • 0
Posted

1.  what about the source part?

Does he clone the whole part of @clone into skill.c??  for that new custom skill??

Spoiler contain parts from atcommand.cpp ACMD_FUNC(clone) don't need to open!

Spoiler


// @clone/@slaveclone/@evilclone <playername> [Valaris]
ACMD_FUNC(clone)
{
    int x=0,y=0,flag=0,master=0,i=0;
    struct map_session_data *pl_sd=NULL;

    memset(atcmd_player_name, '\0', sizeof(atcmd_player_name));

    if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) {
        clif_displaymessage(sd->fd,msg_txt(sd,1323)); // You must enter a player name or ID.
        return 0;
    }

    if((pl_sd=map_nick2sd(atcmd_player_name,true)) == NULL && (pl_sd=map_charid2sd(atoi(atcmd_player_name))) == NULL) {
        clif_displaymessage(fd, msg_txt(sd,3));    // Character not found.
        return 0;
    }

    if(pc_get_group_level(pl_sd) > pc_get_group_level(sd)) {
        clif_displaymessage(fd, msg_txt(sd,126));    // Cannot clone a player of higher GM level than yourself.
        return 0;
    }

    parent_cmd = atcommand_checkalias(command+1);

    if (strcmpi(parent_cmd, "clone") == 0)
        flag = 1;
    else if (strcmpi(parent_cmd, "slaveclone") == 0) {
        flag = 2;
        if(pc_isdead(sd)){
            clif_displaymessage(fd, msg_txt(sd,129+flag*2));
            return 0;
        }
        master = sd->bl.id;
        if (battle_config.atc_slave_clone_limit
            && mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {
            clif_displaymessage(fd, msg_txt(sd,127));    // You've reached your slave clones limit.
            return 0;
        }
    }

    do {
        x = sd->bl.x + (rnd() % 10 - 5);
        y = sd->bl.y + (rnd() % 10 - 5);
    } while (map_getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10);

    if (i >= 10) {
        x = sd->bl.x;
        y = sd->bl.y;
    }

    if((x = mob_clone_spawn(pl_sd, sd->bl.m, x, y, "", master, MD_NONE, flag?1:0, 0)) > 0) {
        clif_displaymessage(fd, msg_txt(sd,128+flag*2));    // Evil Clone spawned. Clone spawned. Slave clone spawned.
        return 0;
    }
    clif_displaymessage(fd, msg_txt(sd,129+flag*2));    // Unable to spawn evil clone. Unable to spawn clone. Unable to spawn slave clone.
    return 0;
}

 

OFFtopic::

I have a question though,

why rathena or the eathena so long time and yet have not the file "Skill_avail.txt",

just like the item_avail.txt or mob_avail.txt??

so we can definitely clone skill and test 

eg.

Asura (original)

Asura (nerfed)

Asura (Buffed)

then test which one is the more like'd and then decide what to change in source.

 

  • 0
Posted

the answer to this topic is OnPCUseSkillEvent
yes, many are broken, even mine in hercules plugin release also broken LOL

 

skill_avail ... that's an interesting suggestion
but due to the complexity of the skill database, I wonder how many field needed clone a skill ID
item_avail only needs 2, mob_avail can have up to 12, skill_avail .... hmmm ... lazy to count ?

  • 0
Posted

 

 

for example

how do I put that pull a clone instead of a mob

case KO_ZANZOU:
        if(sd){
            struct mob_data *md2;

            md2 = mob_once_spawn_sub(src, src->m, src->x, src->y, status_get_name(src), MOBID_ZANZOU, "", SZ_SMALL, AI_NONE);
            if( md2 )
            {
                md2->master_id = src->id;
                md2->special_state.ai = AI_ZANZOU;
                if( md2->deletetimer != INVALID_TIMER )
                    delete_timer(md2->deletetimer, mob_timer_delete);
                md2->deletetimer = add_timer (gettick() + skill_get_time(skill_id, skill_lv), mob_timer_delete, md2->bl.id, 0);
                mob_spawn( md2 );
                map_foreachinallrange(unit_changetarget, src, AREA_SIZE, BL_MOB, src, &md2->bl);
                clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
                skill_blown(src,bl,skill_get_blewcount(skill_id,skill_lv),unit_getdir(bl),BLOWN_NONE);
            }
        }
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...