Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mirage Source 4
Sub MapMsg is unused client side. Not sure if it was noticed, I seen the packet name wasn't converted so.. Yep.
Reply
Sub MapMsg is not used for you, but we can make something with this.

Ex: MapMsg from the server ... Or other stuff ... It's the same for getplayerXXX, you understand ?

Sorry for my bad english, i'm french ^^'
Reply
I'm not sure I understand Sh4rk. Sorry.

In frmDrop I added this check to prevent the hacking attempt server side if you try to drop more of a currency than you have.

Code:
If Val(txtDrop.Text) > GetPlayerInvItemValue(MyIndex, InvNum) Then
        Exit Sub
    End If
Reply
You are maybe not using "Sub MapMSG" but this function maybe useful to other people, imo this is why DFA is not deleting it.

Example of usage: Send a message from the server to a precise map
Reply
Sh4rk Wrote:You are maybe not using "Sub MapMSG" but this function maybe useful to other people, imo this is why DFA is not deleting it.

Example of usage: Send a message from the server to a precise map

sorry if i wrong, but Anthony is talking about "Sub MapMsg" in client side, not in server side...

Verrigan also commented that sub in his edited MSE...
Reply
Oh shit... Sorry :/
You don't have wrong, it's me ^^'
Reply
BigRed's idea for using 3 buffers to draw to.
Reply
The slowest portion is really recalculating and looping through everything in each frame, the drawing is fairly fast.
Reply
Um with this update will all my code still work. If not im not upgrading cause my friend is giving me pets
Reply
One thing I did on my source was to blt the entire map, then blttoDC on a picturebox, and save as a bitmap, then load IT as the surface.

That way you jsut blt the whole map at once. The drawing probably isn't any faster, but I figured eliminating all the tile loops was a good idea.
Reply
Anybody taken a look at the CanAttackPlayer function? Wink

There's currently a problem where if the person is on the map anywhere with you it will display a message if you try to attack, even if they aren't beside you. Here's what I did to fix it:

[code]Function CanAttackPlayer(ByVal Attacker As Long, ByVal Victim As Long) As Boolean

' Check attack timer
If GetTickCount < TempPlayer(Attacker).AttackTimer + 1000 Then
Exit Function
End If

' Check for subscript out of range
If Not IsPlaying(Victim) Then
Exit Function
End If

' Make sure they are on the same map
If Not GetPlayerMap(Attacker) = GetPlayerMap(Victim) Then
Exit Function
End If

' Make sure we dont attack the player if they are switching maps
If TempPlayer(Victim).GettingMap = YES Then
Exit Function
End If

' Check if map is attackable
If Not Map(GetPlayerMap(Attacker)).Moral = MAP_MORAL_NONE Or GetPlayerPK(Victim) = NO Then
Call PlayerMsg(Attacker, "This is a safe zone!", BrightRed)
Exit Function
End If

' Check if at same coordinates
Select Case GetPlayerDir(Attacker)
Case DIR_UP
If (GetPlayerY(Victim) + 1 = GetPlayerY(Attacker)) And (GetPlayerX(Victim) = GetPlayerX(Attacker)) Then CanAttackPlayer = True Else Exit Function
Case DIR_DOWN
If (GetPlayerY(Victim) - 1 = GetPlayerY(Attacker)) And (GetPlayerX(Victim) = GetPlayerX(Attacker)) Then CanAttackPlayer = True Else Exit Function
Case DIR_LEFT
If (GetPlayerY(Victim) = GetPlayerY(Attacker)) And (GetPlayerX(Victim) + 1 = GetPlayerX(Attacker)) Then CanAttackPlayer = True Else Exit Function
Case DIR_RIGHT
If (GetPlayerY(Victim) = GetPlayerY(Attacker)) And (GetPlayerX(Victim) - 1 = GetPlayerX(Attacker)) Then CanAttackPlayer = True Else Exit Function
Case Else
Exit Function
End Select

' Make sure they have more then 0 hp
If GetPlayerVital(Victim, Vitals.HP)
Reply
Christ you guys have gotten a lot done. I'm downloading now Smile
Reply
Any info on 3.59....?
Reply
Am I suppose to be working on it?
Reply
Alright I got some work done on MS 3.59. Me and Nean tested it out too so I know what I've done works so far.

Code:
+++++++++++++
++ MS 3.59 ++
+++++++++++++
*This release was done by Giaken*

--------
|Client|
--------
- /setaccess fixed (Giaken)
- /motd fixed (Giaken)
- Added better UBound and IsNumeric checks for all of the commands (Giaken)
- Whispering is fixed now (Giaken)

--------
|Server|
--------
- DestroyBanList now deletes the file properly instead (Giaken)
- Deleted some redundant code (Giaken)
- There is now a MAX_LEVELS constant, which controls the highest level the player can get (Giaken)
- Experience now rolls over instead of being set to 0 (Giaken)
- CanAttackPlayer now works right...mega ROFL at how it was done before (Giaken)
- Items are now properly refreshed when the map sends (Giaken)
- Kicking and banning is fixed now. Before you could kick/ban the same access as you. (Giaken)

Anything else?

EDIT: Just updated. Also I would like to say that the CanAttackPlayer function made me ROFL so hard.
Reply
I've been looking around through the source, I've found no bugs. What now?
Reply
Need to clear target on changing map
Fix CastSpell sub in server (uses old CanAttackPlayer ways and allows the person to attack themselves)
Change AlertMsg to change their window properly

I forgot the other bugs I found on my game...but there were quite a bit.
Reply
What about a refresh command?
Reply
I'm having 2 bugs (atleast in 3.59)
First is that the NPC's are not always showing up, they are there cus they won't let you move, just that you don't see them
Second is that I can't use the maximum of 5 npc's (it says something that there can't be open spaces between slots, while there aren't any open spaces) I can use the first 4 though.
Reply
Yeah that second sentence was a bug I also noticed.
Reply
DFA Wrote:Last update: Nov. 16, 2008
Typo. Smile
Reply
Looking good, DFA.
Reply
DFA Wrote:Last update: Nov. 16, 2008
kool you went into the future to update mirage O.o
Reply
doomteam1 Wrote:
DFA Wrote:Last update: Nov. 16, 2008
kool you went into the future to update mirage O.o

That is one dedicated son of a bitch. Big Grin
Reply
DFA Wrote:make sure you don't use NPCs without names...i tried out the 5 npc thing, it looks fine.

All 5 of 'm got names.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)