Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 28.11.2005, 14:37   #1
nucer
Архивный участник
 
Join Date: May 2005
Posts: 117
Default [SHARE]Anti train ai

Code:
class stock_teleport : warrior
handler 1	//  ATTACKED
	variable_begin
		"attacker"
		"damage"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  attacker
	push_const 36
	add
	fetch_i	//  is_pc
	push_const 108
	add
	fetch_i
	push_const 0
	not_equal
	push_reg_sp
	fetch_i
	branch_true L69
	shift_sp 1
	push_const 9
	push_event	//  attacker
	push_const 36
	add
	fetch_i	//  npc_class_id
	push_const 1620
	add
	fetch_i
	func_call 143	//  func[IsInCategory]
	shift_sp -2
	or
L69
	branch_false L71
L70
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	push_const 1
	push_event	//  damage
	push_const 84
	add
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  max_hp
	push_const 1000
	add
	fetch_d
	div
	push_const 0.050000
	div
	push_const 100
	mul
	func_call 2	//  func[AddAttackDesire]
	shift_sp -3
	shift_sp -1
L71
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai1
	push_const 2340
	add
	fetch_i
	push_const 11
	not_equal
	push_reg_sp
	fetch_i
	branch_false L72
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  top_desire_target
	push_const 2412
	add
	fetch_i
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	equal
	and
	push_reg_sp
	fetch_i
	branch_false L72
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 150
	greater
	and
L72
	branch_false L74
L73
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai1
	push_const 2340
	add
	push_reg_sp
	fetch_i
	push_const 11
	assign
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	push_reg_sp
	fetch_i
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	assign
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai0
	push_const 2336
	add
	push_reg_sp
	fetch_i
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	assign
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai3
	push_const 2348
	add
	push_reg_sp
	fetch_i
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i	//  x
	push_const 8
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	assign
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai4
	push_const 2352
	add
	push_reg_sp
	fetch_i
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i	//  y
	push_const 16
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	assign
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest0
	push_const 2316
	add
	push_reg_sp
	fetch_i
	push_event	//  damage
	push_const 84
	add
	fetch_i
	assign
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest3
	push_const 2328
	add
	push_reg_sp
	fetch_i
	shift_sp 1
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	assign
	shift_sp -1
	shift_sp 1
	push_const 5001
	push_const 15000
	func_call 28	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L74
handler_end

handler 23	//  CLAN_ATTACKED
	variable_begin
		"attacker"
		"damage"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  attacker
	push_const 36
	add
	fetch_i	//  is_pc
	push_const 108
	add
	fetch_i
	push_const 0
	not_equal
	push_reg_sp
	fetch_i
	branch_true L75
	shift_sp 1
	push_const 9
	push_event	//  attacker
	push_const 36
	add
	fetch_i	//  npc_class_id
	push_const 1620
	add
	fetch_i
	func_call 143	//  func[IsInCategory]
	shift_sp -2
	or
L75
	branch_false L77
L76
	shift_sp 1
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	push_const 1
	push_event	//  damage
	push_const 84
	add
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  max_hp
	push_const 1000
	add
	fetch_d
	div
	push_const 0.050000
	div
	push_const 30
	mul
	func_call 2	//  func[AddAttackDesire]
	shift_sp -3
	shift_sp -1
L77
	push_event	//  attacker
	push_const 36
	add
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	equal
	branch_false L79
L78
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest0
	push_const 2316
	add
	fetch_i
	push_event	//  damage
	push_const 84
	add
	fetch_i
	equal
	branch_false L81
L80
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest1
	push_const 2320
	add
	push_reg_sp
	fetch_i
	push_const 3
	assign
	shift_sp -1
	jump L82
L81
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest1
	push_const 2320
	add
	push_reg_sp
	fetch_i
	push_const 1
	assign
	shift_sp -1
L82
L79
handler_end

handler 12	//  TIMER_FIRED_EX
	variable_begin
		"timer_id"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  timer_id
	push_const 176
	add
	fetch_i
	push_const 5001
	equal
	branch_false L84
L83
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_const 0
	assign
	shift_sp -1
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 400
	greater
	push_reg_sp
	fetch_i
	branch_false L85
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 650
	less
	and
L85
	branch_false L87
L86
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_const 1
	add
	assign
	shift_sp -1
L87
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i	//  z
	push_const 24
	add
	fetch_d
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  z
	push_const 24
	add
	fetch_d
	push_const 100
	sub
	greater
	branch_false L89
