olympiad_operator

guarnieri2008

Интересующийся
Пользователь
Сообщения
29
Розыгрыши
0
Репутация
0
Реакции
2
Баллы
385
olympiada npc code, I would like to remove the restriction when registering only with the base class, I would like to allow participation with the subclass, and if possible without being nobles

Код:
class 1 olympiad_operator_basic : citizen
handler 3 66    //  TALKED
    variable_begin
        "talker"
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end

    push_event    //  talker
    push_const 40
    add
    fetch_i    //  karma
    push_const 468
    add
    fetch_i4
    push_const 0
    greater
    branch_false L2
L1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S0.    "wyac.htm"
    push_string S0
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    exit_handler
L2
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  nobless_type
    push_const 156
    add
    fetch_i4
    push_const 1
    equal
    branch_false L4
L3
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S1.    "olympiad_operator001.htm"
    push_string S1
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L5
L4
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S2.    "olympiad_operator002.htm"
    push_string S2
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L5
handler_end

handler 32 1676    //  MENU_SELECTED
    variable_begin
        "talker"
        "ask"
        "reply"
        "fhtml0"
        "i0"
        "s0"
        "s1"
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end

    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 50
    negate
    equal
    branch_false L7
L6
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  nobless_type
    push_const 156
    add
    fetch_i4
    push_const 1
    equal
    branch_false L9
L8
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S3.    "olympiad_operator001.htm"
    push_string S3
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L10
L9
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S4.    "olympiad_operator002.htm"
    push_string S4
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L10
    jump L11
L7
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 51
    negate
    equal
    branch_false L13
L12
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S5.    "olympiad_operator010.htm"
    push_string S5
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L14
L13
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 52
    negate
    equal
    branch_false L16
L15
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_reg_sp
    fetch_i
    push_const 0
    equal
    branch_false L19
L18
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S6.    "olympiad_operator001.htm"
    push_string S6
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L17
    jump L20
L19
    push_reg_sp
    fetch_i
    push_const 1
    equal
    branch_false L21
L20
    push_event    //  gg
    push_const 632
    add
    fetch_i
    push_const 0
    push_const 3
    func_call 218234890    //  func[GetDateTime]
    shift_sp -2
    push_const 23
    greater_equal
    push_reg_sp
    fetch_i
    branch_false L24
    push_event    //  gg
    push_const 632
    add
    fetch_i
    push_const 0
    push_const 4
    func_call 218234890    //  func[GetDateTime]
    shift_sp -2
    push_const 50
    greater_equal
    and
L24
    branch_false L23
L22
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S7.    "olympiad_operator010k.htm"
    push_string S7
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L25
L23
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S8.    "olympiad_operator010a.htm"
    push_string S8
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L25
    jump L17
    jump L26
L21
    push_reg_sp
    fetch_i
    push_const 2
    equal
    branch_false L27
L26
    push_event    //  gg
    push_const 632
    add
    fetch_i
    push_const 0
    push_const 3
    func_call 218234890    //  func[GetDateTime]
    shift_sp -2
    push_const 23
    greater_equal
    push_reg_sp
    fetch_i
    branch_false L30
    push_event    //  gg
    push_const 632
    add
    fetch_i
    push_const 0
    push_const 4
    func_call 218234890    //  func[GetDateTime]
    shift_sp -2
    push_const 50
    greater_equal
    and
L30
    branch_false L29
L28
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S9.    "olympiad_operator010k.htm"
    push_string S9
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L31
L29
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S10.    "olympiad_operator010b.htm"
    push_string S10
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L31
    jump L17
    jump L32
L27
    push_reg_sp
    fetch_i
    push_const 3
    equal
    branch_false L33
L32
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S11.    "olympiad_operator010f.htm"
    push_string S11
    func_call 184680582    //  func[FHTML_SetFileName]
    shift_sp -2
    shift_sp -1
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_event    //  myself
    push_const 704
    add
    fetch_i
    func_call 184549768    //  func[GetOlympiadWaitingCount]
    assign4
    shift_sp -1
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    push_const 100
    less
    branch_false L35
