Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Target NPC instead of item
#1
Code:
' Check for an item
    For i = 1 To MAX_MAP_ITEMS
        If MapItem(GetPlayerMap(Index), i).Num > 0 Then
            If MapItem(GetPlayerMap(Index), i).x = x And MapItem(GetPlayerMap(Index), i).y = y Then
                Call PlayerMsg(Index, "You see a " & Trim$(Item(MapItem(GetPlayerMap(Index), i).Num).Name) & ".", Yellow)
                Exit Sub
            End If
        End If
    Next i

Copy that code and move it to the bottom of that sub Big Grin.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)