Jump to content
  • 0

Clones Using Skills


MeAndYou

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/28/13
  • Last Seen:  

I searched rAthena boards but nothing came up.

 

I was wondering if theres a script to make @clone / @evilclone use skills.

Lets say...

I @evilclone a Champion, I want the clone to use skills of the job randomly.

Like lets say its gonna use asura, finger offensive, occult impact etc etc

If theres a script like this already please do redirect me.

 

If not, if anyone can do these please do make it. Thanks

 

Edit:

PS

My bad about the topic name... I inputted but ##### came up. Sorry.

Edited by MeAndYou
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.02
  • Content Count:  298
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

This is also my problem on run for ur life event the clones ar not using any skills

can anyone help me? because my event run for your life if the event master will summon the clones they will not use random skills...anyone know how to fix this?

can find yet a answer for this...need help sir

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   2
  • Joined:  06/27/17
  • Last Seen:  

Do you mean when you use @evilclone command? As said above, better use the script command.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  63
  • Topics Per Day:  0.02
  • Content Count:  298
  • Reputation:   4
  • Joined:  02/19/17
  • Last Seen:  

On 8/16/2017 at 5:18 PM, Aisha said:

Do you mean when you use @evilclone command? As said above, better use the script command.

What do u mean better uae the script command?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.01
  • Content Count:  35
  • Reputation:   5
  • Joined:  04/10/20
  • Last Seen:  

Hello! It's been exciting to play Ragnarok again!

I think I've found where in the code we have to alter. I do not have any C++ background, but here's the thing about clone so far I understood. My reference is  the old version of 3Ceam's which has a perfectly working battle sage-mode slaveclone. 

1. Slaveclone is a mob treated as a pet (without its info etc), but attacking & giving us exp like homunculus. All wrapped under a BL_MOB category. Therefore, we need to change the ASPD etc. The problem is that with altering this in hardcoded, Rune Knight seems okay, but a simple low level Mage will be strangely a strong melee attacker. Details on attachment.

2.  So, to imitate the routine/procedure that rathena has made on the code, I duplicate mob_clone_spawn ---> mob_clone_spawn2, with necessary addition in its *.hpp . Why? it's because I also added another @clonea atcommand, by "clone-A" means assistant. I found that by changing the flag & master status (true/false), there is my @clonemp (marine sphere PVP) as regular PC char. Plus, @clonepe as PVPevil. Consequently, I add another conf point as a replacement for mob_skill_rate (clone_skill_rate). In simple word: Actually I want a Mage slaveclone for my Swordsman account mwahahaha

3. ai_mob functions are awesome! (but maybe being overkill, since some ineffective routine done by peak Biolab mobs, idk why cmiiw)

4. I thought by playing with mobs' state (MSS_BERSERK, etc) will change the skill for slaveclone. It doesn't.

5. Finally, less/more, files I edited are: mob, battle, unit (cpp & hpp). Also, atcommand_def & atcommand (inc). And for-import battle_conf (txt), groups.conf .

6. Here's the main thing I change (after 2 weeks of skimming the code lol) (mob.cpp) :

.....

           if (!bl) continue;

            md->skill_idx = i;               //assign the filtered skill that's chosen
            map_freeblock_lock();            //lock the new target for your skill
            if (!battle_check_range(&md->bl, bl, skill_get_range2(&md->bl, ms.skill_id, ms.skill_lv, true)) ||
                !unit_skilluse_id2(&md->bl, bl->id, ms.skill_id, ms.skill_lv, ms.casttime, ms.cancel))
            {                                //validity and executable check (but still doesnt execute?)
                map_freeblock_unlock();      //bcs un-executable, release our lock
                continue;                    //and just skip this block
               //at this point i still dont understand why skill still doesnt work. So I forcefully add another default thing to do below
            }

      }
      unit_skilluse_id2(&md->bl, bl->id, ms.skill_id, ms.skill_lv, ms.casttime, ms.cancel); //yes it's here

....

also:

....
       status->aspd_rate = 1000;    //meaning a -10% acceleration from that quick humunculus' aspd
       status->adelay = 1000;       //interval delay
       status->amotion = 1000;      //animation (?)
       status->dmotion = 1000;      // idk

.... maybe with other status->xyz if you want

7. For further development (maybe!) : a) differentiate the stat alteration, so it looks okay or approximates the master. b) Does slaveclone imitate 100% the master's leveling? IDK. c) I still dont know how to change slaveclone's name to be admin_1 omg i dont get how c++ concatenate strings lol, so teach me!

8. Because this is a repeatedly routine, crash might happen. For example, debugger wants us to fix this on status.cpp:
    status = md->base_status;
    memcpy(status, &md->db->status, sizeof(struct status_data));

9. Lastly, the "valve' to be opened as we want the slaveclone to auto skill is (mob.cpp) :

if (!battle_config.mob_skill_rate || md->ud.skilltimer != INVALID_TIMER || !md->db->maxskill || status_has_mode(&md->status,MD_NOCAST_SKILL))
        return 0;

I "opened" to be:

if (!battle_config.mob_skill_rate || md->ud.skilltimer != -1 || !md->db->maxskill)
return 0;

So that (maybe) the MD_NOCAST_SKILL status doesn't exit this particular line

 

Check this out on my github.

https://github.com/amharfm/rathena

 

Edited by eduardoxmenezes
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   616
  • Joined:  07/05/12
  • Last Seen:  

You can use clone script command. By default an evil clone will use all the skills (or only the skills of the player, I don't remember) allowed by the mapflags.

Some sample of script

http://rathena.org/board/topic/85425-can-anyone-help-me/?p=212624

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/28/13
  • Last Seen:  

Thing is by default, the clones are not using skills. So i was having alot of trouble wondering where would i edit a .txt so that the clones will actually use skills



Bump to this >_< Help please

Link to comment
Share on other sites

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.

×
×
  • Create New...