L34
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S12.    "WaitingCount"
    push_string S12
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 1000504
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184615004    //  func[IntToStr]
    shift_sp -1
S13.    ""
    push_string S13
S14.    ""
    push_string S14
S15.    ""
    push_string S15
S16.    ""
    push_string S16
    func_call 184942731    //  func[MakeFString]
    shift_sp -6
    func_call 184746121    //  func[FHTML_SetStr]
    shift_sp -3
    shift_sp -1
    jump L36
L35
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S17.    "WaitingCount"
    push_string S17
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 1000505
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184615004    //  func[IntToStr]
    shift_sp -1
S18.    ""
    push_string S18
S19.    ""
    push_string S19
S20.    ""
    push_string S20
S21.    ""
    push_string S21
    func_call 184942731    //  func[MakeFString]
    shift_sp -6
    func_call 184746121    //  func[FHTML_SetStr]
    shift_sp -3
    shift_sp -1
L36
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_event    //  myself
    push_const 704
    add
    fetch_i
    func_call 184549769    //  func[GetClassFreeOlympiadWaitingCount]
    assign4
    shift_sp -1
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    push_const 100
    less
    branch_false L38
L37
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S22.    "ClassFreeWaitingCount"
    push_string S22
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 1000504
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184615004    //  func[IntToStr]
    shift_sp -1
S23.    ""
    push_string S23
S24.    ""
    push_string S24
S25.    ""
    push_string S25
S26.    ""
    push_string S26
    func_call 184942731    //  func[MakeFString]
    shift_sp -6
    func_call 184746121    //  func[FHTML_SetStr]
    shift_sp -3
    shift_sp -1
    jump L39
L38
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S27.    "ClassFreeWaitingCount"
    push_string S27
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 1000505
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184615004    //  func[IntToStr]
    shift_sp -1
S28.    ""
    push_string S28
S29.    ""
    push_string S29
S30.    ""
    push_string S30
S31.    ""
    push_string S31
    func_call 184942731    //  func[MakeFString]
    shift_sp -6
    func_call 184746121    //  func[FHTML_SetStr]
    shift_sp -3
    shift_sp -1
L39
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
    func_call 184680586    //  func[ShowFHTML]
    shift_sp -2
    shift_sp -1
    jump L17
    jump L40
L33
    push_reg_sp
    fetch_i
    push_const 4
    equal
    branch_false L41
L40
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S32.    "olympiad_operator010g.htm"
    push_string S32
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L17
    jump L42
L41
    push_reg_sp
    fetch_i
    push_const 5
    equal
    branch_false L43
L42
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S33.    "olympiad_operator010h.htm"
    push_string S33
    func_call 184680582    //  func[FHTML_SetFileName]
    shift_sp -2
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S34.    "WaitingCount"
    push_string S34
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615301    //  func[GetOlympiadPoint]
    shift_sp -1
    func_call 184746119    //  func[FHTML_SetInt]
    shift_sp -3
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
    func_call 184680586    //  func[ShowFHTML]
    shift_sp -2
    shift_sp -1
    jump L44
L43
L44
L17
    shift_sp -1
    jump L45
L16
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 53
    negate
    equal
    branch_false L47
L46
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 0
    equal
    branch_false L49
L48
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S35.    "olympiad_operator001.htm"
    push_string S35
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L50
L49
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 1
    equal
    branch_false L52
L51
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615302    //  func[IsMainClass]
    shift_sp -1
    push_const 1
    equal
    branch_false L54
L53
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 8
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  occupation
    push_const 192
    add
    fetch_i4
    func_call 184680656    //  func[IsInCategory]
    shift_sp -2
    branch_false L56
L55
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615301    //  func[GetOlympiadPoint]
    shift_sp -1
    push_const 0
    greater
    branch_false L58
L57
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615303    //  func[AddClassFreeOlympiad]
    shift_sp -1
    shift_sp -1
    jump L59
L58
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S36.    "olympiad_operator010i.htm"
    push_string S36
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L59
    jump L60
L56
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S37.    "olympiad_operator010j.htm"
    push_string S37
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L60
    jump L61
L54
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S38.    "olympiad_operator010c.htm"
    push_string S38
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L61
L52
L50
    jump L62
