|
You last visited: Today at 15:50
Advertisement
[Release]Worldmap
Discussion on [Release]Worldmap within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
03/10/2010, 00:55
|
#1
|
elite*gold: 650
Join Date: Apr 2008
Posts: 389
Received Thanks: 1,095
|
[Release]Worldmap
Hi
hab 2 scripte gemacht
1. mit server-seid cords (settings.txt)
2. mit client-seit cords (atlasinfo.txt)
das interresante daran ist
dass sich client und server cords unterscheiden
wichtig sind aber hauptsächlich die client-side cords
ich bin mir aber nicht ganz sicher ob ich die größe der maps richtig berechnet habe
weil da is das immer nur in abschnitten angegeben
ich hab jetzt einfach gesagt das jeder abschnitt 256px groß ist
erstmal server side:
Code:
#include <File.au3>
#include <Array.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
$input = "****\hongkong\map\" ;Pfad zu downgeloadeten map ordner
$x = 2850 ;bild göße x
$y = 3650 ;bild göße y
$c = 5 ;wert zu skaliren
$map_names = _FileListToArray($input, "*", 2)
Dim $settings, $map[$map_names[0]][5]
$Form1 = GUICreate("World-Map", 10, 10, 0, 0)
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($x, $y, $hGraphic)
$hGraphicBuff = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hPen = _GDIPlus_PenCreate(0xFFFFFFFF, 2)
$hBrush = _GDIPlus_BrushCreateSolid(0xFFC0C0FF)
$hBrush2 = _GDIPlus_BrushCreateSolid(0xFF000000)
$hFormat = _GDIPlus_StringFormatCreate()
$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFamily, 20)
For $i = 1 To $map_names[0]
If Not FileExists($input & $map_names[$i] & "\Setting.txt") Then
MsgBox(0,"","Der Pfad zum Map ordner ist flasch")
Exit;
EndIf
$settings = FileRead($input & $map_names[$i] & "\Setting.txt")
$tmp = StringSplit($settings, "BasePosition ", 1)
$cords = StringSplit($tmp[2], " ")
_ArrayDelete($cords, 0)
$tmp = StringSplit($cords[1], Chr(10))
$cords[0] = $cords[0] / 100 / $c
$cords[1] = $tmp[1] / 100 / $c
Do
_ArrayPop($cords)
Until UBound($cords) = 2
$tmp = StringSplit($settings, "MapSize ", 1)
$cords2 = StringSplit($tmp[2], " ")
$tmp = StringSplit($cords2[1], Chr(10))
_ArrayAdd($cords, $cords2[1] * 256 / $c)
_ArrayAdd($cords, $tmp[1] * 256 / $c)
$map[$i - 1][0] = $map_names[$i]
$map[$i - 1][1] = $cords[0]
$map[$i - 1][2] = $cords[1]
$map[$i - 1][3] = $cords[2]
$map[$i - 1][4] = $cords[3]
_GDIPlus_GraphicsDrawRect($hGraphicBuff, $cords[0], $cords[1], $cords[2], $cords[3], $hPen)
_GDIPlus_GraphicsFillRect($hGraphicBuff, $cords[0] + 1, $cords[1] + 1, $cords[2] - 2, $cords[3] - 2, $hBrush)
$tLayout = _GDIPlus_RectFCreate($cords[0] + 2, $cords[1] + 2, $cords[2] - 4, $cords[3] - 4)
$aInfo = _GDIPlus_GraphicsMeasureString($hGraphicBuff, StringReplace($map_names[$i],"metin2_map_",""), $hFont, $tLayout, $hFormat)
_GDIPlus_GraphicsDrawStringEx($hGraphicBuff, StringReplace($map_names[$i],"metin2_map_",""), $hFont, $aInfo[0], $hFormat, $hBrush2)
Next
;_ArrayDisplay($map) ; map info mit allen cords
_GDIPlus_ImageSaveToFile($hBitmap, @DesktopDir & "\world-map.bmp")
_GDIPlus_Shutdown()
client side:
Code:
#include <File.au3>
#include <Array.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
$input = "****\atlasinfo.txt" ;pfad zu atlasinfo.txt
If Not FileExists($input) Then
MsgBox(0,"","Die atlasinfo.txt wurde nicht gefunden")
Exit
EndIf
$x = 2850 ;bild göße x
$y = 3650 ;bild göße y
$c = 5 ;wert zu skaliren
Dim $settings
_FileReadToArray($input,$settings)
Dim $map[$settings[0]][5]
$Form1 = GUICreate("World-Map", 10, 10, 0, 0)
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($Form1)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($x, $y, $hGraphic)
$hGraphicBuff = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hPen = _GDIPlus_PenCreate(0xFFFFFFFF, 2)
$hBrush = _GDIPlus_BrushCreateSolid(0xFFC0C0FF)
$hBrush2 = _GDIPlus_BrushCreateSolid(0xFF000000)
$hFormat = _GDIPlus_StringFormatCreate()
$hFamily = _GDIPlus_FontFamilyCreate("Arial")
$hFont = _GDIPlus_FontCreate($hFamily, 20)
For $i = 1 To $settings[0]
$cords = StringSplit($settings[$i], " ")
If $cords[0]<>5 Then _ArrayDisplay($cords)
_ArrayDelete($cords, 0)
$map[$i - 1][0] = StringReplace(StringReplace(StringReplace($cords[0],"season2/",""),"season1/",""),"metin2_map_","")
$map[$i - 1][1] = $cords[1]/100/$c
$map[$i - 1][2] = $cords[2]/100/$c
$map[$i - 1][3] = $cords[3]*256/$c
$map[$i - 1][4] = $cords[4]*256/$c
_GDIPlus_GraphicsDrawRect($hGraphicBuff, $map[$i - 1][1], $map[$i - 1][2], $map[$i - 1][3], $map[$i - 1][4], $hPen)
_GDIPlus_GraphicsFillRect($hGraphicBuff, $map[$i - 1][1] + 1, $map[$i - 1][2] + 1, $map[$i - 1][3] - 2, $map[$i - 1][4] - 2, $hBrush)
$tLayout = _GDIPlus_RectFCreate($map[$i - 1][1] + 2, $map[$i - 1][2] + 2, $map[$i - 1][3] - 4, $map[$i - 1][4] - 4)
$aInfo = _GDIPlus_GraphicsMeasureString($hGraphicBuff, $map[$i - 1][0], $hFont, $tLayout, $hFormat)
_GDIPlus_GraphicsDrawStringEx($hGraphicBuff, $map[$i - 1][0], $hFont, $aInfo[0], $hFormat, $hBrush2)
Next
; _ArrayDisplay($map) ;info mit allen cords
_GDIPlus_ImageSaveToFile($hBitmap, @DesktopDir & "\world-map2.bmp")
_GDIPlus_Shutdown()
viel spaß damit
Edit: kleine Korektur am script
|
|
|
03/10/2010, 01:12
|
#2
|
elite*gold: 41
Join Date: Oct 2007
Posts: 1,950
Received Thanks: 3,120
|
Schaue mir das Script morgen/ nachher an. Bin im mom am iPod und sehe nur paar Zeilen und kann innerhalb der Script Box nicht scrollen
hört sich aber ma gut an
|
|
|
03/10/2010, 09:36
|
#3
|
elite*gold: 0
Join Date: Dec 2009
Posts: 184
Received Thanks: 38
|
wie soll das gehen damit als au3 datei kommt fehler
|
|
|
03/10/2010, 11:31
|
#4
|
elite*gold: 406
Join Date: Jan 2010
Posts: 858
Received Thanks: 566
|
Würde gerne testen aber bin gerade in der Schule >.<
|
|
|
03/10/2010, 11:51
|
#5
|
elite*gold: 5
Join Date: Nov 2009
Posts: 1,863
Received Thanks: 2,778
|
@HansWurst.
Konntest du vllt mehr infos geben vllt ein kleines "HowTo" dazu wie man das einbaut etc.??
MFG Kay
|
|
|
03/10/2010, 12:46
|
#6
|
elite*gold: 0
Join Date: Dec 2009
Posts: 279
Received Thanks: 572
|
what is this ?
|
|
|
03/10/2010, 14:03
|
#7
|
elite*gold: 0
Join Date: Sep 2009
Posts: 133
Received Thanks: 34
|
Ein paar Screens wären ganz nett^^
|
|
|
03/10/2010, 14:07
|
#8
|
elite*gold: 255
Join Date: Nov 2009
Posts: 2,900
Received Thanks: 1,408
|
Soll das so ähnlich sien wie das Script von FreeWorld2? O.o
|
|
|
03/10/2010, 14:19
|
#9
|
elite*gold: 0
Join Date: Apr 2008
Posts: 5,159
Received Thanks: 4,931
|
Quote:
Originally Posted by _DownTime
Soll das so ähnlich sien wie das Script von FreeWorld2? O.o
|
Nein, ist AutoIT und funktioniert nur Lokal.
|
|
|
03/10/2010, 14:24
|
#10
|
elite*gold: 650
Join Date: Apr 2008
Posts: 389
Received Thanks: 1,095
|
ja das ist mit autoit gemacht
und ich hab doch auch 2 screen reingemacht
da drauf erkennt man wo sich welche map befindet
|
|
|
03/10/2010, 14:37
|
#11
|
elite*gold: 75
Join Date: Jan 2009
Posts: 672
Received Thanks: 84
|
das muss man doch in atlasinfo.txt einfügen oda?
das mit clientside !
und wenn ich das mache is sd2 schwarz (bin grad dort ka obs woanders auch so is)
|
|
|
03/10/2010, 15:00
|
#12
|
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 2,176
|
Quote:
Originally Posted by jeffhardy35
das muss man doch in atlasinfo.txt einfügen oda?
das mit clientside !
und wenn ich das mache is sd2 schwarz (bin grad dort ka obs woanders auch so is)
|
nein, das gehört da absolut nicht rein xD...
|
|
|
03/10/2010, 16:57
|
#13
|
elite*gold: 41
Join Date: Oct 2007
Posts: 1,950
Received Thanks: 3,120
|
Quote:
Originally Posted by _DownTime
Soll das so ähnlich sien wie das Script von FreeWorld2? O.o
|
ES IST VON MIR !!! xD
Quote:
Originally Posted by Joshilein
Nein, ist AutoIT und funktioniert nur Lokal.
|
hättest auch ma **** fett immer sagen können es ist von LordKill :P
btw nette idee mit dem script 
könnte man aber noch netter gestalten 
aber die idee zu haben ist schonma nice
|
|
|
03/10/2010, 17:03
|
#14
|
elite*gold: 0
Join Date: Dec 2009
Posts: 184
Received Thanks: 38
|
das scrippt geht nucht als au3 starten kommt fehler
|
|
|
03/10/2010, 19:30
|
#15
|
elite*gold: 650
Join Date: Apr 2008
Posts: 389
Received Thanks: 1,095
|
MT2-Epvp@autoit mal updaten
es sind ein paar neu funkionen dazugekommen
oder du hast einen falschen pfad angegeben
@jeffhardy35:
man muss das nirgends einfügen
der script liest das nur aus
|
|
|
 |
