Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 19.09.2005, 22:31   #1
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default Gatekeepers with weapons?

ppl sometimes hit npcs for fun, but it's kinda annoying. I have put a code for the gatekeeper to hit back when someone hits her, but she hits with bare hands. Can I add a weapon or even a skill she can use to attack those who hit her? I'm thinking of putting a soul bow and a powershot skill huhu~~~
top-gear is offline  
Old 19.09.2005, 22:40   #2
bwgreen
Архивный участник
 
Join Date: Sep 2005
Posts: 408
Default

been there, done that. more ppl complain than anything.

anyway...

present for your ai file.. just fiddle with the teleporters stats in the npdata and they should all attack back. if you set her attack damage settings too high, it can be used as an exploit to get infinite HP until the char relogs. someone may wanna read through this and see if the bug can be fixed.

Code:
class teleporter : default_npc
parameter_define_begin
	string ShopName ""
	string fnHi "thi.htm"
	string fnYouAreChaotic "tcm.htm"
parameter_define_end
property_define_begin
	telposlist_begin Position
		{"Talking Island"; -84169; 244693; -3729; 100000; 0 }
	telposlist_end
property_define_end

handler 1      // ATTACKED
     variable_begin
           "attacker"
           "damage"
           "myself"
           "_choiceN"
           "_code"
           "_from_choice"
     variable_end

     shift_sp 1
     push_event      // attacker
     push_const 36
     add
     fetch_i
     push_const 0
     push_const 2000
     func_call 2      // func[AddAttackDesire]
     shift_sp -3
     shift_sp -1
handler_end

handler 3	//  TALKED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  talker
	push_const 32
	add
	fetch_i	//  karma
	push_const 412
	add
	fetch_i
	push_const 0
	greater
	branch_false L768
L767
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_parameter fnYouAreChaotic
	func_call 43	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
	jump L769
L768
	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_parameter fnHi
	func_call 43	//  func[ShowPage]
	shift_sp -2
	shift_sp -1
L769
handler_end

handler 28	//  TELEPORT_REQUESTED
	variable_begin
		"talker"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	shift_sp 1
	push_event	//  talker
	push_const 32
	add
	fetch_i
	push_property Position
	push_parameter ShopName
S73.	""
	push_string S73
S74.	""
	push_string S74
S75.	""
	push_string S75
	func_call 45	//  func[Teleport]
	shift_sp -6
	shift_sp -1
handler_end

class_end
bwgreen is offline  
Old 20.09.2005, 00:55   #3
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

nice! I'll work on this tomorrow and I'll post an answer.thank you
top-gear 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 18:13.