L47
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 54
    negate
    equal
    branch_false L64
L63
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 0
    equal
    branch_false L66
L65
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S39.    "olympiad_operator001.htm"
    push_string S39
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L67
L66
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 1
    equal
    branch_false L69
L68
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615302    //  func[IsMainClass]
    shift_sp -1
    push_const 1
    equal
    branch_false L71
L70
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 8
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  occupation
    push_const 192
    add
    fetch_i4
    func_call 184680656    //  func[IsInCategory]
    shift_sp -2
    branch_false L73
L72
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615301    //  func[GetOlympiadPoint]
    shift_sp -1
    push_const 0
    greater
    branch_false L75
L74
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615300    //  func[AddOlympiad]
    shift_sp -1
    shift_sp -1
    jump L76
L75
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S40.    "olympiad_operator010i.htm"
    push_string S40
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L76
    jump L77
L73
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S41.    "olympiad_operator010j.htm"
    push_string S41
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L77
    jump L78
L71
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S42.    "olympiad_operator010c.htm"
    push_string S42
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L78
L69
L67
    jump L79
L64
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 55
    negate
    equal
    branch_false L81
L80
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S43.    "olympiad_operator030.htm"
    push_string S43
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L82
L81
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 56
    negate
    equal
    branch_false L84
L83
    jump L85
L84
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 57
    negate
    equal
    branch_false L87
L86
    jump L88
L87
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 58
    negate
    equal
    branch_false L90
L89
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615306    //  func[RemoveOlympiad]
    shift_sp -1
    shift_sp -1
    jump L91
L90
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 59
    negate
    equal
    branch_false L93
L92
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S44.    "olympiad_operator020.htm"
    push_string S44
    func_call 184680582    //  func[FHTML_SetFileName]
    shift_sp -2
    shift_sp -1
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_const 1
    assign4
    shift_sp -1
L94
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    push_const 22
    less_equal
    branch_false L97
    jump L96
L95
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    push_const 1
    add
    assign4
    shift_sp -1
    jump L94
L96
    push_event    //  s0
    push_const 504
    add
    push_reg_sp
    fetch_i
S45.    ""
    push_string S45
    assign
    shift_sp -1
    push_event    //  s1
    push_const 512
    add
    push_reg_sp
    fetch_i
S46.    ""
    push_string S46
    assign
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S47.    "FI"
    push_string S47
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    add_string 1025
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184746119    //  func[FHTML_SetInt]
    shift_sp -3
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184615311    //  func[GetStatusForOlympiadField]
    shift_sp -1
    push_const 0
    equal
    branch_false L99
L98
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S48.    "Status"
    push_string S48
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    add_string 1025
S49.    "&$906;"
    push_string S49
    func_call 184746121    //  func[FHTML_SetStr]
    shift_sp -3
    shift_sp -1
    jump L100
L99
    push_event    //  s0
    push_const 504
    add
    push_reg_sp
    fetch_i
S50.    "&$829;"
    push_string S50
S51.    "   "
    push_string S51
    add_string 1028
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184615312    //  func[GetPlayer1ForOlympiadField]
    shift_sp -1
    add_string 1028
S52.    "  :  "
    push_string S52
    add_string 1028
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184615313    //  func[GetPlayer2ForOlympiadField]
    shift_sp -1
    add_string 1028
    assign
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S53.    "Status"
    push_string S53
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    add_string 1025
    push_event    //  s0
    push_const 504
    add
    fetch_i
    func_call 184746121    //  func[FHTML_SetStr]
    shift_sp -3
    shift_sp -1
L100
    jump L95
L97
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
    func_call 184680586    //  func[ShowFHTML]
    shift_sp -2
    shift_sp -1
    jump L101
L93
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 60
    negate
    equal
    branch_false L103
L102
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 0
    equal
    branch_false L105
L104
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  nobless_type
    push_const 156
    add
    fetch_i4
    push_const 1
    equal
    branch_false L107
L106
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S54.    "olympiad_operator001.htm"
    push_string S54
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L108
L107
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S55.    "olympiad_operator002.htm"
    push_string S55
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L108
L105
    jump L109
