Mirage Source

Free ORPG making software.
It is currently Mon Apr 29, 2024 5:14 am

All times are UTC




Post new topic Reply to topic  [ 1592 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 64  Next
Author Message
PostPosted: Wed Sep 24, 2008 11:33 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Trimmed PlayerMove sub.

There is probably more, actually I know there is more that can be done to it, but I was sort of rushed. It's mostly done though.

Code:
Sub PlayerMove(ByVal Index As Long, ByVal Dir As Long, ByVal Movement As Long)
Dim Packet As String
Dim MapNum As Long
Dim x As Long
Dim y As Long
Dim PlayerX As Long, PlayerY As Long
Dim Moved As Byte

    ' Check for subscript out of range
    If IsPlaying(Index) = False Or Dir < DIR_UP Or Dir > DIR_RIGHT Or Movement < 1 Or Movement > 2 Then
        Exit Sub
    End If
   
    Call SetPlayerDir(Index, Dir)
   
    Moved = NO
   
    Select Case Dir
        Case DIR_UP
            If GetPlayerY(Index) > 0 Then
                PlayerX = GetPlayerX(Index)
                PlayerY = GetPlayerY(Index) - 1
            Else
                If Map(GetPlayerMap(Index)).Up > 0 Then
                    Call PlayerWarp(Index, Map(GetPlayerMap(Index)).Up, GetPlayerX(Index), MAX_MAPY)
                    Moved = YES
                End If
            End If
        Case DIR_DOWN
            If GetPlayerY(Index) < MAX_MAPY Then
                PlayerX = GetPlayerX(Index)
                PlayerY = GetPlayerY(Index) + 1
            Else
                If Map(GetPlayerMap(Index)).Down > 0 Then
                    Call PlayerWarp(Index, Map(GetPlayerMap(Index)).Down, GetPlayerX(Index), 0)
                    Moved = YES
                End If
            End If
        Case DIR_LEFT
            If GetPlayerX(Index) > 0 Then
                PlayerX = GetPlayerX(Index) - 1
                PlayerY = GetPlayerY(Index)
             Else
                If Map(GetPlayerMap(Index)).Left > 0 Then
                    Call PlayerWarp(Index, Map(GetPlayerMap(Index)).Left, MAX_MAPX, GetPlayerY(Index))
                    Moved = YES
                End If
            End If
        Case DIR_RIGHT
            If GetPlayerX(Index) > MAX_MAPX Then
                PlayerX = GetPlayerX(Index) + 1
                PlayerY = GetPlayerY(Index)
            Else
                If Map(GetPlayerMap(Index)).Right > 0 Then
                    Call PlayerWarp(Index, Map(GetPlayerMap(Index)).Right, 0, GetPlayerY(Index))
                    Moved = YES
                End If
            End If
    End Select

        If Map(GetPlayerMap(Index)).Tile(PlayerX, PlayerY).Type <> TILE_TYPE_BLOCKED Then
            ' Check to see if the tile is a key and if it is check if its opened
            If Map(GetPlayerMap(Index)).Tile(PlayerX, PlayerY).Type <> TILE_TYPE_KEY Or (Map(GetPlayerMap(Index)).Tile(PlayerX, PlayerY).Type = TILE_TYPE_KEY And TempTile(GetPlayerMap(Index)).DoorOpen(PlayerX, PlayerY) = YES) Then
                Call SetPlayerY(Index, PlayerY)
               
                Packet = SPlayerMove & SEP_CHAR & Index & SEP_CHAR & PlayerX & SEP_CHAR & PlayerY & SEP_CHAR & GetPlayerDir(Index) & SEP_CHAR & Movement & END_CHAR
                Call SendDataToMapBut(Index, GetPlayerMap(Index), Packet)
                Moved = YES
            End If
        End If
       
    ' Check to see if the tile is a warp tile, and if so warp them
    If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_WARP Then
        MapNum = Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1
        x = Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data2
        y = Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data3
                       
        Call PlayerWarp(Index, MapNum, x, y)
        Moved = YES
    End If
   
    ' Check for key trigger open
    If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_KEYOPEN Then
        x = Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data1
        y = Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data2
       
        If Map(GetPlayerMap(Index)).Tile(x, y).Type = TILE_TYPE_KEY And TempTile(GetPlayerMap(Index)).DoorOpen(x, y) = NO Then
            TempTile(GetPlayerMap(Index)).DoorOpen(x, y) = YES
            TempTile(GetPlayerMap(Index)).DoorTimer = GetTickCount
                           
            Call SendDataToMap(GetPlayerMap(Index), SMapKey & SEP_CHAR & x & SEP_CHAR & y & SEP_CHAR & 1 & END_CHAR)
            Call MapMsg(GetPlayerMap(Index), "A door has been unlocked.", White)
        End If
    End If
   
    ' They tried to hack
    If Moved = NO Then
        Call HackingAttempt(Index, "Position Modification")
    End If
End Sub


Top
 Profile  
 
PostPosted: Thu Sep 25, 2008 5:19 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Here's a preview of the MS4 changes so far:

Code:
--------
|Client|
--------
- Heavily optimized looping (DFA's code, implemented by Dugor)
- The following game editors do no allow blank names: Spell, Shop, NPC, Item (DFA)
- Removed assignment to MyText from GameLoop, moved to txtMyChat_Change (DFA)
- Added password character for password text boxes (Giaken)
- Made frmMirage.lblName taller to support longer game name's (Giaken)
- frmMirage.lblName and frmMirage's caption are now updated with the game's name (Giaken)
- Fill button added to map editor (Lea's code, implemented by Giaken)
- frmIndex is now opened as a modal (Giaken)
- Max is updated in Npc and Item editor (Giaken)
- Map Item captions changed to 1's and the value minimum is 1 now (Giaken)
- Added a MapItemEditorBltItem and now shows preview when selecting a Map Item (Giaken)
- Added a KeyItemEditorBltItem and now shows preview like the map item does (Giaken)
- Did an extra check for warp tile to make sure their X and Y Offset is 0 (Giaken)
- Attributes are now displayed differently and are centered on the tile better (Giaken)
- Changed the CheckInput sub to use a Select Case (Giaken)
- Changed macro check to be more optimized (reduced to only a few lines) and added the shiftdown check (Giaken)
- Changed NPCs to work off the High_Npc_Index instead of MAX_MAP_NPCS (Giaken)
- Moved the check if we're still connected to the top of the GameLoop (Giaken)
- Moved the Clear button on the map editor to the front (Giaken)

--------
|Server|
--------
- Heavily optimized looping (DFA's code, implemented by Dugor)
- Had problems with Function CanAttackPlayer, fixed but lacks optimization. (DFA)
- Chat box scrolls down while minimized (Giaken)

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Thu Sep 25, 2008 5:48 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Quote:
--------
|Server|
--------
- Heavily optimized looping (DFA's code, implemented by Dugor)
- Had problems with Function CanAttackPlayer, fixed but lacks optimization. (DFA)
- Chat box scrolls down while minimized (Giaken)
- Added modPlayer - holds anything related to players (Dugor)
- Added OnDeath(ByVal Index As Long) - what will happen when the player dies (Dugor)
- added DamageEquipment(ByVal Index As Long, ByVal EquipmentSlot As Equipment) - reduces the dur. on certain equipment slot (Dugor)
- Reworked AttackNpc, AttackPlayer, NpcAttackPlayer (Dugor)
- Removed reducing of durability from GetPlayerProtection and GetPlayerDamage (Dugor)
- Fixed a couple of packets that werent converted to the enum (Dugor))


Top
 Profile  
 
PostPosted: Thu Sep 25, 2008 6:28 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Giaken's been stealin' my creditz

lulz

Got a patch file coming giaken?

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Thu Sep 25, 2008 6:31 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
I didn't steal your credits. The only thing I looked in your client for was the fill button. Everything else was planned by me so I just went ahead and did it myself.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Thu Sep 25, 2008 7:57 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
The newest version should be on the SVN.

I think i did it right.


Top
 Profile  
 
PostPosted: Thu Sep 25, 2008 10:02 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Line 11: Property Icon in frmServer had an invalid file reference.
Line 30: Property TabPicture(0) in SSTab1 had an invalid file reference.
Line 38: Property TabPicture(1) in SSTab1 had an invalid file reference.
Line 43: Property TabPicture(2) in SSTab1 had an invalid file reference.

Line 20: Property Icon in frmChars had an invalid file reference.
Line 41: Property ItemData in lstChars had an invalid file reference.
Line 43: Property List in lstChars had an invalid file reference.


Line 20: Property Icon in frmLogin had an invalid file reference.

etc etc...

Other than that things look fine

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Thu Sep 25, 2008 10:33 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
I won't be able to fix that until tomorrow :/


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 6:28 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
http://chaosengine.smfforfree4.com/index.php/topic,715.0.html

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 6:41 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
So is he saying he made the sliding transition ?


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 6:44 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
He said he put it in a blank source. By the looks of things, it's just Lea's released compiled one.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 6:48 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
I'm still waiting to see parts of MS4 put into all the 'engines' out there.


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 6:56 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
I don't care :)

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 6:59 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Oh for the people not using SVN - shame on you - but here's a link to the latest code:

http://deadnoggin.com/deadnoggin/MS4-355.rar


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 7:00 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
MS 3.55??

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Fri Sep 26, 2008 7:04 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Sep 12, 2008 11:18 pm
Posts: 176
Location: England.
GIAKEN wrote:
MS 3.55??


Quote:
+++++++++++++
++ MS 3.55 ++
+++++++++++++
*This release was done by DFA and Dugor and Giaken*


Yep. =-p


Top
 Profile  
 
PostPosted: Sun Sep 28, 2008 4:55 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Quote:
Line 152: Class MSComctlLib.ListView of control lvwInfo was not a loaded control class.
Line 11: Property Icon in frmServer had an invalid file reference.
Line 30: Property TabPicture(0) in SSTab1 had an invalid file reference.
Line 38: Property TabPicture(1) in SSTab1 had an invalid file reference.
Line 43: Property TabPicture(2) in SSTab1 had an invalid file reference.
Line 158: The property name _ExtentX in lvwInfo is invalid.
Line 159: The property name _ExtentY in lvwInfo is invalid.
Line 160: The property name View in lvwInfo is invalid.
Line 161: The property name Arrange in lvwInfo is invalid.
Line 162: The property name LabelWrap in lvwInfo is invalid.
Line 163: The property name HideSelection in lvwInfo is invalid.
Line 164: The property name AllowReorder in lvwInfo is invalid.
Line 165: The property name FullRowSelect in lvwInfo is invalid.
Line 166: The property name GridLines in lvwInfo is invalid.
Line 167: The property name _Version in lvwInfo is invalid.
Line 172: The property name NumItems in lvwInfo is invalid.
Line 176: The property name ColumnHeader(1) in lvwInfo is invalid.
Line 181: The property name ColumnHeader(2) in lvwInfo is invalid.
Line 186: The property name ColumnHeader(3) in lvwInfo is invalid.
Line 191: The property name ColumnHeader(4) in lvwInfo is invalid.


While opening the latest server project
Anyone know what this means?

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Mon Sep 29, 2008 3:00 pm 
Offline
Newbie

Joined: Mon May 12, 2008 4:54 pm
Posts: 9
Lea wrote:
Quote:
Line 152: Class MSComctlLib.ListView of control lvwInfo was not a loaded control class.
Line 11: Property Icon in frmServer had an invalid file reference.
Line 30: Property TabPicture(0) in SSTab1 had an invalid file reference.
Line 38: Property TabPicture(1) in SSTab1 had an invalid file reference.
Line 43: Property TabPicture(2) in SSTab1 had an invalid file reference.
Line 158: The property name _ExtentX in lvwInfo is invalid.
Line 159: The property name _ExtentY in lvwInfo is invalid.
Line 160: The property name View in lvwInfo is invalid.
Line 161: The property name Arrange in lvwInfo is invalid.
Line 162: The property name LabelWrap in lvwInfo is invalid.
Line 163: The property name HideSelection in lvwInfo is invalid.
Line 164: The property name AllowReorder in lvwInfo is invalid.
Line 165: The property name FullRowSelect in lvwInfo is invalid.
Line 166: The property name GridLines in lvwInfo is invalid.
Line 167: The property name _Version in lvwInfo is invalid.
Line 172: The property name NumItems in lvwInfo is invalid.
Line 176: The property name ColumnHeader(1) in lvwInfo is invalid.
Line 181: The property name ColumnHeader(2) in lvwInfo is invalid.
Line 186: The property name ColumnHeader(3) in lvwInfo is invalid.
Line 191: The property name ColumnHeader(4) in lvwInfo is invalid.



"frmServer.frx" file doesn't exist?

i got the same error log when i delete that file....


Top
 Profile  
 
PostPosted: Mon Sep 29, 2008 4:04 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
Ok I think I fixed those error logs. I'll do some more later <3

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
PostPosted: Tue Sep 30, 2008 6:09 pm 
Offline
Newbie
User avatar

Joined: Wed Sep 05, 2007 4:59 pm
Posts: 6
Location: United Kingdom, Leeds
i really like this way of updating with SVN Good work :)


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 2:51 am 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Sub MapMsg is unused client side. Not sure if it was noticed, I seen the packet name wasn't converted so.. Yep.


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 7:35 pm 
Offline
Newbie

Joined: Sun Nov 26, 2006 10:27 am
Posts: 16
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 ^^'


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 8:06 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
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


Top
 Profile  
 
PostPosted: Thu Oct 02, 2008 8:42 pm 
Offline
Newbie

Joined: Sun Nov 26, 2006 10:27 am
Posts: 16
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


Top
 Profile  
 
PostPosted: Fri Oct 03, 2008 11:12 am 
Offline
Newbie

Joined: Mon May 12, 2008 4:54 pm
Posts: 9
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...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1592 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 64  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group