PDA

View Full Version : [SHARE]Anti train ai


nucer
28.11.2005, 14:37
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_endTested by users, works 100%.
Leachers, please don't change something and write here that code doesn't work :D

horyfilipe
28.11.2005, 14:40
really sorry but whats "anti train"? :P

khul
28.11.2005, 14:42
omg if this really works is a great add !! testing it , ill get back to you once i finish test.
thanks for the share =)

hamidouch
28.11.2005, 15:03
yes awesome
got to test that

wton
28.11.2005, 15:08
omg very nice :D

in test...

serjr
28.11.2005, 15:22
really sorry but whats "anti train"? :P
this means using terraing bugs for mass mob killing

cool_santino
28.11.2005, 15:24
а можно исходничек поглядеть?
post please sources... i wont to see how its work :P

SOnick
28.11.2005, 15:26
it must be added after warrior : default_npc ?

Dave
28.11.2005, 16:07
what exactly does it do?

dar55
28.11.2005, 17:09
Hm, 100% work?)

cool_santino
28.11.2005, 17:17
please share sources...

dar55
28.11.2005, 17:18
<rus> да не стоит заморачиваться, косячит данный фикс не по детски, без него даж лучше. В лучшем случае портнет только моба которого атакуешь, да и то если очень не повезет, у меня при тесте уткнувшись в стену не портнуло ни разу, уткнувшись в забор периодически портило, но например за то время пока моб соображал портнуться, он врядли бы выжил.<rus>

cool_santino
28.11.2005, 17:24
<rus>Ну может можно доработать скрипт, тока не по стековому варианту а по исходникам....<rus>

nucer
28.11.2005, 18:22
dar55, try to do same thing with mass magic.

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

If you can make better - just do it.

-mAn-
28.11.2005, 18:26
<rus>А что бы под стенами не стояли и не тупили можно ?</rus>

dar55
28.11.2005, 18:37
<rus> можно, есть даже такой вариант, но вроде говорят немного не доделан<rus>

Metal
28.11.2005, 19:27
Tnx for share, mate. Btw is this Russian forum :?

top-gear
28.11.2005, 22:52
thanks for sharing. How can I use it?

nucer
28.11.2005, 23:51
You must set this ai to mobs.
Example: replace class gremlin : warrior_passive with class gremlin : stock_teleport

bwgreen
29.11.2005, 00:25
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...?

nucer
29.11.2005, 00:54
No. If you need agressive mob made it class xxx : warrior_aggressive.

bwgreen
29.11.2005, 00:58
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.

nucer
29.11.2005, 02:36
You just need to use your brain to make it really usable. :)

top-gear
30.11.2005, 14:22
what is the effect on users then?

Nurgl
30.11.2005, 17:50
<rus>А что бы под стенами не стояли и не тупили можно ?</rus>
<rus>можно, но своими ручками уже :lol:</rus>

_styx
01.12.2005, 00:39
hmmm so if the shared ai is for passive monsters, then compare the code to warrior_passive and then replace that section or sections with the warrior_aggressive coding and wa-la.

avatard
01.12.2005, 03:45
very works, or I dunno how you russians spell that

avatard
01.12.2005, 03:47
one of the most confirmed scripts here on PP; have tried even with the c3 and _screw, _cloud spells

Kleo
01.12.2005, 12:13
cool_santino
Вот искодник. Делать нефиг было переписал.

nucer
01.12.2005, 16:39
cool_santino
Вот искодник. Делать нефиг было переписал.
LOL :)

Делись декомпилером :):)

top-gear
01.12.2005, 21:10
I guess that mobs with attack skills cannot use them, and they will only use melee attack. is that right?

top-gear
01.12.2005, 22:55
Tested but no effect at all...

Kleo
02.12.2005, 19:16
cool_santino
Вот искодник. Делать нефиг было переписал.
LOL :)

Делись декомпилером :):)

<rus>Если я был бы хорошим програмером написал бы декомпилер. А перевел я твой код ручками. Говорюже делать нефиг было. Если есть человек который может написать декомпилер, могу помочь в рашифровки этого псевдо кода.</rus>