L103
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 61
    negate
    equal
    branch_false L111
L110
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S56.    "olympiad_operator020.htm"
    push_string S56
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L112
L111
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 70
    negate
    equal
    branch_false L114
L113
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 0
    equal
    branch_false L116
L115
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S57.    "olympiad_operator001.htm"
    push_string S57
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L117
L116
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 1
    equal
    branch_false L119
L118
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615317    //  func[GetPreviousOlympiadPoint]
    shift_sp -1
    push_const 0
    equal
    branch_false L121
L120
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S58.    "olympiad_operator031a.htm"
    push_string S58
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L122
L121
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615317    //  func[GetPreviousOlympiadPoint]
    shift_sp -1
    push_const 50
    less
    branch_false L124
L123
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  hero_type
    push_const 160
    add
    fetch_i4
    push_const 1
    equal
    push_reg_sp
    fetch_i
    branch_true L127
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  hero_type
    push_const 160
    add
    fetch_i4
    push_const 2
    equal
    or
L127
    branch_false L126
L125
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S59.    "olympiad_operator031.htm"
    push_string S59
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L128
L126
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S60.    "olympiad_operator031a.htm"
    push_string S60
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L128
    jump L129
L124
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S61.    "olympiad_operator031.htm"
    push_string S61
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L129
L122
    jump L130
L119
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 513
    equal
    branch_false L132
L131
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184680529    //  func[ShowMultisell]
    shift_sp -2
    shift_sp -1
L132
L130
L117
    jump L133
L114
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 71
    negate
    equal
    branch_false L135
L134
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 0
    equal
    branch_false L137
L136
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
S62.    "olympiad_operator030.htm"
    push_string S62
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
    jump L138
L137
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 1
    equal
    branch_false L140
L139
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    func_call 184615317    //  func[GetPreviousOlympiadPoint]
    shift_sp -1
    func_call 184680854    //  func[DeletePreviousOlympiadPoint]
    shift_sp -2
    shift_sp -1
L140
L138
    jump L141
L135
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 80
    negate
    equal
    branch_false L143
L142
    jump L144
L143
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 110
    negate
    equal
    branch_false L146
L145
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S63.    "olympiad_operator_rank_class.htm"
    push_string S63
    func_call 184680582    //  func[FHTML_SetFileName]
    shift_sp -2
    shift_sp -1
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_const 1
    assign4
    shift_sp -1
L147
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    push_const 15
    less_equal
    branch_false L150
    jump L149
L148
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    push_const 1
    add
    assign4
    shift_sp -1
    jump L147
L149
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184680844    //  func[GetRankByOlympiadRankOrder]
    shift_sp -2
    push_const 0
    equal
    branch_false L152
L151
    jump L150
L152
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S64.    "Rank"
    push_string S64
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    add_string 1025
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184680844    //  func[GetRankByOlympiadRankOrder]
    shift_sp -2
    func_call 184746119    //  func[FHTML_SetInt]
    shift_sp -3
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
S65.    "Name"
    push_string S65
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    add_string 1025
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184680845    //  func[GetNameByOlympiadRankOrder]
    shift_sp -2
    func_call 184746121    //  func[FHTML_SetStr]
    shift_sp -3
    shift_sp -1
    jump L148
L150
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_event    //  fhtml0
    push_const 520
    add
    fetch_i
    func_call 184680586    //  func[ShowFHTML]
    shift_sp -2
    shift_sp -1
    jump L153
L146
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 130
    negate
    equal
    branch_false L155
L154
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    func_call 184680850    //  func[ObserveOlympiad]
    shift_sp -2
    shift_sp -1
L155
L153
L144
L141
L133
L112
L109
L101
L91
L88
L85
L82
L79
L62
L45
L14
L11
handler_end

handler 96 167    //  DELETE_PREVIOUS_OLYMPIAD_POINT_RETURNED
    variable_begin
        "talker"
        "ask"
        "reply"
        "i0"
        "i1"
        "myself"
        "_choiceN"
        "_code"
        "_from_choice"
    variable_end

    push_event    //  i1
    push_const 264
    add
    push_reg_sp
    fetch_i
    push_const 0
    assign4
    shift_sp -1
    push_event    //  reply
    push_const 164
    add
    fetch_i4
    push_const 0
    not_equal
    branch_false L157
