Рейд Босс Анакакель

Stellar.

Интересующийся
Участник
Сообщения
30
Розыгрыши
0
Репутация
0
Реакции
6
Баллы
345
Здравствуйте!
Прошу помочь разобраться с кодом. Чтобы попасть на РБ Анаказель в рифте, приходится ждать полные циклы в комнатах, по итого за 4 часа игроки не попадают на рб даже при соблюдении условий, что они только стоят и ждут. Пропускать без конца комнаты по кругу бесполезно. Не могу найти тригер, который отправляет пати в комнату к РБ. буду очень бладогарен любому содействую! Хорошего дня. Сам код:
C++:
class teleport_dungeon_manager_npc : citizen
{
parameter:
    string    fnHi = "tel_dungeon_npc_hi";
    string    fnNoMoreChance = "tel_dungeon_npc_nomorechance.htm";
    string    fnYouAreNotLeader = "tel_dungeon_npc_notleader.htm";
    string    LevelName = "TeleportDungeon1";
    int    RoomIndex = 0;
    int    LevelNumber = 1;
    int    escape_x = 1;
    int    escape_y = 1;
    int    escape_z = 1;
    int    PosX0 = 1;
    int    PosY0 = 1;
    int    PosX1 = 1;
    int    PosY1 = 1;
    int    PosX2 = 1;
    int    PosY2 = 1;
    int    PosX3 = 1;
    int    PosY3 = 1;
    int    PosX4 = 1;
    int    PosY4 = 1;
    int    PosX5 = 1;
    int    PosY5 = 1;
    int    PosX6 = 1;
    int    PosY6 = 1;
    int    PosX7 = 1;
    int    PosY7 = 1;
    int    PosX8 = 1;
    int    PosY8 = 1;

handler:
    EventHandler CREATED( rlist0 )
    {
        myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
        myself.AddTimerEx( 2001, 1000 );
        myself.i_ai1 = 3;
        myself.i_ai2 = 0;
        super;
    }

    EventHandler TALKED( talker, s0 )
    {
        s0 = fnHi + RoomIndex + ".htm";
        myself.ShowPage( talker, s0 );
    }

