Requests This subforum is for requests for Emu servers.
4 Weeks Ago
Sergeant Major
Join Date: Jan 2007
Location: Ironforge
Posts: 146
Reputation: 9
Level up: 21%, 559 Points needed
C++ Command
I am trying to make a Item Gossip that opens a codebox and you type a players name into it and it teleports you to that player. I need:
Command for If player is in Party
Gossip Script Template for Item
If i run into any problems ill post here
Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.
4 Weeks Ago
Contributor
Join Date: Dec 2008
Location: Sweden
Posts: 163
Reputation: 101
Level up: 38%, 440 Points needed
__________________
Why do I need a signature?
Last edited by Link_S; 4 Weeks Ago at 04:01 PM .
Reason: Misspell
2 Weeks Ago
Sergeant Major
Join Date: Jan 2007
Location: Ironforge
Posts: 146
Reputation: 9
Level up: 21%, 559 Points needed
I need it setup up in a specific manor, like You open the item goto the option choose it, if the player is a (Insert Gm Level) it opens a menu and when they select the Teleport option a Codebox pops up so they can type in the players name and if the player isnt in a party and isnt themself then it executes the teleport. Im No good at C++ been fiddling with this for a week and no results. So Link_S or anyone could you make this script? And then explain to me how to put it into the server. I have no C++ knowledge and since i cant even make the script i havent gotten to the point of trying to put it in. If possible and anyone wants to tackle some more C++ Scripts i need i will
Big time, the scripts i need are
Code:
C++ Global channel *type /o
C++ Haste system ( Haste isnt capped at 1.0 seconds per hit these are used in the
[Only registered and activated users can see links. ] at AC-Web if anyone knows how to... Ripp them outta the repack thats great but i would like to have these Scripts if possible.
2 Weeks Ago
Sergeant Major
Join Date: Jan 2007
Location: Ironforge
Posts: 146
Reputation: 9
Level up: 21%, 559 Points needed
No answers?? Whats up guys?
1 Weeks Ago
Elite User
Join Date: Jan 2008
Posts: 2,124
Reputation: 349
Level up: 46%, 597 Points needed
1 Week Ago
Sergeant Major
Join Date: Jan 2007
Location: Ironforge
Posts: 146
Reputation: 9
Level up: 21%, 559 Points needed
Yea i know i fail @ C++ so i cant do it. I need some help lol
1 Week Ago
Contributor
Join Date: Sep 2007
Location: Canada
Posts: 1,067
Reputation: 147
Level up: 53%, 428 Points needed
He already made it..
1 Week Ago
Elite User
Join Date: Jan 2008
Posts: 2,124
Reputation: 349
Level up: 46%, 597 Points needed
Hello, is this thing on?
I said I already made it, you don't need to write it again >>
6 Days Ago
Knight-Lieutenant
Join Date: Mar 2008
Location: Denmark
Posts: 309
Reputation: 47
Level up: 83%, 86 Points needed
Laughting @ Spidey
That comment were awesome xP
2 Days Ago
Sergeant Major
Join Date: Jan 2007
Location: Ironforge
Posts: 146
Reputation: 9
Level up: 21%, 559 Points needed
I dont want the exact one you made, i want it setup so it costs nothing, it opens a Codebox where you input a name.
2 Days Ago
New User
Join Date: Nov 2009
Posts: 1
Reputation: 1
Level up: 1%, 397 Points needed
Quote:
Originally Posted by
B14d3r11 I dont want the exact one you made, i want it setup so it costs nothing, it opens a Codebox where you input a name.
Based off of Spidey's Friend Porter, all credit should go to him if anything. I just modified it to fit your request.
Code:
#include "StdAfx.h"
#include "Setup.h"
#ifdef WIN32
#pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
#endif
#define ITEM_ID 123456
#define GM_LEVEL 'a'
class SCRIPT_DECL GMPorter : public GossipScript
{
public:
void GossipHello(Object* pObject, Player* Plr, bool AutoSend);
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char* Code);
void GossipEnd(Object* pObject, Player* Plr);
void Destroy()
{
delete this;
}
};
void GMPorter::GossipHello(Object* pObject, Player* Plr, bool AutoSend)
{
GossipMenu* Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
//Check to see if the player has the appropriate GM level
if(Plr->GetSession()->CanUseCommand(GM_LEVEL))
Menu->AddItem(0, "Port To Player", 1, 1);
Menu->AddItem(0, "[Exit]", 0);
if(AutoSend)
Menu->SendTo(Plr);
}
void GMPorter::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char* Code)
{
GossipMenu* Menu;
switch(IntId)
{
case 0: //End Gossip
Plr->Gossip_Complete();
break;
case 1: //Port to Player
{
//No name entered
if(!Code)
{
Plr->BroadcastMessage("%sYou have not entered a name to port to!", MSG_COLOR_RED);
Plr->Gossip_Complete();
}
Player* pPlayer = objmgr.GetPlayer(Code, false);
//Can't find the player entered
if(!pPlayer)
{
Plr->BroadcastMessage("%sPlayer is not online or could not be found.", MSG_COLOR_RED);
Plr->Gossip_Complete();
}
//If player has a group
if(pPlayer->GetGroup() != NULL)
{
Plr->BroadcastMessage("%sPlayer has a group, thus you cannot teleport to him.", MSG_COLOR_RED);
Plr->Gossip_Complete();
}
else
{
float XLoc = pPlayer->GetPositionX();
float YLoc = pPlayer->GetPositionY();
float ZLoc = pPlayer->GetPositionZ();
float OLoc = pPlayer->GetOrientation();
uint32 Map = pPlayer->GetMapId();
Plr->EventTeleport(Map, XLoc, YLoc, ZLoc);
Plr->SetOrientation(OLoc);
Plr->BroadcastMessage("%sYou have been successfully teleported to %s .", MSG_COLOR_RED, pPlayer->GetName());
Plr->Gossip_Complete();
}
}break;
}
};
void GMPorter::GossipEnd(Object* pObject, Player* Plr)
{
GossipScript::GossipEnd(pObject, Plr);
};
void SetupGMPorter(ScriptMgr* mgr)
{
GossipScript* gs = (GossipScript*) new GMPorter();
mgr->register_item_gossip_script(ITEM_ID, gs);
};
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 04:34 PM .