game/_incl_data/class/Magic/sunduk.php

149 lines
5.9 KiB
PHP
Raw Normal View History

2023-03-31 18:42:06 +00:00
<?php
2022-06-06 21:30:34 +00:00
if(!defined('GAME'))
{
die();
}
if($tr['var_id'] > 4) {
2023-01-10 16:29:32 +00:00
//маг
2022-06-06 21:30:34 +00:00
$itmadd = array(
2023-01-10 16:29:32 +00:00
//3053 - вечность , 3052 - МР 1000
//суперсвиток
2022-06-06 21:30:34 +00:00
0 => array(2142,2143,2144,2141,3052),
2023-01-10 16:29:32 +00:00
//простые свитки
2022-06-06 21:30:34 +00:00
1 => array(3053,3043,2545,2709,874,2391),
2023-01-10 16:29:32 +00:00
//гарантированные
2022-06-06 21:30:34 +00:00
2 => array(3044)
);
$tr['var_id'] -= 4;
}else{
2023-01-10 16:29:32 +00:00
//воин
2022-06-06 21:30:34 +00:00
$itmadd = array(
2023-01-10 16:29:32 +00:00
//суперсвиток
2022-06-06 21:30:34 +00:00
0 => array(911,1172,2143,2144,1173),
2023-01-10 16:29:32 +00:00
//простые свитки
2022-06-06 21:30:34 +00:00
1 => array(3043,2545,2709,874,2391),
2023-01-10 16:29:32 +00:00
//гарантированные
2022-06-06 21:30:34 +00:00
2 => array(3044)
);
}
if($tr['var_id'] > 4) {
2023-01-10 16:29:32 +00:00
//Маг
2022-06-06 21:30:34 +00:00
$i3[9] = $this->addItem(4676,$this->info['id'],'|notr=1|sudba='.$this->info['login']);
}else{
2023-01-10 16:29:32 +00:00
//Воин
2022-06-06 21:30:34 +00:00
$i3[9] = $this->addItem(2870,$this->info['id'],'|notr=1|sudba='.$this->info['login']);
}
if($tr['var_id'] == 1) {
2023-01-10 16:29:32 +00:00
// 200 екр. - 1 суперсвиток 0/15, 2 простых 0/75 + Эссенция Здоровья 0/1
2022-06-06 21:30:34 +00:00
$i4 = array(
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array();
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15);
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[3] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,1);
if($io == '') {
2023-01-10 16:29:32 +00:00
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
2022-06-06 21:30:34 +00:00
}
}elseif($tr['var_id'] == 2) {
2023-01-10 16:29:32 +00:00
// 400 екр. - 2 суперсвитка 0/15, 4 простых 0/75 + Эссенция Здоровья 0/2 + новогодний эликсир 0/7
2022-06-06 21:30:34 +00:00
$i4 = array(
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array();
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15);
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,15);
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[3] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[4] = $this->addItem($i4[4],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[5] = $this->addItem($i4[5],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,75);
$i3[6] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,2);
if($io == '') {
2023-01-10 16:29:32 +00:00
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
2022-06-06 21:30:34 +00:00
}
}elseif($tr['var_id'] == 3) {
2023-01-10 16:29:32 +00:00
// 600 екр. - 2 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/2 + новогодний эликсир 0/10
2022-06-06 21:30:34 +00:00
$i4 = array(
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array();
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
$i3[2] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[3] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[4] = $this->addItem($i4[4],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[5] = $this->addItem($i4[5],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[6] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,2);
if($io == '') {
2023-01-10 16:29:32 +00:00
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
2022-06-06 21:30:34 +00:00
}
}elseif($tr['var_id'] == 4) {
2023-01-10 16:29:32 +00:00
// 1000 екр. - 3-4 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/3 + новогодний эликсир 0/10
2022-06-06 21:30:34 +00:00
$i4 = array(
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[0][rand(0,count($itmadd[0])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)],
$itmadd[1][rand(0,count($itmadd[1])-1)]
);
$i3 = array();
$i3[0] = $this->addItem($i4[0],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
$i3[1] = $this->addItem($i4[1],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
$i3[3] = $this->addItem($i4[2],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
if(rand(0,1000) > 250 && rand(0,1000) < 750) {
$i3[9] = $this->addItem($i4[3],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,20);
}
$i3[4] = $this->addItem($i4[4],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[5] = $this->addItem($i4[5],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[6] = $this->addItem($i4[6],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[7] = $this->addItem($i4[7],$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,100);
$i3[8] = $this->addItem(3044,$this->info['id'],'|notr=1|sudba='.$this->info['login'],NULL,3);
if($io == '') {
2023-01-10 16:29:32 +00:00
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
2022-06-06 21:30:34 +00:00
}
}
unset($itmadd,$i3,$i4);
?>