Block Player

Hello,

I’m using Eclipse Advanced, and I wanna know if I can block player by the CustomScripts (on the server).

Just an example of what I wanna do:

If player level < 10 Then the player can’t pass.

Thank you for your help. :)

Get familiar with the events system.

From modPlayer Sub PlayerMove, Select Case dir, Case dir_up:

                                ' Check to see if the tile is a event and if it is check if its opened

                                If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Type <> TILE_TYPE_EVENT Then

                                    Call SetPlayerY(index, GetPlayerY(index) - 1)

                                    SendPlayerMove index, movement, sendToSelf

                                    Moved = YES

                                Else

                                    If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1 > 0 Then

                                        If Events(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1).WalkThrought = YES Or (Player(index).EventOpen(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1) = YES) Then

                                            Call SetPlayerY(index, GetPlayerY(index) - 1)

                                            SendPlayerMove index, movement, sendToSelf

                                            Moved = YES

                                        End If

                                    End If

                                End If

IIRC, you can do a level-based trigger to make the tile not-walkable. If I’m wrong, then you can always mimic this code to make a custom scripted tile, though you’ll need one script per direction.

Thank you a lot for your help. :)

Log in to reply