PDA

View Full Version : [Share] New version of base classes in AI.obj


Larson
03.05.2006, 17:20
As some from present on this forum, I started to make my own AI.obj with the purpose of optimization, an opportunity of addition quests, delete holes... For the beginning in it topic I shall lay out base classes already compiled by me and if to whom they will be useful I shall fill up probably the list...
So:


class default_npc : (null)
parameter_define_begin
int DesirePqSize 150
int FavorListSize 150
float IdleDesire_DecayRatio 0.000000
float MoveAround_DecayRatio 0.000000
float DoNothing_DecayRatio 0.000000
float Attack_DecayRatio 0.000000
float Chase_DecayRatio 0.000000
float Flee_DecayRatio 0.000000
float GetItem_DecayRatio 0.000000
float Follow_DecayRatio 0.000000
float Decaying_DecayRatio 0.000000
float MoveToWayPoint_DecayRatio 0.000000
float UseSkill_DecayRatio 0.000000
float MoveTo_DecayRatio 0.000000
float EffectAction_DecayRatio 0.000000
float IdleDesire_BoostValue 0.000000
float MoveAround_BoostValue 0.000000
float DoNothing_BoostValue 0.000000
float Attack_BoostValue 0.000000
float Chase_BoostValue 0.000000
float Flee_BoostValue 0.000000
float GetItem_BoostValue 0.000000
float Follow_BoostValue 0.000000
float Decaying_BoostValue 0.000000
float MoveToWayPoint_BoostValue 0.000000
float UseSkill_BoostValue 0.000000
float MoveTo_BoostValue 0.000000
float EffectAction_BoostValue 0.000000
parameter_define_end
handler 0 // NO_DESIRE
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

handler_end

class_end


class citizen : default_npc
parameter_define_begin
string fnHi "chi.htm"
int SocialAction 1
parameter_define_end
handler 13 // CREATED
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_parameter SocialAction
push_const 0
greater
branch_false L1
L0
shift_sp 1
push_const 1002
push_const 10000
func_call 28 // func[AddTimerEx]
shift_sp -2
shift_sp -1
L1
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 1002
equal
branch_false L3
L2
push_parameter SocialAction
push_const 0
greater
push_reg_sp
fetch_i
branch_false L4
shift_sp 1
push_const 4
func_call 55 // func[Rand]
shift_sp -1
push_const 0
equal
and
L4
branch_false L6
L5
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 2
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
L6
shift_sp 1
push_const 1002
push_const 10000
func_call 28 // func[AddTimerEx]
shift_sp -2
shift_sp -1
exit_handler
L3
call_super
handler_end

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

shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
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
handler_end

handler 4 // TALK_SELECTED
variable_begin
"talker"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S0. "noquest.htm"
push_string S0
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
handler_end

class_end

Larson
03.05.2006, 17:20
As some from present on this forum, I started to make my own AI.obj with the purpose of optimization, an opportunity of addition quests, delete holes... For the beginning in it topic I shall lay out base classes already compiled by me and if to whom they will be useful I shall fill up probably the list...
So:


class default_npc : (null)
parameter_define_begin
int DesirePqSize 150
int FavorListSize 150
float IdleDesire_DecayRatio 0.000000
float MoveAround_DecayRatio 0.000000
float DoNothing_DecayRatio 0.000000
float Attack_DecayRatio 0.000000
float Chase_DecayRatio 0.000000
float Flee_DecayRatio 0.000000
float GetItem_DecayRatio 0.000000
float Follow_DecayRatio 0.000000
float Decaying_DecayRatio 0.000000
float MoveToWayPoint_DecayRatio 0.000000
float UseSkill_DecayRatio 0.000000
float MoveTo_DecayRatio 0.000000
float EffectAction_DecayRatio 0.000000
float IdleDesire_BoostValue 0.000000
float MoveAround_BoostValue 0.000000
float DoNothing_BoostValue 0.000000
float Attack_BoostValue 0.000000
float Chase_BoostValue 0.000000
float Flee_BoostValue 0.000000
float GetItem_BoostValue 0.000000
float Follow_BoostValue 0.000000
float Decaying_BoostValue 0.000000
float MoveToWayPoint_BoostValue 0.000000
float UseSkill_BoostValue 0.000000
float MoveTo_BoostValue 0.000000
float EffectAction_BoostValue 0.000000
parameter_define_end
handler 0 // NO_DESIRE
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

