Dawntide
-
Posts
248 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Calendar
Posts posted by Dawntide
-
-
I can not get it to work, it only works if i create a currency label on the minigame and make its caption the same as frmMain.lblGold.Caption and if its 0 then i disable the button. It's not really save, isn't it?
-
And how to send packets from server to client? I only know client to server
It's so difficult :/ -
I have a minigame, you just need to click 1 button, its random if you win or lose. If you win you get 50 gold, if you lose you lose 50 gold.
i want it to exit the minigame button click Sub when the player has less than X gold. -
I did it exactly like you did, but it just shows the chat message, but does not exit the sub, i can still play the minigame.
-
Yeah saw it, but i do not know how to use it.
```
Public Sub CheckCurrency(ByVal itemamount As Long)
Dim Buffer As clsBuffer
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
Set Buffer = New clsBuffer
Buffer.WriteLong CCheckCurrency
Buffer.WriteLong itemamount
SendData Buffer.ToArray()
Set Buffer = Nothing
' Error handler
Exit Sub
errorhandler:
HandleError "CheckCurrency", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub
```
```
Sub HandleCheckCurrency(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim Buffer As clsBuffer
Dim itemamount As Long
Set Buffer = New clsBuffer
Buffer.WriteBytes Data()
itemamount = Buffer.ReadLong
' check gold
itemamount = HasItem(index, 1)
If itemamount < 50 Then
PlayerMsg index, "Not enough gold.", BrightRed
Exit Sub
End If
Set Buffer = Nothing
End Sub
```
It does not work ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sad.png) -
Okay, i will check it after i fixed the gold mechanic.
How to check if the player has more or exactly 50 gold?
I can not find the right Sub -
I used the search function of the forum and did not found it O.O
unfortunately there is no GiveEXP sub :/ -
love you guys (no homo ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png))! You helped me understand this a little bit more, thanks.
What is the deal with the disappeared tutorial? I got the old one in my bookmarks, the thread was named: "[EO] (hopefully) simple packet tutorial"
How to handle the same exact thing with experience? I mean what to use instead of "giveinvitem"?
thanks! -
I tested it.
When the player wins the minigame, in the chat appears this text:
you received0 gold.
and in my inventory i got the icon of the currency but no amount, i can not drop it either. its just there.
Here is what i did:
client side:
```
Public Sub GiveCurrency(ByVal Amount As Long)
Dim Buffer As clsBuffer
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
Set Buffer = New clsBuffer
Buffer.WriteLong CGiveCurrency
Buffer.WriteLong Amount
SendData Buffer.ToArray()
Set Buffer = Nothing
' Error handler
Exit Sub
errorhandler:
HandleError "GiveCurrency", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub
```
modEnumerations:
```
CGiveCurrency
```
Minigame player wins:
```
lblResult = "You Won"
Call GiveCurrency(50)
```
server side:
modHandleData
```
HandleDataSub(CGiveCurrency) = GetAddress(AddressOf HandleGiveCurrency)
```
```
Sub HandleGiveCurrency(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim buffer As clsBuffer
Dim itemnum As Long
Dim amount As Long
Set buffer = New clsBuffer
buffer.WriteBytes Data()
' give gold
GiveInvItem index, 1, amount
' send confirmation message
PlayerMsg index, "You received" & amount & " gold.", BrightGreen
Set buffer = Nothing
End Sub
```
modEnumerations:
```
CGiveCurrency
```
Whats wrong? -
No its a simple imgButton on frmMain ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
-
Sorry, but i do not know how to define and send a ID. And how to return it?
-
I do not tested them, you told me i am sending random stuff which i do not use.
is there a example for the unique ID packet already in the clean copy of eclipse event system 2.3? I could copy and modify it -
Sounds nice, but i'm a noob, could you please give me a little tutorial?
-
I created a new form with a little minigame, if the player wins he should gain a certain amount of gold. how to do it without sending packets to the server?
-
It is supposed to give the player a certain amount of money.
i modified the sellitem Sub. -
hey,
I need your help, i want to create 2 packets, which let me give the player exp and money or take it from him.
Due to the new forum, the only packet tutorial is gone, so i depend on you!
Here is my try on give player money/currency:
client side:
```
Public Sub GiveCurrency(ByVal invslot As Long)
Dim Buffer As clsBuffer
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
Set Buffer = New clsBuffer
Buffer.WriteLong CGiveCurrency
Buffer.WriteLong invslot
SendData Buffer.ToArray()
Set Buffer = Nothing
' Error handler
Exit Sub
errorhandler:
HandleError "GiveCurrency", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub
```
server side:
```
Sub HandleGiveCurrency(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim Buffer As clsBuffer
Dim invSlot As Long
Dim itemnum As Long
Dim Amount As Long
Set Buffer = New clsBuffer
Buffer.WriteBytes Data()
invSlot = Buffer.ReadLong
' give gold
GiveInvItem index, 1, Amount
' send confirmation message
PlayerMsg index, "You received" & Amount & "gold.", BrightGreen
Set Buffer = Nothing
End Sub
```
Please fix my errors AND explain me what to do and why i need to do it.
thanks in advance! -
Oh okay, thank you!
-
What is a registered IP and how do you know that he uses a registered IP? Why can it be shut down at any time then?
-
Hey,
I have seen several games with completely edited gui and window theme, so there are no windows forms anymore, it is just everything custom. The HP Bars are graphical and much more. How to hardcore edit the whole windows?
I know in vb.net there is a way with importing modules which contain the new custom look, is it possible in vb6 too? Can i use vb.net themes then?
How to use graphical HP Bars, like in any good game?
What is the diffrence between onscreen GUI and offscreen gui, is there any advantage with an onscreen Gui?
thanks in advance! -
Sorry i am not sure. But is it even real multiplayer or just limited to a party of players in 1 room? How are you planning to put mutliplayer aspects to it, if you have a classic level system, like in the 2D Mario game, in which you unlock one world after another and have no persistent world?
-
Hey,
This game looks indead amazing, but i am new to the whole kingdom hearts universe, so could you please explain how the basic game mechanics work and if they are inspired by the KH games or just your own idea.
This timeline on the screen lets you select level, doesn't it? -
-
Do you even read my posts?
"Yeah but i guess i can not use the event system, because the action takes place in a new form, not frmMain."
I am using Event System 2.3, but I am using a seperate form, it has nothing to do with frmMain, so the even system will probably not work. -
client side:
```
Public Sub WinEXP(ByVal index As Long, ByVal EXP As Long)
Dim Buffer As clsBuffer
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
Set Buffer = New clsBuffer
Buffer.WriteLong CWinEXPPacket
Buffer.WriteLong index
Buffer.WriteLong EXP
SendData Buffer.ToArray()
Set Buffer = Nothing
```
```
Call WinEXP(index, Player(index).EXP, EXPAMOUNT)
```
server side:
```
HandleDataSub(CWinEXPPacket) = GetAddress
(AddressOf HandleWinEXPPacket)
```
```
Private Sub HandleWinEXPPacket(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddR As Long, ByVal ExtraVar As Long)
' the variables we store our information in
Dim player As Long
Dim EXP As Long
Dim Buffer As clsBuffer
Set Buffer = New clsBuffer
Buffer.WriteBytes Data()
player = buffer.ReadLong
EXP = buffer.ReadLong
GivePlayerEXP index, EXP
Set Buffer = Nothing
End Sub
```
Please fix my mistakes, thanks
Engine is jealous of my money
in Source
Posted
The engine is jealous of all my money
If i spawn 2 billion gold everything is fine, but if i spawn another billion gold the game crashes.
debug highlighting:
```
Call SetPlayerInvItemValue(Index, n, GetPlayerInvItemValue(Index, n) + MapItem(mapnum, i).Value)
```
runtime error overflow
how to fix it and how to set a limit for currency without getting crash if you try to get more money
thanks!