Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Improved !map command

Junior Spellweaver
Joined
Apr 6, 2008
Messages
116
Reaction score
0
Hey,

I have maked an improved map command
some credits go to Hobo17

if u write "!map" without anything behind it u will see a list with all the Map ID's
replace your old "map" part in players.cpp
Code:
        if(strcmp(command, "map") == 0){
            if(strlen(next_token) > 0){
                int mapid = strval(strtok_s(NULL, " ",&next_token));
                if(Maps::info.find(mapid) != Maps::info.end())
                    Maps::changeMap(player ,mapid, 0);
            }
        }

with this one
Code:
		if(strcmp(command, "map") == 0){
			if(strlen(next_token) == 0){
				PlayersPacket::ShowNotice(player, "Enter a Map ID", 1);
				PlayersPacket::ShowNotice(player, "180000000 - GM Map", 6);
				PlayersPacket::ShowNotice(player, "001010000 - Amherst", 6);
				PlayersPacket::ShowNotice(player, "000060000 - Southperry", 6);
				PlayersPacket::ShowNotice(player, "104000000 - Lith Harbor", 6);
				PlayersPacket::ShowNotice(player, "101000000 - Ellinia", 6);
				PlayersPacket::ShowNotice(player, "102000000 - Perion", 6);
				PlayersPacket::ShowNotice(player, "103000000 - Kerning City", 6);
				PlayersPacket::ShowNotice(player, "100000000 - Henesys", 6);
				PlayersPacket::ShowNotice(player, "105040300 - Sleepywood", 6);
				PlayersPacket::ShowNotice(player, "110000000 - Florina Beach", 6);
				PlayersPacket::ShowNotice(player, "200000000 - Orbis", 6);
				PlayersPacket::ShowNotice(player, "211000000 - El Nath", 6);
				PlayersPacket::ShowNotice(player, "220000000 - Ludibrium", 6);
				PlayersPacket::ShowNotice(player, "230000000 - Aqua Road", 6);
				PlayersPacket::ShowNotice(player, "221000000 - Omega Sector", 6);
				PlayersPacket::ShowNotice(player, "222000000 - Korean Folk Town", 6);
				PlayersPacket::ShowNotice(player, "250000000 - Mu Lung", 6);
				PlayersPacket::ShowNotice(player, "251000000 - Herb Town", 6);
				PlayersPacket::ShowNotice(player, "240000000 - Leafre", 6);
				PlayersPacket::ShowNotice(player, "600000000 - New Leaf City", 6);
				PlayersPacket::ShowNotice(player, "680000000 - Amoria", 6);
				PlayersPacket::ShowNotice(player, "100000005 - Mushmom", 6);
				PlayersPacket::ShowNotice(player, "105070002 - Zombie Mushmom", 6);
				PlayersPacket::ShowNotice(player, "280030000 - Zakum's Altar", 6);
				PlayersPacket::ShowNotice(player, "240060200 - Horned Tail's Cave", 6);
				PlayersPacket::ShowNotice(player, "220080001 - Origin of Clocktower", 6);
				PlayersPacket::ShowNotice(player, "230040420 - Cave of Pianus", 6);
				PlayersPacket::ShowNotice(player, "240020401 - Manon's Forest", 6);
				PlayersPacket::ShowNotice(player, "240020101 - Griffey's Forest", 6);
			}
			else
			{
			int mapid = strval(strtok_s(NULL, " ",&next_token));
			if(Maps::info.find(mapid) != Maps::info.end())
				Maps::changeMap(player ,mapid, 0);
			}
		}

EDIT: changed code a bit added some new Maps with Bosses, ty Aldo_MX for ur boss ideas =)
 
Last edited:
Junior Spellweaver
Joined
Apr 6, 2008
Messages
116
Reaction score
0
Re: Improved !map command

Did not test yet with other players... so idk
 
Mocro.net
Joined
Feb 3, 2008
Messages
690
Reaction score
96
Re: Improved !map command

looks cool so when u typ !map Orbis u get orbis

gonne test
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
72
Reaction score
0
Re: Improved !map command

and we can add w/e maps we want to that id list right?
 
Junior Spellweaver
Joined
Apr 6, 2008
Messages
116
Reaction score
0
Re: Improved !map command

No -.-
when u type "!map" without a Map ID behind it, u get a list with all Maps and their ID's

EDIT: yes wildman, u can
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
72
Reaction score
0
Re: Improved !map command