handler_end

class_end


class citizen : default_npc
parameter_define_begin
string fnHi "chi.htm"
int SocialAction 1
parameter_define_end
handler 13 // CREATED
variable_begin
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_parameter SocialAction
push_const 0
greater
branch_false L1
L0
shift_sp 1
push_const 1002
push_const 10000
func_call 28 // func[AddTimerEx]
shift_sp -2
shift_sp -1
L1
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 1002
equal
branch_false L3
L2
push_parameter SocialAction
push_const 0
greater
push_reg_sp
fetch_i
branch_false L4
shift_sp 1
push_const 4
func_call 55 // func[Rand]
shift_sp -1
push_const 0
equal
and
L4
branch_false L6
L5
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 2
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
L6
shift_sp 1
push_const 1002
push_const 10000
func_call 28 // func[AddTimerEx]
shift_sp -2
shift_sp -1
exit_handler
L3
call_super
handler_end

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

shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
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
handler_end

handler 4 // TALK_SELECTED
variable_begin
"talker"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S0. "noquest.htm"
push_string S0
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
handler_end

class_end

Validator
03.05.2006, 17:33
What's changed?

Validator
03.05.2006, 17:33
What's changed?

Larson
03.05.2006, 17:34
Next Guild Masters lv.1 (from starting villages):

class guild_master : citizen
parameter_define_begin
string fnClassList1 "gmhi.htm"
string fnClassList2 "gmhi.htm"
string fnClassMismatch "gmhi.htm"
string fnYouAreSecondClass "gmhi.htm"
string fnYouAreThirdClass "gmhi.htm"
parameter_define_end
handler 42 // CREATE_PLEDGE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L46
L45
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S21. "pl006.htm"
push_string S21
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L46
handler_end

handler 48 // CREATE_ALLIANCE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L48
L47
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S22. "al006.htm"
push_string S22
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L48
handler_end

handler 43 // DISMISS_PLEDGE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L50
L49
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S23. "pl009.htm"
push_string S23
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L50
handler_end

handler 44 // REVIVE_PLEDGE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L52
L51
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S24. "pl012.htm"
push_string S24
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L52
handler_end

handler 45 // LEVEL_UP_PLEDGE
variable_begin
"talker"
"reply"
"i0"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 0
greater_equal
push_reg_sp
fetch_i
branch_false L53
push_event // reply
push_const 104
add
fetch_i
push_const 5
less
and
push_reg_sp
fetch_i
branch_false L53
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
and
L53
branch_false L55
L54
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 0
assign
shift_sp -1
push_event // reply
push_const 104
add
fetch_i
push_reg_sp
fetch_i
push_const 0
equal
branch_false L58
L57
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 30000
greater_equal
push_reg_sp
fetch_i
branch_false L59
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 650000
greater_equal
and
L59
branch_false L61
L60
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
push_const 650000
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L63
L62
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 30000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 1
assign
shift_sp -1
L63
L61
jump L56
jump L64
L58
push_reg_sp
fetch_i
push_const 1
equal
branch_false L65
L64
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 150000
greater_equal
push_reg_sp
fetch_i
branch_false L66
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 2500000
greater_equal
and
L66
branch_false L68
L67
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
push_const 2500000
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L70
L69
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 150000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 2
assign
shift_sp -1
L70
L68
jump L56
jump L71
L65
push_reg_sp
fetch_i
push_const 2
equal
branch_false L72
L71
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 500000
greater_equal
push_reg_sp
fetch_i
branch_false L73
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1419
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
greater
and
L73
branch_false L75
L74
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1419
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L77
L76
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 500000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 3
assign
shift_sp -1
L77
L75
jump L56
jump L78
L72
push_reg_sp
fetch_i
push_const 3
equal
branch_false L79
L78
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 1400000
greater_equal
push_reg_sp
fetch_i
branch_false L80
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3874
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
greater
and
L80
branch_false L82
L81
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3874
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L84
L83
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 1400000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 4
assign
shift_sp -1
L84
L82
jump L56
jump L85
L79
push_reg_sp
fetch_i
push_const 4
equal
branch_false L86
L85
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 3500000
greater_equal
push_reg_sp
fetch_i
branch_false L87
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3870
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
greater
and
L87
branch_false L89
L88
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3870
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L91
L90
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 3500000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 5
assign
shift_sp -1
L91
L89
jump L92
L86
L92
L56
shift_sp -1
push_event // i0
push_const 192
add
fetch_i
push_const 0
greater
branch_false L94
L93
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_event // i0
push_const 192
add
fetch_i
func_call 184 // func[PledgeLevelUp]
shift_sp -2
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S25. "ItemSound.quest_fanfare_1"
push_string S25
func_call 173 // func[SoundEffect]
shift_sp -2
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S26. "pl015.htm"
push_string S26
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L95
L94
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S27. "pl016.htm"
push_string S27
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L95
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
L55
handler_end

handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // ask
push_const 100
add
fetch_i
push_const 3
negate
equal
branch_false L97
L96
push_event // reply
push_const 104
add
fetch_i
push_reg_sp
fetch_i
push_const 0
equal
branch_false L100
L99
push_event // talker
push_const 32
add
fetch_i // level
push_const 888
add
fetch_i
push_const 10
less
branch_false L102
L101
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S28. "pl002.htm"
push_string S28
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L103
L102
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L105
L104
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S29. "pl003.htm"
push_string S29
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L106
L105
push_event // talker
push_const 32
add
fetch_i // pledge_id
push_const 664
add
fetch_i
push_const 0
not_equal
branch_false L108
L107
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S30. "pl004.htm"
push_string S30
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L109
L108
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S31. "pl005.htm"
push_string S31
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L109
L106
L103
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L98
jump L110
L100
push_reg_sp
fetch_i
push_const 1
equal
branch_false L111
L110
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L113
L112
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S32. "pl013.htm"
push_string S32
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L114
L113
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S33. "pl014.htm"
push_string S33
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L114
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L98
jump L115
L111
push_reg_sp
fetch_i
push_const 2
equal
branch_false L116
L115
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L118
L117
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S34. "pl007.htm"
push_string S34
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L119
L118
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S35. "pl008.htm"
push_string S35
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L119
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L98
jump L120
L116
push_reg_sp
fetch_i
push_const 4
equal
branch_false L121
L120
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L123
L122
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S36. "pl010.htm"
push_string S36
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L124
L123
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S37. "pl011.htm"
push_string S37
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L124
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L125
L121
L125
L98
shift_sp -1
exit_handler
jump L126
L97
push_event // ask
push_const 100
add
fetch_i
push_const 4
negate
equal
push_reg_sp
fetch_i
branch_false L127
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
and
push_reg_sp
fetch_i
branch_false L127
push_event // reply
push_const 104
add
fetch_i
push_const 0
equal
and
L127
branch_false L129
L128
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S38. "al005.htm"
push_string S38
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
exit_handler
L129
L126
call_super
handler_end

class_end


class guild_master_lv1 : guild_master
class_end

Larson
03.05.2006, 17:34
Next Guild Masters lv.1 (from starting villages):

class guild_master : citizen
parameter_define_begin
string fnClassList1 "gmhi.htm"
string fnClassList2 "gmhi.htm"
string fnClassMismatch "gmhi.htm"
string fnYouAreSecondClass "gmhi.htm"
string fnYouAreThirdClass "gmhi.htm"
parameter_define_end
handler 42 // CREATE_PLEDGE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L46
L45
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S21. "pl006.htm"
push_string S21
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L46
handler_end

handler 48 // CREATE_ALLIANCE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L48
L47
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S22. "al006.htm"
push_string S22
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L48
handler_end

handler 43 // DISMISS_PLEDGE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L50
L49
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S23. "pl009.htm"
push_string S23
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L50
handler_end

