Lineage 2 Tower Forum

Full Version: Try to write Script for PK
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I try to write one script for Target and hit only PK's Char , finaly i have this script
    LUA Programming
ReputationPoint=0;
RangeLimit=800;
repeat 
Sleep(10000); 
 
me=GetMe();
 
local playerlist = GetPlayerList();
for player in playerlist.list do
	if (player:GetReputation()<ReputationPoint)and(GetMe():GetRangeTo(me)<RangeLimit) then
 Target(player);
 Command("/useshortcut 2 3");
 Command("/attack");
 Sleep(10000);
 end;
 if (player:IsAlikeDeath())then
 Command("/useshortcut 2 2");
 end;end;
 until false;


In line 12 equip one BOW for hit PK , and in line 17 equip one sword ( when pk is death ) for continue to farm .
Only One problem , in GC don't work this script because my char ( she is in second floor) target char in first and 3 floor..
Any good solution ?
1) you wrote 2 time "end;" at the end of the script before "until falese;"
2) take down RangeLimit from 800 to mmh 500/400 ??
if leave one "end;" have this error
[Image: 21HQl]
and i try with RangeLimit=100; but my char target other char in first and 3 floor

I tried setting the ReputationPoint to 500 to check which Char i have in target ..
Maybe i can try with static Coordinate like (X,Y,Z) and set Rangelimit to this Static Coordinate, what do you think?
Mmh yes, maybe that will fix the problem
I don't have idea what command to use to set the static coordinate and verify (into if's comand) coordinated static < rangelimit

try with
    LUA Programming
StaticPoint(190704,59447,-4979);


and
    LUA Programming
StaticPoint<RangeLimit


but have this error [Image: 21ICN]


try with
    LUA Programming
GetDistanceVector(GetMe():GetLocation()<RangeLimit


but have this error[Image: 21IGq]

and try with
    LUA Programming
Point=GetMe():GetLocation();

and
    LUA Programming
Point<RangeLimit

but have this error[Image: 21IJt]

Problem done , finaly this is the script
    LUA Programming
ReputationPoint=0;
RangeLimit=500;
repeat 
Sleep(10000); 
Point=GetMe():GetLocation();
me=GetMe();
 
local playerlist = GetPlayerList();
for player in playerlist.list do
	if (player:GetReputation()<ReputationPoint)and(GetDistanceVector(GetMe():GetLocation(),Point)<RangeLimit) then
 Target(player);
 Command("/useshortcut 2 3");
 Command("/attack");
 Sleep(10000);
 end;
 if (player:IsAlikeDeath())then
 Command("/useshortcut 2 2");
 end;end;
 until false;

Smile



One question, how you will kill the Pk guy? I mean, bow's bot vs a manually played Pk?
can be this like a plugin ?

but usig what wepon you have...if a pk in range you just atack him with what you are in hand...
You can do everything, with right knowledge...
Quote:One question, how you will kill the Pk guy? I mean, bow's bot vs a manually played Pk?
The script was done thinking about a pk with a lot of karma and therefore has the debuff which decreases p. def. , However you can change the target to take pk and attach it with the skill , septate with nuke attack.

Quote:can be this like a plugin ?
I don't know how to use this script like plugin , i'm sorry
can you modify the script in order we attack the PK char, but without changing any weapons ? just attack the PK char with the weapon we already have equipped..
Pages: 1 2 3
Reference URL's