Mirage Source

Free ORPG making software.
It is currently Sun Apr 28, 2024 2:29 am

All times are UTC




Post new topic Reply to topic  [ 77 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Thu Jun 01, 2006 8:31 pm 
Offline
Tutorial Bot
User avatar

Joined: Thu Mar 22, 2007 5:23 pm
Posts: 49
[edit by Lea] This tutorial works in MSE2 and below. If using a newer version, please view the updated tutorial at the link below. On page three of this thread, the discussion switches! Thanks!
http://www.valkoria.com/CharCreateSprit ... SE3_50.pdf


Author: grimsk8ter11
Difficulty: 2/5

:: SERVER SIDE ::
In modServerTCP, replace all of SendNewCharClasses with:
Code:
Sub SendNewCharClasses(ByVal Index As Long)
Dim Packet As String
Dim i As Long

    Packet = "NEWCHARCLASSES" & SEP_CHAR & Max_Classes & SEP_CHAR
    For i = 0 To Max_Classes
        Packet = Packet & GetClassName(i) & SEP_CHAR & GetClassMaxHP(i) & SEP_CHAR & GetClassMaxMP(i) & SEP_CHAR & GetClassMaxSP(i) & SEP_CHAR & Class(i).STR & SEP_CHAR & Class(i).DEF & SEP_CHAR & Class(i).SPEED & SEP_CHAR & Class(i).MAGI & SEP_CHAR & Class(i).Sprite & SEP_CHAR
    Next i
    Packet = Packet & END_CHAR
   
    Call SendDataTo(Index, Packet)
End Sub


:: CLIENT SIDE ::
In frmNewChar, make 2 picture boxes, name them: picpic and picSprite.
picpic Properties:
Code:
Size 32x32
border style = none
appearance = flat


picSprites Properties:
Code:
Size 32x32
border style = none
appearance = flat
visible = false
auto redraw = true
auto resize = true

Make a timer named Timer. Give it the properties:
Code:
enabled = true
interval = 50


Timer Code:
Code:
On Error Resume Next
If optMale.Value = True Then
    Call BitBlt(picpic.hDC, 0, 0, PIC_X, PIC_Y, picSprites.hDC, 0, Int(Class(cmbClass.ListIndex).Sprite) * PIC_Y, SRCCOPY)
Else
    Call BitBlt(picpic.hDC, 0, 0, PIC_X, PIC_Y, picSprites.hDC, 0, Int(Class(cmbClass.ListIndex).Sprite) * PIC_Y, SRCCOPY)
End If


Finally, add a Form_Load sub for the form and put the following inside of it:
Code:
picSprites.Picture = LoadPicture(App.Path & "\sprites.bmp")



In modHandleData, find:
Code:
"newcharclasses"


Replace from:
Code:
n = n + 1

Down to:
Code:
Next i

With:
Code:
n = n + 1

For i = 0 To Max_Classes
    Class(i).Name = Parse(n)
   
    Class(i).HP = Val(Parse(n + 1))
    Class(i).MP = Val(Parse(n + 2))
    Class(i).SP = Val(Parse(n + 3))
   
    Class(i).Str = Val(Parse(n + 4))
    Class(i).DEF = Val(Parse(n + 5))
    Class(i).SPEED = Val(Parse(n + 6))
    Class(i).MAGI = Val(Parse(n + 7))
    Class(i).Sprite = Val(Parse(n + 8))
n = n + 9
Next i

That's all!


Top
 Profile  
 
PostPosted: Sat Apr 12, 2008 1:49 pm 
Offline
Regular
User avatar

Joined: Sun Mar 02, 2008 2:21 am
Posts: 50
Tutorial Bot wrote:

Finally, add a Form_Load sub for the form and put the following inside of it:
Code:
picSprites.Picture = LoadPicture(App.Path & "\sprites.bmp")



Hmm, this is my first time every coding, scripting, or even looking at a source.... I tried doing this and it gave me an error.. should it be:

Code:
picSprites.Picture = LoadPicture(App.Path & "\Gfx\sprites.bmp")


Sorry I'm still a noob, but I really want to learn! Just wanted to know if this was the right way..

_________________
Image


Top
 Profile  
 
PostPosted: Sat Apr 12, 2008 2:54 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
does it work?

_________________
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: Sat Apr 12, 2008 3:07 pm 
Offline
Regular
User avatar

Joined: Sun Mar 02, 2008 2:21 am
Posts: 50
It works, but the sprite is backwards.. like the character is facing up so you cant see the sprite's face...

_________________
Image


Top
 Profile  
 
PostPosted: Sat Apr 12, 2008 3:11 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
add a "+ 96" to the left + right rec.

_________________
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: Sat Apr 12, 2008 7:25 pm 
Offline
Knowledgeable
User avatar

Joined: Thu Dec 28, 2006 8:57 pm
Posts: 297
Location: This magical place called 'reality'
or a + (3 * PIC_X)

_________________
P2B Feed: Custom AI
Image


Top
 Profile  
 
PostPosted: Sun Apr 13, 2008 2:14 pm 
Offline
Knowledgeable

Joined: Sat Jul 08, 2006 8:24 am
Posts: 339
Or (35*2+26)


Top
 Profile  
 
PostPosted: Sun Apr 13, 2008 2:16 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
or CInt(97/5 + 76.6)

_________________
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 Apr 14, 2008 6:04 am 
Offline
Regular
User avatar

Joined: Sun Mar 02, 2008 2:21 am
Posts: 50
I get the point.. thanks everyone! :shock:

_________________
Image


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 3:18 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 11, 2007 10:38 pm
Posts: 144
Location: USA - PA :(
Sry to Necro XD


I have a problem
WHen I go to create a new char, it hi-lites:
Quote:
Sub SendNewCharClasses(ByVal Index As Long)
Dim Packet As String
Dim i As Long

Packet = "NEWCHARCLASSES" & SEP_CHAR & Max_Classes & SEP_CHAR
For i = 0 To Max_Classes
Packet = Packet & GetClassName(i) & SEP_CHAR & GetClassMaxHP(i) & SEP_CHAR & GetClassMaxMP(i) & SEP_CHAR & GetClassMaxSP(i) & SEP_CHAR & Class(i).STR & SEP_CHAR & Class(i).DEF & SEP_CHAR & Class(i).SPEED & SEP_CHAR & Class(i).MAGI & SEP_CHAR & Class(i).Sprite & SEP_CHAR
Next i
Packet = Packet & END_CHAR

Call SendDataTo(Index, Packet)
End Sub


Any ideas?

_________________
Ravuya wrote:
If we didn't have randomness this forum would be full of a bunch of nerdy programmers being racist to Americans.


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 3:53 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Does it give you an error?


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 4:05 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 11, 2007 10:38 pm
Posts: 144
Location: USA - PA :(
oh yes forgot that.

It gives me:

Quote:
Compile Error:

Method or data member not found

_________________
Ravuya wrote:
If we didn't have randomness this forum would be full of a bunch of nerdy programmers being racist to Americans.


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 5:01 pm 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
That error means it can't find Class(i).Str .

Have you edited the ClassRec?


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 6:50 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 11, 2007 10:38 pm
Posts: 144
Location: USA - PA :(
I don't think so :-/..I'll so see what's wrong with ClassRec

_________________
Ravuya wrote:
If we didn't have randomness this forum would be full of a bunch of nerdy programmers being racist to Americans.


Top
 Profile  
 
PostPosted: Fri Aug 15, 2008 11:06 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Nov 11, 2007 10:38 pm
Posts: 144
Location: USA - PA :(
Yep Fixed. thanks. I accidentally did another tut wrong XD.

_________________
Ravuya wrote:
If we didn't have randomness this forum would be full of a bunch of nerdy programmers being racist to Americans.


Top
 Profile  
 
PostPosted: Sat Aug 16, 2008 11:11 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Apr 13, 2008 12:02 am
Posts: 128
I got the same error what was causing it because i am using a fresh MS3.

_________________
Image


Top
 Profile  
 
PostPosted: Sun Aug 17, 2008 2:33 am 
Offline
Pro
User avatar

Joined: Tue Nov 13, 2007 2:42 pm
Posts: 509
Dugor wrote:
That error means it can't find Class(i).Str .

Have you edited the ClassRec?


In MSE3 there is no Class(i).Str. I changed the structure for stats.

Class(i).Stat(Stats.Strength)


Top
 Profile  
 
PostPosted: Tue Sep 02, 2008 2:59 am 
Offline
Newbie
User avatar

Joined: Mon Oct 15, 2007 9:37 pm
Posts: 15
"Error #9, Subscript Out of Range."
:?

By the way, sorry for necro-ing,(now that I noticed.)


Top
 Profile  
 
PostPosted: Tue Sep 02, 2008 1:12 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Jesus christ people, use your common sense xD

This tutorial is for a blank MS.

If you've changed it, or us the new MS3.20 + then you'll have to change it to work with your source.

_________________
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: Tue Sep 02, 2008 8:16 pm 
Offline
Knowledgeable
User avatar

Joined: Wed Jul 26, 2006 11:22 pm
Posts: 143
Location: Virginia, USA
Common sense isn't common. :)

If it was, the Internet wouldn't be such a fun-to-flame place. ;D


Top
 Profile  
 
PostPosted: Fri Sep 05, 2008 11:47 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
I was thinking of posting a new tutorial for this when I do the character creation for Merrimint.


Top
 Profile  
 
PostPosted: Sat Sep 06, 2008 12:43 am 
Offline
Knowledgeable
User avatar

Joined: Wed Jul 26, 2006 11:22 pm
Posts: 143
Location: Virginia, USA
This was made back in the day when most of us were pretty gimp. ;D


Top
 Profile  
 
PostPosted: Sat Sep 06, 2008 12:50 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
DFA wrote:
ban bitblt =(

FFS, why are you guys using MS3.0.3 still? I did everything you guys asked for, even got the license dropped...

For these tutorials...i think someone, either robin or me, needs to validate the quality of the tutorials. This should definitely be disapproved for usage of BitBlt when DirectDraw is capable.


that was for me wasnt it XD

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
PostPosted: Sat Sep 06, 2008 10:35 am 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
This tutorial is useful for people too... slow... to use timers.

Just switch it around to use BltToDC.

_________________
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: Sat Sep 06, 2008 1:58 pm 
Anthony wrote:
I was thinking of posting a new tutorial for this when I do the character creation for Merrimint.


I already did this in Merrimint.

:P

The way DFA is saying to do it.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 77 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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