L88
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_const 3
	add
	assign
	shift_sp -1
L89
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	push_const 0.950000
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai0
	push_const 2336
	add
	fetch_i
	mul
	greater_equal
	branch_false L91
L90
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_const 2
	add
	assign
	shift_sp -1
L91
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai3
	push_const 2348
	add
	fetch_i
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i	//  x
	push_const 8
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	equal
	push_reg_sp
	fetch_i
	branch_false L92
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai4
	push_const 2352
	add
	fetch_i
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i	//  y
	push_const 16
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	equal
	and
L92
	branch_false L94
L93
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_const 3
	add
	assign
	shift_sp -1
L94
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest1
	push_const 2320
	add
	fetch_i
	add
	assign
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest1
	push_const 2320
	add
	push_reg_sp
	fetch_i
	push_const 0
	assign
	shift_sp -1
	shift_sp 1
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest3
	push_const 2328
	add
	fetch_i
	equal
	branch_false L96
L95
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest1
	push_const 2320
	add
	fetch_i
	push_const 3
	equal
	branch_false L98
L97
	jump L99
L98
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_quest1
	push_const 2320
	add
	fetch_i
	push_const 1
	equal
	branch_false L101
L100
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_const 1
	sub
	assign
	shift_sp -1
	jump L102
L101
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	push_reg_sp
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_const 1
	sub
	assign
	shift_sp -1
L102
L99
L96
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai1
	push_const 2340
	add
	fetch_i
	push_const 99
	not_equal
	push_reg_sp
	fetch_i
	branch_false L103
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  top_desire_target
	push_const 2412
	add
	fetch_i
	equal
	and
	push_reg_sp
	fetch_i
	branch_false L103
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai2
	push_const 2344
	add
	fetch_i
	push_const 8
	greater_equal
	and
	push_reg_sp
	fetch_i
	branch_false L103
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 100
	greater
	and
	push_reg_sp
	fetch_i
	branch_false L103
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 750
	less
	and
L103
	branch_false L105
L104
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai1
	push_const 2340
	add
	push_reg_sp
	fetch_i
	push_const 99
	assign
	shift_sp -1
	shift_sp 1
	func_call 15	//  func[RemoveAllAttackDesire]
	shift_sp -1
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i	//  x
	push_const 8
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i	//  y
	push_const 16
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i	//  z
	push_const 24
	add
	fetch_d
	func_call 57	//  func[FloatToInt]
	shift_sp -1
	push_const 10
	add
	func_call 46	//  func[InstantTeleport]
	shift_sp -4
	shift_sp -1
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  c_ai0
	push_const 2380
	add
	fetch_i
	push_const 1
	push_const 10
	push_const 500
	mul
	func_call 2	//  func[AddAttackDesire]
	shift_sp -3
	shift_sp -1
L105
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  i_ai1
	push_const 2340
	add
	push_reg_sp
	fetch_i
	push_const 50
	assign
	shift_sp -1
	jump L106
L84
	call_super
L106
handler_end

class_end
Tested by users, works 100%.
Leachers, please don't change something and write here that code doesn't work
nucer is offline  
Old 28.11.2005, 14:40   #2
horyfilipe
Архивный участник
 
Join Date: Jul 2005
Posts: 242
Default

really sorry but whats "anti train"? :P
horyfilipe is offline  
Old 28.11.2005, 14:42   #3
khul
Архивный участник
 
Join Date: Oct 2005
Posts: 153
Default

omg if this really works is a great add !! testing it , ill get back to you once i finish test.
thanks for the share =)
khul is offline  
Old 28.11.2005, 15:03   #4
hamidouch
Архивный участник
 
Join Date: Mar 2005
Posts: 475
Default

yes awesome
got to test that
hamidouch is offline  
Old 28.11.2005, 15:08   #5
wton
Архивный участник
 
Join Date: May 2005
Posts: 463
Default

omg very nice

in test...
wton is offline  
Old 28.11.2005, 15:22   #6
serjr
Архивный участник
 
Join Date: May 2005
Posts: 115
Default

Quote:
Originally Posted by horyfilipe
really sorry but whats "anti train"? :P
this means using terraing bugs for mass mob killing
serjr is offline  
Old 28.11.2005, 15:24   #7
cool_santino
Архивный участник
 
Join Date: Nov 2005
Posts: 85
Default

а можно исходничек поглядеть?
post please sources... i wont to see how its work :P
cool_santino is offline  
Old 28.11.2005, 15:26   #8
SOnick
Архивный участник
 
