L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help: Routine to use many skills in script
Author Message
rhadamants Offline
Expired VIP Member
**

Posts: 27
Joined: Jun 2012
Reputation: 6
Version: 1.4.2.136
Post: #1
Help: Routine to use many skills in script

I'm having trouble creating a function in a script to use attack skills in class as feoh, Eviscerator and iss. The script works for a while and then displays error "Overload findById".

Does anyone know of a way to use multiple skill in a script and I can share?

It may be just the tool to use multiple skill.
05-24-2015 02:38 AM
Find all posts by this user Quote this message in a reply
plixplox Offline
Expired VIP Member
**

Posts: 304
Joined: Nov 2013
Reputation: 23
Version: 1.4.2.138
Post: #2
RE: Help: Routine to use many skills in script

assign them as functions..
    LUA Programming
1blahskillid = 1;
2blahskillid = 2;
3blahskillid = 3;
 
function blahSKills()
 if blah.blah then
 UseSkillAttack(1blahskillID);
 Sleep(250);
 
 UseSkillAttack(2blahskillID);
 Sleep(250);
 
 UseSkillAttack(3blahskillID);
 Sleep(250);
	end;
etc...
end;
repeat
if blah then
blahskills()
end;
until false;
end;

(This post was last modified: 05-24-2015 04:04 AM by plixplox.)
05-24-2015 04:01 AM
Find all posts by this user Quote this message in a reply
rhadamants Offline
Expired VIP Member
**

Posts: 27
Joined: Jun 2012
Reputation: 6
Version: 1.4.2.136
Post: #3
RE: Help: Routine to use many skills in script

Code:
CharSkills = {
    [187] = { -- Eviscerator
        auraSkill = {
            30602, -- Eviscerator Aura
            1986, --DualMaxHpID
        },
        selfBuffSkills = {
            30512, --Distortion = 30512.
            30520, --SteelMind = 30520.
            1914, --Savage = 1914.
            30511, --AirLight = 30511.

        },
        DefensiveSkills = {
            30516, --GravityBarrier = 30516.
            30519, --WarperSpaceID = 30519.
            30515, --SpallationID = 30515.
            30509, --BackStep = 30503.
            30514,    --FluidWeave = 30503.
            1912, --Disparition = 30503.
            30502, --ChinStrike = 30502.
            30506, --DistantKick = 30506.
        },
        singleAttackSkills = {
            30508, --RightSideStep = 30508.
            30500, --LateralHit = 30500.
            30504, --GravityHit = 30504.
            30501, --BackSpinBlow= 30501.
            30507, --LeftSideStep = 30507.
            30503,  --SpinningKick = 30503.
        },
        massAttackSkills = {
            30518, --ReverseWeight =30518.
        },
    };    
}

Call skills from the table is possible?
How without client crash?
05-26-2015 00:03 AM
Find all posts by this user Quote this message in a reply
plixplox Offline
Expired VIP Member
**

Posts: 304
Joined: Nov 2013
Reputation: 23
Version: 1.4.2.138
Post: #4
RE: Help: Routine to use many skills in script

are you wanting and AIO (all in one) sript?
If not, don't use tables, just assign the skills to the Id's like you find in most scripts..
Tables come with a lot more to make them work, see ISS OOP Scripts for help if you persue that.
Otherwise use,
if playerclass == player:GetClass() == 162 or player:GetClass() == 163 or player:GetClass() == 164 or player:GetClass() == 165 then -- Archers
and for all classes either per-script, or in AIO..
Easiest way is to combine all Attacks into functions.
ie,
function Archer()
if playerclass == player:GetClass() == 162 etc...
if blah me/target then
attacks
end
function mage()
if playerclass == player:GetClass() == XXX etc..
if blah me/target then
attacks
end

wrap up all into Main function,
function Main()
Archers()
Mage()
etc.
end

then process function normally,

repeat
Main()
until false;
end..

hope that helps
05-26-2015 19:08 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Summoner Servitor Skills... MonkeyNuts 3 3,309 11-12-2014 18:07 PM
Last Post: MonkeyNuts



User(s) browsing this thread: 1 Guest(s)