-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathcelebration.php
49 lines (48 loc) · 2.56 KB
/
celebration.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
<?php
#################################################################################
## ##
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
## ##
## --------------------------------------------------------------------------- ##
## ##
## Project: ZravianX ##
## Version: 2011.11.08 ##
## Filename: celebration.php ##
## Developed by: Dzoki ##
## Reworked by: ZZJHONS ##
## License: Creative Commons BY-NC-SA 3.0 ##
## Copyright: ZravianX (c) 2011 - All rights reserved ##
## URLs: http://zravianx.zzjhons.com ##
## Source code: http://www.github.com/ZZJHONS/ZravianX ##
## ##
#################################################################################
include("GameEngine/Village.php");
if(isset($_GET['newdid'])){
$_SESSION['wid'] = $_GET['newdid'];
header("Location: ".$_SERVER['PHP_SELF']);
}
if($village->resarray['f'.$_GET['id'].'t'] == 24 and $village->currentcel == 0){
if(!empty($_GET['type']) && $_GET['type'] == 1){
if(6400 < $village->awood || 6650 < $village->aclay || 5940 < $village->airon || 1340 < $village->acrop){
$endtime = ($sc[$village->resarray['f'.$_GET['id']]]/ SPEED) + time();
$wood = 6400;
$clay = 6650;
$iron = 5940;
$crop = 1340;
$database->modifyResource($village->resarray['vref'],$wood,$clay,$iron,$crop,$mode);
$database->addCel($village->resarray['vref'],$endtime,$_GET['type']);
}
} else if(!empty($_GET['type']) && $_GET['type'] == 2){
if(29700 < $village->awood || 33250 < $village->aclay || 32000 < $village->airon || 6700 < $village->acrop){
$endtime = ($gc[$village->resarray['f'.$_GET['id']]]/ SPEED) + time();
$wood= 29700;
$clay= 33250;
$iron= 32000;
$crop= 6700;
$database->modifyResource($village->resarray['vref'],$wood,$clay,$iron,$crop,$mode);
$database->addCel($village->resarray['vref'],$endtime,$_GET['type']);
}
}
}
header("Location: build.php?id=".$_GET['id']);
?>