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

[EO - Event System 3.0] Send Items (Server)


GodWar
 Share

Recommended Posts

This Tutorial will give you a new feature. At the moment you can send via Server, item to one or all players.

**Screenshot:**
[![](http://www.freemmorpgmaker.com/files/imagehost/pics/78ba99f2987295988cbff5819937228f.png)](http://www.freemmorpgmaker.com/files/imagehost/#78ba99f2987295988cbff5819937228f.png)

**Server:**
modServerTCP

At the end add:
```
' New Server Commands
Sub SendItem(ByVal playerID As Long, ByVal itemID As Long, ByVal Count As Long)
Dim i As Long
Dim players As String

    players = ""

    If frmServer.Combo_ItemPlayerID.ListIndex > 0 Then
        If IsPlaying(playerID) Then
            players = GetPlayerName(playerID)
            SpawnItem itemID, Count, GetPlayerMap(playerID), GetPlayerX(playerID), GetPlayerY(playerID), GetPlayerName(playerID)
            TextAdd ("Item: " & itemID & " was send to: " & players)
        Else
            TextAdd ("The player is not online!")
        End If
    Else
        For i = 1 To frmServer.lvwInfo.ListItems.Count
            If IsPlaying(i) Then
                players = players & GetPlayerName(i) & ", "
                SpawnItem itemID, Count, GetPlayerMap(i), GetPlayerX(i), GetPlayerY(i), GetPlayerName(i)
            End If
        Next i
        If players > vbNullString Then
            TextAdd ("Item: " & itemID & " was send to: " & players)
        Else
            TextAdd ("No user online!")
        End If
    End If
End Sub
```
And replace the frmServer.frm with yours in "\server\src\". (Before make secure copy of yours)

Maybe more features follow later!

And to jcsnider :)
You can use it in your next release if you wan't :)
Link to comment
Share on other sites

I do:

"If frmServer.lvwInfo.ListItems(i).SubItems(1) > vbNullString Then"!

Its the same i think ^^ It search the list and i ther is a entry it is online! I tested it with 4 player and it works also if player goes offline and so on!
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...