Jump to content

Ruafo

Members
  • Posts

    51
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Ruafo

  1. Oh my god... I really must need sleep. I was using the "realm" port... not the SOAP port. Wow! Thank you for your help. I'm sorry about that.
  2. Good idea. Not sure why I didn't think of that. will do.
  3. Hi Carl! I'm able to run the command with :1 and without from the console... that's what has me confused.
  4. As a side note... just to rule it out... I tried changing " to ' and vice versa... which didn't help
  5. I have a PHP website that I'm attempting to send commands via SOAP to the core. It has no problem handing commands like resetting password, etc. However when I try and send an item, I get: WorldSocket::handle_input_header: client sent malformed packet size = 20559 , cmd = 790647891 Here is the command string I'm trying to send: send items TestPlayer1 "Items added" "Attached are the items you requested from the website" 2909:1 That SHOULD send 1 Red Wool Bandana Any thoughts?
  6. Maybe this has been touched on before, for some reason I remember seeing it the old forums. Is it functionally realistic from a performance perspecitive to operate multiple realms from the same world DB? Obviously you need a separate character DB for each realm. But there isn't really anything being written to the world DB. Am I correct? Thanks
  7. by the way, what are you using to embed the code? It looks "prettier" than the normal code embeder here.
  8. Nope. Still not exactly right. Here is what I have after I modified what you gave me: //Transmit Achievement to IRC std::string irc_message = ("Player: %s achieved: %s",GetPlayer()->GetName(),achievement->name); std::string channel = std::string("#") + sIRC._irc_chan[sIRC.Status]; sIRC.Send_IRC_Channel(channel, irc_message, irc_message, true); For reference, this is what I wrote for player.cpp to echo the level when someone achieves a new level. Not sure if that will help at all. char plevel [3]; sprintf(plevel, "%u", level); std::string pname = GetName(); std::string channel = std::string("#") + sIRC._irc_chan[sIRC.anchn].c_str(); sIRC.Send_IRC_Channel(channel, "\\00311["+pname+"] : Has Reached Level: "+plevel, true); (Might be hard to believe, but I actually helped to develop MangChat. I'm Shinzon... I started the thread for it when mangos converted over to the new forum.)
  9. I'll try it out now. I'll also get you a copy of my mangchat patch.
  10. Oh. Certainly: // Send a message to the specified IRC channel void Send_IRC_Channel(std::string sChannel, std::string sMsg, bool NoPrefix = false, std::string nType = "PRIVMSG"); Lillecarl, You like a challenge don't you? Not the first time you've helped me. I have a lot of respect for your coding talents. I'm very strong with PHP, but C++ has always been more of a challenge for me.
  11. See above. Apparently I was editing the post while you posted. // broadcast realm first reached WorldPacket data(SMSG_SERVER_FIRST_ACHIEVEMENT, strlen(GetPlayer()->GetName())+1+8+4+4); data << GetPlayer()->GetName(); data << GetPlayer()->GetObjectGuid(); data << uint32(achievement->ID); data << uint32(0); // 1=link supplied string as player name, 0=display plain string //Transmit Achievement to IRC std::string pname = GetPlayer()->GetName(); std::string a_title = achievement->name std::string channel = std::string("#") + sIRC._irc_chan[sIRC.Status]; sIRC.Send_IRC_Channel(channel, "\\00311["+pname+"] : Has Achieved: "+a_title, true); sWorld.SendGlobalMessage(&data);
  12. I'm actually trying to output achievements for MangChat. So I am building the string for what will be broadcast into the IRC module. In Visual Studio when I try to get "name" for "achievement" (i.e. achievement->name ) using string I get "no suitable constructor exists". So, I know I'm not assembling it right, I just can't seem to get my head around 'how'. Here is the whole piece of code I'm working with (for reference): // broadcast realm first reached WorldPacket data(SMSG_SERVER_FIRST_ACHIEVEMENT, strlen(GetPlayer()->GetName())+1+8+4+4); data << GetPlayer()->GetName(); data << GetPlayer()->GetObjectGuid(); data << uint32(achievement->ID); data << uint32(0); // 1=link supplied string as player name, 0=display plain string //Transmit Achievement to IRC std::string pname = GetPlayer()->GetName(); std::string a_title = achievement->name std::string channel = std::string("#") + sIRC._irc_chan[sIRC.Status]; sIRC.Send_IRC_Channel(channel, "\\00311["+pname+"] : Has Achieved: "+a_title, true); sWorld.SendGlobalMessage(&data);
  13. I am working with AchievementMgr.cpp. This section in particular: // broadcast realm first reached WorldPacket data(SMSG_SERVER_FIRST_ACHIEVEMENT, strlen(GetPlayer()->GetName())+1+8+4+4); data << GetPlayer()->GetName(); data << GetPlayer()->GetObjectGuid(); data << uint32(achievement->ID); data << uint32(0); // 1=link supplied string as player name, 0=display plain string sWorld.SendGlobalMessage(&data); I want to extract the Player's name and the Achievement name as string values. I'm not certain on the code though. Can anyone verify if I'm on the right track? std::string pname = GetPlayer()->GetName(); std::string atitle = achievement->name(); NOTE: I know I am off base on the achievement name... but I think the player name will work. Thoughts?
  14. Okay. Here is the patch for the SQL: Uncomment the sections in the IRCCmde.cpp that say "NOT WORKING" http://pastebin.com/cdzTLWk7
  15. Yeah, okay. That wasn't hard. You guys are missing part of the Database Structure. LOL! I'll post a patch soon.
  16. LordPsyan, I'm actually Shinzon, the one who converted MangChat way back when. (been away from Mangos for a while) • I'm curious, why was the ACE priority set to high in the Master.cpp? //Start up MangChat ACE_Based::Thread irc(new IRCClient); irc.setPriority (ACE_Based::High); • I'm working on the "add", "del", "list" commands from IRCCmde.cpp that aren't working. I think I know what the problem is. • I also have created new code to announce achievements which I will post at some point soon.
  17. Thank you for the advice. I truley appreciate it. I will try it out. And good thoughts on not creating a variable if I'm not going to use it more than once. Thank you!
  18. Ok, I guess I was wrong. I thought it worked... but I was wrong. Vlad, Here is my existing code. Is there anything wrong with it? The part in Green is the part I'm most concerned with. But maybe there is something else conflicting? { Player* target; ObjectGuid target_guid; std::string target_name; if (!ExtractPlayerTarget(&args, &target, &target_guid, &target_name)) return false; Player* _player = m_session->GetPlayer(); if (target == _player || target_guid == _player->GetObjectGuid()) { SendSysMessage(LANG_CANT_TELEPORT_SELF); SetSentErrorMessage(true); return false; } if (target) { uint32 p_team = _player->Player::GetTeam(); uint32 t_team = target->Player::GetTeam(); // Check that other player is same faction if (!(p_team == t_team)) { SendSysMessage(LANG_NOTELE_OPPOSING_FACTION); SetSentErrorMessage(true); return false; }
  19. Ruafo

    graveyard

    Is there not a table for graveyard values? Maybe I'm thinking of an older version of Mangos?
  20. Agree with lillecarl
  21. There IS a limit if it's a player account. Only one player account can be connected at the same time. GM Accounts you can have as many instances connecting as you want (regardless of the IP). Also, you said Computer1 connects but then Computer2 can't connect.... Can Computer2 connect if Computer1 is NOT connected?
  22. Ok, I'm trying develop a custom command for players. Similar to .goname but not exactly. Basically I want players to be able to goname each other, but not go to opposite factions. The problem I'm running into is for the life of me I can't figure out a good way to get the faction of the player and the target for comparison. Here is where I'm going with the code: uint8 p_race = _player->GetTeam(); uint8 t_race = target->GetTeam(); uint32 p_faction = Player::TeamForRace(p_race); uint32 t_faction = Player::TeamForRace(t_race); // Check that other player is same faction if (!p_faction == t_faction) { SendSysMessage(LANG_NOTELE_OPPOSING_FACTION); SetSentErrorMessage(true); return false; } but I know I'm not doing it right because I can still go to opposite factions. What's the best way to call each player's faction? (This is being created in the Level0.cpp file) Thank you in advance for any help you can offer
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use