Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Shop Problem [SOLVED]


da_gad_pader
 Share

Recommended Posts

Find "Sub HandleSearch" server-side and paste this just above "End Sub":

```
If Map(GetPlayerMap(Index)).Tile(x, y).Type = TILE_TYPE_SHOP Then
            ShopNum = Map(GetPlayerMap(Index)).Tile(x, y).Data1

            If ShopNum > 0 Then ' shop exists?
                If Len(Trim$(Shop(ShopNum).Name)) > 0 Then ' name exists?
                    SendOpenShop Index, ShopNum
                    TempPlayer(Index).InShop = ShopNum ' stops movement and the like
                End If
            End If
End If
```
It's untested, but it should work, seeing as I just copied the code from the PlayerMove procedure. Don't forget to declare "ShopNum As Long" at the beginning of the procedure!
Link to comment
Share on other sites

like this?
           ```
If Map(GetPlayerMap(index)).Tile(x, y).Type = TILE_TYPE_SHOP Then
                If x > 0 Then ' shop exists?
                    If Len(Trim$(Shop(x).Name)) > 0 Then ' name exists?
                        SendOpenShop index, x
                        TempPlayer(index).InShop = x ' stops movement and the like
                    End If
                End If
            End If
End Sub
```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...