handler 44 // REVIVE_PLEDGE
variable_begin
"talker"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 1
equal
branch_false L52
L51
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S24. "pl012.htm"
push_string S24
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L52
handler_end

handler 45 // LEVEL_UP_PLEDGE
variable_begin
"talker"
"reply"
"i0"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // reply
push_const 104
add
fetch_i
push_const 0
greater_equal
push_reg_sp
fetch_i
branch_false L53
push_event // reply
push_const 104
add
fetch_i
push_const 5
less
and
push_reg_sp
fetch_i
branch_false L53
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
and
L53
branch_false L55
L54
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 0
assign
shift_sp -1
push_event // reply
push_const 104
add
fetch_i
push_reg_sp
fetch_i
push_const 0
equal
branch_false L58
L57
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 30000
greater_equal
push_reg_sp
fetch_i
branch_false L59
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 650000
greater_equal
and
L59
branch_false L61
L60
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
push_const 650000
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L63
L62
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 30000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 1
assign
shift_sp -1
L63
L61
jump L56
jump L64
L58
push_reg_sp
fetch_i
push_const 1
equal
branch_false L65
L64
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 150000
greater_equal
push_reg_sp
fetch_i
branch_false L66
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 2500000
greater_equal
and
L66
branch_false L68
L67
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 57
push_const 2500000
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L70
L69
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 150000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 2
assign
shift_sp -1
L70
L68
jump L56
jump L71
L65
push_reg_sp
fetch_i
push_const 2
equal
branch_false L72
L71
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 500000
greater_equal
push_reg_sp
fetch_i
branch_false L73
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1419
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
greater
and
L73
branch_false L75
L74
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1419
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L77
L76
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 500000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 3
assign
shift_sp -1
L77
L75
jump L56
jump L78
L72
push_reg_sp
fetch_i
push_const 3
equal
branch_false L79
L78
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 1400000
greater_equal
push_reg_sp
fetch_i
branch_false L80
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3874
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
greater
and
L80
branch_false L82
L81
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3874
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L84
L83
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 1400000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 4
assign
shift_sp -1
L84
L82
jump L56
jump L85
L79
push_reg_sp
fetch_i
push_const 4
equal
branch_false L86
L85
push_event // talker
push_const 32
add
fetch_i // sp
push_const 248
add
fetch_i
push_const 3500000
greater_equal
push_reg_sp
fetch_i
branch_false L87
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3870
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 0
greater
and
L87
branch_false L89
L88
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 3870
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
branch_false L91
L90
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_const 1
push_const 3500000
negate
func_call 171 // func[IncrementParam]
shift_sp -3
shift_sp -1
push_event // i0
push_const 192
add
push_reg_sp
fetch_i
push_const 5
assign
shift_sp -1
L91
L89
jump L92
L86
L92
L56
shift_sp -1
push_event // i0
push_const 192
add
fetch_i
push_const 0
greater
branch_false L94
L93
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
push_event // i0
push_const 192
add
fetch_i
func_call 184 // func[PledgeLevelUp]
shift_sp -2
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S25. "ItemSound.quest_fanfare_1"
push_string S25
func_call 173 // func[SoundEffect]
shift_sp -2
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S26. "pl015.htm"
push_string S26
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L95
L94
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S27. "pl016.htm"
push_string S27
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L95
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
L55
handler_end

handler 32 // MENU_SELECTED
variable_begin
"talker"
"ask"
"reply"
"myself"
"_choiceN"
"_code"
"_from_choice"
variable_end