alright cool very nice release
edit: guys i was really bored so i decided to alphabetize his command
lol since im someone who likes to see order
Code:
                PlayersPacket::ShowNotice(player, "001010000 - Amherst", 6);
                PlayersPacket::ShowNotice(player, "680000000 - Amoria", 6);
                PlayersPacket::ShowNotice(player, "230000000 - Aqua Road", 6);
                PlayersPacket::ShowNotice(player, "101000000 - Ellinia", 6);
				PlayersPacket::ShowNotice(player, "211000000 - El Nath", 6);
                PlayersPacket::ShowNotice(player, "180000000 - GM Map", 6);
				PlayersPacket::ShowNotice(player, "100000000 - Henesys", 6);
				PlayersPacket::ShowNotice(player, "251000000 - Herb Town", 6);
				PlayersPacket::ShowNotice(player, "103000000 - Kerning City", 6);
				PlayersPacket::ShowNotice(player, "222000000 - Korean Folk Town", 6);
				PlayersPacket::ShowNotice(player, "240000000 - Leafre", 6);
				PlayersPacket::ShowNotice(player, "104000000 - Lith Harbor", 6);
				PlayersPacket::ShowNotice(player, "220000000 - Ludibrium", 6);
				PlayersPacket::ShowNotice(player, "250000000 - Mu Lung", 6);
				PlayersPacket::ShowNotice(player, "600000000 - New Leaf City", 6);
				PlayersPacket::ShowNotice(player, "221000000 - Omega Sector", 6);
				PlayersPacket::ShowNotice(player, "200000000 - Orbis", 6);
				PlayersPacket::ShowNotice(player, "102000000 - Perion", 6);
				PlayersPacket::ShowNotice(player, "105040300 - Sleepywood", 6);
				PlayersPacket::ShowNotice(player, "000060000 - Southperry", 6);
 
Junior Spellweaver
Joined
Apr 6, 2008
Messages
116
Reaction score
0
Re: Improved !map command

Mocro, here's something what u want

after u added this to ur Players.cpp
u can write things like "!henesys" or "!nlc" to get to a town

Code:
        else if(strcmp(command, "gmmap") == 0){
            Maps::changeMap(player ,180000000, 0);
        }
        else if(strcmp(command, "zakmap") == 0){
            Maps::changeMap(player ,280030000, 0);
        }
        else if(strcmp(command, "papmap") == 0){
            Maps::changeMap(player ,220080001, 0);
        }
        else if(strcmp(command, "horntailmap") == 0){
            Maps::changeMap(player ,240060200, 0);
        }
        else if(strcmp(command, "southperry") == 0){
            Maps::changeMap(player ,60000, 0);
        }
        else if(strcmp(command, "amherst") == 0){
            Maps::changeMap(player ,1010000, 0);
        }
        else if(strcmp(command, "lith") == 0){
            Maps::changeMap(player ,104000000, 0);
        }
        else if(strcmp(command, "henesys") == 0){
            Maps::changeMap(player ,100000000, 0);
        }
        else if(strcmp(command, "ellinia") == 0){
            Maps::changeMap(player ,101000000, 0);
        }
        else if(strcmp(command, "perion") == 0){
            Maps::changeMap(player ,102000000, 0);
        }
        else if(strcmp(command, "kerning") == 0){
            Maps::changeMap(player ,103000000, 0);
        }
        else if(strcmp(command, "dungeon") == 0){
            Maps::changeMap(player ,105040300, 0);
        }
        else if(strcmp(command, "orbis") == 0){
            Maps::changeMap(player ,200000000, 0);
        }
        else if(strcmp(command, "elnath") == 0){
            Maps::changeMap(player ,211000000, 0);
        }
        else if(strcmp(command, "ludi") == 0){
            Maps::changeMap(player ,220000000, 0);
        }
        else if(strcmp(command, "aquaroad") == 0){
            Maps::changeMap(player ,230000000, 0);
        }
        else if(strcmp(command, "omega") == 0){
            Maps::changeMap(player ,221000000, 0);
        }
        else if(strcmp(command, "korean") == 0){
            Maps::changeMap(player ,222000000, 0);
        }
        else if(strcmp(command, "mulung") == 0){
            Maps::changeMap(player ,250000000, 0);
        }
        else if(strcmp(command, "herbtown") == 0){
            Maps::changeMap(player ,251000000, 0);
        }
        else if(strcmp(command, "leafre") == 0){
            Maps::changeMap(player ,240000000, 0);
        }
        else if(strcmp(command, "nlc") == 0){
            Maps::changeMap(player ,600000000, 0);
        }
        else if(strcmp(command, "amoria") == 0){
            Maps::changeMap(player ,680000000, 0);
        }

EDIT: lol wildman^^, I had an order in it... from beginner maps to newer maps...
 
Mocro.net
Joined
Feb 3, 2008
Messages
690
Reaction score
96
Re: Improved !map command

Scorpion ty u helped me some time but gote other bugs atm on my server -_-
 
Junior Spellweaver
Joined
Apr 15, 2008
Messages
183
Reaction score
0
Re: Improved !map command

Good to see that I'm helping. xD
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
16
Reaction score
0
Re: Improved !map command

Or you can try this one for !map <town>, for ex. !map gm

