It is good practice to create a seperate user to run the moo. You can name it moo, or your own name, or your mother's name. You should add this user to the wheel group, so it has access to the sudo command.
Move the hellcore.tar.gz to the home directory of your user. Extract it into a subfolder, called moo or something. Run this command: tar -xvzf hellcore1104.tar.gz
This will unzip the hellcore. Change directory to the src directory.
Now, setup your 64 bit system to actually be able to compile this beast:
sudo yum install bison
sudo yum -y install glibc.i686
sudo yum install libstdc++.i686
sudo yum install screen
In the src directory run these commands:
make clean
make
If you get no "exited with error" message at the end, success, you have won and can now retire. Make sure gperf and your restart.sh are set to executable!
To start the moo:
screen ./restart hellcore 7777
CTRL+A+D
Now you can return to view the screen with screen -r. If you need to emergency shutdown the MOO, you can resume the screen and press CTRL+C - this will immediately dump everything to hellcore.db.panic! Handy!
Wayfar 1444 is a text based online multiplayer game. You are a colonist, sent to the surface of an alien world with a few basic supplies. Join up with other colonists, or plot against them, while surviving and building a self sufficient colony.
Showing posts with label guides. Show all posts
Showing posts with label guides. Show all posts
Sunday, November 29, 2015
Tuesday, November 3, 2015
Proper use of hashes in Hellcore
Problem: the lambamoo C server keeps allocated memory in process when you allocate it. So if you have a large hash assigned to a variable this big chunk of memory will be stuck in the MOO process until you reboot the MOO. The server will properly free the memory when the variable is destroyed or out of use, but the process itself will hang onto this memory forever.
Solution: Do not assign hashes to variables. Do not assign the results of keys() or values() to variables.
Wrong code:
rkeys = keys($ods.bigkeyhash);
for x in (rkeys)
"something something";
endfor
Correct code:
for x in (keys($ods.bigkeyhash))
"something something";
endfor
Hash Warnings:
The following are things to avoid when using hashes in hellcore. Using these codes can crash the entire MOO and even induce data corruption (this is really bad!).
Do not iterate directly through a hash:
Wrong:
for x in (somehash)
Correct:
for x in (keys(somehash))
Do not modify values while iterating through a hash (guaranteed crash):
Wrong:
for x in (somehash)
somehash[x] = newvalue;
endfor
Correct:
for x in (keys(somehash))
somehash[x] = newvalue;
endfor
These are covered in the HELP HASHES programmer help, but are included here for reference.
Solution: Do not assign hashes to variables. Do not assign the results of keys() or values() to variables.
Wrong code:
rkeys = keys($ods.bigkeyhash);
for x in (rkeys)
"something something";
endfor
Correct code:
for x in (keys($ods.bigkeyhash))
"something something";
endfor
Hash Warnings:
The following are things to avoid when using hashes in hellcore. Using these codes can crash the entire MOO and even induce data corruption (this is really bad!).
Do not iterate directly through a hash:
Wrong:
for x in (somehash)
Correct:
for x in (keys(somehash))
Do not modify values while iterating through a hash (guaranteed crash):
Wrong:
for x in (somehash)
somehash[x] = newvalue;
endfor
Correct:
for x in (keys(somehash))
somehash[x] = newvalue;
endfor
These are covered in the HELP HASHES programmer help, but are included here for reference.
Saturday, April 21, 2012
LambdaMOO/Hellcore: Broadcasting to an IRC server
On Wayfar, when a player is killed they get a death taunt in the style of the LORD or BBS door games. When enough kills are accumulated the MOO connects to an IRC server, posts a kill update, and then disconnects.
The commands to interact with an IRC server are straightforward:
conn = open_network_connection(server, port);
set_connection_option(conn, "hold-input", 1);
Open the connection and tell the MOO not interpret anything on this connection as a game command.
notify(conn, "USER YOUR_USR_NAME 8 * : your_comment");
botname = "Jerkturkey";
notify(conn, "NICK " + botname);
That sends the USER and NICK. Now the IRC server will send a bunch of nonsense at you, then disconnect you if you don't answer the ping request in time. So we wait for the first ping before we start sending messages:
while (line = read(conn))
if (hurf = $su:explode(line))
if ($su:uppercase(hurf[1]) == "PING")
notify(conn, "PONG " + hurf[2]);
break;
endif
endif
endwhile
Note that we have to reply with information from the request. Next up, join a channel:
notify(conn, "JOIN #wayfar1444");
Send whatever messages we've arranged, preferably a batch of messages:
for x in ($web.irc_queue)
notify(conn, "PRIVMSG #wayfar1444 :"+x);
endfor
Tell the IRC server we're leaving and disconnect:
notify(conn, "QUIT");
boot_player(conn);
The commands to interact with an IRC server are straightforward:
conn = open_network_connection(server, port);
set_connection_option(conn, "hold-input", 1);
Open the connection and tell the MOO not interpret anything on this connection as a game command.
notify(conn, "USER YOUR_USR_NAME 8 * : your_comment");
botname = "Jerkturkey";
notify(conn, "NICK " + botname);
That sends the USER and NICK. Now the IRC server will send a bunch of nonsense at you, then disconnect you if you don't answer the ping request in time. So we wait for the first ping before we start sending messages:
while (line = read(conn))
if (hurf = $su:explode(line))
if ($su:uppercase(hurf[1]) == "PING")
notify(conn, "PONG " + hurf[2]);
break;
endif
endif
endwhile
Note that we have to reply with information from the request. Next up, join a channel:
notify(conn, "JOIN #wayfar1444");
Send whatever messages we've arranged, preferably a batch of messages:
for x in ($web.irc_queue)
notify(conn, "PRIVMSG #wayfar1444 :"+x);
endfor
Tell the IRC server we're leaving and disconnect:
notify(conn, "QUIT");
boot_player(conn);
Subscribe to:
Posts (Atom)