push_event // ask
push_const 100
add
fetch_i
push_const 3
negate
equal
branch_false L97
L96
push_event // reply
push_const 104
add
fetch_i
push_reg_sp
fetch_i
push_const 0
equal
branch_false L100
L99
push_event // talker
push_const 32
add
fetch_i // level
push_const 888
add
fetch_i
push_const 10
less
branch_false L102
L101
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S28. "pl002.htm"
push_string S28
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L103
L102
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L105
L104
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S29. "pl003.htm"
push_string S29
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L106
L105
push_event // talker
push_const 32
add
fetch_i // pledge_id
push_const 664
add
fetch_i
push_const 0
not_equal
branch_false L108
L107
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S30. "pl004.htm"
push_string S30
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L109
L108
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S31. "pl005.htm"
push_string S31
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L109
L106
L103
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L98
jump L110
L100
push_reg_sp
fetch_i
push_const 1
equal
branch_false L111
L110
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L113
L112
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S32. "pl013.htm"
push_string S32
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L114
L113
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S33. "pl014.htm"
push_string S33
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L114
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L98
jump L115
L111
push_reg_sp
fetch_i
push_const 2
equal
branch_false L116
L115
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L118
L117
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S34. "pl007.htm"
push_string S34
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L119
L118
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S35. "pl008.htm"
push_string S35
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L119
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L98
jump L120
L116
push_reg_sp
fetch_i
push_const 4
equal
branch_false L121
L120
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
branch_false L123
L122
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S36. "pl010.htm"
push_string S36
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
jump L124
L123
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S37. "pl011.htm"
push_string S37
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
L124
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
jump L125
L121
L125
L98
shift_sp -1
exit_handler
jump L126
L97
push_event // ask
push_const 100
add
fetch_i
push_const 4
negate
equal
push_reg_sp
fetch_i
branch_false L127
push_event // talker
push_const 32
add
fetch_i // is_pledge_master
push_const 672
add
fetch_i
push_const 0
not_equal
and
push_reg_sp
fetch_i
branch_false L127
push_event // reply
push_const 104
add
fetch_i
push_const 0
equal
and
L127
branch_false L129
L128
shift_sp 1
push_event // myself
push_const 28
add
fetch_i // sm
push_const 2400
add
fetch_i
push_const 1
push_const 3000
push_const 10000
func_call 13 // func[AddEffectActionDesire]
shift_sp -4
shift_sp -1
shift_sp 1
push_event // talker
push_const 32
add
fetch_i
S38. "al005.htm"
push_string S38
func_call 43 // func[ShowPage]
shift_sp -2
shift_sp -1
exit_handler
L129
L126
call_super
handler_end

class_end


class guild_master_lv1 : guild_master
class_end

hel
03.05.2006, 17:37
Larson:
Не обращай внимания на этого идиота Admin PP NOOB, это хорошо, что хоть кто-то что-то расшаривает...
What's changed in this AI?

hel
03.05.2006, 17:37
Larson:
Не обращай внимания на этого идиота Admin PP NOOB, это хорошо, что хоть кто-то что-то расшаривает...
What's changed in this AI?

Larson
03.05.2006, 17:40
1. Some parameters unnecessary for a parental class are removed
2. Animation is added at conversation with the player
3. The code is optimized (superfluous checks are removed, new checks are added where are necessary for removal holes and so on trifles...)

P.S. Unfortunately my limit on upload is exceeded also I cannot lay out completely pack, and time for others servers to pour is not present. Therefore if ppl that will become interested probably I shall continue hardly later...

Larson
03.05.2006, 17:40
1. Some parameters unnecessary for a parental class are removed
2. Animation is added at conversation with the player
3. The code is optimized (superfluous checks are removed, new checks are added where are necessary for removal holes and so on trifles...)

P.S. Unfortunately my limit on upload is exceeded also I cannot lay out completely pack, and time for others servers to pour is not present. Therefore if ppl that will become interested probably I shall continue hardly later...

Validator
03.05.2006, 18:24
Larson можешь в хендлере 3 сделать, чтобы НПЦ поварачивался к игроку?

hel
03.05.2006, 18:38
Larson:
You may upload your pack on rapidshare or megaupload...
Good work! Specifications of your AI is cool. Wait more. :)

Larson
03.05.2006, 18:45
Larson можешь в хендлере 3 сделать, чтобы НПЦ поварачивался к игроку?

