Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 23.07.2006, 15:35   #1
Eanae
Архивный участник
 
Join Date: Jun 2005
Posts: 262
Default [Share] My version or preacher of doom

Code:
class preacher_of_doom : default_npc
parameter_define_begin
	int MoveAroundSocial 0
	int ShoutMsg1 0
	int ShoutMsg2 0
	int ShoutMsg3 0
parameter_define_end
handler 0	//  NO_DESIRE
	variable_begin
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	shift_sp 1
	push_const 5
	push_const 5
	func_call 0	//  func[AddMoveAroundDesire]
	shift_sp -2
	shift_sp -1
handler_end

handler 13	//  CREATED
	variable_begin
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_parameter MoveAroundSocial
	push_const 0
	greater
	branch_false L67
L66
	shift_sp 1
	push_const 10
	func_call 52	//  func[SetTimerPeriodByTick]
	shift_sp -1
	shift_sp -1
L67
	push_parameter MoveAroundSocial
	push_const 0
	greater
	push_reg_sp
	fetch_i
	branch_true L68
	push_parameter ShoutMsg2
	push_const 0
	greater
	or
	push_reg_sp
	fetch_i
	branch_true L68
	push_parameter ShoutMsg3
	push_const 0
	greater
	or
L68
	branch_false L70
L69
	shift_sp 1
	push_const 1001
	push_const 10000
	func_call 28	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
L70
handler_end

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

	push_event	//  timer_id
	push_const 176
	add
	fetch_i
	push_const 1001
	equal
	branch_false L72
L71
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  p_state
	push_const 2496
	add
	fetch_i
	push_const 1
	equal
	push_reg_sp
	fetch_i
	branch_true L73
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  p_state
	push_const 2496
	add
	fetch_i
	push_const 2
	equal
	or
	push_reg_sp
	fetch_i
	branch_true L73
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  p_state
	push_const 2496
	add
	fetch_i
	push_const 9
	equal
	or
L73
	branch_false L75
L74
	push_parameter MoveAroundSocial
	push_const 0
	greater
	push_reg_sp
	fetch_i
	branch_false L76
	shift_sp 1
	push_const 100
	func_call 55	//  func[Rand]
	shift_sp -1
	push_const 20
	less
	and
L76
	branch_false L78
L77
	shift_sp 1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i
	push_const 1
	push_parameter MoveAroundSocial
	push_const 1000
	mul
	push_const 30
	div
	push_const 50
	func_call 13	//  func[AddEffectActionDesire]
	shift_sp -4
	shift_sp -1
L78
	push_parameter ShoutMsg1
	push_const 0
	greater
	push_reg_sp
	fetch_i
	branch_false L79
	shift_sp 1
	push_const 1000
	func_call 55	//  func[Rand]
	shift_sp -1
	push_const 200
	less
	and
L79
	branch_false L81
L80
	push_event	//  i6
	push_const 216
	add
	push_reg_sp
	fetch_i
	shift_sp 1
	push_const 3
	func_call 55	//  func[Rand]
	shift_sp -1
	assign
	shift_sp -1
	push_event	//  i6
	push_const 216
	add
	fetch_i
	push_const 1
	equal
	branch_false L83
L82
	shift_sp 1
	shift_sp 1
	push_parameter ShoutMsg1
S15.	""
	push_string S15
S16.	""
	push_string S16
S17.	""
	push_string S17
S18.	""
	push_string S18
S19.	""
	push_string S19
	func_call 89	//  func[MakeFString]
	shift_sp -6
	func_call 42	//  func[Shout]
	shift_sp -1
	shift_sp -1
	jump L84
L83
	push_event	//  i6
	push_const 216
	add
	fetch_i
	push_const 2
	equal
	branch_false L86
L85
	shift_sp 1
	shift_sp 1
	push_parameter ShoutMsg2
S20.	""
	push_string S20
S21.	""
	push_string S21
