Initial commit
This commit is contained in:
42
lotgd-web/lotgd/lib/graveyard/case_battle_search.php
Executable file
42
lotgd-web/lotgd/lib/graveyard/case_battle_search.php
Executable file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
if ($session['user']['gravefights']<=0){
|
||||
output("`\$`bYour soul can bear no more torment in this afterlife.`b`0");
|
||||
$op="";
|
||||
httpset('op', "");
|
||||
}else{
|
||||
require_once("lib/extended-battle.php");
|
||||
suspend_companions("allowinshades", true);
|
||||
if (module_events("graveyard", getsetting("gravechance", 0)) != 0) {
|
||||
if (!checknavs()) {
|
||||
// If we're going back to the graveyard, make sure to reset
|
||||
// the special and the specialmisc
|
||||
$session['user']['specialinc'] = "";
|
||||
$session['user']['specialmisc'] = "";
|
||||
$skipgraveyardtext=true;
|
||||
$op = "";
|
||||
httpset("op", "");
|
||||
} else {
|
||||
page_footer();
|
||||
}
|
||||
} else {
|
||||
$session['user']['gravefights']--;
|
||||
$battle=true;
|
||||
$sql = "SELECT * FROM " . db_prefix("creatures") . " WHERE graveyard=1 ORDER BY rand(".e_rand().") LIMIT 1";
|
||||
$result = db_query($sql);
|
||||
$badguy = db_fetch_assoc($result);
|
||||
$level = $session['user']['level'];
|
||||
$shift = 0;
|
||||
if ($level < 5) $shift = -1;
|
||||
$badguy['creatureattack'] = 9 + $shift + (int)(($level-1) * 1.5);
|
||||
// Make graveyard creatures easier.
|
||||
$badguy['creaturedefense'] = (int)((9 + $shift + (($level-1) * 1.5)));
|
||||
$badguy['creaturedefense'] *= .7;
|
||||
$badguy['creaturehealth'] = $level * 5 + 50;
|
||||
$badguy['creatureexp'] = e_rand(10 + round($level/3),20 + round($level/3));
|
||||
$badguy['creaturelevel'] = $level;
|
||||
$attackstack['enemies'][0] = $badguy;
|
||||
$attackstack['options']['type'] = 'graveyard';
|
||||
$session['user']['badguy']=createstring($attackstack);
|
||||
}
|
||||
}
|
||||
?>
|
21
lotgd-web/lotgd/lib/graveyard/case_default.php
Executable file
21
lotgd-web/lotgd/lib/graveyard/case_default.php
Executable file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
if (!$skipgraveyardtext) {
|
||||
output("`)`c`bThe Graveyard`b`c");
|
||||
output("Your spirit wanders into a lonely graveyard, overgrown with sickly weeds which seem to grab at your spirit as you float past them.");
|
||||
output("Around you are the remains of many broken tombstones, some lying on their faces, some shattered to pieces.");
|
||||
output("You can almost hear the wails of the souls trapped within each plot lamenting their fates.`n`n");
|
||||
output("In the center of the graveyard is an ancient looking mausoleum which has been worn by the effects of untold years.");
|
||||
output("A sinister looking gargoyle adorns the apex of its roof; its eyes seem to follow you, and its mouth gapes with sharp stone teeth.");
|
||||
output("The plaque above the door reads `\$%s`), Overlord of Death`).",$deathoverlord);
|
||||
modulehook("graveyard-desc");
|
||||
}
|
||||
modulehook("graveyard");
|
||||
if ($session['user']['gravefights']) {
|
||||
addnav("Look for Something to Torment","graveyard.php?op=search");
|
||||
}
|
||||
addnav("Places");
|
||||
addnav("W?List Warriors","list.php");
|
||||
addnav("S?Return to the Shades","shades.php");
|
||||
addnav("M?Enter the Mausoleum","graveyard.php?op=enter");
|
||||
module_display_events("graveyard", "graveyard.php");
|
||||
?>
|
16
lotgd-web/lotgd/lib/graveyard/case_enter.php
Executable file
16
lotgd-web/lotgd/lib/graveyard/case_enter.php
Executable file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$max = $session['user']['level'] * 5 + 50;
|
||||
$favortoheal = round(10 * ($max-$session['user']['soulpoints'])/$max);
|
||||
output("`)`b`cThe Mausoleum`c`b");
|
||||
output("You enter the mausoleum and find yourself in a cold, stark marble chamber.");
|
||||
output("The air around you carries the chill of death itself.");
|
||||
output("From the darkness, two black eyes stare into your soul.");
|
||||
output("A clammy grasp seems to clutch your mind, and fill it with the words of the Overlord of Death, `\$%s`) himself.`n`n",$deathoverlord);
|
||||
output("\"`7Your mortal coil has forsaken you. Now you turn to me. There are those within this land that have eluded my grasp and possess a life beyond life. To prove your worth to me and earn my favor, go out and torment their souls. Should you gain enough of my favor, I will reward you.`)\"");
|
||||
addnav(array("Question `\$%s`0 about the worth of your soul",$deathoverlord),"graveyard.php?op=question");
|
||||
addnav(array("Restore Your Soul (%s favor)", $favortoheal),"graveyard.php?op=restore");
|
||||
addnav("Places");
|
||||
addnav("S?Land of the Shades","shades.php");
|
||||
addnav("G?Return to the Graveyard","graveyard.php");
|
||||
modulehook("mausoleum");
|
||||
?>
|
15
lotgd-web/lotgd/lib/graveyard/case_haunt.php
Executable file
15
lotgd-web/lotgd/lib/graveyard/case_haunt.php
Executable file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
output("`\$%s`) is impressed with your actions, and grants you the power to haunt a foe.`n`n",$deathoverlord);
|
||||
$search = translate_inline("Search");
|
||||
rawoutput("<form action='graveyard.php?op=haunt2' method='POST'>");
|
||||
addnav("","graveyard.php?op=haunt2");
|
||||
output("Who would you like to haunt? ");
|
||||
rawoutput("<input name='name' id='name'>");
|
||||
rawoutput("<input type='submit' class='button' value='$search'>");
|
||||
rawoutput("</form>");
|
||||
rawoutput("<script language='JavaScript'>document.getElementById('name').focus()</script>");
|
||||
addnav("Places");
|
||||
addnav("S?Land of the Shades","shades.php");
|
||||
addnav("G?The Graveyard","graveyard.php");
|
||||
addnav("M?Return to the Mausoleum","graveyard.php?op=enter");
|
||||
?>
|
46
lotgd-web/lotgd/lib/graveyard/case_haunt2.php
Executable file
46
lotgd-web/lotgd/lib/graveyard/case_haunt2.php
Executable file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
$string="%";
|
||||
$name = httppost('name');
|
||||
for ($x=0;$x<strlen($name);$x++){
|
||||
$string .= substr($name,$x,1)."%";
|
||||
}
|
||||
$sql = "SELECT login,name,level FROM " . db_prefix("accounts") . " WHERE name LIKE '".addslashes($string)."' AND locked=0 ORDER BY level,login";
|
||||
$result = db_query($sql);
|
||||
if (db_num_rows($result)<=0){
|
||||
output("`\$%s`) could find no one who matched the name you gave him.",$deathoverlord);
|
||||
}elseif(db_num_rows($result)>100){
|
||||
output("`\$%s`) thinks you should narrow down the number of people you wish to haunt.",$deathoverlord);
|
||||
$search = translate_inline("Search");
|
||||
rawoutput("<form action='graveyard.php?op=haunt2' method='POST'>");
|
||||
addnav("","graveyard.php?op=haunt2");
|
||||
output("Who would you like to haunt? ");
|
||||
rawoutput("<input name='name' id='name'>");
|
||||
rawoutput("<input type='submit' class='button' value='$search'>");
|
||||
rawoutput("</form>");
|
||||
rawoutput("<script language='JavaScript'>document.getElementById('name').focus()</script>",true);
|
||||
}else{
|
||||
output("`\$%s`) will allow you to try to haunt these people:`n",$deathoverlord);
|
||||
$name = translate_inline("Name");
|
||||
$lev = translate_inline("Level");
|
||||
rawoutput("<table cellpadding='3' cellspacing='0' border='0'>");
|
||||
rawoutput("<tr class='trhead'><td>$name</td><td>$lev</td></tr>");
|
||||
for ($i=0;$i<db_num_rows($result);$i++){
|
||||
$row = db_fetch_assoc($result);
|
||||
rawoutput("<tr class='".($i%2?"trlight":"trdark")."'><td><a href='graveyard.php?op=haunt3&name=".HTMLEntities($row['login'], ENT_COMPAT, getsetting("charset", "ISO-8859-1"))."'>");
|
||||
output_notl("%s", $row['name']);
|
||||
rawoutput("</a></td><td>");
|
||||
output_notl("%s", $row['level']);
|
||||
rawoutput("</td></tr>",true);
|
||||
addnav("","graveyard.php?op=haunt3&name=".HTMLEntities($row['login'], ENT_COMPAT, getsetting("charset", "ISO-8859-1")));
|
||||
}
|
||||
rawoutput("</table>",true);
|
||||
}
|
||||
addnav(array("Question `\$%s`0 about the worth of your soul",$deathoverlord),"graveyard.php?op=question");
|
||||
$max = $session['user']['level'] * 5 + 50;
|
||||
$favortoheal = round(10 * ($max-$session['user']['soulpoints'])/$max);
|
||||
addnav(array("Restore Your Soul (%s favor)",$favortoheal),"graveyard.php?op=restore");
|
||||
addnav("Places");
|
||||
addnav("S?Land of the Shades","shades.php");
|
||||
addnav("G?The Graveyard","graveyard.php");
|
||||
addnav("M?Return to the Mausoleum","graveyard.php?op=enter");
|
||||
?>
|
59
lotgd-web/lotgd/lib/graveyard/case_haunt3.php
Executable file
59
lotgd-web/lotgd/lib/graveyard/case_haunt3.php
Executable file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
output("`)`c`bThe Mausoleum`b`c");
|
||||
$name = httpget('name');
|
||||
$sql = "SELECT name,level,hauntedby,acctid FROM " . db_prefix("accounts") . " WHERE login='$name'";
|
||||
$result = db_query($sql);
|
||||
if (db_num_rows($result)>0){
|
||||
$row = db_fetch_assoc($result);
|
||||
if ($row['hauntedby']!=""){
|
||||
output("That person has already been haunted, please select another target");
|
||||
}else{
|
||||
$session['user']['deathpower']-=25;
|
||||
$roll1 = e_rand(0,$row['level']);
|
||||
$roll2 = e_rand(0,$session['user']['level']);
|
||||
if ($roll2>$roll1){
|
||||
output("You have successfully haunted `7%s`)!", $row['name']);
|
||||
$sql = "UPDATE " . db_prefix("accounts") . " SET hauntedby='".addslashes($session['user']['name'])."' WHERE login='$name'";
|
||||
db_query($sql);
|
||||
addnews("`7%s`) haunted `7%s`)!",$session['user']['name'],$row['name']);
|
||||
$subj = array("`)You have been haunted");
|
||||
$body = array("`)You have been haunted by `&%s`).",$session['user']['name']);
|
||||
require("lib/systemmail.php");
|
||||
systemmail($row['acctid'], $subj, $body);
|
||||
}else{
|
||||
addnews("`7%s`) unsuccessfully haunted `7%s`)!",$session['user']['name'],$row['name']);
|
||||
switch (e_rand(0,5)){
|
||||
case 0:
|
||||
$msg = "Just as you were about to haunt `7%s`) good, they sneezed, and missed it completely.";
|
||||
break;
|
||||
case 1:
|
||||
$msg = "You haunt `7%s`) real good like, but unfortunately they're sleeping and are completely unaware of your presence.";
|
||||
break;
|
||||
case 2:
|
||||
$msg = "You're about to haunt `7%s`), but trip over your ghostly tail and land flat on your, um... face.";
|
||||
break;
|
||||
case 3:
|
||||
$msg = "You go to haunt `7%s`) in their sleep, but they look up at you, and roll over mumbling something about eating sausage just before going to bed.";
|
||||
break;
|
||||
case 4:
|
||||
$msg = "You wake `7%s`) up, who looks at you for a moment before declaring, \"Neat!\" and trying to catch you.";
|
||||
break;
|
||||
case 5:
|
||||
$msg = "You go to scare `7%s`), but catch a glimpse of yourself in the mirror and panic at the sight of a ghost!";
|
||||
break;
|
||||
}
|
||||
output($msg, $row['name']);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
output("`\$%s`) has lost their concentration on this person, you cannot haunt them now.",$deathoverlord);
|
||||
}
|
||||
addnav(array("Question `\$%s`0 about the worth of your soul",$deathoverlord),"graveyard.php?op=question");
|
||||
$max = $session['user']['level'] * 5 + 50;
|
||||
$favortoheal = round(10 * ($max-$session['user']['soulpoints'])/$max);
|
||||
addnav(array("Restore Your Soul (%s favor)", $favortoheal),"graveyard.php?op=restore");
|
||||
addnav("Places");
|
||||
addnav("S?Land of the Shades","shades.php");
|
||||
addnav("G?The Graveyard","graveyard.php");
|
||||
addnav("M?Return to the Mausoleum","graveyard.php?op=enter");
|
||||
?>
|
24
lotgd-web/lotgd/lib/graveyard/case_question.php
Executable file
24
lotgd-web/lotgd/lib/graveyard/case_question.php
Executable file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$max = $session['user']['level'] * 5 + 50;
|
||||
$favortoheal = round(10 * ($max-$session['user']['soulpoints'])/$max);
|
||||
if ($session['user']['deathpower']>=100) {
|
||||
output("`\$%s`) speaks, \"`7You have impressed me indeed. I shall grant you the ability to visit your foes in the mortal world.`)\"",$deathoverlord);
|
||||
addnav(array("%s Favors",sanitize($deathoverlord)));
|
||||
addnav("H?Haunt a foe (25 favor)","graveyard.php?op=haunt");
|
||||
addnav("e?Resurrection (100 favor)","graveyard.php?op=resurrection");
|
||||
addnav("Other");
|
||||
}elseif ($session['user']['deathpower'] >= 25){
|
||||
output("`\$%s`) speaks, \"`7I am moderately impressed with your efforts. A minor favor I now grant to you, but continue my work, and I may yet have more power to bestow.`)\"",$deathoverlord);
|
||||
addnav(array("%s Favors",sanitize($deathoverlord)));
|
||||
addnav("H?Haunt a foe (25 favor)","graveyard.php?op=haunt");
|
||||
addnav("Other");
|
||||
}else{
|
||||
output("`\$%s`) speaks, \"`7I am not yet impressed with your efforts. Continue my work, and we may speak further.`)\"",$deathoverlord);
|
||||
}
|
||||
output("`n`nYou have `6%s`) favor with `\$%s`).", $session['user']['deathpower'],$deathoverlord);
|
||||
addnav(array("Restore Your Soul (%s favor)",$favortoheal),"graveyard.php?op=restore");
|
||||
addnav("Places");
|
||||
addnav("S?Land of the Shades","shades.php");
|
||||
addnav("G?Return to the Graveyard","graveyard.php");
|
||||
modulehook("ramiusfavors");
|
||||
?>
|
21
lotgd-web/lotgd/lib/graveyard/case_restore.php
Executable file
21
lotgd-web/lotgd/lib/graveyard/case_restore.php
Executable file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
output("`)`b`cThe Mausoleum`c`b");
|
||||
$max = $session['user']['level'] * 5 + 50;
|
||||
$favortoheal = round(10 * ($max-$session['user']['soulpoints'])/$max);
|
||||
if ($session['user']['soulpoints']<$max){
|
||||
if ($session['user']['deathpower']>=$favortoheal){
|
||||
output("`\$%s`) calls you weak for needing restoration, but as you have enough favor with him, he grants your request at the cost of `4%s`) favor.",$deathoverlord, $favortoheal);
|
||||
$session['user']['deathpower']-=$favortoheal;
|
||||
$session['user']['soulpoints']=$max;
|
||||
}else{
|
||||
output("`\$%s`) curses you and throws you from the Mausoleum, you must gain more favor with him before he will grant restoration.",$deathoverlord);
|
||||
}
|
||||
}else{
|
||||
output("`\$%s`) sighs and mumbles something about, \"`7just 'cause they're dead, does that mean they don't have to think?`)\"`n`n",$deathoverlord);
|
||||
output("Perhaps you'd like to actually `ineed`i restoration before you ask for it.");
|
||||
}
|
||||
addnav(array("Question `\$%s`0 about the worth of your soul",$deathoverlord),"graveyard.php?op=question");
|
||||
addnav("Places");
|
||||
addnav("S?Land of the Shades","shades.php");
|
||||
addnav("G?Return to the Graveyard","graveyard.php");
|
||||
?>
|
19
lotgd-web/lotgd/lib/graveyard/case_resurrection.php
Executable file
19
lotgd-web/lotgd/lib/graveyard/case_resurrection.php
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
output("`\$%s`0 waves his skeletal arms as he begins to command the very fabric of life.`n`n",$deathoverlord);
|
||||
// Note to translators. The text spoken by Ramius here is backwards
|
||||
// English. You might choose to maintain it in tact, or you might choose
|
||||
// to translate it to your language, and reverse the letters that way. A
|
||||
// few words have been replaced with latin counterparts to make it a
|
||||
// little harder to identify that they are just backwards english.
|
||||
// tu shall have resurrection
|
||||
// rise from the dead o servant
|
||||
// power over death is mine
|
||||
// your life ego grant tu again
|
||||
// for ego know tu shall return to me again
|
||||
output("\"`)Noitcerruser evah llahs ut...`\$\" The air begins to crackle around you.`n`n");
|
||||
output("\"`)Tnavres o htaed eht morf esir.`\$\" Your soul begins to burn with the pain of a thousand frosty fires.`n`n");
|
||||
output("\"`)Enim si htaed revo rewop.`\$\" Gradually you begin to become aware that the fires are dimming and are replaced by the blinding pain last known by your body before it fell.`n`n");
|
||||
output("\"`)Niaga ut tnarg oge efil ruoy.`\$\" You begin to look around you, and you watch as your muscles knit themselves back together.`n`n");
|
||||
output("\"`)Niaga em ot nruter llahs ut wonk oge rof.`\$\" With a gasp, you laboriously again draw your first breath.");
|
||||
addnav("Continue","newday.php?resurrection=true");
|
||||
?>
|
Reference in New Issue
Block a user