Jump to content

antiroot

Members
  • Posts

    302
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by antiroot

  1. what version does your database say you have currently? knowing this would tell us if you do actually have all the updates installed Execute the following query in your MySQL client of choice (phpmyadmin, mysql-client, etc) Edit: this should be done on your mangos database SHOW COLUMNS FROM db_version; You should have a column similar to required_10131_01_mangos_spell_bonus_data EDIT: LOL don't know why I asked this now that i think about it, if your db_version was off then you'd be getting a completely different error, at any rate at least we know what version your running now, and we now know your capable of executing mysql commands
  2. Also Logins in-game and RA/SOAP still work the same as before, nothing noticeable has been affected by this patch since I applied it to my server, other than the Logs no longer having Warning complaints No unexplained crashes, no strange warnings or errors in logs at LogLevel 3 Just tested this with FreeBSD 8.0 64bit in a virtual machine and it works there as well as my server FreeBSD 7.2 32bit
  3. MaNGOS Revisions early 9xxx - HEAD [10130] Under FreeBSD OpenSSL is not linked properly The includes are set correct, and the library flags are correct, but the library path is never passed (ie -L/usr/local/lib on my system) this causes warnings in logs and also means the wrong libs are being used. This results in building with correct includes/headers but incorrect libs 2010-06-30 11:30:47 OpenSSL 1.0.0a 1 Jun 2010 (Library: OpenSSL 0.9.8e 23 Feb 2007) 2010-06-30 11:30:47 WARNING: Outdated version of OpenSSL lib. Logins to server may not work! 2010-06-30 11:30:47 WARNING: Minimal required version [OpenSSL 0.9.8k] If you installed OpenSSL and overwrite the base system openssl this problem never occurs, however if done the FreeBSD recommended way, you install OpenSSL from ports than the (older) base libraries are being used while only the (newer) ports includes are used which is where the problem is coming from. Here is a git-diff patch to fix the configure file Also there is a space between -L and the path to the libs in m4/ax_check_openssl.m4, I have changed this to follow the same syntax where we do other linking diff --git a/configure.ac b/configure.ac index 1fc4248..810233e 100644 --- a/configure.ac +++ b/configure.ac @@ -254,7 +254,7 @@ AM_CONDITIONAL([MANGOS_BUILD_ACE], [test X$enable_builtin_ace_support = Xyes]) ## Unify all additional includes/libs in one variable. # TODO this looks kinda ugly, but when we add m4 folder I will make it look very pritey ( by Derex ). MANGOS_INCLUDES="$ACE_INCLUDES $POSTGRE_INCLUDES $MYSQL_INCLUDES $OPENSSL_INCLUDES $MANGOS_INCLUDES" -MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LIBS $MANGOS_LIBS" +MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LDFLAGS $OPENSSL_LIBS $MANGOS_LIBS" ## Export defined variables AC_SUBST(DOXYGEN) diff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4 index 7f5c319..8c8740d 100644 --- a/m4/ax_check_openssl.m4 +++ b/m4/ax_check_openssl.m4 @@ -76,7 +76,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [ AC_MSG_CHECKING([for openssl/ssl.h in $ssldir]) if test -f "$ssldir/include/openssl/ssl.h"; then OPENSSL_INCLUDES="-I$ssldir/include" - OPENSSL_LDFLAGS="-L $ssldir/lib" + OPENSSL_LDFLAGS="-L$ssldir/lib" OPENSSL_LIBS="-lssl -lcrypto" found=true AC_MSG_RESULT([yes]) @Vladimir would you test this and commit if its correct since I know you use FreeBSD as well. @Community please test to make sure works under linux/windows still. I'm working on a FreeBSD + MaNGOS install/configure/upgrade guide and because of this issue I've not yet posted it to the forums, but I will once this has been committed. EDIT: my logs after applying these changes 2010-07-01 08:53:01 OpenSSL 1.0.0a 1 Jun 2010 (Library: OpenSSL 1.0.0a 1 Jun 2010) Edit: Should I have posted this in "... Under Review"? I assumed this is where this should have been by reading the description of the Bug Report forum "You found a bug? Written a patch? Then this section is for you" Sorry if this is the wrong place if this is the case
  4. Wow, two of these posts in one day. You need to apply EVERY update you have in numerical order starting with the update number directly after version your database says you have Apply the mangos updates to the mangos database Apply the characters updates to the characters database Apply the realmd updates to the realmd database Since you have '9539_01_mangos_spell_bonus_data.sql' 09589_01_mangos_creature_template.sql -> 09590_01_mangos_db_script_string.sql ... and so on Also since the version you have is older than 09692 the updates you need will be in your git working directory mangos/sql/updates/0.16, after you finish the 0.16 updates then you can apply the updates in mangos/sql/updates or /opt/mangos/data/mangos/sql/updates
  5. an older realmd isn't already running the background is it? usually things can't bind to a port when the port is already in use. If not i did have a similar issue that i was never able to replicate exactly, but trying to open a socket from say php/curl/etc to the port on the system at the exact time the binary is trying to bind caused it to fail (like i said i was unable to replicate that, and it only happened once)
  6. What db versions are in your MySQL database mangos DB SHOW COLUMNS FROM mangos.db_version; realmd DB SHOW COLUMNS FROM realmd.realmd_db_version; characters DB SHOW COLUMNS FROM characters.character_db_version; Apply your updates using the update directly after the value stored in your existing database Which MaNGOS revision are you using, and which revision did you have before pulling the "current" one Also if your older versions are older than update 09010_01_realmd_realmlist.sql than the patches you will need will be in your git working directory (mangos/sql/updates/) you pulled not in /opt/mangos/data/mangos/sql Edit: If you use windows, I'm sorry, I don't know paths MaNGOS uses as I build MaNGOS under FreeBSD. However the same ideas should apply just find the correct directories Another Edit: On a side note I think this post should have been placed in Help & Support -> Installation, Configuration & Upgrades, Because people looking to answer Help/Support questions look there for the posts not in Developer's Corner. Not trying to moderate anything, just helping you for future questions you may have
  7. Sounds like a *nix based distro project, with MaNGOS as its primary goal/daemon/server.. If I'm right I would suggest dropping the wallpaper idea along with the GUI altogether. Instead make it console only and have a neat mangos boot splash screen.. like what you see if you use backtrack and many others. GUIs hog precious resources, look at KDE4 and any Windows OS after 2000
  8. Awesome thank you, I was unaware that .gps did the zone coords as well, must have overlooked that. and thanks for the code from DBCStores.cpp i was searching all the source I thought had to do with maps and didn't even think of looking there
  9. Is there a way to use the data in the database to calculate a character's relative coordinates on any given map in the form of X:[0-100],Y:[0-100] There's a macro for the client that can report this, and is used on many 3rd-party sites to give the location of an object relative to the map it's in. I would like to be able to query the DB and return these simplified percent based coords rather than the ones that are stored in the DB so i can display character locations on a text output page. I know there's the .gps command, however this returns coordinates relative to (i assume) the world, not the map
  10. If you use SOAP or RA (same command lists used for both) you can use "help" or "commands" to get the list of commands to send only mail use, send mail #playername "#subject" "#text" to send items use send items #playername "#subject" "#text" itemid1[:count1] If you want to mess with making in-game commands accesible from RA/SOAP (or making your own) they are in src/game/Chat.cpp the structure is "command", SECURITY_LEVEL, (console access?)true|false, Handler, "", commandSubTable If you look at the file it makes more sense than my example
  11. Found this on the scriptdev2 forums http://www.scriptdev2.com/help-adding-items-t4545.html?t=4545 Heres a snip from ./bindings/ScriptDev2/scripts/eastern_kingdoms/ghostlands.cpp Line 50, shows the itemID in line just above SendNewItem bool GossipSelect_npc_blood_knight_dawnstar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { if (Item* pItem = pPlayer->StoreNewItemInInventorySlot(24226, 1)) pPlayer->SendNewItem(pItem, 1, true, false); pPlayer->CLOSE_GOSSIP_MENU(); } return true; }
  12. Well I tried to recreate your problem of getting a wrong password, but i was unable to do so. I did try out my php-fopen-RA code, last time i used RA with PHP was before it was rewritten in revision 9466 After revision 9466, RA is allowed to have more than one connection at a time, so if your running a current version this is not your problem. Also I've noticed that the delay I encountered prior to 9466 is no longer there, for the most part, so my original PHP code using fopen can now be written as You still need to read after every write, but the usleep()'s are no longer needed <?php $fsk = @fsockopen("127.0.0.1",3443); echo fread($fsk,64); fwrite($fsk,"[b]username[/b]\\n"); //your username/adminname fread($fsk,64); fwrite($fsk,"[b]password[/b]\\n"); // Your user/admins's password fread($fsk,64); // This is where you could use the "send items #playername "#subject" "#text" itemid1[:count]" command // ex: "send items [b]user1[/b] \\"You Won in the Lottery/Giveaway\\" \\"Congratz [b]user1[/b], You won in the daily giveaway/lottery. You have received [b][item][/b]\\" [b]itemid1[/b]:1" fwrite($fsk,"[b]server info[/b]\\n"); // replace "server info" with the mangos command to execute echo fread($fsk,1024); fwrite($fsk,"quit\\n"); echo fread($fsk,1024); ?> The above returns the following for me Welcome to the Massive Network Game Object Server. Username: MaNGOS/0.16.0 (* * Revision 10074 - *) for FreeBSD_x32 (little-endian) Using script library: ScriptDev2 (for MaNGOS 9832+) Revision [1718] 2010-06-17 02:09:04 (Unix) Using World DB: UDB 0.12.0 (391) for MaNGOS 9999 with SD2 SQL for rev. 1702 Using creature EventAI: ACID 3.0.4 - Final Release for Mangos (3.3.2 Client) Online players: 0 (max: 2) Queued players: 0 (max: 0) Server uptime: 11 Hour(s) 1 Minute(s) 52 Second(s). mangos> And although brunogcar stated both DB and Script must have the Username in upper case, I think this may only be true for the DB.. I log into RA/SOAP using lowercase, and the scripts that I wrote in my first post worked with lowercase just fine. If you can provide the exact code your using for your script, just replace private data, I'll see what it does on my server. Other stuff that could be helpful would be your MaNGOS version and PHP version
  13. I'm unsure exactly what your asking for, but it sounds like your looking for a way to interface PHP with MaNGOS? Before SOAP was implemented I used PHP's fopen,fread,fwrite and communicated with mangos through RA via 127.0.0.1:3443 This worked for the most part however you need to write data to RA, then wait, then read, then write some more and repeat, I used something similar to $fsk = @fsockopen("127.0.0.1",3443); usleep(20000); echo fread($fsk,64); fwrite($fsk,"[b]username[/b]\\r\\n"); usleep(20000); fread($fsk,64); fwrite($fsk,"[b]password[/b]\\r\\n"); usleep(20000); fread($fsk,64); fwrite($fsk,"[b]server info[/b]\\r\\n"); // replace "server info" with the mangos command to execute usleep(25000); echo fread($fsk,1024); However this is very slow, inefficient, and doesn't always work With PHP-SOAP you can do the following, just make sure SOAP is enabled in your mangos.conf file $remote_soap = array("127.0.0.1", "7878", "[b]username[/b]", "[b]password[/b]"); // use your own username and password $client = new SoapClient(NULL,array("location" => "http://".$remote_soap[0].":".$remote_soap[1]."/","uri" => "urn:MaNGOS","style" => SOAP_RPC,"login" => $remote_soap[2],"password" => $remote_soap[3])); $command = "[b]server info[/b]"; // Replace "server info" with the mangos command to execute $result = $client->executeCommand(new SoapParam($command, "command")); echo $result;
  14. You sound like you know what your networking wise but i'll ask anyways, Did you set the IP address in the realmlist table (realmd DB ) to the LAN IP of the server, and also use this IP in your clients realmlist.wtf file? Default MaNGOS will use RealmID 1, the default DB entry for RealmID 1 is 127.0.0.1 (loopback not LAN), change that entry to reflect your LAN address
  15. Looking at the script(s) in this thread it should start MaNGOS if it is not currently running. Cron checks every minute if MaNGOS is not running it will start it If you stop MaNGOS in-game, from console, or it crash this cron job should start it back up Edit: You can confirm the cron job is running by stopping MaNGOS pkill "mangos-*" wait 1-2 minutes, then run pgrep "mangos" If you get 2 lines of numbers back then MaNGOS is running, if you don't get any lines returned then it is not working
  16. cron.d, corn.daily, corn.hourly are for system cronjobs and should not be used by users for several reasons, instead, In console execute: crontab -e To edit current users crontab entries To stop mangos-worldd and mangos-realmd use pkill "mangos-*"
  17. We were having a discussion a couple days ago about timestamps being stored in the DB. I stated that it was using a unsigned 64bit unix epoch timestamp, which is the number of seconds that have passed since 1970-01-01. Nobody corrected me in my assumption of unix epoch being the timestamp, and it maskes sense because MaNGOS is primiarily developed under *nix environements To verify what I've said you can take one of your DB timestamps and throw it into http://www.unixtimestamp.com/ So if you have a 32bit system you'll need to upgrade before 2038, if your running a 64bit OS wikipedia states "293 billion representable years" (haven't done the math myself tho) Edit: I had originally posted signed, I meant Unsigned and didn't notice until after Valdimir's post, hope I didn't confuse anyone
  18. @hunuza Thanks for pointing that out, my server only has 3 active users on it and we have not used the guildbank, AH, or mail. But that makes perfect sense why item_instance is its own table now that you mentioned that @voidx Did you try the two suggestions I made about either dropping your ORDER BY in your query or adding the index? With your two tables being that large it makes sense why that query is slow because its having to do the filesort when you use the ORDER BY If you do not want to edit your DB structure and this query is returning to a PHP or other scripting language you can easily use that language to sort your results by the bag and slot so that mysql doesn't have to
  19. Good question, the only data that would have to be merged is item_instance.data into the character_inventory table (this would require many changes to source code for the core) but if your indexes are setup correctly selecting from two joined tables should be close to as fast as a single I do see in my DB there a few records in item_instance that don't have matching records in character_inventory (not sure whats going on with that), but yes theres some redundant data floating around between the two that could be optimized if they were in one table
  20. If you set your realmlist up the way I did using a dns hostname rather than an IP address, you can use a service like dyndns and get a domain name like mymangosserver.dyndns.go.net and use that instead of the IP address in realmlist which for WAN users would point to your WAN IP on your LAN you'd edit your hosts file (C:\\WINDOWS\\system32\\drivers\\etc\\hosts) in notepad and add in an entry for the domain name but point it to your LAN IP example: 127.0.0.1 localhost (this is already in there) 192.168.1.4 mymangosserver.dyndns.go.net As far as the recommended method I can't say, at least the hosts file won't affect the database structure like my other idea I would try it first since it would be easier to fix if something broke or it didn't work
  21. You are right, I only chose to make id,name an UNIQUE index because they were originally PRIMARY and UNIQUE respectivly, so I merely just merged them together making it so names were only unique to the realm id they were attached (probably not the prefered way now that i think about it, like I said 5 minute testing). But yes ip,port makes more sense for a key, the point of my idea was to say that dropping the PRIMARY key from id allowed me to set two realms to the same id allowing LAN/WAN access with the way the core currently is With the way the core currently is the Key/index is a mute point anyways because the core won't utilize the indexs with this "hack", with only 2 realms it won't make a noticable difference
  22. Oh here's an idea (a bit hacky, but it seems to work), what about changing the database structure so that realmid is not the primary key (yes we loose auto-increment, but if it works who cares) create a new UNIQUE index using id,name.. then for your two entries set both their ID's to 1 (with different names and IPs of course) This seems to work on my server having one entry using a WAN IP and the other using the LAN IP The database shows that my LAN users are connecting using the LAN address not the WAN Note: I assume no responsibility for what may happen to your database if you mess with the structure Edit: This may cause further unexpected issues having 2 realms with the same ID, but in my limited 5 minutes of testing i was able to login internally and externally both realms updated the population correctly (reporting the same values) both realms got their realmflags set to online (realmflags|=0x2)
  23. Good call, forgot about RealmID, and with the current core only one realmid can be used / updated at runtime. Sorry Noaru, maybe get a router that supports NAT Reflection, or try using a hostname rather than the IP address, than on your local machine edit their hosts file so that the hostname will point to the local LAN IP for you, but for WAN users they would see your WAN IP (your own local DNS server might help to), not sure if that would work correctly, i'm unable to test at the moment?
  24. 1) Posting "help me, help me" will not speed anything up (and is against forum rules/guidelines) 2) You are asking for help with more than one issue, create new threads for other issues You were provided with a restarter script, all you need to do is change the parts that start/stop mangosd.exe to the correct programs/paths Adding GM to an account can be done in the database by changing the accounts gmlevel 0 = Normal User 1 = Moderator 2 = GM 3 = Admin In game with an account that have higher permissions you can use .account set gmlevel [#accountId|$accountName] #level #accountId is their account ID in the database $accountName is their account login name #level is from the list I provided example: .account set gmlevel antiroot 2 this would give the account "antiroot" GM permission
  25. Ok, those lines look similar to mine. Port 8085 is correct for both entries. BindIP 0.0.0.0 is correct in telling it listen on ANY interface I'm sure you've done this, but I still have to ask, are both "mangos-worldd" and "mangos-realmd" running? In your LAN client's realmlist.wtf is it pointing to the LAN IP of the Login Server (realmd)? Are your WAN clients' realmlist.wtf pointing to the WAN IP of the Login Server? Edit: Your first post makes me think you are not able to login (get to character select screen) is this correct or is it that you can get that far but cannot enter the world? Edit: Are there any other services on the server you can test locally and externally to make sure they are working with your network configuration (apache,ssh,etc)
×
×
  • 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