[Ex] Launcher Daoc
Posté : jeu. 31 juil. 2008 20:13
par jbnh
Voila j'ai fait donc un petit launcher Dark Age of Camelot. Il s'adresse aux serveur non officiels, de démo (zone PvP et RvR uniquement et donc légaux).
Je l'ai fait pour moi mais j'espère que qqun sera intéressé, des joueurs daoc sur le site?
Le code est long pour pas grand chose il y a facilement moyen de le raccourcir mais j'ai pas envie 
Deux screenshots :

Je l'ai fait pour moi mais j'espère que qqun sera intéressé, des joueurs daoc sur le site?

► Afficher le textele code
Code : Tout sélectionner
#include <GUIConstants.au3>
#include <ie.au3>
#include <string.au3>
#include <array.au3>
$GUI = GUICreate("Quick Connect - DAoC", 270, 70, -1, -1)
$server = GUICtrlCreateCombo("Dawn of Light: Eden", 10, 10, 250, 20)
GUICtrlSetData(-1, "Dawn of Light: Storm|Uthgard|Darkside PvP|Urzaria|[ [ [ ~~~ M.I.G ~~~ ] ] ]|Promise Shard [New]|Amtenael|Thid I50 Free RR 6/Cap 21|Ivalice [Rates x5]|Parcel Force|[i50]The Labyrinth v1.2|Rewritten Age of Camelot|Ysendar|Kheldron - Die alte Welt|The Epic Adventure Shard|Ganrod[Staff]|Anduril")
$Button_1 = GUICtrlCreatePic("ressources/btn1.jpg", 15, 35, 80, 22)
$Button_2 = GUICtrlCreatePic("ressources/btn3.jpg", 100, 35, 79, 22)
$Button_3 = GUICtrlCreatePic("ressources/btn2.jpg", 185, 35, 80, 22)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $nMsg = $Button_1
If GUICtrlRead($server) = "Dawn of Light: Eden" Then
$url = "daoc://91.121.134.198:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Dawn of Light: Storm" Then
$url = "daoc://71.164.188.115:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Uthgard" Then
$url = "daoc://89.238.64.166:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Darkside PvP" Then
$url = "daoc://74.222.157.170:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Urzaria" Then
$url = "daoc://91.39.68.235:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "[ [ [ ~~~ M.I.G ~~~ ] ] ]" Then
$url = "daoc://mig.podzone.org:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Promise Shard [New]" Then
$url = "daoc://85.17.135.197:10510"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Amtenael" Then
$url = "daoc://88.191.84.17:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Thid I50 Free RR 6/Cap 21" Then
$url = "daoc://87.102.39.90:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Ivalice [Rates x5]" Then
$url = "daoc://91.121.99.168:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Parcel Force" Then
$url = "daoc://88.191.14.197:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "[i50]The Labyrinth v1.2" Then
$url = "daoc://87.118.112.11:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Rewritten Age of Camelot" Then
$url = "daoc://24.9.228.42:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Ysendar" Then
$url = "daoc://89.2.218.131:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Kheldron - Die alte Welt" Then
$url = "daoc://217.82.33.76:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "The Epic Adventure Shard" Then
$url = "daoc://195.43.185.143:10300"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Ganrod[Staff]" Then
$url = "daoc://ganrod.ath.cx:10302"
$object_IE = _iecreate($url,0,0,1)
Elseif GUICtrlRead($server) = "Anduril" Then
$url = "daoc://62.141.56.188:10300"
$object_IE = _iecreate($url,0,0,1)
Endif
Case $nMsg = $Button_2
InetGet("http://www.daocportal.net/?page=serverlist", "page", 1)
filemove("page", "page.txt")
$file = FileOpen("page.txt", 0)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
$String = FileRead($file)
$serveur0 = _StringBetween($String, '<a href="daoc://71.164.188.115:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur1 = _StringBetween($String, '<a href="daoc://91.121.134.198:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur2 = _StringBetween($String, '<a href="daoc://89.238.64.166:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur3 = _StringBetween($String, '<a href="daoc://74.222.157.170:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur4 = _StringBetween($String, '<a href="daoc://91.39.64.7:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur5 = _StringBetween($String, '<a href="daoc://85.17.135.197:10510" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur6 = _StringBetween($String, '<a href="daoc://88.191.84.17:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur7 = _StringBetween($String, '<a href="daoc://91.121.99.168:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur8 = _StringBetween($String, '<a href="daoc://88.191.14.197:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur9 = _StringBetween($String, '<a href="daoc://87.102.39.90:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur10 = _StringBetween($String, '<a href="daoc://87.118.112.11:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur11 = _StringBetween($String, '<a href="daoc://89.2.218.131:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur12 = _StringBetween($String, '<a href="daoc://24.9.228.42:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur13 = _StringBetween($String, '<a href="daoc://217.82.33.205:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur14 = _StringBetween($String, '<a href="daoc://195.43.185.143:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
$serveur15 = _StringBetween($String, '<a href="daoc://62.141.56.188:10300" onmouseover="Tip(''You must have DAoC Portal installed for this link to work!'')">Connect</a></td><td class="">', '</td>')
Dim $avArray[16][3]
$avArray[0][0] = 'Dawn of Light: Storm'
$avArray[1][0] = 'Dawn of Light: Eden'
$avArray[2][0] = 'Uthgard'
$avArray[3][0] = 'Darkside PvP'
$avArray[4][0] = 'Urzaria'
$avArray[5][0] = 'Promise Shard [New]'
$avArray[6][0] = 'Amtenael'
$avArray[7][0] = 'Ivalice [Rates x5]'
$avArray[8][0] = 'Parcel Force'
$avArray[9][0] = 'Thid I50 Free RR 6/Cap 21'
$avArray[10][0] = '[i50]The Labyrinth v1.2'
$avArray[11][0] = 'Ysendar'
$avArray[12][0] = 'Rewritten Age of Camelot'
$avArray[13][0] = 'Kheldron - Die alte Welt'
$avArray[14][0] = 'The Epic Adventure Shard'
$avArray[15][0] = 'Anduril'
If IsArray ($serveur0) Then
$avArray[0][1] = $serveur0[0]
Endif
If IsArray ($serveur1) Then
$avArray[1][1] = $serveur1[0]
Endif
If IsArray ($serveur2) Then
$avArray[2][1] = $serveur2[0]
Endif
If IsArray ($serveur3) Then
$avArray[3][1] = $serveur3[0]
Endif
If IsArray ($serveur4) Then
$avArray[4][1] = $serveur4[0]
Endif
If IsArray ($serveur5) Then
$avArray[5][1] = $serveur5[0]
Endif
If IsArray ($serveur6) Then
$avArray[6][1] = $serveur6[0]
Endif
If IsArray ($serveur7) Then
$avArray[7][1] = $serveur7[0]
Endif
If IsArray ($serveur8) Then
$avArray[8][1] = $serveur8[0]
Endif
If IsArray ($serveur9) Then
$avArray[9][1] = $serveur9[0]
Endif
If IsArray ($serveur10) Then
$avArray[10][1] = $serveur10[0]
Endif
If IsArray ($serveur11) Then
$avArray[11][1] = $serveur11[0]
Endif
If IsArray ($serveur12) Then
$avArray[12][1] = $serveur12[0]
Endif
If IsArray ($serveur13) Then
$avArray[13][1] = $serveur13[0]
Endif
If IsArray ($serveur14) Then
$avArray[14][1] = $serveur14[0]
Endif
If IsArray ($serveur15) Then
$avArray[15][1] = $serveur15[0]
Endif
_ArrayDisplay($avArray, "Players")
FileClose($file)
FileDelete("page.txt")
Case $nMsg = $Button_3
Exit
EndSelect
WEnd

Deux screenshots :
► Afficher le textele screen1

► Afficher le textele screen2
