forked from NB-Core/lotgd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gypsy.php
48 lines (44 loc) · 1.93 KB
/
gypsy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
// addnews ready
// translator ready
// mail ready
require_once("common.php");
require_once("lib/commentary.php");
require_once("lib/http.php");
require_once("lib/villagenav.php");
tlschema("gypsy");
addcommentary();
$cost = $session['user']['level']*20;
$op = httpget('op');
addnav("Navigation");
addnav("Forget it","village.php");
if ($op=="pay"){
if ($session['user']['gold']>=$cost){ // Gunnar Kreitz
$session['user']['gold']-=$cost;
debuglog("spent $cost gold to speak to the dead");
redirect("gypsy.php?op=talk");
}else{
page_header("Gypsy Seer's tent");
villagenav();
output("`5You offer the old gypsy woman your `^%s`5 gold for your gen-u-wine say-ance, however she informs you that the dead may be dead, but they ain't cheap.", $session['user']['gold']);
}
}elseif ($op=="talk"){
page_header("In a deep trance, you talk with the shades");
commentdisplay("`5While in a deep trance, you are able to talk with the dead:`n", "shade","Project",25,"projects");
addnav("Snap out of your trance","gypsy.php");
}else{
checkday();
page_header("Gypsy Seer's tent");
output("`5You duck into a gypsy tent like many you have seen throughout the realm.");
output("All of them promise to let you talk with the deceased, and most of them surprisingly seem to work.");
output("There are also rumors that the gypsy have the power to speak over distances other than just those of the afterlife.");
output("In typical gypsy style, the old woman sitting behind a somewhat smudgy crystal ball informs you that the dead only speak with the paying.");
output("\"`!For you, %s, the price is a trifling `^%s`! gold.`5\", she rasps.", translate_inline($session['user']['sex']?"my pretty":"my handsome"), $cost);
addnav("Seance");
addnav(array("Pay to talk to the dead (%s gold)", $cost),"gypsy.php?op=pay");
if ($session['user']['superuser'] & SU_EDIT_COMMENTS)
addnav("Superuser Entry","gypsy.php?op=talk");
modulehook("gypsy");
}
page_footer();
?>