| | Emulator Server Releases This section is for all releases regarding Emu servers.
[NO QUESTIONS HERE] |  | | 
10-10-2009
|  | Contributor | | | Join Date: Dec 2007 Location: Ironforge
Posts: 387
Nominated 12 Times in 4 Posts Reputation: 258 Level up: 94%, 59 Points needed |     | | | The most useful GM command ever! Here is a GM command I wrote up some time ago named "warp"
Syntax: .warp direction value
direction = f, b, u, d, rotate
(forward, backward, up, down, rotate)
value: 1-360
This nifty little command will teleport your character (direction) (value).
Basically instead of manually inputting coordinates to get through objects, you can just type my command and you will port yourself though them.
This is EXTREMELY helpful for spawning things (especially game objects!)
Not sure why this has not been made an actual command already!
Installation is pretty self explanatory if you look at the code below. You just need to add three different parts to three different files and then compile your server like normal. Code: //Made by: Pwntzyou!
//DONT JACK THIS SHIT AND TAKE CREDIT FOR IT OR I WILL FIND AND KILL YOU
//ADD TO level3.cpp
//(In all honesty it really does not matter which levelX.cpp you put it unless you want to restrict that level of command
bool ChatHandler::HandleWarpCommand(const char* args, WorldSession *m_session)
{
char dir;
float value;
if(sscanf(args, "%f %c", &value, &dir) < 1) return false;
if(value > 360)
return false;
switch(tolower(dir))
{
//Made by: Pwntzyou!
case 'u':
{
m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ() + (float)value, m_session->GetPlayer()->GetOrientation());
}
break;
case 'd':
{
m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ() - (float)value, m_session->GetPlayer()->GetOrientation());
}
break;
case 'f':
{
float x = m_session->GetPlayer()->GetPositionX() + cosf(m_session->GetPlayer()->GetOrientation())*value;
float y = m_session->GetPlayer()->GetPositionY() + sinf(m_session->GetPlayer()->GetOrientation())*value;
m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), x, y, m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetOrientation());
}
break;
case 'b':
{
//Made by: Pwntzyou!
float x = m_session->GetPlayer()->GetPositionX() - cosf(m_session->GetPlayer()->GetOrientation())*value;
float y = m_session->GetPlayer()->GetPositionY() - sinf(m_session->GetPlayer()->GetOrientation())*value;
m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), x, y, m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetOrientation());
}
break;
case "rotate":
{
//In degrees -> Radians
float radian = value * 180 / 3.14159265;
m_session->GetPlayer()->SafeTeleport(m_session->GetPlayer()->GetMapId(), m_session->GetPlayer()->GetInstanceID(), m_session->GetPlayer()->GetPositionX(), m_session->GetPlayer()->GetPositionY(), m_session->GetPlayer()->GetPositionZ(), m_session->GetPlayer()->GetOrientation() + radian);
}
break;
default:
RedSystemMessage(m_session, "Invalid Direction, Please use forward(f) backward(b) up(u) down(d)");
}
return true;
}
// Chat.cpp
//ADD TO BOTTOM OF "static ChatCommand commandTable[] ="
// {
// ...
// ...
// ...
// HERE
// ...
// }
{ "warp", 'm', &ChatHandler::HandleWarpCommand, "Warp the player (1-100) coordinates forward(f) backward(b) up(u) down(d).",
// Chat.h
// Add the following in Chat.h where similar things are
// Should looks something like this
// Level 0 Commands
// ...
// ...
// ...
// HERE
bool HandleWarpCommand(const char * args, WorldSession * m_session); NULL, 0, 0, 0 },
This *should* work with *most* emulators (Arcemu / Aspire / w.e) but if it does not, getting it to work will not be hard.
__________________ 
<3 MysterioussouL for the sig
Last edited by Pwntzyou; 10-15-2009 at 05:58 PM.
| Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx. 
10-10-2009
|  | The Melancholy Legendary User | | | Join Date: Sep 2007 Location: England
Posts: 1,717
Nominated 69 Times in 5 Posts  TOTM/W Award(s): 1 Reputation: 680 Points: 10,441, Level: 12 | Level up: 54%, 559 Points needed |     | | Tbh this is just for lazy people, it takes about 10 seconds to type .gps, then .worldport with a couple added on to X or whatever. Still, a nice script so  | 
10-10-2009
|  | Contributor | | | Join Date: Dec 2007 Location: Ironforge
Posts: 387
Nominated 12 Times in 4 Posts Reputation: 258 Level up: 94%, 59 Points needed |     | | Quote:
Originally Posted by stoneharry Tbh this is just for lazy people, it takes about 10 seconds to type .gps, then .worldport with a couple added on to X or whatever. Still, a nice script so  | I know, but when you need to do something like spawning 100 walls partially underground, something like this is a lifesaver
...trust me >.<!
And thanks!
__________________ 
<3 MysterioussouL for the sig | 
10-10-2009
|  | Contributor | | | Join Date: Jun 2008 Location: can of duh
Posts: 117
Nominated 17 Times in 5 Posts Reputation: 104 Level up: 83%, 85 Points needed |  | | Great script, just tried it out and it works perfectly!
This is going to save me a lot of time, Thank you so much! x2
edit: Love the fact that it teleports you forward or backwards relative to your players orientation.
Last edited by Vision1000; 10-10-2009 at 06:42 PM.
| 
10-10-2009
|  | Knight-Champion | | | Join Date: Feb 2008
Posts: 489
Reputation: 43 Level up: 85%, 111 Points needed |   | | Looks good mate.  . | 
10-11-2009
|  | Master Sergeant | | | Join Date: Feb 2009 Location: Texas
Posts: 95
Nominated 11 Times in 3 Posts Reputation: 41 Level up: 77%, 164 Points needed |    | | | Could you also do orientation too? I wold make it 500* more epic
__________________ What once was Moonblade rose from the ashes as Apple Pi! | 
10-11-2009
|  | Contributor | | | Join Date: Dec 2007 Location: Ironforge
Posts: 387
Nominated 12 Times in 4 Posts Reputation: 258 Level up: 94%, 59 Points needed |     | | Quote:
Originally Posted by moonblade0421 Could you also do orientation too? I wold make it 500* more epic | This uses orientation...
Hence *forward / backward*
so it ports you in the direction you are facing
__________________ 
<3 MysterioussouL for the sig | 
10-11-2009
|  | Contributor | | | Join Date: Dec 2008 Location: Sweden
Posts: 191
Reputation: 109 Level up: 61%, 278 Points needed |  | | Haha, the human always tries to make everything easier cause we're so lazy xD.
This is very "lazy-creative" I can't get my hands of the button ^^
__________________ Why do I need a signature? | 
10-11-2009
|  | Contributor | | | Join Date: Sep 2007 Location: wowvirtue.com
Posts: 147
Reputation: 84 Level up: 49%, 361 Points needed |     | | nice 1  repx3 for you | 
10-11-2009
|  | Moderator Legendary User | | | Join Date: Aug 2008 Location: United Kingdom.
Posts: 2,141
Nominated 36 Times in 10 Posts Reputation: 771 Points: 19,448, Level: 19 | Level up: 10%, 1,352 Points needed |     | | Sexy Release is Sexy. | 
10-11-2009
|  | Sergeant | | | Join Date: Nov 2007 Location: near you
Posts: 44
Reputation: 11 Level up: 53%, 235 Points needed |    | | didnt work for me Code: >------ Build started: Project: arcemu-world, Configuration: Release Win32 ------
1>Compiling...
1>StdAfx.cpp
1>Compiling...
1>faction.cpp
1>RecallCommands.cpp
1>QuestCommands.cpp
1>Level3.cpp
1>Level2.cpp
1>..\..\src\arcemu-world\Level3.cpp(4026) : error C2601: 'ChatHandler::HandleWarpCommand' : local function definitions are illegal
1> ..\..\src\arcemu-world\Level3.cpp(3940): this line contains a '{' which has not yet been matched
1>..\..\src\arcemu-world\Level3.cpp(4073) : fatal error C1075: end of file found before the left brace '{' at '..\..\src\arcemu-world\Level3.cpp(3940)' was matched
1>Level1.cpp
1>Level0.cpp
1>InstanceCommands.cpp
1>GMTicketCommands.cpp
1>debugcmds.cpp
1>BattlegroundCommands.cpp
1>WorldRunnable.cpp
1>DayWatcherThread.cpp
1>CommonScheduleThread.cpp
1>SpellTarget.cpp
1>SpellFixes.cpp
1>SpellEffects.cpp
1>Spell.cpp
1>WorldSession.cpp
1>AreaTrigger.cpp
1>VoiceChatHandler.cpp
1>TradeHandler.cpp
1>TaxiHandler.cpp
1>SpellHandler.cpp
1>SocialHandler.cpp
1>SkillHandler.cpp
1>ReputationHandler.cpp
1>RaidHandler.cpp
1>QuestHandler.cpp
1>QueryHandler.cpp
1>PetHandler.cpp
1>NPCHandler.cpp
1>MovementHandler.cpp
1>MiscHandler.cpp
1>LfgHandler.cpp
1>ItemHandler.cpp
1>HonorHandler.cpp
1>GuildHandler.cpp
1>GroupHandler.cpp
1>GMTicket.cpp
1>DuelHandler.cpp
1>CombatHandler.cpp
1>ChatHandler.cpp
1>CharacterHandler.cpp
1>ChannelHandler.cpp
1>BattlegroundHandler.cpp
1>LogonCommHandler.cpp
1>LogonCommClient.cpp
1>WorldSocket.cpp
1>VoiceChatClientSocket.cpp
1>UnixMetric.cpp
1>Opcodes.cpp
1>AuctionMgr.cpp
1>AuctionHouse.cpp
1>WorldCreator.cpp
1>TerrainMgr.cpp
1>TaxiMgr.cpp
1>ScriptMgr.cpp
1>QuestMgr.cpp
1>LocalizationMgr.cpp
1>EventMgr.cpp
1>AddonMgr.cpp
1>AchievementMgr.cpp
1>ConsoleListener.cpp
1>ConsoleCommands.cpp
1>CConsole.cpp
1>Master.cpp
1>Main.cpp
1>WorldState.cpp
1>World.cpp
1>WeatherMgr.cpp
1>Quest.cpp
1>ObjectMgr.cpp
1>MapScriptInterface.cpp
1>MapMgr.cpp
1>MapCell.cpp
1>Map.cpp
1>CollideInterface.cpp
1>MailSystem.cpp
1>LootMgr.cpp
1>LfgMgr.cpp
1>ArenaTeam.cpp
1>Arenas.cpp
1>WarsongGulch.cpp
1>StrandOfTheAncient.cpp
1>EyeOfTheStorm.cpp
1>BattlegroundMgr.cpp
1>ArathiBasin.cpp
1>AlteracValley.cpp
1>SpellAuras.cpp
1>ObjectContainer.cpp
1>ItemInterface.cpp
1>Item.cpp
1>Container.cpp
1>TransporterHandler.cpp
1>GameObject.cpp
1>DynamicObject.cpp
1>Corpse.cpp
1>Vehicle.cpp
1>Pet.cpp
1>Creature.cpp
1>SpeedDetector.cpp
1>PlayerPacketWrapper.cpp
1>Player.cpp
1>..\..\src\arcemu-world\Player.cpp(38) : warning C4355: 'this' : used in base member initializer list
1>Guild.cpp
1>Group.cpp
1>Unit.cpp
1>Stats.cpp
1>Object.cpp
1>EventableObject.cpp
1>ObjectStorage.cpp
1>DatabaseCleaner.cpp
1>AIInterface.cpp
1>WordFilter.cpp
1>WayPoints.cpp
1>Chat.cpp
1>..\..\src\arcemu-world\Chat.cpp(773) : error C2144: syntax error : 'bool' should be preceded by '}'
1>..\..\src\arcemu-world\Chat.cpp(773) : error C2144: syntax error : 'bool' should be preceded by '}'
1>..\..\src\arcemu-world\Chat.cpp(773) : error C2144: syntax error : 'bool' should be preceded by ';'
1>..\..\src\arcemu-world\Chat.cpp(773) : error C2143: syntax error : missing ';' before '}'
1>..\..\src\arcemu-world\Chat.cpp(773) : error C2059: syntax error : ','
1>..\..\src\arcemu-world\Chat.cpp(775) : error C2143: syntax error : missing ';' before '{'
1>..\..\src\arcemu-world\Chat.cpp(775) : error C2447: '{' : missing function header (old-style formal list?)
1>..\..\src\arcemu-world\Chat.cpp(776) : error C2059: syntax error : '}'
1>..\..\src\arcemu-world\Chat.cpp(776) : error C2143: syntax error : missing ';' before '}'
1>..\..\src\arcemu-world\Chat.cpp(776) : error C2059: syntax error : '}'
1>..\..\src\arcemu-world\Chat.cpp(777) : error C2059: syntax error : 'this'
1>..\..\src\arcemu-world\Chat.cpp(780) : error C2065: '_commandTable' : undeclared identifier
1>..\..\src\arcemu-world\Chat.cpp(781) : error C2059: syntax error : 'while'
1>..\..\src\arcemu-world\Chat.cpp(782) : error C2143: syntax error : missing ';' before '{'
1>..\..\src\arcemu-world\Chat.cpp(782) : error C2447: '{' : missing function header (old-style formal list?)
1>..\..\src\arcemu-world\Chat.cpp(792) : error C2059: syntax error : '}'
1>..\..\src\arcemu-world\Chat.cpp(792) : error C2143: syntax error : missing ';' before '}'
1>..\..\src\arcemu-world\Chat.cpp(792) : error C2059: syntax error : '}'
1>..\..\src\arcemu-world\Chat.cpp(795) : error C2143: syntax error : missing ';' before '{'
1>..\..\src\arcemu-world\Chat.cpp(795) : error C2447: '{' : missing function header (old-style formal list?)
1>Channel.cpp
1>Build log was saved at "file://c:\Users\Jordan\Desktop\Arcemu\branches\untested\win\VC90\arcemu-world___Win32_Release\BuildLog.htm"
1>arcemu-world - 22 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 5 up-to-date, 0 skipped ==========
| 
10-11-2009
|  | Master Sergeant | | | Join Date: Feb 2009 Location: Texas
Posts: 95
Nominated 11 Times in 3 Posts Reputation: 41 Level up: 77%, 164 Points needed |    | | | I mean want way you are facing such as turning in 90 deg or such
__________________ What once was Moonblade rose from the ashes as Apple Pi! | 
10-11-2009
|  | Contributor | | | Join Date: Dec 2007 Location: Ironforge
Posts: 387
Nominated 12 Times in 4 Posts Reputation: 258 Level up: 94%, 59 Points needed |     | | Quote:
Originally Posted by moonblade0421 I mean want way you are facing such as turning in 90 deg or such |
I am not sure what you mean T_T
Like i said before my script does make use of "degrees" (It actually uses radians) to use the player's orientation when porting forward and such
__________________ 
<3 MysterioussouL for the sig
Last edited by Pwntzyou; 10-11-2009 at 02:21 PM.
| 
10-11-2009
|  | Sergeant Major | | | Join Date: Dec 2008 Location: Pennsylvania
Posts: 170
Reputation: 51 Level up: 47%, 377 Points needed |   | | Quote:
Originally Posted by Pwntzyou I am not sure what you mean T_T
Like i said before my script does make use of "degrees" (It actually uses radians) to use the player's orientation when porting forward and such | They mean instead of warping to a different location or whatever, just change the direction they are facing (i.e. 90 degree turn). | 
10-11-2009
|  | Contributor | | | Join Date: Dec 2007 Location: Ironforge
Posts: 387
Nominated 12 Times in 4 Posts Reputation: 258 Level up: 94%, 59 Points needed |     | | Quote:
Originally Posted by Zudrik They mean instead of warping to a different location or whatever, just change the direction they are facing (i.e. 90 degree turn). | Ahh now that makes sense, I added it to the code but it is untested (Took about two seconds btw)
.warp rotate X
X can be 1-360
__________________ 
<3 MysterioussouL for the sig
Last edited by Pwntzyou; 10-11-2009 at 11:19 PM.
|  | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -4. The time now is 12:59 AM. |