Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 27.06.2007, 16:05   #1
Fot@r@s
Архивный участник
 
Join Date: Mar 2007
Posts: 118
Default [Share] NPC "PK Killer"

Hello Guyz,
I have made this npc to protect the players from spawnkilling.

Server Side:
npcdata.txt
Code:
npc_begin	guard	18000	[pk_killer]	level=80	acquire_exp_rate=0	acquire_sp=0	unsowing=1	clan={}	ignore_clan_list={}	clan_help_range=300	slot_chest=[]	slot_rhand=[draconic_bow]	slot_lhand=[]	shield_defense_rate=0	shield_defense=0	skill_list={@s_race_undead;@s_full_magic_defence}	npc_ai={[pk_killer];{[fnHi]=[pk_killer.htm]};{[MoveAroundSocial]=0};{[MoveAroundSocial1]=92};{[MoveAroundSocial2]=92}}	category={}	race=human	sex=male	undying=1	can_be_attacked=0	corpse_time=7	no_sleep_mode=0	agro_range=18000	ground_high={160;0;0}	ground_low={50;0;0}	exp=1	org_hp=5000000000	org_hp_regen=10	org_mp=5000000000.0	org_mp_regen=10	collision_radius={8;8}	collision_height={24;24}	str=99	int=99	dex=99	wit=99	con=99	men=99	base_attack_type=bow	base_attack_range=60	base_damage_range={0;0;80;120}	base_rand_dam=30	base_physical_attack=9xx.xx854	base_critical=50	physical_hit_modify=4.75	base_attack_speed=5000	base_reuse_delay=0	base_magic_attack=611	base_defend=99xx.xx	base_magic_defend=9999.8	physical_avoid_modify=-6	soulshot_count=0	spiritshot_count=0	hit_time_factor=0.6	item_make_list={}	corpse_make_list={}	additional_make_list={}	additional_make_multi_list={}	hp_increase=0	mp_increase=0	safe_height=100	npc_end
htm:
Code:
<html><body> 
PK killer:<br>
Please go Away!! I have work now....<br>
</body></html>
Ai: attached below
Client Side:

npcname-e.dat
Code:
18000	Maximus	Elite Guard	3F	8B	FE	-1
npcgrp.dat
Code:
18000	LineageNPC.e_guard_MOrc	LineageNPCs.e_guard_MOrc_m00	4	LineageNPCsTex.e_guard_MOrc_m00_t00_b00	LineageNPCsTex.e_guard_MOrc_m00_t00_b01	LineageNPCsTex.e_guard_MOrc_m00_t00_f	LineageNPCsTex.e_guard_MOrc_m00_t00_h		0			1	0								2.00000000	0	3	ItemSound.fist_1	ItemSound.fist_2	ItemSound.fist_3	5	ItemSound.armor_metal_strong_1	ItemSound.armor_metal_strong_3	ItemSound.armor_metal_strong_7	ItemSound.armor_metal_alt_6	ItemSound.armor_metal_weak_2	3	ChrSound.MNpc_Giant_Dmg_1	ChrSound.MNpc_Giant_Dmg_2	ChrSound.MNpc_Giant_Dmg_3	0	0																											0	0	LineageEffect.p_u002_a	0	xx.xx000000	2xx.xx000000	xx.xx000000	0	0
Maybe needs some corrections.

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
ai.txt — 4896 байт
Fot@r@s is offline  
Old 27.06.2007, 16:14   #2
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

It already realized in [moveguard_human] in C4 Retail pack.
Your guard do something new? Give some more information
HF is offline  
Old 27.06.2007, 16:16   #3
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

i dont understund. What PK must be killed here? And where spawned this PK_Killer
Code:
/***************************************************************************
*                                Change Log
*                            ------------------
*   xx.xx.2007
*   Script Decompiled by SauDecompiler build 102306.2 (fix build 060707)
*
***************************************************************************/