Direct ways has not found while... There Are some variants on an extreme case... But yet I do not want to try, as there is no time for all :( Can be later...

Thalone
03.05.2006, 21:48
Larson if u need an FTP let me know, i got lots of bandwidth

astrid
04.05.2006, 22:36
P.S. Unfortunately my limit on upload is exceeded also I cannot lay out completely pack, and time for others servers to pour is not present. Therefore if ppl that will become interested probably I shall continue hardly later...


Dear admins, can you increase upload quota to Larson please?

Megatronpt
04.05.2006, 23:50
Larson, try using filefront:

hxxp://www.filefront.com

Digital
05.05.2006, 04:08
sure, y not?
increased larson's attachment limit ;)

Larson
05.05.2006, 15:09
Thanks for that have shown interest to my work. To time began more, therefore has laid out the first part of work as a file. I wait for results of testing...

Xoleum
06.05.2006, 00:35
Ok, I'm really new to this. I was wondering Larson if you could guide me to where I can learn this, where can I understand this code and what are those variables. Also, what is your AI exactly for? Guild Masters only?

Thanks for the info, great work!

GriffiN
06.05.2006, 17:33
im also newbie on this subject... trying to understand ai.obj...

what does this code exactly do??

anywhere else where to start understanding ai.obj??

toolpunk
06.05.2006, 18:05
tutorials have been posted by digital, just search for them.
also take a look at StaticVoid's topic, it's great...

Larson
13.05.2006, 13:12
First of all good work and thanks.
Thanks for you too.
1 in demon's version for animation there was an additional handler ( handler 5 as far as i rememeber ), any difference ?
Yes, the difference is. He uses handler SEE_CREATURE, I - on the timer. His variant has not approached me, as this handler works once on the player, up to his following entrance in radius of visibility npc (and it big). For servers with small amount of players there is a high probability, that players almost will not see animation: (
2 testing the ai you posted ( not guild members, only the 2 first classes ), some npcs animate, but most don't.
It occurs because animation is incorporated in a base class "citizen" and only at its successors accordingly she will be. At present a plenty of classes in AI.obj are successors of a class defaul_npc, and it has no animation.
3 i have complaints that some npcs wich animate, do not accept quest items or don't give skills. dunno whats wrong. i will check myself later, but i can't find in ai code what's wrong.
It is quite possible, as from a base class "default_npc" it is removed handler TALKED. For fast correction 2 variants are possible: 1) To add this handler in default_npc as it was earlier; 2) In those npc which have problems to replace a parental class on citizen (here it is necessary to be very cautious)
4 maybe it would be better to provde ai in source ( nasc C syntax ) for many reasons : a.) anti-leech b.) safety c.) possible collaborative work d.) less bugs since more ppl will be able to check it.
Can be later... Having laid out a code there will be other questions such as " And at me it is not compiled.... At me a mistake... ". As at rewriting a code I use Items, skills, NPC's name from the server (I try to give them names as in the client) and they in do not converge with PP-release many. About command development I not against, but yet do not see it...

Mirror
13.05.2006, 18:41
thanks for answer, i will try those. some more questions :

1. if we put function for animation in default_npc won't that make all of them animate ? will this cause any problems such as lag ? worse performance ? security issues ?

2. the animation the npcs can do is only one ? or function has parameter ? if it takes as parameter the action, can we do it so it animates a random action each time ?

Larson
14.05.2006, 09:17
1. if we put function for animation in default_npc won't that make all of them animate ? will this cause any problems such as lag ? worse performance ? security issues ?
Each class should be considered separately. Otherwise all the same are possible lags... It is necessary to try...
2. the animation the npcs can do is only one ? or function has parameter ? if it takes as parameter the action, can we do it so it animates a random action each time ?
You inattentively looked mine post :) All my classes have 2 kinds of animation :) 1) arises at dialogue with players 2) through the certain time intervals, type the extension of the become numb muscles, knee-bend, examining of manicure and etc... I yet have not found other kinds of animation for npc...

Mirror
15.05.2006, 13:48
i have for example class teleporter : default_npc. if i make it teleporter : citizen will it cause any other problems..? such as "2) In those npc which have problems to replace a parental class on citizen (here it is necessary to be very cautious)" this one ? is this the same case you refer to ?

Larson
15.05.2006, 14:28
Anything terrible for this case will not take place. Animation will be lost only at conversation with players as the class teleporter blocks hadler TALKED a base class. However animation of "inaction" will be kept...