Jump to content

Patman128

Members
  • Posts

    1090
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Patman128

  1. struct huffman_input_stream { unsigned char *in_buf; // this is a pointer to our data unsigned long bit_buf; // this buffer stores 16 bits of our input (in_buf) at a time unsigned int bits; // number of bits in bit_buf (if we have 8 or less we need to load more data into it) }; static unsigned long libmpq_huff_get_8bits(struct huffman_input_stream *is) { unsigned long one_byte; // this is the byte we will return if (is->bits <= 8) { // if we have 8 or less bits in our buffer... is->bit_buf |= *(unsigned short *)is->in_buf << is->bits; // load the next 16 bits into bit_buf is->in_buf += sizeof(unsigned short); // increment the input so that we are pointing to the next 16 bits to load (for the next time) is->bits += 16; // add 16 to bits so we know that we have 16 more bits loaded } one_byte = (is->bit_buf & 0xFF); // set one_byte to the first byte of our buffer is->bit_buf >>= 8; // push out the first byte of our buffer (since we've now used it) is->bits -= 8; // remove a byte from our counter (since we just pushed it out) return one_byte; }
  2. It's a LUA script. Mangos doesn't support LUA.
  3. mysql_connect ("$host","$user","$pass"); mysql_select_db ("$mangosrealm"); You have variables surrounded by quotes here. $result = mysql_query ("SELECT username FROM account WHERE gmlevel > 3 ORDER BY USERNAME)"); This query is written incorrectly. "SELECT username FROM account WHERE gmlevel > 3 ORDER BY USERNAME)" What is the ) for? while ( $row = mysql_fetch_array($result)) { $t_name = $row['username']; echo " [b]<span style='color: #B00000'>$t_name[/b]</span></p>"; } I actually don't see anything wrong with this part.
  4. No, factions absolutely do matter, in dungeons and in world. If creatures get help from other creatures even if the faction is not right, most likely they are grouped together and share aggro (which is not implemented in mangos)
  5. Ask these people. Mangos doesn't include any quests.
  6. Yes in this case must be related to some other problem or custom patch.
  7. I think you're looking for npc_text.
  8. Or to put it into simpler terms, here is the mangos function for converting map co-ords (like the ones in DB) into zone co-ords (like Cartographer) bool Map2ZoneCoordinates(float& x,float& y,uint32 zone) { WorldMapAreaEntry const* maEntry = sWorldMapAreaStore.LookupEntry(zone); // if not listed then map coordinates (instance) if (!maEntry || maEntry->x2 == maEntry->x1 || maEntry->y2 == maEntry->y1) return false; x = (x-maEntry->x1)/((maEntry->x2-maEntry->x1)/100); y = (y-maEntry->y1)/((maEntry->y2-maEntry->y1)/100); // client y coord from top to down std::swap(x,y); // client have map coords swapped return true; } You need to look up the zone in WorldMapArea.dbc. This will give you 4 co-ordinates: x1, x2, y1, and y2. These are the limits for the zone's map. To get the zone co-ordinates, simply run: x = (x1)/((x2-x1)/100); y = (y1)/((y2-y1)/100); and then switch x and y. (If you want to know which columns are x1, x2, etc, see struct WorldMapAreaEntry in DBCStructure.h)
  9. Teleport to 0,0 on the map. The origin is not always a corner of the map, it's in the middle. On 530 this is most likely in some netherspace area between Outland and BC starting zones. On 0 it is in the Alterac Mountains.
  10. How much do you know about transports and movement system already? Because if it's nothing, you might want to try something a bit easier first. If all you do is port the patch from Trinity to mangos, I can tell you with about 95% accuracy that it will be rejected. If Trinity has this implemented it is in hack way and not proper and will not be accepted into mangos.
  11. Would it not be -3064.61 and 2525.7?
  12. You may or may not be able to do it with gossip scripts, depending on what exactly you want to do.
  13. In mangos code you will always see something like this: enum Things { THING_1 = 1, THING_2 = 2, THING_3 = 3, THING_4 = 4 } #define MAX_THINGS 4 You can also define it as: enum Things { THING_1 = 0, THING_2 = 1, THING_3 = 2, THING_4 = 3, MAX_THINGS } In this case, MAX_THINGS is 4 because if an enum isn't given a value, it is always previous + 1. There is no way to automatically get the length of an enum unfortunately. However, since it's size will never vary dynamically, just make sure to update it.
  14. ... mangos?
  15. Maybe compiled for wrong platform? Next time, build mangos yourself.
  16. You can't force players to join channels.
  17. I was actually planning to reimplement this from scratch using much more advanced algorithms for buying and selling.
  18. I think that's client-side, not server-side.
  19. I can't tell you how to fix it if you don't post the code, sorry.
  20. Yeah, because you are packing the packet with data improperly. Just use if(isDonator()) text.insert(0, "[Donator] "); and let BuildPlayerChat() take care of packing it.
  21. Use it for 3.3.5. That works. I would rather have a 3.3.5 server that works really well than a 4.0.1 that barely functions.
  22. Thanks for the pep talk. Mangos has project has its own developers and administrators. If anyone wants to submit patches they are welcome to. Arc/Trinity also have their own developers and administrators. If they want to drop their software and make patches for mangos they are free to do so. My guess is they won't, and I don't think mangos developers are going to be leaving mangos anytime soon (though they can speak for themselves) If 4.0.1 takes a long time to have working and users don't like this, then tough luck. If they care so much they should learn to help out instead of complaining in thread after thread of "whens 4.0.1 mangos come out?!"
  23. It's called mysqldump. It comes with MySQL. Example: mysqldump --user root --password SOME_DB_NAME > ./dump.sql
  24. I noticed you added pathfinding to charge effects. When these fail, will the charge fail or will it do a shortcut? On retail servers, if you can't get a path to the target, you'll just get an error "No path to target found" or something similar.
×
×
  • 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