You last visited: Today at 02:53
Advertisement
Programming For Idiots (Tutorial) - In C#
Discussion on Programming For Idiots (Tutorial) - In C# within the CO2 Programming forum part of the Conquer Online 2 category.
07/15/2008, 15:21
#61
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Well i just found out that i can't install visual C# 2008 (don't ask why) so i'm stuck using C# 2005 does that matter?
//edit i'll just wait till you get online at msn
07/15/2008, 16:05
#62
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Confirmed Quicktime Player works
07/15/2008, 21:28
#63
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by
scottdavey
You said at the start ask smart questions, And my question is exactly what you said.
How to create an IP ban function?
Well, you'd need to load a list of banned IPs at the start when your server loads, so for example
public static string[] BannedIPs = File.ReadAllLines(filedir);
Then once a person logs in, check through the list and then check their ip, (assuming you're using the "Socket" class for their connection, here's an easy way)
Code:
foreach (string IP in BannedIPs)
{
if (Client.Socket.RemoteEndPoint.ToString().Contains(IP))
{
Client.Socket.Disconnect(false);
break;
}
}
07/16/2008, 11:20
#64
elite*gold: 0
Join Date: Sep 2006
Posts: 8
Received Thanks: 0
a
BIG THANKS for those lessons
i needed em....
i'm programming in delphi but it's easy to go to c++ and to c#
07/16/2008, 17:42
#65
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by
powkis
a
BIG THANKS for those lessons
i needed em....
i'm programming in delphi but it's easy to go to c++ and to c#
The one reason I don't like deplhi a lot anymore is because it's really gay with pointers, and it's sometimes extremely hard to debug when your getting 2986394 (over-exaduration) EAccessViolations thrown, lol.
07/16/2008, 19:31
#66
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Well since i can't find a answer i hope you can't answer it
How do you find Map IDs and NO i do not mean a list of current known map IDs but how do you find an map ID ?
07/16/2008, 20:19
#67
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by
Djago160
Well since i can't find a answer i hope you can't answer it
How do you find Map IDs and NO i do not mean a list of current known map IDs but how do you find an map ID ?
You need to know the DMap file for the map, then what you can do is check GameMap.ini (or some ini in your "\ini\" folder has it) and do the conversation that way.
07/16/2008, 20:58
#68
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by
InfamousNoone
You need to know the DMap file for the map, then what you can do is check GameMap.ini (or some ini in your "ini" folder has it) and do the conversation that way.
eehmm ok thats easy but eh.. were are the DMaps located
07/16/2008, 22:27
#69
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
I believe there in "\map\map\" just ctrl + f for a ".dmap" file in that folder.
EDIT:
Someone want me to post a video on how to bypass IP bans on games or servers?
07/17/2008, 00:44
#70
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by
InfamousNoone
I believe there in "mapmap" just ctrl + f for a ".dmap" file in that folder.
EDIT:
Someone want me to post a video on how to bypass IP bans on games or servers?
Go for it. It could be usefull for some people.
07/17/2008, 02:48
#71
elite*gold: 20
Join Date: Jun 2006
Posts: 1,759
Received Thanks: 827
Quote:
Originally Posted by
InfamousNoone
Someone want me to post a video on how to bypass IP bans on games or servers?
yep lol would be nice
but would also be good to continue along the list that your going on and build up to ip bans
07/17/2008, 18:14
#72
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by
InfamousNoone
You need to know the DMap file for the map, then what you can do is check GameMap.ini (or some ini in your "ini" folder has it) and do the conversation that way.
Well i found the .DMap(just \Conquer 2.0\map\map right?) and the GameMap.dat(its a .dat not .ini) but the map IDs are not in there
GameMap.dat
Code:
? map/map/desert.DMap ? map/map/d_antre01.DMap ? map/map/newplain.DMap ? map/map/mine01.DMap ? map/map/forum.DMap ? map/map/arena.DMap ? map/map/horse.DMap L map/map/star01.DMap M map/map/star02.DMap N map/map/star03.DMap O map/map/star04.DMap P map/map/star05.DMap Q map/map/star10.DMap R map/map/star06.DMap S map/map/star07.DMap T map/map/star08.DMap U map/map/star09.DMap ? map/map/smith.DMap ? map/map/grocery.DMap ? map/map/grocery.DMap ? map/map/newbie.DMap ? map/map/woods.DMap ? map/map/sky.DMap ? map/map/tiger.DMap ? map/map/dragon.DMap ? map/map/island.DMap ? map/map/qiling.DMap ? map/map/w-arena.DMap ? map/map/p-arena.DMap ? map/map/l-arena.DMap ? map/map/canyon.DMap ? map/map/mine.DMap ? map/map/brave.DMap map/map/mine-one.DMap map/map/mine-two.DMap map/map/mine-three.DMap map/map/mine-four.DMap map/map/mine-one2.DMap map/map/mine-two2.DMap map/map/mine-three2.DMap map/map/mine-four2.DMap map/map/newbie.DMap ? map/map/mine-one.DMap p map/map/prison.DMap map/map/street.DMap
map/map/faction-black.DMap map/map/faction.DMap map/map/playground.DMap map/map/skycut.DMap map/map/skymaze.DMap q map/map/prison.DMap map/map/lineup-pass.DMap map/map/lineup.DMap map/map/lineup.DMap map/map/lineup.DMap map/map/lineup.DMap map/map/lineup.DMap map/map/lineup.DMap map/map/lineup.DMap map/map/lineup.DMap map/map/riskisland.DMap $ map/map/skymaze1.DMap % map/map/skymaze2.DMap & map/map/skymaze3.DMap ( map/map/star.DMap . map/map/boa.DMap 8 map/map/p-arena.DMap 9 map/map/p-arena.DMap 3 map/map/newcanyon.DMap 4 map/map/newwoods.DMap 5 map/map/newdesert.DMap 6 map/map/newisland.DMap 7 map/map/mys-island.DMap ' map/map/riskisland.DMap : map/map/idland-map.DMap B map/map/parena-m.DMap C map/map/parena-s.DMap J map/map/house01.DMap K map/map/house03.DMap A map/map/sanctuary.DMap ? map/map/task01.DMap ? map/map/task02.DMap ? map/map/task04.DMap ? map/map/task05.DMap ? map/map/task07.DMap ? map/map/task08.DMap ? map/map/task10.DMap ? map/map/task11.DMap ? map/map/island-snail.DMap ? map/map/desert-snail.DMap ? map/map/canyon-fairy.DMap ? map/map/woods-fairy.DMap ? map/map/newplain-fairy.DMap ? map/map/mine-a.DMap ? map/map/mine-b.DMap ? map/map/mine-c.DMap ? map/map/mine-d.DMap G map/map/s-task01.DMap H map/map/s-task02.DMap I map/map/s-task03.DMap J map/map/s-task04.DMap ? map/map/slpk.DMap ? map/map/hhpk.DMap ? map/map/blpk.DMap ? map/map/ympk.DMap ? map/map/mfpk.DMap map/map/faction01.DMap map/map/faction01.DMap ? map/map/grocery.DMap ? map/map/forum.DMap ? map/map/tiger.DMap O map/map/jokul01.DMap P map/map/tiemfiles.DMap Q map/map/tiemfiles.DMap ? map/map/Dgate.DMap€ ? map/map/Dsquare.DMap€ ? map/map/Dcloister.DMap€ ? map/map/Dsigil.DMap€ m map/map/cordiform.DMap map/map/faction.DMap map/map/faction.DMap ? map/map/forum.DMap ? map/map/Gulf.DMap€ Y map/map/Nhouse04.DMap€ ? map/map/arena-none.DMap ? map/map/kunlun1.DMap ? map/map/kunlun2.DMap ? map/map/kunlun3.DMap ? map/map/kunlun4.DMap ? map/map/kunlun5.DMap ? map/map/kunlun6.DMap ? map/map/kunlun7.DMap ? map/map/kunlun8.DMap ? map/map/kunlun9.DMap ? map/map/fairylandPK-07.DMap ? map/map/Halloween2007a.DMap ? map/map/Halloween2007boss.DMap * map/map/woods-z.DMap + map/map/qiling-z.DMap - map/map/desert-snail.DMap ? map/map/parena-m.DMap ? map/map/fairylandPK-03.DMap ? map/map/Nhouse04.DMap€ ? map/map/star05.DMap ? map/map/icecrypt-lev1.DMap€ ? map/map/idland-map.DMap , map/map/forum.DMap ? map/map/fairylandPK-02.DMap ? map/map/fairylandPK-06.DMap ? map/map/fairylandPK-07.DMap
//edit when i posted this i crashed the forum for 2 seconds lol
07/17/2008, 18:20
#73
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
The mapid's are binary, it's a binary file.
EDIT:
Post the file, and I'll do it for you.
07/17/2008, 19:42
#74
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by
InfamousNoone
The mapid's are binary, it's a binary file.
EDIT:
Post the file, and I'll do it for you.
Here is the GameMap.dat (thats the file right?) btw get online at msn thats easier
Attached Files
GameMap.rar
(1.2 KB, 13 views)
07/17/2008, 21:43
#75
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Code:
DynamicArray<string> List = new DynamicArray<string>();
FILE* GameMap = Native.fopen(@"c:documents and settingsgamemap.dat", "rb");
int read = 1;
string fmt = "{0} = {1}";
while (read == 1)
{
int junk;
int mapid;
int size;
sbyte* dmapfile;
read = (int)Native.fread(&junk, 4, 1, GameMap);
if (read == 0)
break;
read = (int)Native.fread(&mapid, 4, 1, GameMap);
if (read == 0)
break;
read = (int)Native.fread(&size, 4, 1, GameMap);
if (read == 0)
break;
dmapfile = (sbyte*)Native.malloc((uint)size);
read = (int)Native.fread(dmapfile, (uint)size, 1, GameMap);
string query = string.Format(fmt, new string(dmapfile, 0, size), mapid);
List.Add(query);
Native.free(dmapfile);
}
File.WriteAllLines(@"c:documents and settingsgamemap.txt", List.ToArray());
Quote:
map/map/fairylandPK-07.DMap = 1735
map/map/fairylandPK-06.DMap = 1734
map/map/fairylandPK-02.DMap = 1730
map/map/forum.DMap = 1068
map/map/idland-map.DMap = 1769
map/map/icecrypt-lev1.DMap = 1762
map/map/star05.DMap = 1761
map/map/Nhouse04.DMap = 1765
map/map/fairylandPK-03.DMap = 1764
map/map/parena-m.DMap = 1763
map/map/desert-snail.DMap = 1069
map/map/qiling-z.DMap = 1067
map/map/woods-z.DMap = 1066
map/map/Halloween2007boss.DMap = 1767
map/map/Halloween2007a.DMap = 1766
map/map/fairylandPK-07.DMap = 1760
map/map/kunlun9.DMap = 1720
map/map/kunlun8.DMap = 1719
map/map/kunlun7.DMap = 1718
map/map/kunlun6.DMap = 1717
map/map/kunlun5.DMap = 1716
map/map/kunlun4.DMap = 1715
map/map/kunlun3.DMap = 1714
map/map/kunlun2.DMap = 1713
map/map/kunlun1.DMap = 1712
map/map/arena-none.DMap = 700
map/map/Nhouse04.DMap = 601
map/map/Gulf.DMap = 1700
map/map/forum.DMap = 1707
map/map/faction.DMap = 1561
map/map/faction.DMap = 1560
map/map/cordiform.DMap = 1645
map/map/Dsigil.DMap = 2024
map/map/Dcloister.DMap = 2023
map/map/Dsquare.DMap = 2022
map/map/Dgate.DMap = 2021
map/map/tiemfiles.DMap = 1617
map/map/tiemfiles.DMap = 1616
map/map/jokul01.DMap = 1615
map/map/tiger.DMap = 1512
map/map/forum.DMap = 1511
map/map/grocery.DMap = 1510
map/map/faction01.DMap = 1551
map/map/faction01.DMap = 1550
map/map/mfpk.DMap = 1509
map/map/ympk.DMap = 1508
map/map/blpk.DMap = 1507
map/map/hhpk.DMap = 1506
map/map/slpk.DMap = 1505
map/map/s-task04.DMap = 1354
map/map/s-task03.DMap = 1353
map/map/s-task02.DMap = 1352
map/map/s-task01.DMap = 1351
map/map/mine-d.DMap = 1503
map/map/mine-c.DMap = 1502
map/map/mine-b.DMap = 1501
map/map/mine-a.DMap = 1500
map/map/newplain-fairy.DMap = 1216
map/map/woods-fairy.DMap = 1215
map/map/canyon-fairy.DMap = 1214
map/map/desert-snail.DMap = 1213
map/map/island-snail.DMap = 1212
map/map/task11.DMap = 1211
map/map/task10.DMap = 1210
map/map/task08.DMap = 1208
map/map/task07.DMap = 1207
map/map/task05.DMap = 1205
map/map/task04.DMap = 1204
map/map/task02.DMap = 1202
map/map/task01.DMap = 1201
map/map/sanctuary.DMap = 1601
map/map/house03.DMap = 1099
map/map/house01.DMap = 1098
map/map/parena-s.DMap = 1091
map/map/parena-m.DMap = 1090
map/map/idland-map.DMap = 1082
map/map/riskisland.DMap = 1063
map/map/mys-island.DMap = 1079
map/map/newisland.DMap = 1078
map/map/newdesert.DMap = 1077
map/map/newwoods.DMap = 1076
map/map/newcanyon.DMap = 1075
map/map/p-arena.DMap = 1081
map/map/p-arena.DMap = 1080
map/map/boa.DMap = 1070
map/map/star.DMap = 1064
map/map/skymaze3.DMap = 1062
map/map/skymaze2.DMap = 1061
map/map/skymaze1.DMap = 1060
map/map/riskisland.DMap = 1051
map/map/lineup.DMap = 1050
map/map/lineup.DMap = 1049
map/map/lineup.DMap = 1048
map/map/lineup.DMap = 1047
map/map/lineup.DMap = 1046
map/map/lineup.DMap = 1045
map/map/lineup.DMap = 1044
map/map/lineup.DMap = 1043
map/map/lineup-pass.DMap = 1042
map/map/prison.DMap = 6001
map/map/skymaze.DMap = 1041
map/map/skycut.DMap = 1040
map/map/playground.DMap = 1039
map/map/faction.DMap = 1038
map/map/faction-black.DMap = 1037
map/map/street.DMap = 1036
map/map/prison.DMap = 6000
map/map/mine-one.DMap = 5000
map/map/newbie.DMap = 1035
map/map/mine-four2.DMap = 1032
map/map/mine-three2.DMap = 1031
map/map/mine-two2.DMap = 1030
map/map/mine-one2.DMap = 1029
map/map/mine-four.DMap = 1028
map/map/mine-three.DMap = 1027
map/map/mine-two.DMap = 1026
map/map/mine-one.DMap = 1025
map/map/brave.DMap = 1022
map/map/mine.DMap = 1021
map/map/canyon.DMap = 1020
map/map/l-arena.DMap = 1019
map/map/p-arena.DMap = 1018
map/map/w-arena.DMap = 1017
map/map/qiling.DMap = 1016
map/map/island.DMap = 1015
map/map/dragon.DMap = 1014
map/map/tiger.DMap = 1013
map/map/sky.DMap = 1012
map/map/woods.DMap = 1011
map/map/newbie.DMap = 1010
map/map/grocery.DMap = 1009
map/map/grocery.DMap = 1008
map/map/smith.DMap = 1007
map/map/star09.DMap = 1109
map/map/star08.DMap = 1108
map/map/star07.DMap = 1107
map/map/star06.DMap = 1106
map/map/star10.DMap = 1105
map/map/star05.DMap = 1104
map/map/star04.DMap = 1103
map/map/star03.DMap = 1102
map/map/star02.DMap = 1101
map/map/star01.DMap = 1100
map/map/horse.DMap = 1006
map/map/arena.DMap = 1005
map/map/forum.DMap = 1004
map/map/mine01.DMap = 1003
map/map/newplain.DMap = 1002
map/map/d_antre01.DMap = 1001
map/map/desert.DMap = 1000
Similar Threads
Programming for Idiots (Tutorial) C++
06/11/2012 - CO2 Programming - 20 Replies
Yeah, so in my relation to my C# one (http://www.elitepvpers.com/forum/co2-guides-templa tes/148675-programming-idiots-tutorial-c.html), which wasn't the best I felt I'll *try* make for it with this one. I've also got some spare time in between school, from when exams start, and a new Warlords server comes out... so yeah.
Right, so before I post any links to the videos I'd like to point out, so I don't get bitched at by people saying, "this isn't real C++", most of the things I do will be...
[RE-OPENING]"Programming For Idiots (Tutorial) - In C#"
09/17/2009 - CO2 Programming - 20 Replies
At start i want to say THIS IS NOT MY GUIDE , GUIDE WAS MADE BY INFAMOUSNONE!!
All times are GMT +1. The time now is 02:54 .