S22.	""
	push_string S22
S23.	""
	push_string S23
S24.	""
	push_string S24
	func_call 89	//  func[MakeFString]
	shift_sp -6
	func_call 42	//  func[Shout]
	shift_sp -1
	shift_sp -1
	jump L87
L86
	shift_sp 1
	shift_sp 1
	push_parameter ShoutMsg3
S25.	""
	push_string S25
S26.	""
	push_string S26
S27.	""
	push_string S27
S28.	""
	push_string S28
S29.	""
	push_string S29
	func_call 89	//  func[MakeFString]
	shift_sp -6
	func_call 42	//  func[Shout]
	shift_sp -1
	shift_sp -1
L87
L84
L81
L75
L72
	shift_sp 1
	push_const 1001
	push_const 10000
	func_call 28	//  func[AddTimerEx]
	shift_sp -2
	shift_sp -1
	call_super
handler_end

handler 5	//  SEE_CREATURE
	variable_begin
		"creature"
		"i6"
		"myself"
		"_choiceN"
		"_code"
		"_from_choice"
	variable_end

	push_event	//  i6
	push_const 216
	add
	push_reg_sp
	fetch_i
	shift_sp 1
	push_const 100
	func_call 55	//  func[Rand]
	shift_sp -1
	assign
	shift_sp -1
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 100
	greater
	push_reg_sp
	fetch_i
	branch_false L88
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 900
	less
	and
	push_reg_sp
	fetch_i
	branch_false L88
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 9962
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L88
	shift_sp 1
	push_const 0
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  occupation
	push_const 152
	add
	fetch_i
	func_call 143	//  func[IsInCategory]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L88
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  level
	push_const 888
	add
	fetch_i
	push_const 65
	greater
	and
L88
	branch_false L90
L89
	push_event	//  i6
	push_const 216
	add
	fetch_i
	push_const 100
	less
	branch_false L92
L91
	shift_sp 1
	push_const 1117186
	func_call 155	//  func[Skill_GetConsumeMP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  mp
	push_const 352
	add
	fetch_d
	less
	push_reg_sp
	fetch_i
	branch_false L93
	shift_sp 1
	push_const 1117186
	func_call 154	//  func[Skill_GetConsumeHP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	less
	and
L93
	branch_false L95
L94
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 1117186
	push_const 1
	push_const 0
	push_const 1000000
	func_call 10	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
L95
L92
	jump L96
L90
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 100
	greater
	push_reg_sp
	fetch_i
	branch_false L97
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 900
	less
	and
	push_reg_sp
	fetch_i
	branch_false L97
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 9962
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L97
	shift_sp 1
	push_const 0
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  occupation
	push_const 152
	add
	fetch_i
	func_call 143	//  func[IsInCategory]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L97
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  level
	push_const 888
	add
	fetch_i
	push_const 40
	greater
	and
L97
	branch_false L99
L98
	push_event	//  i6
	push_const 216
	add
	fetch_i
	push_const 100
	less
	branch_false L101
L100
	shift_sp 1
	push_const 1117185
	func_call 155	//  func[Skill_GetConsumeMP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  mp
	push_const 352
	add
	fetch_d
	less
	push_reg_sp
	fetch_i
	branch_false L102
	shift_sp 1
	push_const 1117185
	func_call 154	//  func[Skill_GetConsumeHP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	less
	and
L102
	branch_false L104
L103
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 1117185
	push_const 1
	push_const 0
	push_const 1000000
	func_call 10	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
L104
L101
	jump L105
L99
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 100
	greater
	push_reg_sp
	fetch_i
	branch_false L106
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 900
	less
	and
	push_reg_sp
	fetch_i
	branch_false L106
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 9962
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L106
	shift_sp 1
	push_const 1
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  occupation
	push_const 152
	add
	fetch_i
	func_call 143	//  func[IsInCategory]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L106
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  level
	push_const 888
	add
	fetch_i
	push_const 65
	greater
	and
