Jump to content

AdmiralMorketh

Members
  • Content Count

    24
  • Donations

    0.00 GBP 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About AdmiralMorketh

  • Rank
    Junior Member
  • Birthday November 6
  1. Now i just ran into a problem of getting a new IP from my ISP and i wrote a little script that im using on a Cronjob (written in perl) to grab the External IP address and updating the information in the realmlist table to help in keeping a steady connection this is the ipupdate.pl (i keep mine in the bin directory of mangos) #!/usr/bin/perl -w # DBI is the standard database interface for Perl # DBD is the Perl module that we use to connect to the Mysql database # LWP will be used for using web addresses use LWP::Simple; use DBI; use DBD::mysql; use warnings; #---------------------------------------------------------------------- # grab the external ip of our server for updating chomp(my $eip = get('http://ifconfig.me/ip')); print "External IP: ",$eip,"\n"; # open the accessDB file to retrieve the database name, host name, user name and password open(ACCESS_INFO, "<..\/etc\/dynRealm") || die "Can't access login credentials: ..\/etc\/dynRealm"; # assign the values in the accessDB file to the variables my $database = <ACCESS_INFO>; my $host = <ACCESS_INFO>; my $userid = <ACCESS_INFO>; my $passwd = <ACCESS_INFO>; # the chomp() function will remove any newline character from the end of a string chomp ($database, $host, $userid, $passwd); # close the accessDB file close(ACCESS_INFO); #---------------------------------------------------------------------- # invoke the ConnectToMySQL sub-routine to make the database connection $connection = ConnectToMySql($database); # set the value of your SQL query $querySel = "SELECT id,name,address FROM realmd.realmlist WHERE id = 1"; $queryIns = "UPDATE realmd.realmlist SET address = ? WHERE id = 1"; # prepare your statement for connecting to the database $statement = $connection->prepare($queryIns); $statement2 = $connection->prepare($querySel); # execute your SQL statement $statement->execute($eip); $statement2->execute(); # retrieve the values returned from executing your SQL statement @data = $statement2->fetchrow_array(); # print the first (and only) value from the @data array # we add a \n for a new line (carriage return) print join("\t",@data),"\n"; # exit the script exit; #--- start sub-routine ------------------------------------------------ sub ConnectToMySql { #---------------------------------------------------------------------- my ($db) = @_; # assign the values to your connection variable my $connectionInfo="dbi:mysql:$db;$host"; # make connection to database my $l_connection = DBI->connect($connectionInfo,$userid,$passwd); # the value of this connection is returned by the sub-routine return $l_connection; } #--- end sub-routine -------------------------------------------------- here is the dynRealm file i have mine set up in the mangos/etc directory (sticking with the style of the developers) realmd localhost USERNAME PASSWORD change the USERNAME and PASSWORD fields to match your installation this script can be ran using a cron job (and because an ISP shouldnt really change your lease very offten you can safely run this about once a week or you can also place the perl script (Above) in your /etc/cron.weekly/ to let the cron daemon run this on a weekly basis if you do this you should also change the paths in this line: open(ACCESS_INFO, "<..\/etc\/dynRealm") || die "Can't access login credentials: ..\/etc\/dynRealm"; to match the location of your dynRealm connection file As a note you dont need FULL database permissions for this user only need UPDATE and SELECT on realmd
  2. Forereaper, this will be a great addition to Mangos-three once its done (is there an ETA for that? A few posts back Antz said "very soon") im actualy going to pull a copy of mangos-Zero (is that the one with the eluna engine?) and play around with it and see what i can come up with. im going to take Olions post up there and see what i can learn. start off with something small to get the hang of it thank you for the help y'all have been very helpful i actualy think i can "safely" (is that the way Olion put it? ) script a few things now with out breaking the engine too much
  3. well that is defiantly a ton of good information and i hope that does help. guess i should learn how to not bite off more then i can chew on. I think what i will do is try and learn how this works and write some documentation on subject seems like most of this is all trial and error some one out there knows enough about it after all if they didnt it wouldnt have been developed in the first place i think the problem lies int he lack of documentation. i think with a little work what y'all have mentioned above can be broken down into a good piece of documentation with some awesome code examples on how to build new scripts or new content. Antz ive seen various places around the forums you have developed some kind of tool to aid in the creation of scripting content/NPCs would you by any chance have a link for that? id like to see if i could get my hands dirty a bit now that i have a better understanding of what i might be doing
  4. when im writing a script is there any methods or functions or variables that NEED to be used? or are these user defined? also i browsed over to the scripting how-to in the university section of the forums here wasnt really clear in the way of the structures used. is there any detailed technical documentation with code examples that i could use as a learning tool? i dont want to seem like im just asking the same question over and over trying to get a new answer. thanks again ~ Admiral Morketh ~
  5. How does the scriptdev2 library add scripts to the game engine? more precisely in what format are they written? not really the language but more like the flow of the script as ive asked a few questions and read posts on the matter ive been trying to assemble a reasonable answer on that one and i cant really figure that out. ive heard things of scriptdev3 coming out and then about Eluna for scripting seems MaNGOS Three is not compatible with either at this point. example_creature.cpp this one for example sets up an example creature. im kind of having a hard time understanding HOW this works with the Mangos Engine. although my concept of script and engine might be entirely wrong im trying to step out of the OpenSim Scripting engine to get more detailed with AI programing and MaNGOS seemed like a realy good project to help understand how these things work thanks again for your patience Antz ~ Admiral Morketh ~
  6. the one thing i did have a question about concerning Scriptdev2 was the format in which scripts were added in order to script unscripted instances/quests. i found the quest template table and started to dig around there but im fairly certain that its the scriptdev2 library that needs some adjusting to get a few of the "special" quests to work i'll keep diging and see if i can come up with anything but some input on the matter would be helpful
  7. consider this a nudge after the tutorial got uploaded to the wiki the markdown sort of broke not sure how/why but the tutorials for the mangos three install are located broken and correct formatting
  8. I belive for the time being this is necessary to have scriptdev installed the database files are manual install i currently have a mangos three server running with scriptdev2 installed and the database populated before the compile the scriptdev library goes into: src/bindings/scripts there is also an SQL file that you you should upload manually. check out the tutorial i wrote on installing and building mangos: https://github.com/Morketh/MaNGOS-Tuts/blob/master/mangos_tut_rpm.md#databse-installation unfortunately the one here on the wiki needs a bit of tweaking to show up properly. hope it helps Regards ~ Admiral Morketh ~
  9. Hey Chuck thank you for the response. lots of good information in there you mentioned Eluna im fairly certain i did not use that part O_e where do i set the Eluna up is there a guide or maybe just some basic information im pretty good at getting thins to compile been compiling MaNGOS on few "unsupported" platforms for about a year now. I'll dig around a bit more see if i cant figure out how/what Eluna is see if i cant get that work wiki is a great resource unfortunately the parts of the server im diging in are the ones undocumented. oh i also browsed around the blogs section and found Antz's eluna tool. i'' figure something out here start back with Zero and work my way back up to Three thanks again Chuck for the information it was an eye opener
  10. Antz not sure if you ment to link me the Zero template but the Two template https://getmangos.eu/wiki/Reference%20Information/DB/mangos/MaNGOSTwo/quest_template.md doesnt provide much information in the table. i'll dig around try and figure things out.
  11. so after playing around on my dev server i found a few little things that are broken i know the server is a state of development and i dont mind getting my hads dirty. the problem im having is the HOW and the WHERE would i fix quests/missing professions and other small details? would that be a database table entry or an actual script that would need to have the server re compiled?
  12. another solution utilized by myself and a few friends is to set up 2 entries in the realm list one with the WAN IP and the second with the LAN IP if you would like to hide the LAN realm from anyone else you may set the allowedSecurityLevel field or even setting the realm in a different timezone would do the trick
  13. Definitely looking forward to something like that for the community i believe that would be a real bonus to get every one else on board that wants to jump on and help.
  14. A DOS attack is primarily a half open connection a DDOS attack is also a half open connection from SEVERAL hosts at once in 3 simple firewall rules you can clean out INVALID (half open) connections and close them about as fast they can be opened by remote hosts. iptables -t raw -I PREROUTING -p tcp -m tcp --syn -j CT --notrack iptables -I INPUT -p tcp -m tcp -m state --state INVALID,UNTRACKED -j SYNPROXY --sack-perm --timestamp --wscale 7 --mss 1460 iptables -A INPUT -m state --state INVALID -j DROP a break down of each rule is as follows: The raw table handles untracked connections, the "CT" stands for conntrack and the --notrack options excludes them from tracking. Second rule matches the SYN packets (UNTRACKED as per previous rule) and ACK packets (INVALID as per „nf_conntrack_tcp_loose=0“) and forwards them to the SYNPROXY target, which then verifies the syncookies (parallel, which wasn't possible previously) and establishes the full TCP connections. And finally we add a rule that drops every packet that the previous rule didn't catch, read bad packets/DDoS. Your server should be able to handle multiple millions of packets per second, as long as your NIC doesn't crumble and your ISP doesn't nullroute your IP.
  15. Actualy i found the information while building another test environment Inside the realmd.conf WrongPass.MaxCount = 0 WrongPass.BanTime = 600 WrongPass.BanType = 0 After this its just a matter of Bash-Fu. Id like to mark this as [solved] not sure how to do that. i don't see an option for it :confused:

Contact Us

To contact us click here
You can also email us at [email protected]

Privacy Policy | Terms & Conditions

Repositories

The Link to the master list
of MaNGOS repositories:
Copyright © getMaNGOS. All rights Reserved.

This website is in no way associated with or endorsed by Blizzard Entertainment®
×
×
  • Create New...