L2Tower Discord
Let's keep the community alive with discord.
Discussions about plugins and scripts
L2Tower Discord
Thread Rating:
- 65 Vote(s) - 2.95 Average
- 1
- 2
- 3
- 4
- 5
Help with Scripting
|
Author |
Message |
D0nnieDarko
Elpy

Posts: 4
Joined: Apr 2011
Version:
None
|
Help with Scripting
Hi,
i am trying to make a Script which uses skills on mobs while being on melee attack.
Probably i am just too stupid to find that option but if it really doesnt exist how does a script has to look like to use skills?
I have gotten this far but it aint working. Actually i adopted pretty much the style of the sample script with CH-BSOE
Code:
repeat
Sleep(10);
until GetMe():GetHpPrecent()<1.0;
if (GetMe():IsAttacking() == true) then
UseSkill(400);
end;
I hope u can help me!
Greetings
D0nnieDarko
|
|
04-14-2011 10:03 AM |
|
D0nnieDarko
Elpy

Posts: 4
Joined: Apr 2011
Version:
None
|
RE: Help with Scripting
(04-14-2011 11:16 AM)Geddys Wrote: (04-14-2011 10:03 AM)D0nnieDarko Wrote: Hi,
i am trying to make a Script which uses skills on mobs while being on melee attack.
Probably i am just too stupid to find that option but if it really doesnt exist how does a script has to look like to use skills?
I have gotten this far but it aint working. Actually i adopted pretty much the style of the sample script with CH-BSOE
Code:
repeat
Sleep(10);
until GetMe():GetHpPrecent()<1.0;
if (GetMe():IsAttacking() == true) then
UseSkill(400);
end;
I hope u can help me!
Greetings
D0nnieDarko
You script has logic error.
main loop sleeps until you are under 1% of hp, and then u use skill.
Omg, as i read it i saw it xD ... anyways i tried diffrent ways of that i also made a infinite loop instead of the repeat-until construct and it didnt work aswell
Code:
while true do
if (GetMe():IsAttacking() == true) then
UseSkill(400);
end;
This other try was looking like that (I typed that right now, so it may contain syntax bugs)
So probably what Clock said is correct, i am going to try out the nuke setting things.
@Clock
How is the syntax to check target-type and target-hp status? I wanted to do that but didnt find the correct syntax. Would be nice for skills which can be activated at certain levels of hp (target or self).
Thanks for ur fast replies  ... its awesome to have such a fast "support".
Greetings
(This post was last modified: 04-14-2011 12:43 PM by D0nnieDarko.)
|
|
04-14-2011 12:40 PM |
|
Sakaszli
I'm too pro to be pro.
      
Posts: 1,189
Joined: Jan 2011
Reputation: 484
Version:
1.4.2.134.5b
|
|
04-14-2011 13:30 PM |
|
D0nnieDarko
Elpy

Posts: 4
Joined: Apr 2011
Version:
None
|
|
04-14-2011 13:33 PM |
|
D0nnieDarko
Elpy

Posts: 4
Joined: Apr 2011
Version:
None
|
RE: Help with Scripting
(04-14-2011 13:38 PM)sakaszli Wrote: bool IsPlayer();
bool IsMyPartyMember();
bool IsFriend();
bool IsMe();
bool IsNpc();
In user, mob i NPC too. Bool= true/false.
ah ... k npc = mob aswell xD that is what i missed here ... ty
|
|
04-14-2011 14:24 PM |
|
User(s) browsing this thread: 1 Guest(s)