Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [Share] My version or preacher of doom (https://postpacific.loc-online.com/showthread.php?t=5250)

Eanae 23.07.2006 15:35

[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.

metroland 23.07.2006 16:18

priest of dawn dusk give Record of the seven sings and Contributing seal stones. :)

Code:

class priest_of_dawndusk : citizen
handler 32        //  MENU_SELECTED
        variable_begin
                "ask"
                "i0"
                "i1"
                "i2"
                "i3"
                "reply"
                "talker"
                "myself"
                "_choiceN"
                "_code"
                "_from_choice"
        variable_end

        push_event        //  ask
        push_const 100
        add
        fetch_i
        push_const 1
        equal
        push_reg_sp
        fetch_i
        branch_false L80920
        push_event        //  reply
        push_const 104
        add
        fetch_i
        push_const 2
        equal
        and
L80920
        branch_false L80922
L80921
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 5707
        func_call 81        //  func[OwnItemCount]
        shift_sp -2
        push_const 0
        equal
        push_reg_sp
        fetch_i
        branch_false L80923
        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 500
        greater
        and
L80923
        branch_false L80925
L80924
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 5707
        push_const 1
        func_call 77        //  func[GiveItem1]
        shift_sp -3
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 57
        push_const 500
        func_call 80        //  func[DeleteItem1]
        shift_sp -3
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S80927.        "dawn_priest_giverec.htm"
        push_string S80927
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        jump L80926
L80925
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S80928.        "dawn_priest_noadena.htm"
        push_string S80928
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
L80926
L80922
        push_event        //  ask
        push_const 100
        add
        fetch_i
        push_const 1
        equal
        push_reg_sp
        fetch_i
        branch_false L80500
        push_event        //  reply
        push_const 104
        add
        fetch_i
        push_const 1
        equal
        and
L80500
        branch_false L80502
L80501
        push_event        //  i1
        push_const 196
        add
        push_reg_sp
        fetch_i
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 6360
        func_call 81        //  func[OwnItemCount]
        shift_sp -2
        assign
        shift_sp -1
        push_event        //  i2
        push_const 200
        add
        push_reg_sp
        fetch_i
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 6361
        func_call 81        //  func[OwnItemCount]
        shift_sp -2
        assign
        shift_sp -1
        push_event        //  i3
        push_const 204
        add
        push_reg_sp
        fetch_i
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 6362
        func_call 81        //  func[OwnItemCount]
        shift_sp -2
        assign
        shift_sp -1
        push_event        //  i0
        push_const 192
        add
        push_reg_sp
        fetch_i
        push_event        //  i1
        push_const 196
        add
        fetch_i
        push_const 3
        mul
        push_event        //  i2
        push_const 200
        add
        fetch_i
        push_const 5
        mul
        add
        push_event        //  i3
        push_const 204
        add
        fetch_i
        push_const 10
        mul
        add
        assign
        shift_sp -1
        push_event        //  i0
        push_const 192
        add
        fetch_i
        push_const 0
        equal
        branch_false L80505
L80503
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S80504.        "dawn_priest_ssnone.htm"
        push_string S80504
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
        jump L80506
L80505
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 5575
        push_event        //  i0
        push_const 192
        add
        fetch_i
        func_call 77        //  func[GiveItem1]
        shift_sp -3
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 6360
        push_event        //  i1
        push_const 196
        add
        fetch_i
        func_call 80        //  func[DeleteItem1]
        shift_sp -3
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 6361
        push_event        //  i2
        push_const 200
        add
        fetch_i
        func_call 80        //  func[DeleteItem1]
        shift_sp -3
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
        push_const 6362
        push_event        //  i3
        push_const 204
        add
        fetch_i
        func_call 80        //  func[DeleteItem1]
        shift_sp -3
        shift_sp -1
        shift_sp 1
        push_event        //  talker
        push_const 32
        add
        fetch_i
S80507.        "dawn_priest_ssthx.htm"
        push_string S80507
        func_call 43        //  func[ShowPage]
        shift_sp -2
        shift_sp -1
L80506
L80502
handler_end

class_end

Code:

<html>
<body>
Dusk Priestess:

 
Until the day of revolution! The Seal of Death has awoken! We, the Revolutionaries of Dusk, will use our awesome power to destroy the old system and create a world where all are equal! <font color="FF0000">[ The competition is underway. New participants in the Seven Signs may start immediately. ]</font>

 
<font color="LEVEL">[ Seven Signs Information ]</font>

 
<a action="link opisanie1.htm">What is the Seven Signs?</a>

 
<a action="bypass -h menu_select?ask=1&reply=2">Purchase Record of the Seven Signs.</a>

 
<font color="LEVEL">[ Participate in the Seven Signs ]</font>

 
<a action="link opisanie3.htm">How do I collect seal stones?</a>

 
<a action="bypass -h menu_select?ask=1&reply=1">Contributing seal stones.</a>

 
<a action="bypass -h multisell?id=40">Purchase Special Potions and Scrolls for Ancient Adena.</a>

 
<font color="LEVEL">[ Festival of Darkness ]</font>

 
<a action="link opisanie4.htm">What is the Festival of Darkness?</a>

 
I wish to participate in the Festival of Darkness.

 
<a action="link havescroll.htm">I want SP...(need SP scroll)</a>

 
</body>
</html>


wton 23.07.2006 22:08

testiando ^^...


All times are GMT. The time now is 15:26.