Join Date: Feb 2005
Posts: 177
Default

it must be added after warrior : default_npc ?
SOnick is offline  
Old 28.11.2005, 16:07   #9
Dave
Архивный участник
 
Join Date: Jun 2005
Posts: 364
Default what exactly does it do

what exactly does it do?
Dave is offline  
Old 28.11.2005, 17:09   #10
dar55
Архивный участник
 
Join Date: Aug 2005
Posts: 180
Default

Hm, 100% work?)
dar55 is offline  
Old 28.11.2005, 17:17   #11
cool_santino
Архивный участник
 
Join Date: Nov 2005
Posts: 85
Default

please share sources...
cool_santino is offline  
Old 28.11.2005, 17:18   #12
dar55
Архивный участник
 
Join Date: Aug 2005
Posts: 180
Default

<rus> да не стоит заморачиваться, косячит данный фикс не по детски, без него даж лучше. В лучшем случае портнет только моба которого атакуешь, да и то если очень не повезет, у меня при тесте уткнувшись в стену не портнуло ни разу, уткнувшись в забор периодически портило, но например за то время пока моб соображал портнуться, он врядли бы выжил.<rus>
dar55 is offline  
Old 28.11.2005, 17:24   #13
cool_santino
Архивный участник
 
Join Date: Nov 2005
Posts: 85
Default

<rus>Ну может можно доработать скрипт, тока не по стековому варианту а по исходникам....<rus>
cool_santino is offline  
Old 28.11.2005, 18:22   #14
nucer
Архивный участник
 
Join Date: May 2005
Posts: 117
Default

dar55, try to do same thing with mass magic.

<rus>Короче можно сделать так чтобы к лучникам телепортились. Тока тогда они будут ещё и не во время паровоза телепортиться.</rus>

If you can make better - just do it.
nucer is offline  
Old 28.11.2005, 18:26   #15
-mAn-
Архивный участник
 
Join Date: Mar 2005
Posts: 6
Default

<rus>А что бы под стенами не стояли и не тупили можно ?</rus>
-mAn- is offline  
Old 28.11.2005, 18:37   #16
dar55
Архивный участник
 
Join Date: Aug 2005
Posts: 180
Default

<rus> можно, есть даже такой вариант, но вроде говорят немного не доделан<rus>
dar55 is offline  
Old 28.11.2005, 19:27   #17
Metal
Архивный участник
 
Join Date: Aug 2005
Posts: 44
Default

Tnx for share, mate. Btw is this Russian forum :?
Metal is offline  
Old 28.11.2005, 22:52   #18
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

thanks for sharing. How can I use it?
top-gear is offline  
Old 28.11.2005, 23:51   #19
nucer
Архивный участник
 
Join Date: May 2005
Posts: 117
Default

You must set this ai to mobs.
Example: replace class gremlin : warrior_passive with class gremlin : stock_teleport
nucer is offline  
Old 29.11.2005, 00:25   #20
bwgreen
Архивный участник
 
Join Date: Sep 2005
Posts: 408
Default

Quote:
Originally Posted by nucer
You must set this ai to mobs.
Example: replace class gremlin : warrior_passive with class gremlin : stock_teleport
So.. erm. Won't this effect the mobs dropping quest items?

Also.. if the same AI is used for all mobs, they will no longer be agressive.. or they will all be aggressive...?
bwgreen is offline  
Old 29.11.2005, 00:54   #21
nucer
Архивный участник
 
Join Date: May 2005
Posts: 117
Default

No. If you need agressive mob made it class xxx : warrior_aggressive.
nucer is offline  
Old 29.11.2005, 00:58   #22
bwgreen
Архивный участник
 
Join Date: Sep 2005
Posts: 408
Default

But that just negates the need for the anti-train function. So only non-aggressive mobs will be affected by the anti-train function? Pointless in my honest opinion.
bwgreen is offline  
Old 29.11.2005, 02:36   #23
nucer
Архивный участник
 
Join Date: May 2005
Posts: 117
Default

You just need to use your brain to make it really usable.
nucer is offline  
Old 30.11.2005, 14:22   #24
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

what is the effect on users then?
top-gear is offline  
Old 30.11.2005, 17:50   #25
Nurgl
Архивный участник
 
Join Date: May 2005
Posts: 118
Default

Quote:
Originally Posted by -mAn-
<rus>А что бы под стенами не стояли и не тупили можно ?</rus>
<rus>можно, но своими ручками уже :lol:</rus>
Nurgl 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:04.