    EventHandler MENU_SELECTED( talker, ask, reply, room0, room1, i0, i1, i2, party0, rlist0, maker0, c0 )
    {
        if ( ask == -1000 ) {
            maker0 = myself.GetMyMaker( );
            rlist0 = GetRoomInfoList( LevelName );
            room0 = rlist0.GetRoomInfo( RoomIndex );
            if ( reply == 1 ) {
                party0 = GetPartyFromID( room0.party_id );
                c0 = myself.GetLeaderOfParty( party0 );
                if ( talker == c0 ) {
                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                    for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                        c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                        if ( HaveMemo( c0, 635 ) ) {
                            myself.SetMemoStateEx( c0, 635, 1, -1 );
                        }
                    }
                    room0.status.Exchange( 0 );
                    room0.Clear( );
                    AddLog( 8, c0, 1 );
                } else {
                    myself.ShowPage( talker, fnYouAreNotLeader );
                }
            } else {
                if ( reply == 2 ) {
                    if ( Party_GetLeader( talker ) == talker ) {
                        i0 = GetMemoStateEx( talker, 635, 1 );
                        if ( i0 == 1 ) {
                            myself.SetMemoStateEx( talker, 635, 1, 0 );
                            i0 = -1;
                            for ( i1 = 0; i1 < 8; ++i1 ) {
                                if ( i0 == -1 ) {
                                    i2 = Rand( 8 );
                                    room1 = rlist0.GetRoomInfo( i2 );
                                    if ( room1.status.value == 0 ) {
                                        room1.status.Exchange( 1 );
                                        i0 = i2;
                                    }
                                }
                            }
                            if ( i0 == -1 ) {
                                for ( i1 = 0; i1 < 8; ++i1 ) {
                                    if ( i0 == -1 ) {
                                        room1 = rlist0.GetRoomInfo( i1 );
                                        if ( room1.status.value == 0 ) {
                                            room1.status.Exchange( 1 );
                                            i0 = i1;
                                        }
                                    }
                                }
                            }
                            if ( i0 == -1 ) {
                            } else {
                                SendMakerScriptEvent( maker0, 0, 0, 0 );
                                room1.SetParty( room0.party_id );
                                select ( i0 ) {
                                    case 0: {
                                        myself.TeleportParty( room0.party_id, PosX0, PosY0, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 1: {
                                        myself.TeleportParty( room0.party_id, PosX1, PosY1, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 2: {
                                        myself.TeleportParty( room0.party_id, PosX2, PosY2, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 3: {
                                        myself.TeleportParty( room0.party_id, PosX3, PosY3, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 4: {
                                        myself.TeleportParty( room0.party_id, PosX4, PosY4, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 5: {
                                        myself.TeleportParty( room0.party_id, PosX5, PosY5, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 6: {
                                        myself.TeleportParty( room0.party_id, PosX6, PosY6, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 7: {
                                        myself.TeleportParty( room0.party_id, PosX7, PosY7, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                }
                                room0.status.Exchange( 0 );
                                room0.Clear( );
                                AddLogEx( 324, talker, RoomIndex, i0 );
                            }
                        } else {
                            myself.ShowPage( talker, fnNoMoreChance );
                        }
                    } else {
                        myself.ShowPage( talker, fnYouAreNotLeader );
                    }
                }
            }
        }
        super;
    }

    EventHandler TIMER_FIRED_EX( timer_id, rlist0, room0, room1, party0, i0, i1, i2, maker0, c0, i3 )
    {
        rlist0 = GetRoomInfoList( LevelName );
        if ( IsNull( rlist0 ) ) {
            myself.AddTimerEx( timer_id, 10000 );
            return;
        }
        room0 = rlist0.GetRoomInfo( RoomIndex );
        maker0 = myself.GetMyMaker( );
        if ( timer_id == 2001 ) {
            if ( IsNull( room0 ) ) {
            } else {
                if ( room0.status.value == 1 ) {
                    if ( ( GetTimeOfDay( ) - room0.time ) < 15 ) {
                        SendMakerScriptEvent( maker0, 1, 0, 0 );
                    } else {
                        if ( room0.PartyChanged( ) ) {
                            if ( ( GetTimeOfDay( ) - room0.time ) > 3 ) {
                                for ( i0 = 0; i0 < room0.member_count; i0 = ( i0 + 1 ) ) {
                                    c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                                    if ( HaveMemo( c0, 635 ) ) {
                                        myself.SetMemoStateEx( c0, 635, 1, -1 );
                                    }
                                }
                                myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                                SendMakerScriptEvent( maker0, 0, 0, 0 );
                                room0.status.Exchange( 0 );
                                c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                                AddLog( 8, c0, 2 );
                                room0.Clear( );
                            }
                        } else {
                            if ( myself.InMyTerritory( myself.GetLeaderOfParty( GetPartyFromID( room0.party_id ) ) ) == 0 ) {
                                if ( ( GetTimeOfDay( ) - room0.time ) > 3 ) {
                                    for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                                        c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                                        if ( HaveMemo( c0, 635 ) ) {
                                            myself.SetMemoStateEx( c0, 635, 1, -1 );
                                        }
                                    }
                                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                                    room0.status.Exchange( 0 );
                                    c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                                    AddLog( 8, c0, 2 );
                                    room0.Clear( );
                                }
                            } else {
                                if ( ( GetTimeOfDay( ) - room0.time ) > ( ( 60 * 8 ) + ( Rand( 5 ) * 30 ) ) ) {
                                    if ( myself.i_ai2 == 1 ) {
                                        if ( RoomIndex == 8 && myself.i_ai1 == 2 ) {
                                        } else {
                                            Announce( "Clearance of dimension: The test was ended." );
                                            room0.status.Exchange( 0 );
                                            SendMakerScriptEvent( maker0, 0, 0, 0 );
                                            myself.i_ai2 = 0;
                                        }
                                    } else {
                                        room1 = rlist0.GetRoomInfo( 8 );
                                        i0 = -1;
                                        for ( i1 = 0; i1 < room0.member_count; ++i1 ) {
                                            if ( i0 == -1 ) {
                                                c0 = GetCreatureFromID( room0.GetMemberID( i1 ) );
                                                if ( IsNull( c0 ) == 0 ) {
                                                    i0 = GetMemoStateEx( c0, 635, 0 );
                                                    break;
                                                }
                                            }
                                        }
                                        if ( RoomIndex == 8 && myself.i_ai1 == 2 ) {
                                        } else {
                                            if ( ( i0 + ( 60 * 40 ) ) < GetTimeOfDay( ) ) {
                                                for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                                                    c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                                                    if ( HaveMemo( c0, 635 ) ) {
                                                        myself.SetMemoStateEx( c0, 635, 1, -1 );
                                                    }
                                                }
                                                myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                                                SendMakerScriptEvent( maker0, 0, 0, 0 );
                                                room0.status.Exchange( 0 );
                                                c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                                                AddLog( 8, c0, 0 );
                                                room0.Clear( );
                                            } else {
                                                myself.AddTimerEx( 2002, 5000 );
                                                myself.EarthQuakeToParty( room0.party_id, 20, 10, 1 );
                                            }
                                        }
                                    }
                                } else {
                                    if ( RoomIndex == 8 && myself.i_ai1 == 3 ) {
                                        myself.AddTimerEx( 2002, 5000 );
                                        myself.EarthQuakeToParty( room0.party_id, 10, 10, 1 );
                                    }
                                }
                            }
                        }
                    }
                } else {
                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                }
            }
            myself.AddTimerEx( 2001, 10000 );
        } else {
            if ( timer_id == 2002 ) {
                if ( room0.PartyChanged( ) ) {
                    for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                        c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                        if ( HaveMemo( c0, 635 ) ) {
                            myself.SetMemoStateEx( c0, 635, 1, -1 );
                        }
                    }
                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                    room0.status.Exchange( 0 );
                    room0.Clear( );
                } else {
                    party0 = GetPartyFromID( room0.party_id );
                    c0 = myself.GetLeaderOfParty( party0 );
                    i3 = 0;
                    if ( ( c0.alive == 0 ) || ( myself.InMyTerritory( c0 ) == 0 ) ) {
                        for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                            c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                            if ( HaveMemo( c0, 635 ) ) {
                                myself.SetMemoStateEx( c0, 635, 1, -1 );
                            }
                        }
                        myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                        SendMakerScriptEvent( maker0, 0, 0, 0 );
                        room0.status.Exchange( 0 );
                        c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                        AddLog( 8, c0, 2 );
                        room0.Clear( );
                    } else {
                        if ( RoomIndex == 8 && myself.i_ai1 == 2 ) {
                        } else {
                            room1 = rlist0.GetRoomInfo( 8 );
                            if ( RoomIndex != 8 && Rand( 100 ) < 15 && room1.status.value == 0 ) {
                                if ( room1.status.Exchange( 1 ) == 1 ) {
                                    i0 = -1;
                                    for ( i1 = 0; i1 < 8; ++i1 ) {
                                        if ( i0 == -1 ) {
                                            i2 = Rand( 8 );
                                            room1 = rlist0.GetRoomInfo( i2 );
                                            if ( room1.status.value == 0 ) {
                                                if ( room1.status.Exchange( 1 ) == 0 ) {
                                                    i0 = i2;
                                                }
                                            }
                                        }
                                    }
                                    if ( i0 == -1 ) {
                                        for ( i1 = 0; i1 < 8; ++i1 ) {
                                            if ( i0 == -1 ) {
                                                room1 = rlist0.GetRoomInfo( i1 );
                                                if ( room1.status.value == 0 ) {
                                                    if ( room1.status.Exchange( 1 ) == 0 ) {
                                                        i0 = i1;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    if ( i0 == -1 ) {
                                        myself.i_ai4 = -1;
                                    } else {
                                        SendMakerScriptEvent( maker0, 0, 0, 0 );
                                        room1.SetParty( room0.party_id );
                                        select ( i0 ) {
                                            case 0: {
                                                myself.TeleportParty( room0.party_id, PosX0, PosY0, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 1: {
                                                myself.TeleportParty( room0.party_id, PosX1, PosY1, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 2: {
                                                myself.TeleportParty( room0.party_id, PosX2, PosY2, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 3: {
                                                myself.TeleportParty( room0.party_id, PosX3, PosY3, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 4: {
                                                myself.TeleportParty( room0.party_id, PosX4, PosY4, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 5: {
                                                myself.TeleportParty( room0.party_id, PosX5, PosY5, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 6: {
                                                myself.TeleportParty( room0.party_id, PosX6, PosY6, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 7: {
                                                myself.TeleportParty( room0.party_id, PosX7, PosY7, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                        }
                                    }
                                } else {
                                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                                    room1.SetParty( room0.party_id );
                                    myself.TeleportParty( room0.party_id, PosX8, PosY8, FloatToInt( myself.sm.z ), 2000, 0 );
                                }
                            } else {
                                i0 = -1;
                                for ( i1 = 0; i1 < 8; ++i1 ) {
                                    if ( i0 == -1 ) {
                                        i2 = Rand( 8 );
                                        room1 = rlist0.GetRoomInfo( i2 );
                                        if ( room1.status.value == 0 ) {
                                            if ( room1.status.Exchange( 1 ) == 0 ) {
                                                i0 = i2;
                                            }
                                        }
                                    }
                                }
                                if ( i0 == -1 ) {
                                    for ( i1 = 0; i1 < 8; ++i1 ) {
                                        if ( i0 == -1 ) {
                                            room1 = rlist0.GetRoomInfo( i1 );
                                            if ( room1.status.value == 0 ) {
                                                if ( room1.status.Exchange( 1 ) == 0 ) {
                                                    i0 = i1;
                                                }
                                            }
                                        }
                                    }
                                }
                                if ( i0 == -1 ) {
                                    myself.i_ai4 = -1;
                                } else {
                                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                                    room1.SetParty( room0.party_id );
                                    select ( i0 ) {
                                        case 0: {
                                            myself.TeleportParty( room0.party_id, PosX0, PosY0, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 1: {
                                            myself.TeleportParty( room0.party_id, PosX1, PosY1, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 2: {
                                            myself.TeleportParty( room0.party_id, PosX2, PosY2, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 3: {
                                            myself.TeleportParty( room0.party_id, PosX3, PosY3, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 4: {
                                            myself.TeleportParty( room0.party_id, PosX4, PosY4, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 5: {
                                            myself.TeleportParty( room0.party_id, PosX5, PosY5, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 6: {
                                            myself.TeleportParty( room0.party_id, PosX6, PosY6, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 7: {
                                            myself.TeleportParty( room0.party_id, PosX7, PosY7, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                    }
                                }
                            }
                            room0.status.Exchange( 0 );
                            room0.Clear( );
                        }
                    }
                }
            }
        }
        super;
    }

    EventHandler SCRIPT_EVENT( script_event_arg1, script_event_arg2, c0 )
    {
        if ( ( script_event_arg1 == 3 ) || ( script_event_arg1 == 2 ) ) {
            myself.i_ai1 = script_event_arg1;
        }
    }

}
 

Здравствуйте!
Прошу помочь разобраться с кодом. Чтобы попасть на РБ Анаказель в рифте, приходится ждать полные циклы в комнатах, по итого за 4 часа игроки не попадают на рб даже при соблюдении условий, что они только стоят и ждут. Пропускать без конца комнаты по кругу бесполезно. Не могу найти тригер, который отправляет пати в комнату к РБ. буду очень бладогарен любому содействую! Хорошего дня. Сам код:
C++:
class teleport_dungeon_manager_npc : citizen
{
parameter:
    string    fnHi = "tel_dungeon_npc_hi";
    string    fnNoMoreChance = "tel_dungeon_npc_nomorechance.htm";
    string    fnYouAreNotLeader = "tel_dungeon_npc_notleader.htm";
    string    LevelName = "TeleportDungeon1";
    int    RoomIndex = 0;
    int    LevelNumber = 1;
    int    escape_x = 1;
    int    escape_y = 1;
    int    escape_z = 1;
    int    PosX0 = 1;
    int    PosY0 = 1;
    int    PosX1 = 1;
    int    PosY1 = 1;
    int    PosX2 = 1;
    int    PosY2 = 1;
    int    PosX3 = 1;
    int    PosY3 = 1;
    int    PosX4 = 1;
    int    PosY4 = 1;
    int    PosX5 = 1;
    int    PosY5 = 1;
    int    PosX6 = 1;
    int    PosY6 = 1;
    int    PosX7 = 1;
    int    PosY7 = 1;
    int    PosX8 = 1;
    int    PosY8 = 1;

handler:
    EventHandler CREATED( rlist0 )
    {
        myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
        myself.AddTimerEx( 2001, 1000 );
        myself.i_ai1 = 3;
        myself.i_ai2 = 0;
        super;
    }

    EventHandler TALKED( talker, s0 )
    {
        s0 = fnHi + RoomIndex + ".htm";
        myself.ShowPage( talker, s0 );
    }

    EventHandler MENU_SELECTED( talker, ask, reply, room0, room1, i0, i1, i2, party0, rlist0, maker0, c0 )
    {
        if ( ask == -1000 ) {
            maker0 = myself.GetMyMaker( );
            rlist0 = GetRoomInfoList( LevelName );
            room0 = rlist0.GetRoomInfo( RoomIndex );
            if ( reply == 1 ) {
                party0 = GetPartyFromID( room0.party_id );
                c0 = myself.GetLeaderOfParty( party0 );
                if ( talker == c0 ) {
                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                    for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                        c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                        if ( HaveMemo( c0, 635 ) ) {
                            myself.SetMemoStateEx( c0, 635, 1, -1 );
                        }
                    }
                    room0.status.Exchange( 0 );
                    room0.Clear( );
                    AddLog( 8, c0, 1 );
                } else {
                    myself.ShowPage( talker, fnYouAreNotLeader );
                }
            } else {
                if ( reply == 2 ) {
                    if ( Party_GetLeader( talker ) == talker ) {
                        i0 = GetMemoStateEx( talker, 635, 1 );
                        if ( i0 == 1 ) {
                            myself.SetMemoStateEx( talker, 635, 1, 0 );
                            i0 = -1;
                            for ( i1 = 0; i1 < 8; ++i1 ) {
                                if ( i0 == -1 ) {
                                    i2 = Rand( 8 );
                                    room1 = rlist0.GetRoomInfo( i2 );
                                    if ( room1.status.value == 0 ) {
                                        room1.status.Exchange( 1 );
                                        i0 = i2;
                                    }
                                }
                            }
                            if ( i0 == -1 ) {
                                for ( i1 = 0; i1 < 8; ++i1 ) {
                                    if ( i0 == -1 ) {
                                        room1 = rlist0.GetRoomInfo( i1 );
                                        if ( room1.status.value == 0 ) {
                                            room1.status.Exchange( 1 );
                                            i0 = i1;
                                        }
                                    }
                                }
                            }
                            if ( i0 == -1 ) {
                            } else {
                                SendMakerScriptEvent( maker0, 0, 0, 0 );
                                room1.SetParty( room0.party_id );
                                select ( i0 ) {
                                    case 0: {
                                        myself.TeleportParty( room0.party_id, PosX0, PosY0, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 1: {
                                        myself.TeleportParty( room0.party_id, PosX1, PosY1, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 2: {
                                        myself.TeleportParty( room0.party_id, PosX2, PosY2, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 3: {
                                        myself.TeleportParty( room0.party_id, PosX3, PosY3, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 4: {
                                        myself.TeleportParty( room0.party_id, PosX4, PosY4, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 5: {
                                        myself.TeleportParty( room0.party_id, PosX5, PosY5, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 6: {
                                        myself.TeleportParty( room0.party_id, PosX6, PosY6, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                    case 7: {
                                        myself.TeleportParty( room0.party_id, PosX7, PosY7, FloatToInt( myself.sm.z ), 2000, 0 );
                                        break;
                                    }
                                }
                                room0.status.Exchange( 0 );
                                room0.Clear( );
                                AddLogEx( 324, talker, RoomIndex, i0 );
                            }
                        } else {
                            myself.ShowPage( talker, fnNoMoreChance );
                        }
                    } else {
                        myself.ShowPage( talker, fnYouAreNotLeader );
                    }
                }
            }
        }
        super;
    }

    EventHandler TIMER_FIRED_EX( timer_id, rlist0, room0, room1, party0, i0, i1, i2, maker0, c0, i3 )
    {
        rlist0 = GetRoomInfoList( LevelName );
        if ( IsNull( rlist0 ) ) {
            myself.AddTimerEx( timer_id, 10000 );
            return;
        }
        room0 = rlist0.GetRoomInfo( RoomIndex );
        maker0 = myself.GetMyMaker( );
        if ( timer_id == 2001 ) {
            if ( IsNull( room0 ) ) {
            } else {
                if ( room0.status.value == 1 ) {
                    if ( ( GetTimeOfDay( ) - room0.time ) < 15 ) {
                        SendMakerScriptEvent( maker0, 1, 0, 0 );
                    } else {
                        if ( room0.PartyChanged( ) ) {
                            if ( ( GetTimeOfDay( ) - room0.time ) > 3 ) {
                                for ( i0 = 0; i0 < room0.member_count; i0 = ( i0 + 1 ) ) {
                                    c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                                    if ( HaveMemo( c0, 635 ) ) {
                                        myself.SetMemoStateEx( c0, 635, 1, -1 );
                                    }
                                }
                                myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                                SendMakerScriptEvent( maker0, 0, 0, 0 );
                                room0.status.Exchange( 0 );
                                c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                                AddLog( 8, c0, 2 );
                                room0.Clear( );
                            }
                        } else {
                            if ( myself.InMyTerritory( myself.GetLeaderOfParty( GetPartyFromID( room0.party_id ) ) ) == 0 ) {
                                if ( ( GetTimeOfDay( ) - room0.time ) > 3 ) {
                                    for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                                        c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                                        if ( HaveMemo( c0, 635 ) ) {
                                            myself.SetMemoStateEx( c0, 635, 1, -1 );
                                        }
                                    }
                                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                                    room0.status.Exchange( 0 );
                                    c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                                    AddLog( 8, c0, 2 );
                                    room0.Clear( );
                                }
                            } else {
                                if ( ( GetTimeOfDay( ) - room0.time ) > ( ( 60 * 8 ) + ( Rand( 5 ) * 30 ) ) ) {
                                    if ( myself.i_ai2 == 1 ) {
                                        if ( RoomIndex == 8 && myself.i_ai1 == 2 ) {
                                        } else {
                                            Announce( "Clearance of dimension: The test was ended." );
                                            room0.status.Exchange( 0 );
                                            SendMakerScriptEvent( maker0, 0, 0, 0 );
                                            myself.i_ai2 = 0;
                                        }
                                    } else {
                                        room1 = rlist0.GetRoomInfo( 8 );
                                        i0 = -1;
                                        for ( i1 = 0; i1 < room0.member_count; ++i1 ) {
                                            if ( i0 == -1 ) {
                                                c0 = GetCreatureFromID( room0.GetMemberID( i1 ) );
                                                if ( IsNull( c0 ) == 0 ) {
                                                    i0 = GetMemoStateEx( c0, 635, 0 );
                                                    break;
                                                }
                                            }
                                        }
                                        if ( RoomIndex == 8 && myself.i_ai1 == 2 ) {
                                        } else {
                                            if ( ( i0 + ( 60 * 40 ) ) < GetTimeOfDay( ) ) {
                                                for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                                                    c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                                                    if ( HaveMemo( c0, 635 ) ) {
                                                        myself.SetMemoStateEx( c0, 635, 1, -1 );
                                                    }
                                                }
                                                myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                                                SendMakerScriptEvent( maker0, 0, 0, 0 );
                                                room0.status.Exchange( 0 );
                                                c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                                                AddLog( 8, c0, 0 );
                                                room0.Clear( );
                                            } else {
                                                myself.AddTimerEx( 2002, 5000 );
                                                myself.EarthQuakeToParty( room0.party_id, 20, 10, 1 );
                                            }
                                        }
                                    }
                                } else {
                                    if ( RoomIndex == 8 && myself.i_ai1 == 3 ) {
                                        myself.AddTimerEx( 2002, 5000 );
                                        myself.EarthQuakeToParty( room0.party_id, 10, 10, 1 );
                                    }
                                }
                            }
                        }
                    }
                } else {
                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                }
            }
            myself.AddTimerEx( 2001, 10000 );
        } else {
            if ( timer_id == 2002 ) {
                if ( room0.PartyChanged( ) ) {
                    for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                        c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                        if ( HaveMemo( c0, 635 ) ) {
                            myself.SetMemoStateEx( c0, 635, 1, -1 );
                        }
                    }
                    myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                    room0.status.Exchange( 0 );
                    room0.Clear( );
                } else {
                    party0 = GetPartyFromID( room0.party_id );
                    c0 = myself.GetLeaderOfParty( party0 );
                    i3 = 0;
                    if ( ( c0.alive == 0 ) || ( myself.InMyTerritory( c0 ) == 0 ) ) {
                        for ( i0 = 0; i0 < room0.member_count; ++i0 ) {
                            c0 = GetCreatureFromID( room0.GetMemberID( i0 ) );
                            if ( HaveMemo( c0, 635 ) ) {
                                myself.SetMemoStateEx( c0, 635, 1, -1 );
                            }
                        }
                        myself.InstantTeleportInMyTerritory( escape_x, escape_y, escape_z, 100 );
                        SendMakerScriptEvent( maker0, 0, 0, 0 );
                        room0.status.Exchange( 0 );
                        c0 = GetCreatureFromID( room0.GetMemberID( 0 ) );
                        AddLog( 8, c0, 2 );
                        room0.Clear( );
                    } else {
                        if ( RoomIndex == 8 && myself.i_ai1 == 2 ) {
                        } else {
                            room1 = rlist0.GetRoomInfo( 8 );
                            if ( RoomIndex != 8 && Rand( 100 ) < 15 && room1.status.value == 0 ) {
                                if ( room1.status.Exchange( 1 ) == 1 ) {
                                    i0 = -1;
                                    for ( i1 = 0; i1 < 8; ++i1 ) {
                                        if ( i0 == -1 ) {
                                            i2 = Rand( 8 );
                                            room1 = rlist0.GetRoomInfo( i2 );
                                            if ( room1.status.value == 0 ) {
                                                if ( room1.status.Exchange( 1 ) == 0 ) {
                                                    i0 = i2;
                                                }
                                            }
                                        }
                                    }
                                    if ( i0 == -1 ) {
                                        for ( i1 = 0; i1 < 8; ++i1 ) {
                                            if ( i0 == -1 ) {
                                                room1 = rlist0.GetRoomInfo( i1 );
                                                if ( room1.status.value == 0 ) {
                                                    if ( room1.status.Exchange( 1 ) == 0 ) {
                                                        i0 = i1;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    if ( i0 == -1 ) {
                                        myself.i_ai4 = -1;
                                    } else {
                                        SendMakerScriptEvent( maker0, 0, 0, 0 );
                                        room1.SetParty( room0.party_id );
                                        select ( i0 ) {
                                            case 0: {
                                                myself.TeleportParty( room0.party_id, PosX0, PosY0, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 1: {
                                                myself.TeleportParty( room0.party_id, PosX1, PosY1, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 2: {
                                                myself.TeleportParty( room0.party_id, PosX2, PosY2, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 3: {
                                                myself.TeleportParty( room0.party_id, PosX3, PosY3, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 4: {
                                                myself.TeleportParty( room0.party_id, PosX4, PosY4, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 5: {
                                                myself.TeleportParty( room0.party_id, PosX5, PosY5, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 6: {
                                                myself.TeleportParty( room0.party_id, PosX6, PosY6, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                            case 7: {
                                                myself.TeleportParty( room0.party_id, PosX7, PosY7, FloatToInt( myself.sm.z ), 2000, 0 );
                                                break;
                                            }
                                        }
                                    }
                                } else {
                                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                                    room1.SetParty( room0.party_id );
                                    myself.TeleportParty( room0.party_id, PosX8, PosY8, FloatToInt( myself.sm.z ), 2000, 0 );
                                }
                            } else {
                                i0 = -1;
                                for ( i1 = 0; i1 < 8; ++i1 ) {
                                    if ( i0 == -1 ) {
                                        i2 = Rand( 8 );
                                        room1 = rlist0.GetRoomInfo( i2 );
                                        if ( room1.status.value == 0 ) {
                                            if ( room1.status.Exchange( 1 ) == 0 ) {
                                                i0 = i2;
                                            }
                                        }
                                    }
                                }
                                if ( i0 == -1 ) {
                                    for ( i1 = 0; i1 < 8; ++i1 ) {
                                        if ( i0 == -1 ) {
                                            room1 = rlist0.GetRoomInfo( i1 );
                                            if ( room1.status.value == 0 ) {
                                                if ( room1.status.Exchange( 1 ) == 0 ) {
                                                    i0 = i1;
                                                }
                                            }
                                        }
                                    }
                                }
                                if ( i0 == -1 ) {
                                    myself.i_ai4 = -1;
                                } else {
                                    SendMakerScriptEvent( maker0, 0, 0, 0 );
                                    room1.SetParty( room0.party_id );
                                    select ( i0 ) {
                                        case 0: {
                                            myself.TeleportParty( room0.party_id, PosX0, PosY0, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 1: {
                                            myself.TeleportParty( room0.party_id, PosX1, PosY1, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 2: {
                                            myself.TeleportParty( room0.party_id, PosX2, PosY2, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 3: {
                                            myself.TeleportParty( room0.party_id, PosX3, PosY3, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 4: {
                                            myself.TeleportParty( room0.party_id, PosX4, PosY4, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 5: {
                                            myself.TeleportParty( room0.party_id, PosX5, PosY5, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 6: {
                                            myself.TeleportParty( room0.party_id, PosX6, PosY6, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                        case 7: {
                                            myself.TeleportParty( room0.party_id, PosX7, PosY7, FloatToInt( myself.sm.z ), 2000, 0 );
                                            break;
                                        }
                                    }
                                }
                            }
                            room0.status.Exchange( 0 );
                            room0.Clear( );
                        }
                    }
                }
            }
        }
        super;
    }

    EventHandler SCRIPT_EVENT( script_event_arg1, script_event_arg2, c0 )
    {
        if ( ( script_event_arg1 == 3 ) || ( script_event_arg1 == 2 ) ) {
            myself.i_ai1 = script_event_arg1;
        }
    }

}
На попадание в 8 комнату к РБ отвечает строка
Код:
if ( RoomIndex != 8 && Rand( 100 ) < 15 && room1.status.value == 0 )
. Вопрос по этой теме закрыт.
Другой вопрос, имеется возможность пропустить комнату единожды, как добавить туда шанс попасть к РБ при пропуске комнаты
 
Код:
i2 = Rand(8);
Исправь на 9
И ниже добавь кейс 8 с posx8, posy8
 

Вложения

  • IMG_0002.webp
    IMG_0002.webp
    32,9 КБ · Просмотры: 6
Код:
i2 = Rand(8);
Исправь на 9
И ниже добавь кейс 8 с posx8, posy8
Вопрос, а при этом не получится так, что игроки смогут залететь, к другим находящимся в комнате с рб?
Это проверка на 9ку будет действовать?)
room0.status.Exchange( 0 );
 
Назад
Сверху Снизу