Hello so a player in my game said a idea and its pretty good,
When a player rights click other a windows with all actions shows!
Its possible? (i just wanna know where the right click command is to make that open a vb window with all)
Hello so a player in my game said a idea and its pretty good,
When a player rights click other a windows with all actions shows!
Its possible? (i just wanna know where the right click command is to make that open a vb window with all)
I have no idea what your asking… please talk in proper english and provide more details. Are you trying to create a window that has all the commands on it? If so, use a simple sadscript code.
no guys… c’mon!!
so do you know the left click on Eclipse Stable that make target on some NPC or Player!!
Thats what im talkin’ about, i wanna change it so when you click on a player a window comes up (i know is source edit this)
i just wanna know how to left click call the window made in vb6…
Like kris made on kryce?
You right click a player and a window comes up with a few options(Trade, etc)
if you mean like kryces (which funnily enough i made the right click search function for ES a while back when askelJ was having trouble with it, he asked me to do that bit then he made the sadscript section for it.
but anyway, if you mean like how kryce has it
if askel didnt change the sub names then in the server its
Public Sub Packet_RightSearch(ByVal Index As Long, ByVal CurX As Long, ByVal CurY As Long, ByVal X As Long, ByVal Y As Long)
jsut try searching ‘RightSearch’
then you’ll have to send a packet to the client with the player selected index in it, or store it in a variable in the server, then edit the clients packet handler to show the window you want it to
i’ll put a tut together tomorrow or monday when i’m a tad more sober.
if you’ve done vb6 all your doing is in Packet_RightSearch(server)
is using SendDataTo(index, “packet”) just make the packet have a command name and the player selected’s index like packet = “rightconfirm” & SEP_CHAR & Target & END_CHAR
something maybe?
then in the client in ModHandleData add something which shows a picture box on frmmirage or frmstable, which holds controls or buttons
i dont wanna be rude… can someone give me the link to
@Atrophy:
link=topic=59796.msg633365#msg633365 date=1272733617]
Pingu released a Tut on this LONG time ago. Might be able to find it somewhere.
???
if yes thanks
He stated before that he wants to make it so that it works when you left-click on another player. This just requires a small source edit to both the Client and Server.
Server
Head over to modHandleData, and find this:
Public Sub Packet_Search(ByVal Index As Long, ByVal X As Long, ByVal Y As Long)
Dim i As Long
If X < 0 Or X > MAX_MAPX Then
Exit Sub
End If
If Y < 0 Or Y > MAX_MAPY Then
Exit Sub
End If
' Check for a player
For i = 1 To MAX_PLAYERS
If IsPlaying(i) Then
If GetPlayerMap(Index) = GetPlayerMap(i) Then
If GetPlayerX(i) = X Then
If GetPlayerY(i) = Y Then
' Change the target.
Player(Index).Target = i
Player(Index).TargetType = TARGET_TYPE_PLAYER
Call PlayerMsg(Index, "Your target is now " & GetPlayerName(i) & ".", YELLOW)
Exit Sub
End If
End If
End If
End If
Next i
' Check for an NPC.
For i = 1 To MAX_MAP_NPCS
If MapNPC(GetPlayerMap(Index), i).num > 0 Then
If MapNPC(GetPlayerMap(Index), i).X = X Then
If MapNPC(GetPlayerMap(Index), i).Y = Y Then
Player(Index).TargetNPC = i
Player(Index).TargetType = TARGET_TYPE_NPC
Call PlayerMsg(Index, "Your target is now a " & Trim$(NPC(MapNPC(GetPlayerMap(Index), i).num).Name) & ".", YELLOW)
Exit Sub
End If
End If
End If
Next i
' Check for an item on the ground.
For i = 1 To MAX_MAP_ITEMS
If MapItem(GetPlayerMap(Index), i).num > 0 Then
If MapItem(GetPlayerMap(Index), i).X = X Then
If 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
End If
Next i
' Check for an OnClick tile.
If Map(GetPlayerMap(Index)).Tile(X, Y).Type = TILE_TYPE_ONCLICK Then
If SCRIPTING = 1 Then
MyScript.ExecuteStatement "Scripts\Main.txt", "OnClick " & Index & "," & Map(GetPlayerMap(Index)).Tile(X, Y).Data1
End If
End If
End Sub
Change that entire Sub to look like this:
Public Sub Packet_Search(ByVal Index As Long, ByVal X As Long, ByVal Y As Long)
Dim i As Long
If X < 0 Or X > MAX_MAPX Then
Exit Sub
End If
If Y < 0 Or Y > MAX_MAPY Then
Exit Sub
End If
' Check for a player
For i = 1 To MAX_PLAYERS
If IsPlaying(i) Then
If GetPlayerMap(Index) = GetPlayerMap(i) Then
If GetPlayerX(i) = X Then
If GetPlayerY(i) = Y Then
' Change the target.
Player(Index).Target = i
Player(Index).TargetType = TARGET_TYPE_PLAYER
Call SendDataTo(Index, "playeroptions" & END_CHAR)
Exit Sub
End If
End If
End If
End If
Next i
' Check for an NPC.
For i = 1 To MAX_MAP_NPCS
If MapNPC(GetPlayerMap(Index), i).num > 0 Then
If MapNPC(GetPlayerMap(Index), i).X = X Then
If MapNPC(GetPlayerMap(Index), i).Y = Y Then
Player(Index).TargetNPC = i
Player(Index).TargetType = TARGET_TYPE_NPC
Call PlayerMsg(Index, "Your target is now a " & Trim$(NPC(MapNPC(GetPlayerMap(Index), i).num).Name) & ".", YELLOW)
Exit Sub
End If
End If
End If
Next i
' Check for an item on the ground.
For i = 1 To MAX_MAP_ITEMS
If MapItem(GetPlayerMap(Index), i).num > 0 Then
If MapItem(GetPlayerMap(Index), i).X = X Then
If 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
End If
Next i
' Check for an OnClick tile.
If Map(GetPlayerMap(Index)).Tile(X, Y).Type = TILE_TYPE_ONCLICK Then
If SCRIPTING = 1 Then
MyScript.ExecuteStatement "Scripts\Main.txt", "OnClick " & Index & "," & Map(GetPlayerMap(Index)).Tile(X, Y).Data1
End If
End If
End Sub
Now we just need to handle the packet on the Client.
Client
Go to modHandleData, and add this as a new Case or casestring. I’m using casestring because I use Eclipse Evolution 2.7:
If casestring = "playeroptions" Then
frmMirage.picbox.Visible = True
Exit Sub
End If
Replace the picbox variable with the name of the Picturebox you create on frmMirage that has all of the other player commands. You also will need to do some sort of calculation to set the Picturebox’s left and top so that it will appear over the player.
You will need to do some more to get this to work properly, however. As stated before, you will need to create your own Picturebox and program each command that you choose to place on it.
Besides that, though, everything else should be done.
so… i understan all!
but i dont know where put the last code for the client…
If casestring = “playeroptions” Then
frmMirage.picbox.Visible = True
Exit Sub
End If
where ^??
vitinho coding is not something you can jsut C&P to make it work, you msut read entire posts otherwise i can garuntee 75% of the time it will nto work for you…
it clearly stats in the post where in the source. He also states that ‘casestring’ is for ee2.7
es may use a different handler.