vbGore Free Online RPG Engine

Revolutionizing Visual Basic ORPG Development
It is currently Sun May 19, 2013 5:44 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Mod-able Defense
PostPosted: Sun Oct 12, 2008 12:39 pm 
Bytewise Operator

Joined: Wed Oct 08, 2008 8:09 am
Posts: 148
For those of you who would like to be able to spend points on Def, I have a little tutorial for you. 8)

First, go to Bluewave.ini (or appropriate skin file) and find [STATWINDOW]. In this code below, I added added on a AddDefX, AddDefY, AddDefHeight, and AddDefWidth. Also I moved things a round a little. Here's my code:
Code:
[STATWINDOW]
ScreenX=0
ScreenY=150
ScreenWidth=250
ScreenHeight=250
CmbX=25
CmbY=20
AddStrX=7
AddStrY=40
AddStrWidth=16
AddStrHeight=16
AddDefX=7
AddDefY=60
AddDefWidth=16
AddDefHeight=16
AddAgiX=7
AddAgiY=80
AddAgiWidth=16
AddAgiHeight=16
AddMagX=7
AddMagY=100
AddMagWidth=16
AddMagHeight=16
StrX=25
StrY=40
DefX=25
DefY=60
AgiX=25
AgiY=80
MagX=25
MagY=100
PointsX=25
PointsY=140
DmgX=25
DmgY=120
GoldX=25
GoldY=160



in the client side script:
Go to TileEngine.bas. Find "Private Type StatWindow" and add the following in there:
Code:
    AddDef As Rectangle


go to the "Engine_Init_Gui" function and find 'Load stats window. Add this in there:
Code:
        .AddDef.X = Val(Var_Get(s, "STATWINDOW", "AddDefX"))
        .AddDef.Y = Val(Var_Get(s, "STATWINDOW", "AddDefY"))
        .AddDef.Width = Val(Var_Get(s, "STATWINDOW", "AddDefWidth"))
        .AddDef.Height = Val(Var_Get(s, "STATWINDOW", "AddDefHeight"))


Find the "Engine_Render_GUI_Window" function. In there find "Case StatWindow". In there find "If BaseStats(SID.Points) > 0 Then". Add this too it:
Code:
Engine_Render_Grh .AddGrh, .Screen.X + .AddDef.X, .Screen.Y + .AddDef.Y, 0, 1



Go to the Input.bas file now. Go to the "Input_Mouse_LeftClick_Window" function. Find "Case StatWindow" and add this to it:
Code:

                        'Raise def
                        If Engine_Collision_Rect(MousePos.X, MousePos.Y, 1, 1, .Screen.X + .AddDef.X, .Screen.Y + .AddDef.Y, .AddDef.Width, .AddDef.Height) Then
                            sndBuf.Allocate 2
                            sndBuf.Put_Byte DataCode.User_BaseStat
                            sndBuf.Put_Byte SID.DEF
                        End If




Now for the Server side script.
Go to the TCP.bas file and find the "Data_User_BaseStat" function. find the line "'Invalid stats" and remove SID.DEF from there.


There you go!


Top
 Profile  
 
 Post subject: Re: Mod-able Defense
PostPosted: Mon Oct 13, 2008 3:29 am 
Bit Baby

Joined: Tue Sep 02, 2008 12:33 pm
Posts: 382
Location: United Kingdom
GoreMania, Im impressed with all the tutorials your making. I mean yea, its a lot of small stuff..but you gotta start somewhere. Work your way up as it were :)

Now if you could do a "100% complete updated mmo, all gfx, files, DB's etc included tutorial", that would be great! haha ^^


Top
 Profile  
 
 Post subject: Re: Mod-able Defense
PostPosted: Mon Oct 13, 2008 4:23 am 
Slave to the BB

Joined: Sat Feb 24, 2007 11:17 pm
Posts: 2704
Location: The Aussie Land
STOP HELPING PEOPLE!!! >:(



Nah awesome work man, the world needs people like you :D


Top
 Profile  
 
 Post subject: Re: Mod-able Defense
PostPosted: Mon Oct 13, 2008 5:13 am 
Bytewise Operator

Joined: Wed Oct 08, 2008 8:09 am
Posts: 148
:rofl:


Top
 Profile  
 
 Post subject: Re: Mod-able Defense
PostPosted: Fri Oct 17, 2008 4:48 pm 
=^.^= Kitty =^.^=

Joined: Tue Jun 03, 2008 11:01 pm
Posts: 963
Location: In Koredai
Noez... Soon there'll be no moar noobs for me to flame. :(


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


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

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group