kvoxi
02.12.2005, 19:34
cool_santino
Вот искодник. Делать нефиг было переписал.
LOL :)

Делись декомпилером :):)

<rus>Если я был бы хорошим програмером написал бы декомпилер. А перевел я твой код ручками. Говорюже делать нефиг было. Если есть человек который может написать декомпилер, могу помочь в рашифровки этого псевдо кода.</rus>
Немного подучи теорию конечных автоматов и сам сможешь писать парсеры, компилеры и декомпилеры.

KTPSMF
21.12.2005, 20:19
dit know whats wrong :/
http://img311.imageshack.us/img311/491/shot000368be.jpg

all these npc has stack_teleporter ai

npc_begin warrior 198 [neer_crawler_frak] level=29 exp=3949754.5 acquire_exp_rate=3.66 undying=0 can_be_attacked=1 acquire_sp=165 race=undead sex=male temper=100 safe_height=100 org_jump=15 skill_list={@s_soft_bones;@s_unholy} magic_list={} max_item=50 item_make_list={} corpse_make_list={{[advanced_antidote];1;1;90};{[advanced_antidote];1;1;90}} additional_make_list={} additional_make_multi_list={{{{[adena];444;879;100}};90};{{{[elven_tunic];1;1;0.9308};{[white_tunic];1;1;0.9308};{[white_tunic_pattern];1;1;xx.xx66};{[mage's_tunic];1;1;0.9308};{[elven_hose];1;1;1.4878};{[dark_hose];1;1;1.4878};{[dark_hose_fabric];1;1;xx.xx77};{[mage's_hose];1;1;1.4877}};4.4364};{{{[charcoal];1;1;xx.xx96};{[thread];1;1;xx.xx91};{[cord];1;1;xx.xx13}};xx.xx84}} slot_chest=[] slot_rhand=[] slot_lhand=[] base_attack_type=fist base_can_penetrate=0 base_attack_range=40 base_damage_range={0;0;80;120} base_rand_dam=30 str=40 int=21 dex=30 wit=20 con=43 men=10 hp_increase=10 mp_increase=3 org_hp_regen=3.5 org_mp_regen=1.5 ground_low={50;0;10} ground_high={90;-30;30} underwater_low={50;0;10} underwater_high={0;0;30} fly_low={0;0;10} fly_high={0;-30;30} float_low={0;0;10} float_high={0;-30;30} org_earshot=100 sight={0;0;2500;120;5} agro_range=1000 org_hp=5xx.xx9167019678 org_mp=3xx.xx base_defend=1xx.xx597751854 base_magic_attack=xx.xx36709389587 base_magic_defend=xx.xx63831718592 base_physical_attack=xx.xx2021797265 physical_hit_modify=4.75 physical_avoid_modify=0 base_attack_speed=253 base_reuse_delay=0 base_critical=4 magic_use_speed_modify=0 status={normal} align=-841 collision_radius=14 collision_height=22 category={} clan={@neer_crawler_clan} clan_help_range=300 guild={} pledge={} pledge_leader=0 alliance={} alliance_leader=0 ignore_clan_list={} ruler=0 ruling_domain={} npc_ai={[stock_teleport]} corpse_time=7 no_sleep_mode=0 npc_end



they react in buffs too, So : it's not working o i just done somethig wrong

kepler001
21.12.2005, 20:32
add skill prominece for npc =))))
hehe

top-gear
21.12.2005, 22:36
add skill prominece for npc =))))
hehe

what do you mean??

Co0L
14.01.2006, 13:12
Somebody complete anti-train solution?

gamedeveloper
17.01.2006, 04:50
Sure ;)

Co0L
17.01.2006, 13:36
Sure ;)
Hm... can You share it? :roll:

gamedeveloper
17.01.2006, 14:19
Definitely no. We are direct competitors, LineageII.ru and La2.ru

Co0L
17.01.2006, 14:32
Definitely no. We are direct competitors, LineageII.ru and La2.ru
ыыы, я заранее знал ответ :)

gamedeveloper
17.01.2006, 17:12
Definitely no. We are direct competitors, LineageII.ru and La2.ru
ыыы, я заранее знал ответ :) Why did you ask question when you know answer?