Code:
		if(strcmp(command, "map") == 0){
			if(strlen(next_token) == 0) return;
			// GM Map
			if(strcmp(next_token, "gm") == 0 || strcmp(next_token, "gmmap") == 0)
				Maps::changeMap(player ,180000000, 0);
			// SouthPerry
			else if(strcmp(next_token, "southperry") == 0)
				Maps::changeMap(player ,60000, 0);
			// Amherst
			else if(strcmp(next_token, "amherst") == 0)
				Maps::changeMap(player ,1010000, 0);
			// Florina Beach
			else if(strcmp(next_token, "florina") == 0 || strcmp(next_token, "florinabeach") == 0)
				Maps::changeMap(player ,110000000, 0);
			// Lith Harbor
			else if(strcmp(next_token, "lith") == 0 || strcmp(next_token, "lithharbor") == 0)
				Maps::changeMap(player ,104000000, 0);
			// Kerning City
			else if(strcmp(next_token, "kerning") == 0)
				Maps::changeMap(player ,103000000, 0);
			// Perion
			else if(strcmp(next_token, "perion") == 0)
				Maps::changeMap(player ,102000000, 0);
			// Henesys
			else if(strcmp(next_token, "henesys") == 0)
				Maps::changeMap(player ,100000000, 0);
			// Ellinia
			else if(strcmp(next_token, "ellinia") == 0)
				Maps::changeMap(player ,101000000, 0);
			// Sleepywood
			else if(strcmp(next_token, "sleepywood") == 0)
				Maps::changeMap(player ,105040300, 0);
			// Mushroom Shrine
			else if(strcmp(next_token, "mushroomshrine") == 0 || strcmp(next_token, "zipangu") == 0)
				Maps::changeMap(player ,800000000, 0);
			// Showa
			else if(strcmp(next_token, "showa") == 0)
				Maps::changeMap(player ,801000000, 0);
			// Orbis
			else if(strcmp(next_token, "orbis") == 0)
				Maps::changeMap(player ,200000000, 0);
			// El Nath
			else if(strcmp(next_token, "elnath") == 0 || strcmp(next_token, "nath") == 0)
				Maps::changeMap(player ,211000000, 0);
			// Aqua Road
			else if(strcmp(next_token, "aqua") == 0 || strcmp(next_token, "aquaroad") == 0)
				Maps::changeMap(player ,230000000, 0);
			// Ludibrium
			else if(strcmp(next_token, "ludi") == 0 || strcmp(next_token, "ludibrium") == 0)
				Maps::changeMap(player ,220000000, 0);
			// Leafre
			else if(strcmp(next_token, "leafre") == 0)
				Maps::changeMap(player ,240000000, 0);
			// NLC
			else if(strcmp(next_token, "nlc") == 0)
				Maps::changeMap(player ,600000000, 0);
			// Mu Lung
			else if(strcmp(next_token, "mulung") == 0)
				Maps::changeMap(player ,250000000, 0);
			// Herb Town
			else if(strcmp(next_token, "herbtown") == 0)
				Maps::changeMap(player ,251000000, 0);
			// HappyVille
			else if(strcmp(next_token, "happyville") == 0)
				Maps::changeMap(player ,209000000, 0);
			// Someone Else's House
			else if(strcmp(next_token, "mm") == 0 || strcmp(next_token, "mushmom") == 0)
				Maps::changeMap(player ,100000005, 0);
			// The Grave of Mushmom
			else if(strcmp(next_token, "zmm") == 0 || strcmp(next_token, "zombiemm") == 0 || strcmp(next_token, "zombiemushmom") == 0)
				Maps::changeMap(player ,105070002, 0);
			// Hall of Mushroom
			else if(strcmp(next_token, "md") == 0 || strcmp(next_token, "mushdad") == 0)
				Maps::changeMap(player ,800010100, 0);
			// Origin of Clocktower
			else if(strcmp(next_token, "papu") == 0 || strcmp(next_token, "papulatus") == 0)
				Maps::changeMap(player ,220080001, 0);
			// The Cave of Pianus
			else if(strcmp(next_token, "pianus") == 0)
				Maps::changeMap(player ,230040420, 0);
			// Griffey Forest
			else if(strcmp(next_token, "griffey") == 0)
				Maps::changeMap(player ,240020101, 0);
			else if(strcmp(next_token, "griffey1") == 0)
				Maps::changeMap(player ,240020101, 0);
			// Manon's Forest
			else if(strcmp(next_token, "manon") == 0)
				Maps::changeMap(player ,240020401, 0);
			else if(strcmp(next_token, "manon1") == 0)
				Maps::changeMap(player ,240020402, 0);
			// Zakum's Altar
			else if(strcmp(next_token, "zakum") == 0)
				Maps::changeMap(player ,280030000, 0);
			// Horned Tail's Cave
			else if(strcmp(next_token, "horntail") == 0)
				Maps::changeMap(player ,240060200, 0);
			// Map ID
			else{
				int mapid = atoi(strtok_s(NULL, " ",&next_token));
				if(Maps::info.find(mapid) != Maps::info.end())
					Maps::changeMap(player ,mapid, 0);
			}
		}
 
Newbie Spellweaver
Joined
Jun 12, 2006
Messages
26
Reaction score
0
Re: Improved !map command

can we be able to do the same thign liek thsi only with
!job
 
Newbie Spellweaver
Joined
Apr 2, 2008
Messages
83
Reaction score
0
Re: Improved !map command

Scorp, you don't know how much anyone who reads this can learn from it. I never even thought of the last way Aldo put there.
 
Back
Top