F L H O O K ============= version: 1.6.6 Based on FLHook v1.5.5 with w0dk4's cloak code NOTE: If you wish to use this version of FLHook in place of your standard 1.5.5, please read the changelog. The default FLHook.ini works with vanilla FL; for an example of a config file for a mod, look at FLHook Flak.ini ('88 Flak's config file). ================================================================================ == INSTALLATION ================================================================ ================================================================================ FLHOOK ONLY WORKS WITH FLSERVER 1.1. USING IT WITH 1.0 WILL CRASH FLSERVER!!! copy the files from "bin" to your freelancer/exe directory and edit the FLHook.ini in order to suite your needs. there are 3 different ways to start flhook: 1) open dacomsrv.ini in "...\freelancer\exe" and append FLHook.dll to the [Libraries] section. flserver will load flhook whenever you start it. 2) execute FLHookStart.exe while flserver.exe is already running. this will inject FLHook into the running process. 3) execute FLHookStart.exe with "execute ..." as command line. this will start flserver.exe along with FLHook. the rest of the command line will be passed on to the server. FLHook console will be shown as soon as the loading-process has finished (note: the old patch is not needed anymore, use 1) instead) ================================================================================ == CONFIG ====================================================================== ================================================================================ take a look at the comments in FLHook.ini ================================================================================ == ADMIN-COMMANDS ============================================================== ================================================================================ commands can be executed by administrators in several ways: - using the FLHook console(-> access to all commands) - ingame by typing .command in the chat(e.g. .getcash Player1) this will only work when you own the appropriate rights which may be set via the setadmin command. FLHook will store the rights of each player in his account-directory in flhookadmin.ini. - via a socket connection in raw text mode(e.g. with putty) connect to the port given in the FLHook.ini and enter "PASS password". after having successfully logged in you may enter all of the commands you want(as long as you have the necessary rights). you may have several socket connections at the same time. exiting the connection may be done by entering "quit" or simply by closing it. - CASH - all cash functions work no matter if the player is currently logged in or not getcash shows current account balance of setcash sets current account balance of to setcashsec sets current account balance of to , only works when his old account balance is addcash adds to the current account balance of addcashsec adds to the current account balance of , only works when his old account balance is - KICK/BAN - kick disconnects . the user will be displayed , if it is specified. ban bans 's account stays connected if he's currently on the server unban unbans 's account kickban kicks and bans (2 in 1, same as kick , ban ) - MSG - msg private message to (shown as "Console: ") msgs send to all players in (shown as "Console: ") must be the either the system-id or the shortname (like Li01) msgu message to the whole universe msguc message to the whole universe (shown as "Console: ") fmsg private message to (see XMLTEXT section for further details) fmsgs send to all players in (see XMLTEXT section for further details) fmsgu message to the whole universe (see XMLTEXT section for further details) - BEAM/KILL - beam force to land on (player must be in space) must be either the shortname(like Li01_01_Base for Manhattan) or a shortcut defined in the FLHook.ini Player may be kicked after beam note: see the issues section below kbeam Kills , respawning them at when they click RESPAWN As long as the player respawns after dying, they will not lose any cargo This is meant as a replacement for beam, which sometimes kicks a player kill [charname] kills [charname] if it is defined, otherwise kills object selected in HUD instantdock Instantly docks to the selected object in HUD; note that the object and must be in the same system - REPUTATION - resetrep sets 's reputations to the one specified in "mpnewcharacter.fl" setrep set 's reputation for to . should be between -1 and 1. example: "setrep playerxy li_n_grp 0.7" -> set playerxy's reputation for liberty navy to 0.7 setreprelative Adjust 's reputation with by . Works like when you kill a NPC - the reps with all the other factions are adjusted as well. getrep get 's reputation for . getrep playerxy li_n_grp returns "rep=0.1223", for example. getaffiliation gets 's affiliation; returns "repgroup=li_n_grp", for example. setaffiliation sets 's affiliation - CARGO - All cargo commands except for addcargo only work when the targeted player is ingame enumcargo lists 's cargo, first reply will be the remaining hold size addcargo adds numbers of (shortname like co_gun01_mark02,commodity_silver,etc OR hash) to 's cargo if is set to 1, the cargo is declared as mission cargo addcargom Same as above except the cargo is mounted to . removecargo removes numbers of (this must be the value from enumcargo's "id=" reply) from - CHARACTERS - rename rename to (player will be kicked if he's logged in 's account) deletechar delete (player will be kicked if he's logged in 's account) readcharfile reads 's userfile(xxx.fl) and prints it(each line will be preceded by "l ") writecharfile writes into 's userfile(xxx.fl). existing charfile will be overwritten. you should be careful with this one because a corrupted charfile may lead to server crashes and flhook does not do any syntax checks on . NOTE: YOU MUST REPLACE LINE-WRAPS WITH \n(TEXT) example: writecharfile playerxy [Player]\ndescription = 00300034002f0031003\n\n ... etc. - SETTINGS - setadmin set as ingame-admin with (affects all characters on the account) (see RIGHTS section below) getadmin show 's rights deladmin revoke 's ingame-admin-status setadminrestriction Only allow to execute admin commands on characters with names that include . getadminrestriction Gets the admin restriction for ; returns "restriction=[blarg]", for example. rehash reload the flhook.ini in order to activate changed settings, this works for everything except the socket-settings unload unload flhook(flserver will keep on running flawlessly) this is very useful since it allows you to install a new flhook version on-the-fly. simply unload, replace the files and execute FLHookStart.exe the command will kick players with an active moneyfixlist(don't bother). - GROUP - getgroupmembers returns all players which are in a group with getgroup gets the group-id of ; returns "groupid=2", for example. players in no group have a group-id of 0. addtogroup adds to invitetogroup invites to join 's group removefromgroup removes from sendgroupcash sends everyone in of cash, divided among the members - DEATH PENALTY - These commands require both cash and cargo rights. setdpfraction Sets the death penalty fraction adddpsystem Add a system to the death penalty exclusion list removedpsystem Remove a system from the death penalty exclusion list enumdpsystems Print all systems on the death penalty exclusion list - OTHER - getbasestatus returns the hull status of a base. when the base hasn't been created in space yet it returns 0. getclientid gets 's client id getplayerinfo get 's info xgetplayerinfo same as getplayerinfo, except that result is shown in a more readable format getplayers get player info for all players on the server (players in charselect menu will not be shown) xgetplayers same as getplayers, except that result is shown in a more readable format getplayerids shows all players on the server with their client-id in a short format(useful when ingame) getaccountdirname get account-dirname of getcharfilename get char-filename of savechar save 's current info to disk isloggedin check if is logged in on the server isonserver check if is connected(this includes idleness in charselect menu) to the server NOTE: isonserver will also return true, when another char on the same account is logged in! serverinfo shows server load, whether npc spawn is currently enabled or disabled(see ini) and uptime. the format for the uptime is: days:hours:minutes:seconds moneyfixlist show players with active money-fix restartserver restart the server; command line params can be set in ini. NOTE: will create an instance of cmd.exe, which will exit when the server does; requires that the server have taskkill installed (is not installed by default on XP Home). shutdownserver shutdown the server. NOTE: requires that the server have taskkill installed (is not installed by default on XP Home). spawns [on|off] Turns NPC spawns on or off. help [page number (if ingame)] get a list of all commands - MISC INFOS - you can use client-ids instead of by appending $ to the cmd. Using $ for the client-id means use your own. examples: getcash$ 12 kickban$ 1 getplayerinfo$ $ etc. you can also use "shortcuts" instead of the whole character-name for a currently logged in player by appending & to the cmd. FLHook traverses all logged in players and checks if their character-name contains (case insensitive) and if so, the command will operate on this player. an error will be shown if the searchstring given in is ambiguous. examples (let's assume there are 2 players logged in: "superhax0r" and "..::[]SUPERNERD[]::.."): "kick& nerd" kicks "..::[]SUPERNERD[]::.." because his nick contains "nerd" "getcash& super" fails because there are multiple character names containing "super" all commands return "OK" when successful or "ERR " when error occured ================================================================================ == RIGHTS ====================================================================== ================================================================================ rights may be separated by a comma (e.g. setadmin playerxy cash,kickban,msg) superadmin -> everything cash -> cash commands kickban -> kick/ban/group commands beam -> beam/kill/resetrep/setrep command msg -> msg commands savechar -> savechar command cargo -> cargo commands chars -> rename/deletechar/readcharfile/writecharfile eventmode -> eventmode (only when connected via socket) all other commands except setadmin/getadmin/deladmin/restartserver/shutdownserver/spawns may be executed by all admins ================================================================================ == XMLTEXT ===================================================================== ================================================================================ the fmsg* commands allow you to format text in several ways(like in the exe\misctext.dll) text is enclosed in tags while the format can be changed with nodes-names must be written in capital chars! be sure to replace the following characters within a text-node: < -> < > -> > & -> & - NODE SYNTAX - the data field of a TRA node consists of an RGB value along with format specifications: BB is the blue value GG is the green value RR is the red value FF is the format value (all in hexadecimal representation) format flags are: bin hex dec effect 00000001 1 1 bold 00000010 2 2 italic 00000100 4 4 underline 00001000 8 8 big 00010000 10 16 big&wide 00100000 20 32 very big 01000000 40 64 smoothest? 10000000 80 128 smoother? 10010000 90 144 small simply add the flags to combine them (e.g. 7 = bold/italic/underline) examples: fmsgu A player has died: Player this is similar to the standard die-msg(which is shown in bold) fmsgu Hello World this will show "Hello World" ("Hello" will be blue/bold/italic and "World" green/big) ================================================================================ == EVENTMODE =================================================================== ================================================================================ socket connections may be set to eventmode by entering "eventmode". from then on you will receive several event-notifications listed below. once activated, eventmode runs until you close the connection. - NOTIFICATIONS - chat from= id= type= [to= idto=] text= : charname sending the message : client-id of sender : either universe,system or player /: only sent when type=player : guess ... kill victim= by=[,[;killer2's weapons]... : charname of the victim. : charname/faction(if NPC) of the killer; sorted from highest to lowest damage. : comma separated list of weapons used to kill player. Weapons can be guns, missiles (only if CombineMissilesTorps is set to no), mines, torpedoes (only if CombineMissilesTorps is set to no), missiles/torpedoes (only if CombineMissilesTorps is set to yes), or collisions. Sorted from highest to lowest damage. login char= accountdirname= id= ip= occurs when player selects a character in the character-select menu launch char= id= base= system= occurs when player undocks from a base/planet baseenter char= id= base= system= occurs when player enters base baseexit char= id= base= system= occurs when player exits base(includes disconnect/f1) jumpin char= id= system= occurs when player jumps in a system switchout char= id= system= occurs when player switches out a system spawn char= id= system= occurs when player selects a character and launches in space connect id= ip= occurs when player connects to the server disconnect char= id= occurs when player disconnects from the server ================================================================================ == USER-COMMANDS =============================================================== ================================================================================ user commands may be entered ingame by every player in chat and can be enabled or disabled in the ini. enter them ingame to get a description. /set diemsg xxx while xxx must be one of the following values: - all = all deaths will be displayed - system = only display deaths occurring in the system you are currently in - self = only display deaths the player is involved in(either as victim or killer) - none = don't show any death-messages settings keep saved in flhookuser.ini and affect all characters on the account /set diemsgsize - change the size of the diemsgs /set chatfont