| Hebdzik   Tester
 
 Posts: 1,235
 Joined: Aug 2011
 Reputation: 265
 Version: 
1.4.3.143
 
 | 
			| RE: Try to write Script for PK 
 
				on witch line it make error?
 try it now
 Warning hammer!!! Use Search before you post something
 If i hellp you, you can thx me by +1 Reputation
 
 ![[Image: U63SU]](http://goo.gl/U63SU)  
				
(This post was last modified: 02-18-2013 12:04 PM by Hebdzik.)
 |  | 
	| 02-18-2013 11:56 AM |  | 
	
		| Mobius   VIP Member
 
    
   Posts: 136
 Joined: Jan 2012
 Reputation: 40
 Version: 
1.4.2.135
 
 | 
			| RE: Try to write Script for PK 
 
				 (02-18-2013 11:00 AM)nadmaster101 Wrote:  okay well the plugin doesn't work at all, my client crash imediatly when i type /killpk 
maybe you copied it wrong   
works like a charm for me
  (02-18-2013 10:35 AM)TheBl4ckPhoenix Wrote:  Nice1, but i disagree about Range Distance... It should be less then 1000 i think.. 
i think 1600 its ok cus yuls have 1100 range with skills and can have 1200 with sniper stance    ... then 1000 range sucks xD, and my plugin just kill pk when they target me or target someone of my pt, don't kill anyone going passing
			 +2 if i help you :-)
 
				
(This post was last modified: 02-18-2013 12:22 PM by Mobius.)
 |  | 
	| 02-18-2013 12:20 PM |  | 
	
		| vdm89   VIP Member
 
    
   Posts: 76
 Joined: Oct 2012
 Reputation: 2
 Version: 
1.4.2.138
 
 | 
			| RE: Try to write Script for PK 
 
				    LUA Programming
	KillPKStatus = false;
 
function OnCreate()
	this:RegisterCommand("killpk", 
 
CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
function OnCommand_killpk(vCommandChatType, vNick, 
 
vCommandParam)
	if (KillPKStatus == false) then
 KillPKStatus = true;
 ShowToClient("Kill PK","Matar Cualquier PK Cerca Activado.");
	else
 KillPKStatus = false;
 ShowToClient("Kill PK","Matar Cualquier PK Cerca Desactivado.");	
	end;
end;
--------------------
function WhatClassAmI()
	if(GetMe() ~= nil)then
 if(GetMe():GetClass() == 145) then
 return 22;
 end;
	end;
	return 2;
end;
--------------------
function OnLTick1s()
if (KillPKStatus == true) then
	local playerlist = GetPlayerList();
	local playerid = nil;
	for player in playerlist.list do
 if (player:IsMyPartyMember() == false) and (player:IsEnemy()) and (player:GetReputation() < 0) and (player:GetDistance() < 1600) and (player:IsFriend() == false) then
 playertarget = GetUserById(player:GetTarget());
 if (playertarget ~= nil) then
 if (playertarget:IsMyPartyMember()) or (playertarget:IsMe()) then
 playerid = player:GetId();
 end; 
 end;
	end;
end;
 
if (playerid ~= nil) then
 ClearTargets();
 TargetRaw(playerid);
 Action(2,false,true);
 if (GetMe():GetClass() == 145) then
 Action(WhatClassAmI(), false, true);
	end;
	end;
end;
end; 
this plugin work ?
			 -----
 First +2 ME , then I will help
  -----
 
 ![[Image: user.gif]](http://l2tower.eu/user.gif)  |  | 
	| 02-23-2013 04:41 AM |  | 
	
		| TheQQmaster   Trolling the Trolls
 
      
   Posts: 1,532
 Joined: Jun 2012
 Reputation: 642
 Version: 
1.4.2.133
 
 | 
			| RE: Try to write Script for PK 
 
				 (02-18-2013 10:15 AM)Mobius Wrote:      LUA Programming
	KillPKStatus = false;
 
function OnCreate()
	this:RegisterCommand("killpk", 
 
CommandChatType.CHAT_ALLY, CommandAccessLevel.ACCESS_ME);
end;
 
function OnCommand_killpk(vCommandChatType, vNick, 
 
vCommandParam)
	if (KillPKStatus == false) then
 KillPKStatus = true;
 ShowToClient("Kill PK","Matar Cualquier PK Cerca Activado.");
	else
 KillPKStatus = false;
 ShowToClient("Kill PK","Matar Cualquier PK Cerca Desactivado.");	
	end;
end;
 
function OnLTick1s()
if (KillPKStatus == true) then
	local playerlist = GetPlayerList();
	local playerid = nil;
	for player in playerlist.list do
 if (player:IsMyPartyMember() == false) and (player:IsEnemy()) and (player:GetReputation() < 0) and (player:GetDistance() < 1600) and (player:IsFriend() == false) then
 playertarget = GetUserById(player:GetTarget());
 if (playertarget ~= nil) then
 if (playertarget:IsMyPartyMember()) or (playertarget:IsMe()) then
 playerid = player:GetId();
 end; 
 end;
	end;
end;
 
if (playerid ~= nil) then
 ClearTargets();
 TargetRaw(playerid);
 Action(2,false,true);
 if (GetMe():GetClass() == 145) then
 Action(22,false,true);
	end;
	end;
end;
end; 
ok this script killing pk wery vel, + fot that creater   , but need add some fuction, too check after pk char is dead, he hit the ground, and stay there my bots all time target him and dont target any of mobs, need to make fuction or somthing that to check it death
 
function blabla
 
if my target pk is dead then  
clertargets  
end;
 
plizzz plizzz help, other will be usefull too    PUSH
 ![[Image: knUu53]](http://goo.gl/knUu53) IF HELPED |  | 
	| 03-04-2013 07:36 AM |  |