Jump to content
  • 0

SA_AUTOSPELL custom help


Agriias

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  17
  • Reputation:   0
  • Joined:  07/21/20
  • Last Seen:  

I want to work on the SA_AUTOSPELL skill.

I wanted to configure it to automatically launch only the skills: MG_COLDBOLT, MG_FIREBOLT, MG_LIGHTNINGBOLT
  and remove the skills: MG_FROSTDIVER, MG_FIREBALL, MG_SOULSTRIKE, MG_NAPALMBEAT

and for her at the maximum level to launch MG_COLDBOLT, MG_FIREBOLT, MG_LIGHTNINGBOLT at equivalent levels.
EX: SA_AUTOSPELL LV 1 = MG_COLDBOLT, MG_FIREBOLT, MG_LIGHTNINGBOLT LV 1
SA_AUTOSPELL LV 5 =
MG_COLDBOLT, MG_FIREBOLT, MG_LIGHTNINGBOLT LV 3

considering that the class will only learn these 3 skills.

I'm starting now in these settings I imagine that I should modify the skills in the src: skill.cpp
but I don't quite understand the language to make it happen.

I tried it but it doesn't seem to work well:

Quote

case SA_AUTOSPELL:
        clif_skill_nodamage(src,bl,skill_id,skill_lv,1);
        if (sd) {
            sd->state.workinprogress = WIP_DISABLE_ALL;
            clif_autospell(sd,skill_lv);
        } else {
            int maxlv=1,spellid=0;
            static const int spellarray[10] = { MG_COLDBOLT,MG_FIREBOLT,MG_LIGHTNINGBOLT };

            if(skill_lv >= 10) {
                spellid = MG_FROSTDIVER;
//                if (tsc && tsc->data[SC_SPIRIT] && tsc->data[SC_SPIRIT]->val2 == SA_SAGE)
//                    maxlv = 10;
//                else
                    maxlv = skill_lv - 9;
            }

            if(spellid > 0)
                sc_start4(src,src,SC_AUTOSPELL,100,skill_lv,spellid,maxlv,0,
                    skill_get_time(SA_AUTOSPELL,skill_lv));
        }
        break;

 

Edited by Agriias
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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