

Patman128
Members-
Posts
1090 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Everything posted by Patman128
-
Which spell? I can't find it.
-
tSecurity is the security level of this player, pSecurity is the security level of whoever they are whispering. What is it you are trying to do exactly?
-
Well, sure. If you look at the other commands, such as in Level1.cpp: bool ChatHandler::HandleGonameCommand(const char* args) { Player* target; uint64 target_guid; std::string target_name; if (!extractPlayerTarget((char*)args,&target,&target_guid,&target_name)) return false; Player* _player = m_session->GetPlayer(); if (target == _player || target_guid == _player->GetGUID()) { SendSysMessage(LANG_CANT_TELEPORT_SELF); SetSentErrorMessage(true); return false; } You'll see that here, the targeted player is taken from extractPlayerTarget() and assigned to target, and the player using the command, _player, is taken from m_session->GetPlayer(). You can just use this in your command.
-
Well, I'll do you one better. If you look at Chat.cpp, scroll down past all the command sub-menu definitions and you'll find the main commands table: static ChatCommand commandTable[] = { { "account", SEC_PLAYER, true, NULL, "", accountCommandTable }, { "gm", SEC_MODERATOR, true, NULL, "", gmCommandTable }, { "npc", SEC_MODERATOR, false, NULL, "", npcCommandTable }, { "go", SEC_MODERATOR, false, NULL, "", goCommandTable }, { "learn", SEC_MODERATOR, false, NULL, "", learnCommandTable }, { "modify", SEC_MODERATOR, false, NULL, "", modifyCommandTable }, { "debug", SEC_MODERATOR, true, NULL, "", debugCommandTable }, { "tele", SEC_MODERATOR, true, NULL, "", teleCommandTable }, { "character", SEC_GAMEMASTER, false, NULL, "", characterCommandTable}, { "event", SEC_GAMEMASTER, false, NULL, "", eventCommandTable }, { "gobject", SEC_GAMEMASTER, false, NULL, "", gobjectCommandTable }, { "honor", SEC_GAMEMASTER, false, NULL, "", honorCommandTable }, { "wp", SEC_GAMEMASTER, false, NULL, "", wpCommandTable }, { "quest", SEC_ADMINISTRATOR, false, NULL, "", questCommandTable }, { "reload", SEC_ADMINISTRATOR, true, NULL, "", reloadCommandTable }, { "list", SEC_ADMINISTRATOR, true, NULL, "", listCommandTable }, { "lookup", SEC_ADMINISTRATOR, true, NULL, "", lookupCommandTable }, { "pdump", SEC_ADMINISTRATOR, true, NULL, "", pdumpCommandTable }, { "guild", SEC_ADMINISTRATOR, true, NULL, "", guildCommandTable }, { "cast", SEC_ADMINISTRATOR, false, NULL, "", castCommandTable }, { "reset", SEC_ADMINISTRATOR, true, NULL, "", resetCommandTable }, { "instance", SEC_ADMINISTRATOR, true, NULL, "", instanceCommandTable }, { "server", SEC_ADMINISTRATOR, true, NULL, "", serverCommandTable }, { "aura", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAuraCommand, "", NULL }, { "unaura", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUnAuraCommand, "", NULL }, { "announce", SEC_MODERATOR, true, &ChatHandler::HandleAnnounceCommand, "", NULL }, { "nameannounce", SEC_MODERATOR, false, &ChatHandler::HandleNameAnnounceCommand, "", NULL }, { "notify", SEC_MODERATOR, true, &ChatHandler::HandleNotifyCommand, "", NULL }, { "goname", SEC_MODERATOR, false, &ChatHandler::HandleGonameCommand, "", NULL }, { "namego", SEC_MODERATOR, false, &ChatHandler::HandleNamegoCommand, "", NULL }, { "groupgo", SEC_MODERATOR, false, &ChatHandler::HandleGroupgoCommand, "", NULL }, { "commands", SEC_PLAYER, true, &ChatHandler::HandleCommandsCommand, "", NULL }, { "demorph", SEC_GAMEMASTER, false, &ChatHandler::HandleDeMorphCommand, "", NULL }, { "die", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDieCommand, "", NULL }, { "revive", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReviveCommand, "", NULL }, { "dismount", SEC_PLAYER, false, &ChatHandler::HandleDismountCommand, "", NULL }, { "gps", SEC_MODERATOR, false, &ChatHandler::HandleGPSCommand, "", NULL }, { "guid", SEC_GAMEMASTER, false, &ChatHandler::HandleGUIDCommand, "", NULL }, { "help", SEC_PLAYER, true, &ChatHandler::HandleHelpCommand, "", NULL }, { "itemmove", SEC_GAMEMASTER, false, &ChatHandler::HandleItemMoveCommand, "", NULL }, { "cooldown", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCooldownCommand, "", NULL }, { "unlearn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUnLearnCommand, "", NULL }, { "distance", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetDistanceCommand, "", NULL }, { "recall", SEC_MODERATOR, false, &ChatHandler::HandleRecallCommand, "", NULL }, { "save", SEC_PLAYER, false, &ChatHandler::HandleSaveCommand, "", NULL }, { "saveall", SEC_MODERATOR, true, &ChatHandler::HandleSaveAllCommand, "", NULL }, { "kick", SEC_GAMEMASTER, true, &ChatHandler::HandleKickPlayerCommand, "", NULL }, { "ban", SEC_ADMINISTRATOR, true, NULL, "", banCommandTable }, { "unban", SEC_ADMINISTRATOR, true, NULL, "", unbanCommandTable }, { "baninfo", SEC_ADMINISTRATOR, false, NULL, "", baninfoCommandTable }, { "banlist", SEC_ADMINISTRATOR, true, NULL, "", banlistCommandTable }, { "start", SEC_PLAYER, false, &ChatHandler::HandleStartCommand, "", NULL }, { "taxicheat", SEC_MODERATOR, false, &ChatHandler::HandleTaxiCheatCommand, "", NULL }, { "linkgrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLinkGraveCommand, "", NULL }, { "neargrave", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNearGraveCommand, "", NULL }, { "explorecheat", SEC_ADMINISTRATOR, false, &ChatHandler::HandleExploreCheatCommand, "", NULL }, { "hover", SEC_ADMINISTRATOR, false, &ChatHandler::HandleHoverCommand, "", NULL }, { "levelup", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLevelUpCommand, "", NULL }, { "showarea", SEC_ADMINISTRATOR, false, &ChatHandler::HandleShowAreaCommand, "", NULL }, { "hidearea", SEC_ADMINISTRATOR, false, &ChatHandler::HandleHideAreaCommand, "", NULL }, { "additem", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddItemCommand, "", NULL }, { "additemset", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddItemSetCommand, "", NULL }, { "bank", SEC_ADMINISTRATOR, false, &ChatHandler::HandleBankCommand, "", NULL }, { "wchange", SEC_ADMINISTRATOR, false, &ChatHandler::HandleChangeWeather, "", NULL }, { "ticket", SEC_GAMEMASTER, true, &ChatHandler::HandleTicketCommand, "", NULL }, { "delticket", SEC_GAMEMASTER, true, &ChatHandler::HandleDelTicketCommand, "", NULL }, { "maxskill", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMaxSkillCommand, "", NULL }, { "setskill", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetSkillCommand, "", NULL }, { "whispers", SEC_MODERATOR, false, &ChatHandler::HandleWhispersCommand, "", NULL }, { "pinfo", SEC_GAMEMASTER, true, &ChatHandler::HandlePInfoCommand, "", NULL }, { "respawn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleRespawnCommand, "", NULL }, { "send", SEC_MODERATOR, true, NULL, "", sendCommandTable }, { "loadscripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadScriptsCommand, "", NULL }, { "mute", SEC_MODERATOR, true, &ChatHandler::HandleMuteCommand, "", NULL }, { "unmute", SEC_MODERATOR, true, &ChatHandler::HandleUnmuteCommand, "", NULL }, { "movegens", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMovegensCommand, "", NULL }, { "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL }, { "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL }, { "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL }, { "flusharenapoints",SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL }, { "repairitems", SEC_GAMEMASTER, true, &ChatHandler::HandleRepairitemsCommand, "", NULL }, { "waterwalk", SEC_GAMEMASTER, false, &ChatHandler::HandleWaterwalkCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } The first argument is the command name, the second is the security level (it's hardcoded for whatever reason) the third is whether or not it's allowed in the console, and the fourth is a pointer to it's handler function (you can ignore the other 2 arguments) Now, simply code the handler function in one of the Level files (or, like I said, you can make your own file for your commands) and add it to that table. Then, insert the entry in `world`.`commands` for it.
-
Has to be client-side, but it's possible with an add-on or patch.
-
Someone made a python client a while back on here. You may be able to find it if you search for it.
-
You have to add the command to the big commands array in Chat.cpp (I believe) as well as code the actual command in one of the Level#.cpp files (or make your own CustomCommands.cpp) Then you have to put in the database stuff. You need to know C++ to write commands. If you already know C++, just look at how the others are implemented.
-
git is actually one of the easier things I've come across. It's not really hard at all once you get the hang of it. For getting mangos, just use the git clone command: git clone git://github.com/mangos/mangos.git mangos-0.12 Or, you can cd into the directory you want to use and use init and pull instead: git init git pull git://github.com/mangos/mangos.git mangos-0.12 Once you actually have a git repository, you can then add your remotes, like your other command: git remote add origin git://github.com/mangos/mangos.git mangos-0.12 This means that you can substitute "origin" for "git://github.com/mangos/mangos.git mangos-0.12" when pulling changes. To pull the latest changes from mangos: git pull origin Now, to make a working branch, simply use branch and checkout: git branch work git checkout work This creates and switches to your new working branch. Now, let's say your system goes something like (pull new changes from mangos to master)-->(merge changes into work)-->(switch back to work) you could just use something like: git checkout master git pull origin git checkout work git merge master And then your master and work would be up to date. And that's some basic git commands. Any more questions?
-
Mangos have been repacked for commercial sales in China!
Patman128 replied to rogermangos's topic in OldGeneral discussion
If someone is going to pay that much for something they can get for free, I don't see them having much success with their server anyway. -
It should probably be a ScriptDev script.
-
Learn C++. http://www.cprogramming.com/tutorial.html
-
Pretty sure they added that somewhere between then and now.
-
Packet sniffing.
-
[Patch][8446] Fix for Achievement criteria 'Fall Without Diying'
Patman128 replied to a topic in ... acceptedOld
// recheck alive, might have died of EnvironmentalDamage if (isAlive() && (damage < Health)) GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING, uint32(z_diff*100)); Cleaned that for you. -
Let me guess: the character is in the Emerald Dream? Which map is it attempting to load? Your debugger optimized out the values.
-
Ah, so THAT'S what the s and v fields in the account table are for. Thanks, I didn't know how the login system worked before.
-
I think it was changed in http://github.com/mangos/mangos/commit/d86dc83b34b879a24fb89a7dbe33de397f72c910
-
Actually, I pretty sure you can just use a string (ChatHandler(player).SendSysMessage("Some text here"); )
-
Not sure what you said, but yes, the hash sent by client (if the username and password are correct) is the same as the one stored in the database.
-
I'm looking through old code. I can't see anything about it saving the changes. Which branch are you using?
-
Ah, I think you want ChatHandler(player).SendSysMessage(LANG_ITEM_SAVE_FAILED);
-
I think it's in the conf file. If it's not, the code is in Gameobject.cpp: case GAMEOBJECT_TYPE_MEETINGSTONE: //23 { GameObjectInfo const* info = GetGOInfo(); if(user->GetTypeId()!=TYPEID_PLAYER) return; Player* player = (Player*)user; Player* targetPlayer = ObjectAccessor::FindPlayer(player->GetSelection()); // accept only use by player from same group for caster except caster itself if(!targetPlayer || targetPlayer == player || !targetPlayer->IsInSameGroupWith(player)) return; //required lvl checks! uint8 level = player->getLevel(); if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel) return; level = targetPlayer->getLevel(); if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel) return; spellId = 23598; break; }
-
What? PG2? If I'm using iptables, I thought you would have assumed I used Linux. Yeah, there's probably some firewall tool out there. But without root access, it might be hard to find one which works properly.
-
In Player.cpp, add the comments here: void Player::UpdateZoneDependentAuras( uint32 newZone ) { // remove new continent flight forms /* if( !isGameMaster() && GetVirtualMapForMapAndZone(GetMapId(),newZone) != 530) { RemoveSpellsCausingAura(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED); RemoveSpellsCausingAura(SPELL_AURA_FLY); } */ In Spell.cpp add the comments here: case SPELL_AURA_FLY: { // not allow cast fly spells at old maps by players (all spells is self target) /* if(m_caster->GetTypeId() == TYPEID_PLAYER) { if( !((Player*)m_caster)->isGameMaster() && GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) != 530) return SPELL_FAILED_NOT_HERE; } */ break; }
-
Yes, but not everyone has access to such tools. For example, on a test server I was using once, it was a shared system, the root admin controlled the iptables and firewall. Furthermore, getting access to a datacenter's router controls isn't exactly an easy task.
Contact Us
To contact us
click here
You can also email us at [email protected]
Privacy Policy | Terms & Conditions

You can also email us at [email protected]
Privacy Policy | Terms & Conditions
Copyright © getMaNGOS. All rights Reserved.
This website is in no way associated with or endorsed by Blizzard Entertainment®
This website is in no way associated with or endorsed by Blizzard Entertainment®