-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.php
103 lines (92 loc) · 4.06 KB
/
index.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php // index.php :: Case switching to decide what function we need to be running.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
error_reporting(E_STRICT);
include("lib.php");
include("globals.php");
if(isset($_GET["do"])) {
$do = explode(":",$_GET["do"]);
switch ($do[0]) {
// Exploring.
case "explore": include("explore.php"); move(); break;
case "travel": include("explore.php"); travel($do[1]); break;
case "quickheal": include("explore.php"); quickheal(); break;
case "itemdrop": include("explore.php"); itemdrop(); break;
case "humanity": include("explore.php"); botkillah(); break;
// Towns.
case "inn": include("town.php"); inn(); break;
case "maps": include("town.php"); map(); break;
case "duel": include("town.php"); duel(); break;
case "challenge": include("town.php"); duelchallenge(); break;
case "buy": include("town.php"); buy(); break;
case "gamble": include("town.php"); gamble(); break;
case "bank": include("town.php"); bank(); break;
case "top10": include("town.php"); halloffame(); break;
// Mailbox.
case "mailbox": include("mailbox.php"); mailbox(); break;
case "mailview": include("mailbox.php"); letter(); break;
case "maildelete": include("mailbox.php"); maildelete(); break;
case "mailnew": include("mailbox.php"); mailnew(); break;
case "mailreply": include("mailbox.php"); mailreply(); break;
case "mailsent": include("mailbox.php"); outbox(); break;
case "mailviewsent": include("mailbox.php"); letterout(); break;
// Fights.
// Guilds.
case "guilds": include("guilds.php"); guildmain(); break;
case "guildhome": include("guilds.php"); guildhome(); break;
case "guildcreate": include("guilds.php"); guildcreate(); break;
case "guildapp": include("guilds.php"); guildapp(); break;
case "guildmembers": include("guilds.php"); guildmembers(); break;
case "guildbank": include("guilds.php"); guildbank(); break;
case "guildpromote": include("guilds.php"); guildpromote(); break;
case "guildremove": include("guilds.php"); guildremove(); break;
case "guildapprove": include("guilds.php"); guildapprove(); break;
case "guildnews": include("guilds.php"); guildnews(); break;
case "guilddisband": include("guilds.php"); guilddisband(); break;
case "guildedit": include("guilds.php"); guildedit(); break;
case "guildleave": include("guilds.php"); guildleave(); break;
case "guildupdate": include("guilds.php"); guildupdate(); break;
// Misc.
case "babblebox": include("misc.php"); babblebox2(); break;
case "showmap": include("misc.php"); showmap(); break;
case "version": include("misc.php"); version(); break;
case "iddqd": include("misc.php"); iddqd(); break;
default: donothing();
}
} else {
donothing();
}
function donothing() {
global $userrow;
if ($userrow["story"] != "0" && $userrow["storylat"] == $userrow["latitude"] && $userrow["storylon"] == $userrow["longitude"]) {
die(header("Location: story.php"));
}
if ($userrow["currentpvp"] != 0) {
die(header("Location: pvp.php"));
}
if ($userrow["currentaction"] == "In Town") {
include("town.php");
dotown();
}
if ($userrow["currentaction"] == "Exploring") {
include("explore.php");
doexplore();
}
if ($userrow["currentaction"] == "Fighting") {
die(header("Location: fight.php"));
}
if ($userrow["currentaction"] == "PVP") {
die(header("Location: pvp.php"));
}
}
?>