L156
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  hero_type
    push_const 160
    add
    fetch_i4
    push_const 1
    equal
    push_reg_sp
    fetch_i
    branch_true L160
    push_event    //  talker
    push_const 40
    add
    fetch_i    //  hero_type
    push_const 160
    add
    fetch_i4
    push_const 2
    equal
    or
L160
    branch_false L159
L158
    push_event    //  i1
    push_const 264
    add
    push_reg_sp
    fetch_i
    push_const 300
    assign4
    shift_sp -1
L159
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 1000
    greater
    branch_false L162
L161
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_const 1000
    push_event    //  i1
    push_const 264
    add
    fetch_i4
    add
    push_const 1000
    mul
    assign4
    shift_sp -1
    jump L163
L162
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_const 50
    less
    branch_false L165
L164
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_event    //  i1
    push_const 264
    add
    fetch_i4
    push_const 1000
    mul
    assign4
    shift_sp -1
    jump L166
L165
    push_event    //  i0
    push_const 260
    add
    push_reg_sp
    fetch_i
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_event    //  i1
    push_const 264
    add
    fetch_i4
    add
    push_const 1000
    mul
    assign4
    shift_sp -1
L166
L163
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_const 1
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_event    //  ask
    push_const 160
    add
    fetch_i4
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184811900    //  func[AddLogEx]
    shift_sp -4
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_const 6651
    push_event    //  i0
    push_const 260
    add
    fetch_i4
    func_call 184746111    //  func[GiveItem1]
    shift_sp -3
    shift_sp -1
    push_event    //  myself
    push_const 704
    add
    fetch_i
    push_event    //  talker
    push_const 40
    add
    fetch_i
    push_parameter S949
    func_call 184680516    //  func[ShowPage]
    shift_sp -2
    shift_sp -1
L157
handler_end

class_end
[CÓDIGO][/CÓDIGO]

Код:
class 1 olympiad_operator_basic : citizen
{
handler:
  EventHandler TALKED( talker )
  {
    if( talker.karma > 0 )
    {
      myself::ShowPage( talker, "wyac.htm" );
      return;
    }
    if( talker.nobless_type == @NOBLESS_ACTIVE )
    {
      myself::ShowPage( talker, "olympiad_operator001.htm" );
    }
    else
    {
      myself::ShowPage( talker, "olympiad_operator002.htm" );
    }
  }

