![]() |
|
|
#1 |
|
Архивный участник
Join Date: Mar 2007
Posts: 118
|
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
Code:
<html><body> PK killer:<br> Please go Away!! I have work now....<br> </body></html> Client Side: npcname-e.dat Code:
18000 Maximus Elite Guard 3F 8B FE -1 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 Вложения из исходного сообщения (сами файлы в копии отсутствуют): ai.txt — 4896 байт |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Aug 2005
Posts: 1,531
|
It already realized in [moveguard_human] in C4 Retail pack.
Your guard do something new? Give some more information
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Aug 2005
Posts: 1,531
|
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;
}
}
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Jan 2007
Posts: 61
|
nice. :P
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Dec 2005
Posts: 156
|
lolcopypaste
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Mar 2007
Posts: 118
|
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...
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Jun 2007
Posts: 21
|
HF i think it is to kill the players that pk on respaw, i use a peace respaw.
|
|
|
|
|
#8 | |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Quote:
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 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);
}
}
NOTE: You dont need to create a new guard, you can simple spawn "bowman" NPC where you want. |
|
|
|
|
|
#9 |
|
Архивный участник
Join Date: Apr 2006
Posts: 181
|
this man needs something like antileech code so he just shared something in order to get it
funny man! |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|