class pk_killer : guard_stand
{
handler:
	EventHandler TALK_SELECTED(i0,talker)
	{
		if( _from_choice == 0 )
		{
			if( myself->HaveMemo(talker,104) )
			{
				_choiceN = ( _choiceN + 1 );
				_code = 0;
				myself->AddChoice(0,"Spirit of Mirrors (In Progress)");
			}
			if( _choiceN > 1 )
			{
				myself->ShowChoicePage(talker,1);
				return;
			}
		}
		if( _from_choice || _choiceN == 1 )
		{
			if( _code == 0 )
			{
				if( _from_choice == 0 || myself->HaveMemo(talker,104) )
				{
					myself->SetCurrentQuestID(104);
					if( myself->GetInventoryInfo(talker,0) >= ( myself->GetInventoryInfo(talker,1) * 0.800000 ) || myself->GetInventoryInfo(talker,2) >= ( myself->GetInventoryInfo(talker,3) * 0.800000 ) )
					{
						myself->ShowSystemMessage(talker,1118);
						return;
					}
					myself->ShowPage(talker,"johnson_q0104_01.htm");
					i0 = myself->GetMemoStateEx(talker,104,1);
					myself->SetMemoStateEx(talker,104,1,( i0 + 1 ));
					if( myself->GetMemoStateEx(talker,104,1) == 110 )
					{
						myself->SetFlagJournal(talker,104,2);
					}
				}
			}
			return;
		}
		super;
	}

}
TALK_SELECTED ? PK must be use "Quest" for self killing?
HF is offline  
Old 27.06.2007, 16:51   #4
Morfey
Архивный участник
 
Join Date: Jan 2007
Posts: 61
Default

nice. :P
Morfey is offline  
Old 27.06.2007, 17:45   #5
madar
Архивный участник
 
Join Date: Dec 2005
Posts: 156
Default

lolcopypaste
madar is offline  
Old 27.06.2007, 17:56   #6
Fot@r@s
Архивный участник
 
Join Date: Mar 2007
Posts: 118
Default

I don't know how to edit the AI and for that reason i copy&paste a regular AI guard . I don't think that is something fantastick or difucult to make. I just share it for tha lazys...
Fot@r@s is offline  
Old 27.06.2007, 18:27   #7
seway
Архивный участник
 
Join Date: Jun 2007
Posts: 21
Default

HF i think it is to kill the players that pk on respaw, i use a peace respaw.

seway is offline  
Old 27.06.2007, 18:42   #8
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by Fot@r@s View Post
I don't know how to edit the AI and for that reason i copy&paste a regular AI guard . I don't think that is something fantastick or difucult to make. I just share it for tha lazys...
I cant stop laughing hahahahaha

He made a awesome NPC!! he copy & paste TALK_SELECTED handler from other NPC... that has nothing to do with PK... or whatever... this man have absolute no idea what he is doing...

First... that guard works because you are using a super class guard_stand, but in your code there is nothing at all.. so.. when you say.. "Maybe needs some corrections" ... there is nothing to change since isnt code...

This AI will have the same effect...
Code:
class 1 pk_killer : guard_stand
class_end
And second... are you going to spawn that npc in every single GK spawn ?... because there are more than 200. I have exactly 227, but i know some of them are too close... so.. like 200... but them... your guard is going to kill each single player appaers with karma in that place..

And the last thing... the handler in charge of attack PKs will be SEE_CREATURE.

Something like...
Code:
EventHandler SEE_CREATURE(creature)
{
	if (creature.karma > 0) 
	{
		AddAttackDesire(creature,1,1500);
	}
}
But you will have a new problem... players that convert into PK in front of the guard will not be attacked, but in exchange, your guard will kill for example.. people comming from Clan Hall that want to low their karma...


NOTE: You dont need to create a new guard, you can simple spawn "bowman" NPC where you want.
FidoW is offline  
Old 28.06.2007, 05:06   #9
smeli
Архивный участник
 
Join Date: Apr 2006
Posts: 181
Default

this man needs something like antileech code so he just shared something in order to get it

funny man!
smeli is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:06.