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

Thread Closed 
 
Thread Rating:
  • 7 Vote(s) - 2.86 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Try to write Script for PK
Author Message
Hebdzik Offline
Tester

Posts: 1,235
Joined: Aug 2011
Reputation: 265
Version: 1.4.3.143
Post: #21
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]
(This post was last modified: 02-18-2013 12:04 PM by Hebdzik.)
02-18-2013 11:56 AM
Find all posts by this user
Mobius Offline
VIP Member
***

Posts: 136
Joined: Jan 2012
Reputation: 40
Version: 1.4.2.135
Post: #22
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 Confused
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 Smile ... 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
Find all posts by this user
TheBl4ckPhoenix Offline
(^.^)
****

Posts: 1,871
Joined: Mar 2012
Reputation: 601
Version: 1.4.3.143
Post: #23
RE: Try to write Script for PK

I was talking about GC... More then 600 isn't good
02-18-2013 15:50 PM
Find all posts by this user
MtnDew Offline
VIP Member
***

Posts: 500
Joined: Mar 2012
Reputation: 110
Version: 1.4.2.141
Post: #24
RE: Try to write Script for PK

Actally in GC more than 600 is good if my pets go after him, some pkers stand in the hallways and send in cougars/reapers after me so i have to target them in the hall.

I will try the plugin again but i don't know how i could copy it wrong. Select all, copy, paste. Easy peasy.

Okay so what I did was copied the plugin correctly but after i pasted it in notepad I changed the Spanish? (Guessing language) and accidentally deleted something I wasn't supposed to. Checking to see if it works now.

+1 or +2 me if I helped you or you think I'm an ass. Tongue
(This post was last modified: 02-18-2013 16:16 PM by MtnDew.)
02-18-2013 16:04 PM
Find all posts by this user
vdm89 Offline
VIP Member
***

Posts: 76
Joined: Oct 2012
Reputation: 2
Version: 1.4.2.138
Post: #25
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 Big Grin
-----
[Image: user.gif]
02-23-2013 04:41 AM
Find all posts by this user
Mobius Offline
VIP Member
***

Posts: 136
Joined: Jan 2012
Reputation: 40
Version: 1.4.2.135
Post: #26
RE: Try to write Script for PK

edit was not necesary, the plugin was working good... i use it every day

+2 if i help you :-)
02-23-2013 07:00 AM
Find all posts by this user
vdm89 Offline
VIP Member
***

Posts: 76
Joined: Oct 2012
Reputation: 2
Version: 1.4.2.138
Post: #27
RE: Try to write Script for PK

(02-23-2013 07:00 AM)Mobius Wrote:  edit was not necesary, the plugin was working good... i use it every day

I do , i have test your plugin and she have one good work , but i think to start this plugin on my wynn and attack pk's char only with summon , just for don't go out of spawn

-----
First +2 ME , then I will help Big Grin
-----
[Image: user.gif]
02-23-2013 14:25 PM
Find all posts by this user
Mobius Offline
VIP Member
***

Posts: 136
Joined: Jan 2012
Reputation: 40
Version: 1.4.2.135
Post: #28
RE: Try to write Script for PK

for that already had

    LUA Programming
if (GetMe():GetClass() == 145) then
		Action(22,false,true);
	end;



you just added a lot of trash code to do the same function

+2 if i help you :-)
(This post was last modified: 02-23-2013 14:39 PM by Mobius.)
02-23-2013 14:37 PM
Find all posts by this user
TheQQmaster Offline
Trolling the Trolls
*****

Posts: 1,532
Joined: Jun 2012
Reputation: 642
Version: 1.4.2.133
Post: #29
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 Smile, 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 Smile

PUSH [Image: knUu53] IF HELPED
03-04-2013 07:36 AM
Visit this user's website Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Where did you guys learn to write scripts? jamesisawesom 2 4,489 07-30-2014 16:21 PM
Last Post: eustach3
  Newspapers - what others write about us ... ClockMan 9 38,835 12-15-2013 17:17 PM
Last Post: bogdanel
Bug Sorry if I do not write in that branch BalanaRRR 2 2,429 03-25-2013 23:29 PM
Last Post: Forsakendeamon
  help me write a script lowbob 5 4,257 07-24-2012 23:07 PM
Last Post: iglaras22



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