  EventHandler MENU_SELECTED( talker, ask, reply, fhtml0, i0, s0, s1 )
  {
    if( ask == -50 )
    {
      if( talker.nobless_type == @NOBLESS_ACTIVE )
      {
        myself::ShowPage( talker, "olympiad_operator001.htm" );
      }
      else
      {
        myself::ShowPage( talker, "olympiad_operator002.htm" );
      }
    }
    else if( ask == -51 )
    {
      myself::ShowPage( talker, "olympiad_operator010.htm" );
    }
    else if( ask == -52 )
    {
      switch( reply )
      {
        case 0:
        {
          myself::ShowPage( talker, "olympiad_operator001.htm" );
          break;
        }
        case 1:
        {
          if( gg::GetDateTime( 0, @DTF_HOUR ) >= 23 &&
              gg::GetDateTime( 0, @DTF_MIN ) >= 50 )
          {
            myself::ShowPage( talker, "olympiad_operator010k.htm" );
          }
          else
          {
            myself::ShowPage( talker, "olympiad_operator010a.htm" );
          }
          break;
        }
        case 2:
        {
          if( gg::GetDateTime( 0, @DTF_HOUR ) >= 23 &&
              gg::GetDateTime( 0, @DTF_MIN ) >= 50 )
          {
            myself::ShowPage( talker, "olympiad_operator010k.htm" );
          }
          else
          {
            myself::ShowPage( talker, "olympiad_operator010b.htm" );
          }
          break;
        }
        case 3:
        {
          myself::FHTML_SetFileName( fhtml0, "olympiad_operator010f.htm" );
          i0 = myself::GetOlympiadWaitingCount();
          if( i0 < 100 )
          {
            myself::FHTML_SetStr( fhtml0, "WaitingCount",
                                  myself::MakeFString( 1000504, myself::IntToStr( i0 ), "",
                                                       "", "", "" ) );
          }
          else
          {
            myself::FHTML_SetStr( fhtml0, "WaitingCount",
                                  myself::MakeFString( 1000505, myself::IntToStr( i0 ), "",
                                                       "", "", "" ) );
          }
          i0 = myself::GetClassFreeOlympiadWaitingCount();
          if( i0 < 100 )
          {
            myself::FHTML_SetStr( fhtml0, "ClassFreeWaitingCount",
                                  myself::MakeFString( 1000504, myself::IntToStr( i0 ), "",
                                                       "", "", "" ) );
          }
          else
          {
            myself::FHTML_SetStr( fhtml0, "ClassFreeWaitingCount",
                                  myself::MakeFString( 1000505, myself::IntToStr( i0 ), "",
                                                       "", "", "" ) );
          }
          myself::ShowFHTML( talker, fhtml0 );
          break;
        }
        case 4:
        {
          myself::ShowPage( talker, "olympiad_operator010g.htm" );
          break;
        }
        case 5:
        {
          myself::FHTML_SetFileName( fhtml0, "olympiad_operator010h.htm" );
          myself::FHTML_SetInt( fhtml0, "WaitingCount",
                                myself::GetOlympiadPoint( talker ) );
          myself::ShowFHTML( talker, fhtml0 );
        }
      }
    }
    else if( ask == -53 )
    {
      if( reply == 0 )
      {
        myself::ShowPage( talker, "olympiad_operator001.htm" );
      }
      else if( reply == 1 )
      {
        if( myself::IsMainClass( talker ) == 1 )
        {
          if( myself::IsInCategory( @fourth_class_group, talker.occupation ) )
          {
            if( myself::GetOlympiadPoint( talker ) > 0 )
            {
              myself::AddClassFreeOlympiad( talker );
            }
            else
            {
              myself::ShowPage( talker, "olympiad_operator010i.htm" );
            }
          }
          else
          {
            myself::ShowPage( talker, "olympiad_operator010j.htm" );
          }
        }
        else
        {
          myself::ShowPage( talker, "olympiad_operator010c.htm" );
        }
      }
    }
    else if( ask == -54 )
    {
      if( reply == 0 )
      {
        myself::ShowPage( talker, "olympiad_operator001.htm" );
      }
      else if( reply == 1 )
      {
        if( myself::IsMainClass( talker ) == 1 )
        {
          if( myself::IsInCategory( @fourth_class_group, talker.occupation ) )
          {
            if( myself::GetOlympiadPoint( talker ) > 0 )
            {
              myself::AddOlympiad( talker );
            }
            else
            {
              myself::ShowPage( talker, "olympiad_operator010i.htm" );
            }
          }
          else
          {
            myself::ShowPage( talker, "olympiad_operator010j.htm" );
          }
        }
        else
        {
          myself::ShowPage( talker, "olympiad_operator010c.htm" );
        }
      }
    }
    else if( ask == -55 )
    {
      myself::ShowPage( talker, "olympiad_operator030.htm" );
    }
    else if( ask == -56 )
    {
    }
    else if( ask == -57 )
    {
    }
    else if( ask == -58 )
    {
      myself::RemoveOlympiad( talker );
    }
    else if( ask == -59 )
    {
      myself::FHTML_SetFileName( fhtml0, "olympiad_operator020.htm" );
      for( i0 = 1; i0 <= 22; i0 = i0 + 1 )
      {
        s0 = "";
        s1 = "";
        myself::FHTML_SetInt( fhtml0, "FI" + i0, i0 );
        if( myself::GetStatusForOlympiadField( i0 ) == 0 )
        {
          myself::FHTML_SetStr( fhtml0, "Status" + i0, "&$906;" );
        }
        else
        {
          s0 = "&$829;" + "&nbsp;&nbsp;&nbsp;" + myself::GetPlayer1ForOlympiadField( i0 ) + "&nbsp; : &nbsp;" + myself::GetPlayer2ForOlympiadField( i0 );
          myself::FHTML_SetStr( fhtml0, "Status" + i0, s0 );
        }
      }
      myself::ShowFHTML( talker, fhtml0 );
    }
    else if( ask == -60 )
    {
      if( reply == 0 )
      {
        if( talker.nobless_type == @NOBLESS_ACTIVE )
        {
          myself::ShowPage( talker, "olympiad_operator001.htm" );
        }
        else
        {
          myself::ShowPage( talker, "olympiad_operator002.htm" );
        }
      }
    }
    else if( ask == -61 )
    {
      myself::ShowPage( talker, "olympiad_operator020.htm" );
    }
    else if( ask == -70 )
    {
      if( reply == 0 )
      {
        myself::ShowPage( talker, "olympiad_operator001.htm" );
      }
      else if( reply == 1 )
      {
        if( myself::GetPreviousOlympiadPoint( talker ) == 0 )
        {
          myself::ShowPage( talker, "olympiad_operator031a.htm" );
        }
        else if( myself::GetPreviousOlympiadPoint( talker ) < 50 )
        {
          if( talker.hero_type == @HERO_WAITING ||
              talker.hero_type == @HERO_ACTIVE )
          {
            myself::ShowPage( talker, "olympiad_operator031.htm" );
          }
          else
          {
            myself::ShowPage( talker, "olympiad_operator031a.htm" );
          }
        }
        else
        {
          myself::ShowPage( talker, "olympiad_operator031.htm" );
        }
      }
      else if( reply == 513 )
      {
        myself::ShowMultisell( reply, talker );
      }
    }
    else if( ask == -71 )
    {
      if( reply == 0 )
      {
        myself::ShowPage( talker, "olympiad_operator030.htm" );
      }
      else if( reply == 1 )
      {
        myself::DeletePreviousOlympiadPoint( talker,
                                             myself::GetPreviousOlympiadPoint( talker ) );
      }
    }
    else if( ask == -80 )
    {
    }
    else if( ask == -110 )
    {
      myself::FHTML_SetFileName( fhtml0, "olympiad_operator_rank_class.htm" );
      for( i0 = 1; i0 <= 15; i0 = i0 + 1 )
      {
        if( myself::GetRankByOlympiadRankOrder( reply, i0 ) == 0 )
        {
          break;
        }
        myself::FHTML_SetInt( fhtml0, "Rank" + i0,
                              myself::GetRankByOlympiadRankOrder( reply, i0 ) );
        myself::FHTML_SetStr( fhtml0, "Name" + i0,
                              myself::GetNameByOlympiadRankOrder( reply, i0 ) );
      }
      myself::ShowFHTML( talker, fhtml0 );
    }
    else if( ask == -130 )
    {
      myself::ObserveOlympiad( talker, reply );
    }
  }

  EventHandler DELETE_PREVIOUS_OLYMPIAD_POINT_RETURNED( talker, ask, reply, i0, i1 )
  {
    i1 = 0;
    if( reply != 0 )
    {
      if( talker.hero_type == @HERO_WAITING ||
          talker.hero_type == @HERO_ACTIVE )
      {
        i1 = 300;
      }
      if( ask > 1000 )
      {
        i0 = ( 1000 + i1 ) * 1000;
      }
      else if( ask < 50 )
      {
        i0 = i1 * 1000;
      }
      else
      {
        i0 = ( ask + i1 ) * 1000;
      }
      myself::AddLogEx( 1, talker, ask, i0 );
      myself::GiveItem1( talker, @nobless_gate_pass, i0 );
      myself::ShowPage( talker, S949 );
    }
  }
}
 

Код:
if( myself::IsMainClass( talker ) == 1 )
Код:
if( talker.nobless_type == @NOBLESS_ACTIVE )
 
Is there also a retail server check for main class when PC is transferred to stadium? What prevents the player from registering with main class and then change to a sub while waiting?
 
maybe checked registered class?
 
Назад
Сверху Снизу