L106
	branch_false L108
L107
	push_event	//  i6
	push_const 216
	add
	fetch_i
	push_const 100
	less
	branch_false L110
L109
	shift_sp 1
	push_const 1117442
	func_call 155	//  func[Skill_GetConsumeMP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  mp
	push_const 352
	add
	fetch_d
	less
	push_reg_sp
	fetch_i
	branch_false L111
	shift_sp 1
	push_const 1117442
	func_call 154	//  func[Skill_GetConsumeHP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	less
	and
L111
	branch_false L113
L112
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 1117442
	push_const 1
	push_const 0
	push_const 1000000
	func_call 10	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
L113
L110
	jump L114
L108
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 100
	greater
	push_reg_sp
	fetch_i
	branch_false L115
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 900
	less
	and
	push_reg_sp
	fetch_i
	branch_false L115
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 9962
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L115
	shift_sp 1
	push_const 1
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  occupation
	push_const 152
	add
	fetch_i
	func_call 143	//  func[IsInCategory]
	shift_sp -2
	and
	push_reg_sp
	fetch_i
	branch_false L115
	push_event	//  creature
	push_const 68
	add
	fetch_i	//  level
	push_const 888
	add
	fetch_i
	push_const 40
	greater
	and
L115
	branch_false L117
L116
	push_event	//  i6
	push_const 216
	add
	fetch_i
	push_const 100
	less
	branch_false L119
L118
	shift_sp 1
	push_const 1117441
	func_call 155	//  func[Skill_GetConsumeMP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  mp
	push_const 352
	add
	fetch_d
	less
	push_reg_sp
	fetch_i
	branch_false L120
	shift_sp 1
	push_const 1117441
	func_call 154	//  func[Skill_GetConsumeHP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	less
	and
L120
	branch_false L122
L121
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 1117441
	push_const 1
	push_const 0
	push_const 1000000
	func_call 10	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
L122
L119
	jump L123
L117
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 100
	greater
	push_reg_sp
	fetch_i
	branch_false L124
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	func_call 51	//  func[DistFromMe]
	shift_sp -1
	push_const 900
	less
	and
	push_reg_sp
	fetch_i
	branch_false L124
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 9962
	func_call 81	//  func[OwnItemCount]
	shift_sp -2
	and
L124
	branch_false L126
L125
	push_event	//  i6
	push_const 216
	add
	fetch_i
	push_const 10
	less
	branch_false L128
L127
	shift_sp 1
	push_const 1117697
	func_call 155	//  func[Skill_GetConsumeMP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  mp
	push_const 352
	add
	fetch_d
	less
	push_reg_sp
	fetch_i
	branch_false L129
	shift_sp 1
	push_const 1117697
	func_call 154	//  func[Skill_GetConsumeHP]
	shift_sp -1
	push_event	//  myself
	push_const 28
	add
	fetch_i	//  sm
	push_const 2400
	add
	fetch_i	//  hp
	push_const 344
	add
	fetch_d
	less
	and
L129
	branch_false L131
L130
	shift_sp 1
	push_event	//  creature
	push_const 68
	add
	fetch_i
	push_const 1117697
	push_const 1
	push_const 0
	push_const 1000000
	func_call 10	//  func[AddUseSkillDesire]
	shift_sp -5
	shift_sp -1
L131
L128
L126
L123
L114
L105
L96
handler_end

class_end
Code:
90000	[This world will soon be annihilated!]
90001	[All is lost! The prophecy of destruction has been fulfilled!]
90002	[All is lost! Prepare to meet the goddess of death!]
90003	[As foretold in the prophecy of darkness, the era of chaos has begun!]
90004	[The prophecy of darkness has come to pass!]
90005	[The day of judgement is near!]
Another useless ai share.


PS: Thanks to hami for some help on this.
Eanae 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 15:44.