This is a tutorial on how to create your very own Runescape Client.
Key:
Names of objects in Red
Important notes in Bold
Handy tips in Blue
You need:
One standard form
- Frm
One Module
- Mod
Two OptionButtons
- OptLow with caption "Low Detail"
- and OptHigh with caption "High Detail"
One WebBrowser
- Web
Two ListBoxes
- ComMemS and ComFreeS
Two hidden TextBoxes
- ComMem and ComFree
One CommandButton
- CmdGo
Two timers
- TimM and TimF
--------------------------------------------------------
THE FORM
Set up your form how you wish, adding images, colour schemes can be done by you, after all it will be YOUR client.
The ideal size for your webbrowser object is 12000 wide and 8020 high.
Now ComMemS must contain a list of every member's world, because this is the "selectable list for member worlds", hence the name, so I done the hard part for you.
Copy this and paste it into the List in design view.
Code:2 6 9 12 18 22 23 24 26 27 28 36 41 42 44 46 48 53 54 58 59 60 64 65 66 69 70 71 77 78 79 83 84 88 89 91 98 99 100 103 104 110 111 112 114 115 120 121
Now do the same for ComFreeS, again in the List section in design view. These ones are the free worlds.
Code:1 3 4 5 7 8 10 11 13 14 15 16 17 19 20 21 25 29 30 31 32 33 34 35 37 38 39 40 43 45 47 49 50 51 52 55 56 57 61 62 63 67 72 73 74 75 76 80 81 82 85 86 87 90 92 93 94 95 96 97 101 102 106 107 108 109 113 117 118 119
Create a sub now for the selection of the Member worlds:
Code:Private Sub MemS() CmdGo.Caption = "Load World" & vbNewLine & ComMemS.Text ComFree.Text = "" ComMem.Text = ComMemS.Text End Sub
And Free worlds:
Code:Private Sub FreeS() CmdGo.Caption = "Load World" & vbNewLine & ComFreeS.Text ComMem.Text = "" ComFree.Text = ComFreeS.Text End Sub
Now remember both ComFree and ComMem are invisible text boxes and ComMemS and ComFreeS are visible Listboxes.
So set the textboxes - the invisible ones - so that they both cant have a value in them:
Code:Private Sub ComMem_Change() ComFree.Text = "" End Sub Private Sub ComFree_Change() ComMem.Text = "" End Sub
Now in the ComMemS and ComFreeS click events call their new subs.
Code:Private Sub ComMemS_Click() MemS End Sub Private Sub ComFreeS_Click() FreeS End Sub
Now we will double-click on Web and add some code so that because we are not using Runescape to switch worlds, we don't want the browser to stop and go back to Runescape's main page, so in the BeforeNavigate2 we enter:
Now we need to set the form when it loads so that everything is right to go:Code:Private Sub Web_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean) On Error Resume Next If URL = "http://www.runescape.com/" Then Cancel = True End Sub
Code:Private Sub Form_Load() CmdGo.caption = "Na" OptLow.Value = True Web.Navigate "http://www.runescape.com/title.ws" End Sub
--------------------------------------------------------
THE MODULE
Now open up Mod, your module, and put in a new public sub. This is the most time-consuming and difficult part of the entire project, so I have done it for you, you must read through this in order to understand what it does.
It simply puts together the "http:\\" call, the server number depending on what world you have chosen, and whether you chose high or low detail.
Code:Public Sub ChangeWorlds() '|---------------| DECLARES |---------------| On Error Resume Next Dim Server As String Dim Detail As String Dim URL As String Dim World As String '|---------------| IF NOTHING |---------------| If Frm.CmdGo.Caption = "Na" Then Exit Sub End If '|---------------| DETAIL |---------------| If Frm.OptLow.Value = True Then Detail = "lowmem=1&plugin=0&affiliate=runescape" End If If Frm.OptHigh.Value = True Then Detail = "lowmem=0&plugin=0&affiliate=runescape" End If '|---------------| CHANGES |---------------| If Frm.ComFree.Text = "1" Then Server = "http://ul2.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "2" Then Server = "http://ul4.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "3" Then Server = "http://po3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "4" Then Server = "http://po4.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "5" Then Server = "http://po5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "6" Then Server = "http://po6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "7" Then Server = "http://above2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "8" Then Server = "http://above3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "9" Then Server = "http://above4.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "10" Then Server = "http://jolt7.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "11" Then Server = "http://jolt8.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "12" Then Server = "http://jolt9.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "13" Then Server = "http://nl3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "14" Then Server = "http://nl4.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "15" Then Server = "http://uk2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "16" Then Server = "http://uk3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "17" Then Server = "http://tor1.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "18" Then Server = "http://tor2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "19" Then Server = "http://nl7.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "20" Then Server = "http://nl8.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "21" Then Server = "http://nl11.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "22" Then Server = "http://nl1.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "23" Then Server = "http://uk4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "24" Then Server = "http://uk5.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "25" Then Server = "http://nl12.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "26" Then Server = "http://ul5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "27" Then Server = "http://nl5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "28" Then Server = "http://nl6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "29" Then Server = "http://ul6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "30" Then Server = "http://po7.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "31" Then Server = "http://po8.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "32" Then Server = "http://ul1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "33" Then Server = "http://at1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "34" Then Server = "http://at2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "35" Then Server = "http://at3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "36" Then Server = "http://at4.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "37" Then Server = "http://tor3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "38" Then Server = "http://planet1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "39" Then Server = "http://planet2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "40" Then Server = "http://planet3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "41" Then Server = "http://planet4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "42" Then Server = "http://po2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "43" Then Server = "http://sl11.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "44" Then Server = "http://at6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "45" Then Server = "http://planet5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "46" Then Server = "http://planet6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "47" Then Server = "http://above5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "48" Then Server = "http://above6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "49" Then Server = "http://ams1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "50" Then Server = "http://ams2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "51" Then Server = "http://ams3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "52" Then Server = "http://ams4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "53" Then Server = "http://ams5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "54" Then Server = "http://ams6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "55" Then Server = "http://ch1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "56" Then Server = "http://nl10.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "57" Then Server = "http://ch3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "58" Then Server = "http://ch4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "59" Then Server = "http://ch5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "60" Then Server = "ttp://ch6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "61" Then Server = "http://se1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "62" Then Server = "http://se2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "63" Then Server = "http://se3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "64" Then Server = "http://se4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "65" Then Server = "http://se5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "66" Then Server = "http://se6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "67" Then Server = "http://jolt10.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "68" Then Server = "http://jolt11.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "69" Then Server = "http://jolt12.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "70" Then Server = "http://sl10.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "71" Then Server = "http://uk7.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "72" Then Server = "http://sl1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "73" Then Server = "http://sl2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "74" Then Server = "http://sl3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "75" Then Server = "http://sl4.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "76" Then Server = "http://sl5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "77" Then Server = "http://sl6.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "78" Then Server = "http://sl7.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "79" Then Server = "http://sl8.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "80" Then Server = "http://jolt1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "81" Then Server = "http://jolt2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "82" Then Server = "http://jolt3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "83" Then Server = "http://jolt4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "84" Then Server = "http://jolt5.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "85" Then Server = "http://ny1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "86" Then Server = "http://ny2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "87" Then Server = "http://ny4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "88" Then Server = "http://ny5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "89" Then Server = "http://ny6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "90" Then Server = "http://ny7.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "91" Then Server = "http://ny8.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "92" Then Server = "http://nl9.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "93" Then Server = "http://mi1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "94" Then Server = "http://mi2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "95" Then Server = "http://mi3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "96" Then Server = "http://mi4.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "97" Then Server = "http://mi5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "98" Then Server = "http://mi6.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "99" Then Server = "http://mi7.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "100" Then Server = "http://ul3.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "101" Then Server = "http://at7.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "102" Then Server = "http://at8.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "103" Then Server = "http://at9.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "104" Then Server = "http://at10.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "105" Then Server = "http://uk8.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "106" Then Server = "http://uk9.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "107" Then Server = "http://au1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "108" Then Server = "http://au2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "109" Then Server = "http://au3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "110" Then Server = "http://au4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "111" Then Server = "http://au5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "112" Then Server = "http://au6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "113" Then Server = "http://tor4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "114" Then Server = "http://tor5.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "115" Then Server = "http://tor6.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "117" Then Server = "http://swe1.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "118" Then Server = "http://swe2.runescape.com/rs2.cgi?" If Frm.ComFree.Text = "119" Then Server = "http://swe3.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "120" Then Server = "http://swe4.runescape.com/rs2.cgi?" If Frm.ComMem.Text = "121" Then Server = "http://swe5.runescape.com/rs2.cgi?" World = Server & Detail Frm.Web.Navigate World End Sub
That should be it, now just add this sub into the CmdGo click event and everythign should be fine.
Code:Private Sub CmdGo_Click() Web.stop Call ChangeWorlds End Sub
Finished! Now you can add your own leet looking graphics .. to your client.
If you think your going to be better than swiftswitch .. i suggest you get webhosting and then add a textbox for searching to your website.
eg. Prices, Armor etc.
Same as adding a highscores table into this client, my suggestion is to use php image manipulation to get the info and display it into your client
good luck!
(with credit to Jeremiah)
-AusHell





Reply With Quote

















Marzey