|
Similar Threads
|
[WorldMap] Homepage Addon
04/29/2011 - Metin2 PServer Guides & Strategies - 56 Replies
http://www.imgbox.de/users/public/images/h11551d97 .png
Guten Morgen Mt2 Section.
Da nun wieder etwas public ist was ich gemacht habe versuche ich euch hier mit dem Tutorial zu zeigen wie man so etwas anstellen kann und gebe ich euch ein template dafür.
Fangen wir einmal an.
Wir erstellen eine neue php datei und schreiben zuerst die verbindungsdaten zur db hin, in meinem fall ist dies in einer anderen datei daher include ich diese.
<?
|
[PLReleased]Polen haben worldmap released
03/22/2010 - Metin2 Private Server - 2 Replies
ich glaube zumindestens das die polen grad ne worldmap released haben der orginal Thread:
Ziemie Gildi Takie Jak Na Pl Gotowy Plik - MPC Forum - Cheaty, Boty, Bugi, Hacki do gier online
wenn ihr ihn haben wollt müsst ihr euch im mpc-forum anmelden
es kanna uch was anderes sein bin mirr nicht sicher deswegen farg ich euch^^
|
[Suche] US-Amerikanische Worldmap-Texturen von Kalimdor und Östliche Königreiche
06/21/2009 - World of Warcraft - 0 Replies
Hi;
ich habe auf ein paar Bilder gesehen, dass seit 3.x.x die Kontinente Kalimdor und Östliche Königreiche auf der Weltkarte zu den Alpha Versionen geändert wurden, dies allerdings nur beim US-Client. Und ich hätte die gerne, besitze aber den US-Client nicht.
Kann einer, der den US-Clienten besitzt, mir die Dateien extrahieren und dann zu schicken? Sendet mir einfach eine PN, dann gibts meine e-Mail Adresse, und dann könnt ihr das ganze gezippt/gerart/ge-7zippt los schicken.^^
Hier...
|
All times are GMT +1. The time now is 15:54.
|
|