- Config.Command_Go = ConfigGetInt ( "commands.ini", "go", 299 ); //change to 99 to give access for all players
Lets get started! Note that this is my first actually code I dunno if I did it right.
In worldserver.cpp find:
Under it add:
- Config.Command_Go2 = ConfigGetInt ( "commands.ini", "go2", 299 ); //change to 99 to give access for all players
In sockets.h find:
- int Command_Go;
Under it add:
- int Command_Go2;
In gmcmds.cpp find:
- Log( MSG_GMACTION, " %s : /go %i" , thisclient->CharInfo->charname, loc);
- }
- return true;
- }
Under it add:
- else if (strcmp(command, "go2")==0) // AtCommandGo2
- {
- if(Config.Command_go2 > thisclient->Session->accesslevel)
- return true;
- if ((tmp = strtok(NULL, " ")) == NULL) tmp = 0; int loc=atoi(tmp);
- if(Config.Command_Go2 > thisclient->Session->accesslevel)
- return true;
- int x = 0;
- int y = 0;
- int map = 0;
- if(loc == 1)
- {
- map = 1;
- x = 5242;
- y = 5193;
- }
- else if(loc == 2)
- {
- map = 2;
- x = 5655;
- y = 5228;
- }
- else if (loc == 3)
- {
- map = 3;
- x = 5198;
- y = 5010;
- }
- else if (loc == 4)
- {
- map = 5;
- x = 5201;
- y = 5277;
- }
- else if (loc == 5)
- {
- map = 6;
- x = 5201;
- y = 5277;
- }
- else if (loc == 6)
- {
- map = 8;
- x = 5160;
- y = 5080;
- }
- else if (loc == 7)
- {
- map = 11;
- x = 5160;
- y = 5132;
- }
- else if (loc == 8)
- {
- map = 12;
- x = 5160;
- y = 5132;
- }
- else if (loc == 9)
- {
- map = 13;
- x = 5160;
- y = 5132;
- }
- else if (loc == 10)
- {
- map = 21;
- x = 5158;
- y = 5352;
- }
- else if (loc == 11)
- {
- map = 22;
- x = 5112;
- y = 5350;
- }
- else if (loc == 12)
- {
- map = 23;
- x = 5351;
- y = 5056;
- }
- else if (loc == 13)
- {
- map = 24;
- x = 5379;
- y = 5329;
- }
- else if (loc == 14)
- {
- map = 25;
- x = 5377;
- y = 5185;
- }
- else if (loc == 15)
- {
- map = 26;
- x = 5278;
- y = 5158;
- }
- else if (loc == 16)
- {
- map = 27;
- x = 5479;
- y = 4976;
- }
- else if (loc == 17)
- {
- map = 28;
- x = 5205;
- y = 4911;
- }
- else if (loc == 18)
- {
- map = 29;
- x = 5093;
- y = 5144;
- }
- else if (loc == 19)
- {
- map = 31;
- x = 5516;
- y = 5437;
- }
- else if (loc == 20)
- {
- map = 32;
- x = 5435;
- y = 5259;
- }
- else if (loc == 21)
- {
- map = 33;
- x = 5605;
- y = 5488;
- }
- else if (loc == 22)
- {
- map = 37;
- x = 5184;
- y = 5256;
- }
- else if (loc == 23)
- {
- map = 38;
- x = 5074;
- y = 5342;
- }
- else if (loc == 24)
- {
- map = 51;
- x = 5362;
- y = 5094;
- }
- else if (loc == 25)
- {
- map = 52;
- x = 6079;
- y = 5269;
- }
- else if (loc == 26)
- {
- map = 53;
- x = 6229;
- y = 5313;
- }
- else if (loc == 27)
- {
- map = 54;
- x = 5094;
- y = 4254;
- }
- else if (loc == 28)
- {
- map = 55;
- x = 5789;
- y = 4619;
- }
- else if (loc == 29)
- {
- map = 56;
- x = 5035;
- y = 5200;
- }
- else if (loc == 30)
- {
- map = 57;
- x = 5540;
- y = 5145;
- }
- else if (loc == 31)
- {
- map = 58;
- x = 5680;
- y = 4287;
- }
- else if (loc == 32)
- {
- map = 59;
- x = 5102;
- y = 5132;
- }
- else if (loc == 33)
- {
- map = 61;
- x = 5431;
- y = 4603;
- }
- else if (loc == 34)
- {
- map = 62;
- x = 5666;
- y = 5139;
- }
- else if (loc == 35)
- {
- map = 63;
- x = 5407;
- y = 4491;
- }
- else if (loc == 36)
- {
- map = 64;
- x = 5197;
- y = 5157;
- }
- else if (loc == 37)
- {
- map = 65;
- x = 5395;
- y = 5205;
- }
- else
- {
- SendPM(thisclient, "Please input a number after the go command, below is a list of places and their appropriate number");
- SendPM(thisclient, "1 = Canyon City of Zant");
- SendPM(thisclient, "2 = City of Junon Polis");
- SendPM(thisclient, "3 = Dolphin Island");
- SendPM(thisclient, "4 = Junon Cartel");
- SendPM(thisclient, "5 = Crusader Training Camp");
- SendPM(thisclient, "6 = Lion's Plains");
- SendPM(thisclient, "7 = Junon Clan Field (30-49)");
- SendPM(thisclient, "8 = Junon Clan Field (50-59)");
- SendPM(thisclient, "9 = Junon Clan Field (69-89)");
- SendPM(thisclient, "10 = Valley of Luxem Tower");
- SendPM(thisclient, "11 = Adventurer's Plains");
- SendPM(thisclient, "12 = Breezy Hills");
- SendPM(thisclient, "13 = El Verloon Desert");
- SendPM(thisclient, "14 = Anima Lake");
- SendPM(thisclient, "15 = Forest of Wisdom");
- SendPM(thisclient, "16 = Kenji Beach");
- SendPM(thisclient, "17 = Gorge of Silence");
- SendPM(thisclient, "18 = Desert of the Dead");
- SendPM(thisclient, "19 = Goblin Cave (B1)");
- SendPM(thisclient, "20 = Goblin Cave (B2)");
- SendPM(thisclient, "21 = Goblin Cave (B3)");
- SendPM(thisclient, "22 = Sunshine Coast");
- SendPM(thisclient, "23 = Santa Planetoid");
- SendPM(thisclient, "24 = Magic City of the Eucar");
- SendPM(thisclient, "25 = Mana Snowfields");
- SendPM(thisclient, "26 = Arumic Valley");
- SendPM(thisclient, "27 = Crystal Snowfields");
- SendPM(thisclient, "28 = Freezing Plateau");
- SendPM(thisclient, "29 = Forgotten Temple (B1)");
- SendPM(thisclient, "30 = Forgotten Temple (B2)");
- SendPM(thisclient, "31 = Mount Eruca");
- SendPM(thisclient, "32 = Luna Clan Field");
- SendPM(thisclient, "33 = Refuge Xita");
- SendPM(thisclient, "34 = Shady Jungle");
- SendPM(thisclient, "35 = Forest of Wandering");
- SendPM(thisclient, "36 = Marsh of Ghosts");
- SendPM(thisclient, "37 = Sikuku Underground Prison");
- SendPM(thisclient, "Example; /go2 13");
- }
- if ( thisclient->Stats->HP < (thisclient->Stats->MaxHP / 4) || thisclient->Stats->HP < 1 || thisclient->Session->inGame == false )
- {
- SendPM(thisclient, "You need at least 25% HP in order to warp");
- return true;
- }
- if( (x != 0) && (y != 0) && (map != 0) )
- {
- fPoint coord;
- coord.x = x;
- coord.y = y;
- MapList.Index[map]->TeleportPlayer( thisclient, coord, false );
- Log( MSG_GMACTION, " %s : /go2 %i" , thisclient->CharInfo->charname, loc);
- }
- return true;
- }
In commands.ini find:
- Go=299 //change to 99 to give access for all player
Under it add:
- Go2=299 //change to 99 to give access for all players
If someone could compile this into an unedited osRose v80 and upload for me that would be very nice