Commit e591301d authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #87 from hikawiier/waaagh

Add itemmix_tips & hotkey
parents 943c6c7b 177385cb
......@@ -57,7 +57,6 @@ if(!empty($llist)){
$llist = '('.substr($llist,0,-1).')';
$db->query("UPDATE {$tablepre}log SET prcsd=1 WHERE toid = '$pid' AND lid IN $llist");
}
//var_dump($_POST);
if($hp > 0){
//显示枪声信息
......@@ -120,6 +119,13 @@ if($hp > 0){
$mode = 'command';
}else{
//进入指令判断
if(!empty($itemindex))
{
$opendialog = 'itemmix_tips';
$mode = 'command';
$command = 'itemmain';
$itemcmd = 'itemmix';
}
if(strpos($action,'chase')===false && strpos($action,'dfight')===false && $mode !== 'combat' && $mode !== 'revcombat' && $mode !== 'corpse' && strpos($action,'pacorpse')===false && $mode !== 'senditem'){
$action = '';
}
......@@ -158,6 +164,9 @@ if($hp > 0){
$emax = get_emix_itme_max();
foreach($elements_info as $e_key=>$e_info) ${'etaginfo'.$e_key} ="<span tooltip=\"".print_elements_tags($e_key)."\">";
}
elseif($itemcmd == 'itemmix'){
$main = 'itemmix_tips';
}
$mode = $itemcmd;
}
} elseif($command == 'song') {
......@@ -339,9 +348,10 @@ if($hp > 0){
if ($mixmask&(1<<($i-1)))
$mixlist[] = $i;
}
include_once GAME_ROOT.'./include/game/itemmix.func.php';
if (isset($itemselect))
itemmix($mixlist,$itemselect);
else itemmix($mixlist);
itemmix_rev($mixlist,$itemselect);
else itemmix_rev($mixlist);
}
} elseif($command == 'elementmix') {
if($club == 20){
......
......@@ -15,7 +15,7 @@ $areaesc = 1;
$isduel = 0;
//开启快捷键?0为不开启,1为开启
$hotkeyon = 0;
$hotkeyon = 1;
//开启NPC台词功能?0为不开启,1为开启
$npcchaton = 1;
//有台词的NPC(已废弃,只要登记过台词的NPC就会显示台词,需要关闭哪个NPC的台词功能请直接注释掉ta的台词)
......
No91.雷闪龙 4,WC,380,,Aar,4,5,
No39.希望皇 霍普 4,WC,240,,A,4,2,
No9.天盖星 戴森球 9,WC,233,,ea,9,2,
星圣 欧米伽星云 4,WC,251,,Mi,4,2,
机甲忍者 刃心 4,WC,160,,cr,4,2,
英豪冠军 草雉剑王,WK,150,200,nc,4,3,
始祖守护者 提拉斯 5 -,WC,200,,,5,2,
NO7.幸运条纹人 7,WC,300,,rc,7,3,
超次元机器人 银河破坏王 10,WC,800,,rdcm,10,3,
\ No newline at end of file
No91.雷闪龙 4,WC,380,,Aar,4,5
No39.希望皇 霍普 4,WC,240,,A,4,2
No9.天盖星 戴森球 9,WC,233,,ea,9,2
星圣 欧米伽星云 4,WC,251,,Mi,4,2
机甲忍者 刃心 4,WC,160,,cr,4,2
英豪冠军 草雉剑王,WK,150,200,nc,4,3
始祖守护者 提拉斯 5 -,WC,200,,,5,2
NO7.幸运条纹人 7,WC,300,,rc,7,3
超次元机器人 银河破坏王 10,WC,800,,rdcm,10,3
\ No newline at end of file
星尘龙 8,WC08,170,100,wMc,8,-1,-1,
救世星龙 -,WC,100,,cZ,9,救世龙 1,星尘龙 8,
救世魔龙 -,WC,100,,cd,9,救世龙 1,红莲魔龙 8,
红莲魔龙 8 -,WC,130,,cu,8,-1,-1,
正义盟军 光明守望者 8 -,WC,101,,Z,8,-1,-1,
阿尔法大日 9,WC09,33,99,ebrj,9,-1,-1,
超念力枪手 9,WC09,180,,NH,9,-1,-1,
黑蔷薇龙 7,WC07,180,70,u,7,-1,-1,
机巧将军 无零 7,WC07,252,,Z,7,-1,-1,
流星龙 10 -,WC,120,,c,10,-1,-1,
\ No newline at end of file
星尘龙 8,WC08,170,100,wMc,8,,
救世星龙 -,WC,100,,cZ,9,救世龙 1+星尘龙 8,
救世魔龙 -,WC,100,,cd,9,救世龙 1+红莲魔龙 8,
红莲魔龙 8 -,WC,130,,cu,8,,
正义盟军 光明守望者 8 -,WC,101,,Z,8,,
阿尔法大日 9,WC09,33,99,ebrj,9,,
超念力枪手 9,WC09,180,,NH,9,,
黑蔷薇龙 7,WC07,180,70,u,7,,
机巧将军 无零 7,WC07,252,,Z,7,,
流星龙 10 -,WC,120,,c,10,,
\ No newline at end of file
<?php
if(!defined('IN_GAME')) {
exit('Access Denied');
}
include_once GAME_ROOT.'./include/game/itemmain.func.php';
$mix_type = Array('normal' => '通常','sync' => '同调', 'overlay' => '超量');
// 合成功能
function itemmix_rev($mlist, $itemselect=-1, &$data=NULL)
{
global $log,$mode,$cmd;
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
# 合成队列合法性检查
if(!itemmix_place_check($mlist,$data)) return;
# 合成结果检查
$mix_res = itemmix_get_result($mlist,$data);
# 尝试进行合成操作时 合成操作计数+1
if(empty($clbpara['achvars']['immix'])) $clbpara['achvars']['immix'] = 1;
$mixitemname = array();
foreach($mlist as $val) $mixitemname[] = ${'itm'.$val};
$itmstr = implode(' ', $mixitemname);
$mixmask = calc_mixmask($mlist);
//没有合成选项
if(!$mix_res) {
$log .= "<span class=\"yellow\">{$itmstr}</span>不能合成!<br>";
$mode = 'itemmix';
} elseif(count($mix_res) > 1) {//合成选项2个以上
if($itemselect >= 0) {//有选择则合成
itemmix_proc($mlist, $mix_res[$itemselect], $itmstr, $data);
}else{//否则显示合成选项
$cmd.=itemmix_option_show($mix_res,$mixmask);
}
} else {//只有1个合成选项则直接合成
itemmix_proc($mlist, $mix_res[0], $itmstr, $data);
}
return;
}
function itemmix_get_result($mlist,&$data=NULL)
{
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
$mixitem = array();
foreach($mlist as $val){
$mixitem[$val] = array(
'itm' => ${'itm'.$val},
'itmk' => ${'itmk'.$val},
'itme' => ${'itme'.$val},
'itms' => ${'itms'.$val},
'itmsk' => ${'itmsk'.$val},
);
}
//常规合成
$mixresult = itemmix_recipe_check($mixitem);
//同调合成
$chc_res = itemmix_sync_check($mlist);
if($chc_res){
foreach($chc_res as $cv) {
foreach($cv as $v){
$mixresult[] = $v;
}
}
}
//超量合成
$chc_res = itemmix_overlay_check($mlist);
if($chc_res){
foreach($chc_res as $cv) {
foreach($cv as $v){
$mixresult[] = $v;
}
}
}
return $mixresult;
}
//用户界面暂存的合成素材列表
function calc_mixmask($mlist)
{
$mask=0;
foreach($mlist as $k)
if ($k>=1 && $k<=6)
$mask|=(1<<((int)$k-1));
return $mask;
}
function itemmix_option_show($mix_res,$mixmask)
{
global $mix_type;
ob_start();
include template('itemmix_result');
$res = ob_get_contents();
ob_end_clean();
return $res;
}
function itemmix_place_check($mlist,&$data=NULL)
{
global $mode,$log,$main;
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
if($club == 20){
$log .= "<span class=\"yellow\">无法使用合成功能!</span><br>";
$mode = 'command'; $main = '';
return false;
}
$main = 'itemmix_tips';
$mlist2 = array_unique($mlist);
if(count($mlist) != count($mlist2)) {
$log .= '相同道具不能进行合成!<br>';
$mode = 'itemmix';
return false;
}
if(count($mlist) < 2){
$log .= '至少需要2个道具才能进行合成!';
$mode = 'itemmix';
return false;
}
foreach($mlist as $val){
if(!$data['itm'.$val]){
$log .= '所选择的道具'.$val.'不存在!';
$mode = 'itemmix';
return false;
}
}
return true;
}
//查看哪些合成公式符合要求
//$mi已改为道具数组
function itemmix_recipe_check($mixitem)
{
$mixinfo = get_mixinfo();
$res = array();
if(count($mixitem) >= 2){
$mi_names = array();
foreach($mixitem as $i) $mi_names[] = itemmix_name_proc($i['itm']);
sort($mi_names);
foreach($mixinfo as $minfo){
$ms = $minfo['stuff'];
sort($ms);
if(count($mi_names)==count($ms) && $mi_names == $ms) {
$minfo['type'] = 'normal';
$res[] = $minfo;
}
}
}
return $res;
}
//查看是否符合同调要求
function itemmix_sync_check($mlist)
{
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
//判断是否存在调整,并计算总星数
$star = $star2 = 0;
$tunner = $stuff = array();
foreach($mlist as $mval){
$stuff[] = ${'itm'.$mval};
list($mstar, $mtunner) = itemmix_star_culc_sync($mval);
if($mstar == 0){
$star = 0;
break;
}else{
$star += $mstar;
}
if($mtunner){
$tunner[] = $mval;
}
/*if(in_array('^002',get_itmsk_array(${'itmsk'.$mval})))//生命肌瘤龙变星效果
{
$streamstar = $mstar;
}*/
}
$chc_res = array();
if($star && count($tunner) == 1){
if(!empty($streamstar)){//生命肌瘤龙的变星实际上提供两个星数分支
$star2 = $streamstar + count($mlist) - 1;
}
//然后判断是否存在对应的同调成果
$prp_res = get_syncmixinfo();
foreach($prp_res as $pra){
$pstar = $pra[5];
$preq = $pra[6];
$preqflag = true;
if($preq){//检查是不是有特殊需求
$req=explode('+',$preq);
$mname = array();
foreach($mlist as $mi){
$mname[] = itemmix_name_proc(${'itm'.$mi});
}
//如果素材没有满足则认为无法合成
foreach($req as $rv){
if('st'==$rv){//调整要求是同调
$tunnersk = ${'itmsk'.$tunner[0]};
if(!in_array('s',get_itmsk_array($tunnersk))) $preqflag = false;
}elseif(strpos($rv,'sm')===0){//调整以外要求是同调
$smnum = (int)substr($rv,2);
foreach($mlist as $mi){
if(!in_array($mi, $tunner)){
$misk = ${'itmsk'.$mi};
if(!in_array('s',get_itmsk_array($misk))) {
$preqflag = false;
break;
}
}
}
if(count($mlist) <= $smnum) $preqflag = false;//素材数目不足
}else{//其他,认为是名字要求
if(!in_array($rv, $mname)) $preqflag = false;
}
}
}
if(($pstar == $star || $pstar == $star2) && $preqflag){
if($pstar == $star2) list($star, $star2) = array($star2, $star);
if(empty($chc_res[$star])) $chc_res[$star] = array();
//用键名记录星数和素材数方便提示
$chc_res[$star][] = array('stuff' => $stuff, 'list' => $mlist, 'result' => $pra, 'type' => 'sync');
}
}
}
return $chc_res;
}
function itemmix_star_culc_sync($itmn)
{
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
$star=0;
$tunner=false;
if(${'itms'.$itmn}){
$star = itemmix_get_star(${'itmk'.$itmn});
if(strpos(${'itmsk'.$itmn},'s')!==false) $tunner = true;
}
return array($star, $tunner);
}
function itemmix_get_star($z){
$star = 0;
for ($i=0; $i<strlen($z); $i++)
if ('0'<=$z[$i] && $z[$i]<='9')
$star=$star*10+(int)$z[$i];
return $star;
}
function itemmix_overlay_check($mlist)
{
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
//先判断是否是同星素材2张以上
$star = $num = 0;
$stuff = array();
foreach($mlist as $mval){
$stuff[] = ${'itm'.$mval};
$mstar = itemmix_star_culc_overlay($mval);
if(($star && $mstar != $star) || $mstar == 0){
$star = 0;break;
}else{
$star = $mstar;
$num ++;
}
}
$chc_res = array();
if($star && $num > 1){
//然后判断是否存在对应的超量成果
$prp_res = get_overlaymixinfo();
foreach($prp_res as $pra){
$pstar = $pra[5];
$pnum = $pra[6];
if($star == $pstar && $num == $pnum){
if(empty($chc_res[$star.'-'.$num])) $chc_res[$star.'-'.$num] = array();
//用键名记录星数和素材数方便提示
$chc_res[$star.'-'.$num][] = array('stuff' => $stuff, 'list' => $mlist, 'result' => $pra, 'type' => 'overlay');
}
}
}
return $chc_res;
}
function itemmix_star_culc_overlay($itmn)
{
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
$star=0;
if(${'itms'.$itmn}){
$star = itemmix_get_star(${'itmk'.$itmn});
if(!check_valid_overlay_material(${'itm'.$itmn}, ${'itmsk'.$itmn}, $star)){
$star = 0;
}
}
return $star;
}
//有效的超量素材:带有“超量素材”属性,或者是真卡(名称里有★数字,数字与星数一致,并且没有“-仮”字样)
function check_valid_overlay_material($itm, $itmsk, $star)
{
if(strpos($itmsk,'J')!==false) return true;
preg_match('/★(\d+)/s', $itm, $matches);
//gwrite_var('a.txt',$matches);
if(!empty($matches) && $star == $matches[1] && strpos($itm,'-仮')===false) return true;
return false;
}
function itemmix_name_proc($n){
$n = trim($n);
$itmname_ignore = Array('/锋利的/si','/电气/si','/毒性/si','/-改/si');
foreach(Array($itmname_ignore) as $value){
$n = preg_replace($value,'',$n);
}
if(strpos($n, '小黄的')!==false) $n = preg_replace('/\[\+[0-9]+?\]/si','',$n);//小黄强化特判可以合成
$n = str_replace('钉棍棒','棍棒',$n);
return $n;
}
//执行合成
function itemmix_proc($mlist, $minfo, $itmstr, &$data=NULL)
{
global $log,$main,$now,$mix_type;
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
foreach($mlist as $val){
itemreduce('itm'.$val);
}
$itm0 = $minfo['result'][0];
$itmk0 = $minfo['result'][1];
$itme0 = $minfo['result'][2];
$itms0 = $minfo['result'][3];
if (isset($minfo['result'][4]))
$itmsk0 = $minfo['result'][4];
else{
$itmsk0 = '';
}
$uip['mixcls'] = !empty($minfo['class']) ? $minfo['class'] : '';
$uip['mixtp'] = $minfo['type'];
//合成成功
$main = '';
//“通常”合成当动词实在是太奇怪了
$tpstr = (empty($uip['mixtp']) || $uip['mixtp']==$mix_type['normal']) ? '' : $mix_type[$uip['mixtp']];
$log .= "<span class=\"yellow\">$itmstr</span>{$tpstr}合成了<span class=\"yellow\">{$itm0}</span>。<br>";
addnews($now,'itemmix',$name,$itm0,$tpstr);
$wd+=1;
if((strpos($itmk0,'H') === 0)&&($club == 16)&&($itms0 !== $nosta)){ $itms0 = ceil($itms0*2); }
elseif(($itmk0 == 'EE' || $itmk0 == 'ER') && ($club == 7)){ $itme0 *= 5; }
//检查成就
include_once GAME_ROOT.'./include/game/achievement.func.php';
check_mixitem_achievement_rev($name,$itm0);
itemget($data);
}
?>
\ No newline at end of file
......@@ -3,6 +3,193 @@ if (! defined ( 'IN_GAME' )) {
exit ( 'Access Denied' );
}
//以道具名反查mixinfo数据
//tp & 1 以原料反查,tp & 2 以产物反查
//返回mixinfo里的单个array
function smartmix_find_recipe($itm, $tp=0)
{
include_once GAME_ROOT.'./include/game/itemmix.func.php';
$mix_res = array();
$itm = htmlspecialchars_decode(itemmix_name_proc($itm));
$mixinfo = get_mixinfo();
foreach ($mixinfo as $ma)
{
$ma['type'] = 'normal';
//隐藏合成是无法查到的
if(($tp & 1 && in_array($itm, $ma['stuff']) && $ma['class']!='hidden') || ($tp & 2 && $itm == $ma['result'][0])){
$mix_res[] = $ma;
}
}
return $mix_res;
}
//检查玩家包裹,返回可合成的道具列表
function smartmix_check_available($data)
{
include_once GAME_ROOT.'./include/game/itemmix.func.php';
extract($data);
//itms为零的道具不参与判断
$packn = array();
for($i=1;$i<=6;$i++){
if(!empty(${'itms'.$i})){
$packn[] = $i;
//$packname[] = \itemmix\itemmix_name_proc(${'itm'.$i});
}
}
//生成道具序号的全组合
$fc = full_combination($packn, 2);
//所有的组合全部判断一遍是否可以合成,最简单粗暴和兼容
$mix_available = $mix_overlay_available = $mix_sync_available = array();
foreach($fc as $fcval){
$mix_res = itemmix_get_result($fcval,$data);
if($mix_res){
//$mix_res['type'] = 'normal';
$mix_available[] = $mix_res;
}
}
foreach($fc as $fval){
$mix_overlay_res = itemmix_overlay_check($fval);
if($mix_overlay_res){
foreach($mix_overlay_res as $mkey => $mval){
//$mval['type'] = 'overlay';
if(!isset($mix_overlay_available[$mkey])){
$mix_overlay_available[$mkey] = array($mval);
}else{
$mix_overlay_available[$mkey][] = $mval;
}
}
}
$mix_sync_res = itemmix_sync_check($fval);
if($mix_sync_res){
foreach($mix_sync_res as $mkey => $mval){
//$mval['type'] = 'sync';
if(!isset($mix_sync_available[$mkey])){
$mix_sync_available[$mkey] = array($mval);
}else{
$mix_sync_available[$mkey][] = $mval;
}
}
}
}
return array($mix_available,$mix_overlay_available,$mix_sync_available);
}
function init_itemmix_tips($itemindex='',&$data=NULL)
{
if(!isset($data))
{
global $pdata;
$data = &$pdata;
}
extract($data,EXTR_REFS);
$mix_type = Array('normal' => '通常','sync' => '同调', 'overlay' => '超量');
$mhint = ''; $smhint = '';
if(!empty($itemindex))
{
$mix_res = smartmix_find_recipe($itemindex, 1 + 2);
if($mix_res){
$smhint .= '<span class="blueseed b">'.$itemindex.'</span>涉及的合成公式:<br><ul>';
foreach($mix_res as $mval){
if(!isset($mval['type']) || $mval['type'] == 'normal'){
foreach($mval['stuff'] as $key => $ms){
if($key == 0) $smhint .= '<li>';
if($ms == $itemindex) $smhint .= parse_smartmix_recipelink($ms).' + ';
else $smhint .= parse_smartmix_recipelink($ms,'','grey').' + ';
}
$smhint = substr($smhint,0,-3);
}
$mr = $mval['result'][0];
$smhint .= ' → '.parse_smartmix_recipelink($mr, parse_itemmix_resultshow($mval['result']),'grey').'</li>';
}
$smhint .= "</ul>";
}
else
{
$smhint .= '没有找到<span class="blueseed b">'.$itemindex.'</span>的相关合成公式<span class="grey">(不会显示隐藏公式)</span>';
}
return $smhint;
}
list($mix_available,$mix_overlay_available,$mix_sync_available) = smartmix_check_available($data);
if(empty($mix_available) && empty($mix_overlay_available) && empty($mix_sync_available)){
$mhint .= '';
}else{
$mhint .= '<span class="blueseed b">可合成</span>:<br>';
$shown_list = array();
foreach($mix_available as $mlist){//第一层:不同配方
$mstuff = $mresult = '';
$o_type = '';
foreach ($mlist as $mval){//第二层:不同结果
if(!empty($o_type) && $o_type != $mval['type']) {//换类型时把上一合成类别显示,并且清空显示的配方和结果列表
$mtstr = '';
if(isset($mix_type[$o_type])) $mtstr = $mix_type[$o_type];
$show_str = '<span>'.$mstuff.'</span>可'.$mtstr.'合成:<ul>'.$mresult.'</ul><br>';
if(!in_array($show_str, $shown_list)){
$shown_list[] = $show_str;
$mhint .= $show_str;
}
$mstuff = $mresult = '';
}
$o_type = $mval['type'];
if(!$mstuff) {//配方只显示1次
sort($mval['stuff']);
foreach($mval['stuff'] as $ms){
$mstuff .= parse_smartmix_recipelink($ms).' + ';
}
$mstuff = substr($mstuff,0,-3);
}
$mresult .= '<li>'.parse_smartmix_recipelink($mval['result'][0], parse_itemmix_resultshow($mval['result']), 'yellow').'</li>';
}
$mtstr = '';
if(isset($mix_type[$o_type])) $mtstr = $mix_type[$o_type];
$show_str = '<span class="b">'.$mstuff.'</span>可'.$mtstr.'合成:<ul>'.$mresult.'</ul>';
if(!in_array($show_str, $shown_list)){
$shown_list[] = $show_str;
$mhint .= $show_str;
}
}
}
for($i=0;$i<=6;$i++)
{
$itemindex = ${'itm'.$i};
$mix_res = smartmix_find_recipe($itemindex, 1 + 2);
if($mix_res){
$smhint .= '<span class="blueseed b">'.$itemindex.'</span>涉及的合成公式:<br><ul>';
foreach($mix_res as $mval){
if(!isset($mval['type']) || $mval['type'] == 'normal'){
foreach($mval['stuff'] as $key => $ms){
if($key == 0) $smhint .= '<li>';
if($ms == ${'itm'.$i}) $smhint .= parse_smartmix_recipelink($ms).' + ';
else $smhint .= parse_smartmix_recipelink($ms,'','grey').' + ';
}
$smhint = substr($smhint,0,-3);
}
$mr = $mval['result'][0];
$smhint .= ' → '.parse_smartmix_recipelink($mr, parse_itemmix_resultshow($mval['result']),'grey').'</li>';
}
$smhint .= "</ul>";
}
}
if(!empty($smhint))
{
//$smhint = "<span class=\"b\">素材不足:</span><br>".$smhint;
$mhint .= $smhint;
}
$mhint .= '<br>';
return $mhint;
}
function parse_smartmix_recipelink($itemindex, $stext = '', $sstyle = ''){
return "<a ".($sstyle ? "class=\"{$sstyle}\" " : '')."onclick=\"$('itemindex').value='$itemindex';postCmd('maincmd','command.php');\">".($stext ? $stext : $itemindex).'</a>';
}
function parse_itemmix_resultshow($rarr){
$ret = $rarr[0].'/'.parse_info_desc($rarr[1],'k','',0,'tooltip2').'/'.$rarr[2].'/'.$rarr[3];
$itmskw = !empty($rarr[4]) ? parse_info_desc($rarr[4],'sk',$rarr[1],0,'tooltip2') : '';
if($itmskw) $ret .= '/'.$itmskw;
return $ret;
}
function get_npc_helpinfo($nlist,$tooltip=1)
{
global $plsinfo,$hplsinfo,$gamecfg,$iteminfo,$clubinfo;
......
function hotkey(evt)
/*function hotkey(evt)
{
if(document.activeElement.tagName != 'INPUT'){
evt = (evt) ? evt : ((window.event) ? window.event : '');
......@@ -9,6 +9,68 @@ function hotkey(evt)
}
}
}
}*/
var ms;
hotkey_ok = true;
refchat_ok = true;
function hotkey(evt)
{
if(hotkey_ok && document.activeElement.tagName != 'INPUT'){
evt = (evt) ? evt : ((window.event) ? window.event : '');
var ky = evt.keyCode ? evt.keyCode : evt.which;
flag=1;//是否完成冷却
if (ms!=undefined) {
if (ms>0) flag=0;
}
//双字母id=冷却时间内不可执行的操作 单字母可以执行
if(!evt.ctrlKey && !evt.altKey && !evt.shiftKey){
if(ky==90){
flag==1 ? hotkey_click('zz') : hotkey_click('z');
}
else if(ky==65){
flag==1 ? hotkey_click('aa') : hotkey_click('a');
}
else if(ky==83){
flag==1 ? hotkey_click('ss') : hotkey_click('s');
}
else if(ky==68){
flag==1 ? hotkey_click('dd') : hotkey_click('d');
}
else if(ky==81){
flag==1 ? hotkey_click('qq') : hotkey_click('q');
}
else if(ky==87){
flag==1 ? hotkey_click('ww') : hotkey_click('w');
}
else if(ky==69){
flag==1 ? hotkey_click('ee') : hotkey_click('e');
}
else if(ky==88){
flag==1 ? hotkey_click('xx') : hotkey_click('x');
}
else if(ky==67){
flag==1 ? hotkey_click('cc') : hotkey_click('c');
}
else if(ky==86){
hotkey_click('v');
}
else if(ky >= 49 && ky <= 54){
var kc=(ky-48).toString();
flag==1 ? hotkey_click(kc+kc) : hotkey_click(kc);
}
}
}
}
function hotkey_click(hkid){
var hk = $(hkid);
if (hk) hk.click();
else if ((hkid == 'zz' || hkid == 'z' || hkid == 'x') && $('zx')) $('zx').click();
else if (hkid.length > 1) {
hk = $(hkid.substr(0,1));
if (hk) hk.click();
}
}
//update time
......
......@@ -567,11 +567,12 @@ function player_format_with_db_structure($data){
}
return $ndata;
}
function parse_info_desc($info,$type,$vars='',$short=0)
function parse_info_desc($info,$type,$vars='',$short=0,$tiptype=0)
{
global $iteminfo,$itemspkinfo,$cskills;
global $tps_name,$tps_names,$tps_ik,$tps_isk;
$ttypes = $tiptype ? $tiptype : 'tooltip';
# 处理名字
if($type == 'm')
{
......@@ -580,13 +581,13 @@ function parse_info_desc($info,$type,$vars='',$short=0)
{
$ts = $tps_names[$tps_name[$tinfo]];
$tinfo_f = isset($ts['class']) ? "class=\"{$ts['class']}\"" : '';
$tinfo_tp = isset($ts['title']) ? "tooltip=\"{$ts['title']}\"" : '';
$tinfo_tp = isset($ts['title']) ? "{$ttypes}=\"{$ts['title']}\"" : '';
return "<span {$tinfo_tp} {$tinfo_f}>{$info}</span>";
}
elseif(isset($tps_name[$tinfo]))
{
$tinfo_f = isset($tps_name[$tinfo]['class']) ? "class=\"{$tps_name[$tinfo]['class']}\"" : '';
$tinfo_tp = isset($tps_name[$tinfo]['title']) ? "tooltip=\"{$tps_name[$tinfo]['title']}\"" : '';
$tinfo_tp = isset($tps_name[$tinfo]['title']) ? "{$ttypes}=\"{$tps_name[$tinfo]['title']}\"" : '';
return "<span {$tinfo_tp} {$tinfo_f}>{$info}</span>";
}
return $info;
......@@ -605,7 +606,7 @@ function parse_info_desc($info,$type,$vars='',$short=0)
# 类别不存在样式或提示时,用大类尝试一下
if(!isset($tps_ik[$info])) $info = $v_info;
$info_f = isset($tps_ik[$info]['class']) ? "class=\"{$tps_ik[$info]['class']}\"" : '';
$info_tp = isset($tps_ik[$info]['title']) ? "tooltip=\"{$tps_ik[$info]['title']}\"" : '';
$info_tp = isset($tps_ik[$info]['title']) ? "{$ttypes}=\"{$tps_ik[$info]['title']}\"" : '';
if(!isset($iteminfo[$info])) $info = $v_info;
return "<span {$info_tp} {$info_f}>{$iteminfo[$info]}</span>";
}
......@@ -621,7 +622,7 @@ function parse_info_desc($info,$type,$vars='',$short=0)
if(!empty($info) && isset($cskills[$info]))
{
$sk = $cskills[$info]; $sknm = $cskills[$info]['name'];
return "<span tooltip=\"阅读后可习得技能「{$sknm}\">知识</span>";
return "<span {$ttypes}=\"阅读后可习得技能「{$sknm}\">知识</span>";
}
return "--";
}
......@@ -670,7 +671,7 @@ function parse_info_desc($info,$type,$vars='',$short=0)
if($sk_max > $short_nums && $short) $ret = $itemspkinfo[$info[0]]."+...+".$itemspkinfo[end($info)];
if(!empty($sk_tp))
{
$ret = "<span tooltip=\"{$sk_tp}\">{$ret}</span>";
$ret = "<span {$ttypes}=\"{$sk_tp}\">{$ret}</span>";
}
}
return $ret;
......@@ -765,6 +766,38 @@ function generate_ndnumbers($min, $max, $count = 10)
return $numbers;
}
function full_combination($a, $min) {
$r = array();
$n = count($a);
if($n >= $min){
for($i=$min;$i<=$n;$i++){
$r = array_merge($r, combination($a, $i));
}
}
return $r;
}
function combination($a, $m) {
$r = array();
$n = count($a);
if ($m <= 0 || $m > $n) {
return $r;
}
for ($i=0; $i<$n; $i++) {
$t = array($a[$i]);
if ($m == 1) {
$r[] = $t;
} else {
$b = array_slice($a, $i+1);
$c = combination($b, $m-1);
foreach ($c as $v) {
$r[] = array_merge($t, $v);
}
}
}
return $r;
}
function mgzdecode($data)
{
return gzinflate(substr($data,10,-8));
......
......@@ -31,6 +31,30 @@ function get_mixinfo()
if(!empty($vn_mixinfo)) $mixinfo = array_merge($mixinfo,$vn_mixinfo);
return $mixinfo;
}
function get_syncmixinfo()
{
global $gamecfg;
$file = config("synitem",$gamecfg);
$slist = openfile($file);
$n = count($slist);
$prp_res = array();
for ($i=0;$i<$n;$i++){
$prp_res[] = explode(',',$slist[$i]);
}
return $prp_res;
}
function get_overlaymixinfo()
{
global $gamecfg;
$file = config("overlay",$gamecfg);
$olist = openfile($file);
$n = count($olist);
$prp_res = array();
for ($i=0;$i<$n;$i++){
$prp_res[] = explode(',',$olist[$i]);
}
return $prp_res;
}
# achievement_1.php
function get_achtype()
......
......@@ -8,18 +8,18 @@
<tr>
<!-- 第一攻击方式 -->
<td width=100px align="center" style="vertical-align:top">
<input type="button" class="cmdbutton" style="width:95" name="w1" value="{$attinfo[$w1]}" onclick="$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" style="width:95" id="zz" name="w1" value="[Z]{$attinfo[$w1]}" onclick="$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;">
</td>
<!-- 第二攻击方式 -->
<!--{if $w2}-->
<td width=100px>
<input type="button" class="cmdbutton" style="width:95" name="w2" value="{$attinfo[$w2]}" onclick="$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" style="width:95" id="aa" name="w2" value="[A]{$attinfo[$w2]}" onclick="$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;">
</td>
<!--{/if}-->
<td width=100px>
<!-- 切换副武器 -->
<!--{if $pdata['wep2s']}-->
<input type="button" class="cmdbutton" style="width:95" value="切换" onclick="$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" style="width:95" id="cc" value="[C]切换" onclick="$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;">
<!--{/if}-->
</td>
</tr>
......@@ -42,7 +42,7 @@
<!-- 末行:逃跑、坚守 -->
<tr>
<td width=100px align="center" style="vertical-align:top">
<input type="button" class="cmdbutton" name="back" style="width:95" value="逃跑" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="x" name="back" style="width:95" value="[X]逃跑" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
</td>
<td>
</td>
......
<input type="hidden" name="mode" value="command">
<input type="hidden" name="command" value="back">
<input type="button" class="cmdbutton" name="submit" value="确定" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]确定" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -3,29 +3,29 @@
<input type="hidden" id="subcmd" name="subcmd" value="">
现在想要做什么?<br /><br />
<input type="button" class="cmdbutton" id="search" name="search" value="搜寻" onclick="$('command').value='search';postCmd('gamecmd','command.php');this.disabled=true;" <!--{if (array_search($pls,$arealist) <= $areanum && !$hack) && (isset($plsinfo[$pls]) && !isset($hplsinfo[$pgroup]))}-->disabled<!--{/if}-->>
<input type="button" class="cmdbutton" id="zz" name="search" value="[Z]搜寻" onclick="$('command').value='search';postCmd('gamecmd','command.php');this.disabled=true;" <!--{if (array_search($pls,$arealist) <= $areanum && !$hack) && (isset($plsinfo[$pls]) && !isset($hplsinfo[$pgroup]))}-->disabled<!--{/if}-->>
<select id="moveto" name="moveto" onchange="$('command').value='move';postCmd('gamecmd','command.php');this.disabled=true;">
{template move}
</select>
<br />
<br />
<!--{if $itms1}-->
<input type="button" class="cmdbutton" <!--{if strpos($itmk1,'W')===0 || strpos($itmk1,'D')===0 || strpos($itmk1,'A')===0}-->value="装备"<!--{else}-->value="使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm1';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm1}</span>/{$itme1}/{$itms1}<br>
<input type="button" id="11" class="cmdbutton" <!--{if strpos($itmk1,'W')===0 || strpos($itmk1,'D')===0 || strpos($itmk1,'A')===0}-->value="[1]装备"<!--{else}-->value="[1]使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm1';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm1}</span>/{$itme1}/{$itms1}<br>
<!--{/if}-->
<!--{if $itms2}-->
<input type="button" class="cmdbutton" <!--{if strpos($itmk2,'W')===0 || strpos($itmk2,'D')===0 || strpos($itmk2,'A')===0}-->value="装备"<!--{else}-->value="使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm2';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm2}</span>/{$itme2}/{$itms2}<br>
<input type="button" id="22" class="cmdbutton" <!--{if strpos($itmk2,'W')===0 || strpos($itmk2,'D')===0 || strpos($itmk2,'A')===0}-->value="[2]装备"<!--{else}-->value="[2]使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm2';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm2}</span>/{$itme2}/{$itms2}<br>
<!--{/if}-->
<!--{if $itms3}-->
<input type="button" class="cmdbutton" <!--{if strpos($itmk3,'W')===0 || strpos($itmk3,'D')===0 || strpos($itmk3,'A')===0}-->value="装备"<!--{else}-->value="使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm3';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm3}</span>/{$itme3}/{$itms3}<br>
<input type="button" id="33" class="cmdbutton" <!--{if strpos($itmk3,'W')===0 || strpos($itmk3,'D')===0 || strpos($itmk3,'A')===0}-->value="[3]装备"<!--{else}-->value="[3]使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm3';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm3}</span>/{$itme3}/{$itms3}<br>
<!--{/if}-->
<!--{if $itms4}-->
<input type="button" class="cmdbutton" <!--{if strpos($itmk4,'W')===0 || strpos($itmk4,'D')===0 || strpos($itmk4,'A')===0}-->value="装备"<!--{else}-->value="使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm4';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm4}</span>/{$itme4}/{$itms4}<br>
<input type="button" id="44" class="cmdbutton" <!--{if strpos($itmk4,'W')===0 || strpos($itmk4,'D')===0 || strpos($itmk4,'A')===0}-->value="[4]装备"<!--{else}-->value="[4]使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm4';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm4}</span>/{$itme4}/{$itms4}<br>
<!--{/if}-->
<!--{if $itms5}-->
<input type="button" class="cmdbutton" <!--{if strpos($itmk5,'W')===0 || strpos($itmk5,'D')===0 || strpos($itmk5,'A')===0}-->value="装备"<!--{else}-->value="使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm5';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm5}</span>/{$itme5}/{$itms5}<br>
<input type="button" id="55" class="cmdbutton" <!--{if strpos($itmk5,'W')===0 || strpos($itmk5,'D')===0 || strpos($itmk5,'A')===0}-->value="[5]装备"<!--{else}-->value="[5]使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm5';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm5}</span>/{$itme5}/{$itms5}<br>
<!--{/if}-->
<!--{if $itms6}-->
<input type="button" class="cmdbutton" <!--{if strpos($itmk6,'W')===0 || strpos($itmk6,'D')===0 || strpos($itmk6,'A')===0}-->value="装备"<!--{else}-->value="使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm6';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm6}</span>/{$itme6}/{$itms6}<br>
<input type="button" id="66" class="cmdbutton" <!--{if strpos($itmk6,'W')===0 || strpos($itmk6,'D')===0 || strpos($itmk6,'A')===0}-->value="[6]装备"<!--{else}-->value="[6]使用"<!--{/if}--> onclick="$('mode').value='command';$('command').value='itm6';postCmd('gamecmd','command.php');this.disabled=true;"><span class="yellow">{$itm6}</span>/{$itme6}/{$itms6}<br>
<!--{/if}-->
<br>
......@@ -50,10 +50,10 @@
<!-- 第 2 行: 武器相关-->
<span tooltip="切换主/副武器,或将手中武器存放于副武器栏内">
<input type="button" class="cmdbutton" id="sw_weapon" name="sw_weapon" value="切换武器" onclick="$('mode').value='itemmain';$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="cc" name="sw_weapon" value="[C]切换武器" onclick="$('mode').value='itemmain';$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;">
</span>
<span tooltip="装备的武器中带有“多重”属性时,点此转换武器模式">
<input type="button" class="cmdbutton" id="sp_weapon" name="sp_weapon" value="武器模式" onclick="$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_weapon';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" name="sp_weapon" value="武器模式" onclick="$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_weapon';postCmd('gamecmd','command.php');this.disabled=true;">
</span>
<span tooltip="消耗{$arte}点歌魂歌唱,可能会暴露自己的位置">
<!--{if strpos($artk,'ss')!==false}-->
......@@ -76,16 +76,16 @@
<span tooltip="进入睡眠状态,随时间缓慢恢复体力
<!--{if $pose == 8}-->当前地图存活种火数量越多,恢复速率越快<!--{/if}-->
">
<input type="button" class="cmdbutton" id="rest1" name="rest1" value="睡眠" onclick="$('command').value='rest1';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="q" name="rest1" value="[Q]睡眠" onclick="$('command').value='rest1';postCmd('gamecmd','command.php');this.disabled=true;">
</span>
<span tooltip="进入治疗状态,随时间缓慢恢复生命
<!--{if $pose == 8}-->当前地图存活种火数量越多,恢复速率越快<!--{/if}-->
">
<input type="button" class="cmdbutton" id="rest2" name="rest2" value="治疗" onclick="$('command').value='rest2';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="w" name="rest2" value="[W]治疗" onclick="$('command').value='rest2';postCmd('gamecmd','command.php');this.disabled=true;">
</span>
<!--{if in_array($pls,$hospitals)}-->
<span tooltip="进入静养状态,随时间缓慢恢复生命与体力,同时可以积攒怒气">
<input type="button" class="cmdbutton" id="rest3" name="rest3" value="静养" onclick="$('command').value='rest3';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="e" name="rest3" value="[E]静养" onclick="$('command').value='rest3';postCmd('gamecmd','command.php');this.disabled=true;">
</span>
<!--{/if}-->
<br>
......@@ -107,12 +107,12 @@
<!-- 第 4 行:地区功能-->
<!--{if in_array($pls,$shops)}-->
<input type="button" class="cmdbutton" id="sp_shop" name="sp_shop" value="商店" onclick="$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_shop';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="aa" name="sp_shop" value="[A]商店" onclick="$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_shop';postCmd('gamecmd','command.php');this.disabled=true;">
<br>
<!--{/if}-->
<!--{if in_array($pls,$depots)}-->
<span tooltip="向安全箱中存入或取出道具">
<input type="button" class="cmdbutton" id="sp_depot" name="sp_depot" value="安全箱" onclick="$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_depot';postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="aa" name="sp_depot" value="[A]安全箱" onclick="$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_depot';postCmd('gamecmd','command.php');this.disabled=true;">
</span>
<br>
<!--{/if}-->
......@@ -148,7 +148,7 @@
<!-- 子面板 -->
<span tooltip="查看战场地图、切换背景音乐或调节背景音量">
<input type="button" class="cmdbutton" id="sp_terminal" name="sp_terminal" value="子面板" onclick="showModalDialog($('terminal'));">
<input type="button" class="cmdbutton" id="s" name="sp_terminal" value="[S]子面板" onclick="showModalDialog($('terminal'));">
</span>
{template sp_terminal}
<!--{if isset($gamevars['apis'])}-->
......@@ -157,6 +157,6 @@
<!-- 技能面板 -->
<span tooltip="升级或使用技能">
<input type="button" class="cmdbutton" id="skillstable" name="skillstable" value="技能表" onclick="showModalDialog($('skillpage'));">
<input type="button" class="cmdbutton" id="v" name="skillstable" value="[V]技能表" onclick="showModalDialog($('skillpage'));">
</span>
{template skillpage}
\ No newline at end of file
......@@ -55,4 +55,4 @@
<input type="radio" name="command" id="money" value="money" checked><a onclick=sl('money'); href="javascript:void(0);" >$w_money {lang moneyunit} </a><br>
<!--{/if}-->
<input type="button" name="submit" value="提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" id="zz" name="submit" value="[Z]提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -11,4 +11,4 @@
(注意,deathnote只能对玩家使用。)
<br />
<br />
<input type="button" name="submit" value="提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" name="submit" id="zz" value="[Z]提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -25,10 +25,10 @@
</table>
<br>
<!--{if $dkey > 0}-->
<input type="button" class="cmdbutton" style="margin-right: 5%;" value="上一页" onclick="changePages($dkey,$dkey-1);">
<input type="button" class="cmdbutton" id="c" style="margin-right: 5%;" value="[C]上一页" onclick="changePages($dkey,$dkey-1);">
<!--{/if}-->
<!--{if (($dkey < ($maxdkey-1)) || (isset($dialogue_branch[$dialogue_id])))}-->
<input type="button" class="cmdbutton" value="下一页" onclick="changePages($dkey,$dkey+1);">
<input type="button" class="cmdbutton" id="z" value="[Z]下一页" onclick="changePages($dkey,$dkey+1);">
<!--{elseif isset($dialogue_end[$dialogue_id])}-->
$dialogue_end[$dialogue_id]
<!--{/if}-->
......@@ -48,9 +48,9 @@
</center></p>
<!--{if (isset($dialogue_branch[$dialogue_id]) || isset($dialogue_end[$dialogue_id]))}-->
<img class="dialog-background" src="img/profile.gif" onclick="">
<img class="dialog-background" src="img/profile.gif" id="x" onclick="">
<!--{else}-->
<img class="dialog-background" src="img/profile.gif" onclick="closeDialog($('dialogue'));$('command').value='end_dialogue';postCmd('gamecmd','command.php');this.disabled=true;">
<img class="dialog-background" src="img/profile.gif" id="x" onclick="closeDialog($('dialogue'));$('command').value='end_dialogue';postCmd('gamecmd','command.php');this.disabled=true;">
<!--{/if}-->
</dialog>
<script>
......
......@@ -64,5 +64,5 @@
&nbsp; › 当前:效果、耐久占比会在<span class="lime">2%~98%</span>间浮动。</span><br>
<br>
<!--{/if}-->
<input type="button" class="cmdbutton" name="submit" value="提交" onclick="$('command').value='elementmix';itemmixchooser();postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" name="submit" value="放弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]提交" onclick="$('command').value='elementmix';itemmixchooser();postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="x" name="submit" value="[X]放弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" name="back" value="返回" onclick="postCmd('gamecmd','command.php');"><br><br>
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="back" value="[Z]返回" onclick="postCmd('gamecmd','command.php');"><br><br>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<input type="hidden" name="mode" value="senditem">
<input type="hidden" id="command" name="command" value="back">
留言:<br><input size="30" type="text" name="message" maxlength="60"><br><br>
<input type="button" class="cmdbutton" name="back" value="返回" onclick="postCmd('gamecmd','command.php');"><br><br>
<input type="button" class="cmdbutton" id="zz" name="back" value="[Z]返回" onclick="postCmd('gamecmd','command.php');"><br><br>
<!--{if $itms1}-->
转让:<input type="button" name="itm1" value="{$itm1}/{$itme1}/{$itms1}" onclick="$('command').value='itm1';postCmd('gamecmd','command.php');"><br>
<!--{/if}-->
......
......@@ -4,7 +4,14 @@
<!--{eval $bgm = init_bgm(1)}-->
$bgm
</div>
<!--{loop $plsinfo $places $info}-->
<!--{if (CURSCRIPT == 'game' && $pls==$places)}-->
<!--{eval $bgurl = "img/location/".$places.".jpg"}-->
<style>
body {background-image: url("$bgurl");background-position: center;}
</style>
<!--{/if}-->
<!--{/loop}-->
<table border="0" cellspacing="10" cellpadding="0" align="center">
<tr valign=top>
<td>
......@@ -13,6 +20,8 @@
{template battle}
<!--{elseif $main=='battle_rev'}-->
{template battle_rev}
<!--{elseif $main=='itemmix_tips'}-->
{template itemmix_tips}
<!--{else}-->
{template profile}
<!--{/if}-->
......
......@@ -182,7 +182,7 @@
</style>
<!--{/if}-->
</head>
<BODY <!--{if CURSCRIPT == 'game' && $hotkeyon}-->onkeydown="hotkey(event);"<!--{/if}-->>
<BODY <!--{if CURSCRIPT == 'game' && $hotkeyon}-->onkeyup="hotkey(event);"<!--{/if}-->>
<div class="title" >{lang title}</div>
<div class="headerlink" >
<a href="index.php">>>{lang index}</a>
......
......@@ -20,4 +20,4 @@
<input type="radio" name="command" id="itm6" value="dropitm6"><a onclick=sl('itm6'); href="javascript:void(0);" >$itm6/$itme6/$itms6 </a><br>
<!--{/if}-->
<br><br>
<input type="button" class="cmdbutton" name="submit" value="确定并丢弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]确定并丢弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -8,4 +8,4 @@
<input type="radio" name="command" id="itm5" value="swapitm5"><a onclick=sl('itm5'); href="javascript:void(0);" >$itm5/$itme5/$itms5 </a><br>
<input type="radio" name="command" id="itm6" value="swapitm6"><a onclick=sl('itm6'); href="javascript:void(0);" >$itm6/$itme6/$itms6 </a><br>
<br><br>
<input type="button" class="cmdbutton" name="submit" value="确定" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]确定" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -10,5 +10,5 @@
<!--{if $itms5}--><input type="checkbox" id="mitm5" name="mitm5" value="0"><a onclick="$('mitm5').click();" href="javascript:void(0);">$itm5/$itme5/$itms5</a><br><!--{/if}-->
<!--{if $itms6}--><input type="checkbox" id="mitm6" name="mitm6" value="0"><a onclick="$('mitm6').click();" href="javascript:void(0);">$itm6/$itme6/$itms6</a><br><!--{/if}-->
<br>
<input type="button" class="cmdbutton" name="submit" value="提交" onclick="$('command').value='itemencase';itemmixchooser();postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" name="submit" value="放弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]提交" onclick="$('command').value='itemencase';itemmixchooser();postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="x" name="submit" value="[X]放弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -5,9 +5,9 @@
<br>
<input type="hidden" id="mode" name="mode" value="itemmain">
<input type="hidden" id="command" name="command" value="itemget">
<input type="button" class="cmdbutton" name="itemget" value="拾取" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="zz" name="itemget" value="[Z]拾取" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
<!--{if $club==20}-->
&nbsp;&nbsp;<input type="button" class="cmdbutton" name="split_itm" value="提炼" onclick="$('command').value='split_itm0';postCmd('gamecmd','command.php');this.disabled=true;">
&nbsp;&nbsp;<input type="button" id="cc" class="cmdbutton" name="split_itm" value="[A]提炼" onclick="$('command').value='split_itm0';postCmd('gamecmd','command.php');this.disabled=true;">
<!--{/if}-->
<br><br>
<input type="button" class="cmdbutton" name="dropitm0" value="丢弃" onclick="$('command').value='dropitm0';postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="xx" name="dropitm0" value="[X]丢弃" onclick="$('command').value='dropitm0';postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -35,7 +35,7 @@
<div style="padding: 5px;">
<span class="grey">先选择要移位的道具,再选择要移动到的位置。</span><br>
将:
<select name="from">
<select name="from" onclick=sl('itemmove'); href="javascript:void(0);">
<option value="0">■ 道 具 ■
<!--{if $itms1}--><option value="1">$itm1/$itme1/$itms1<!--{/if}-->
<!--{if $itms2}--><option value="2">$itm2/$itme2/$itms2<!--{/if}-->
......@@ -46,7 +46,7 @@
</select>
<br>
移动至/与之交换:
<select name="to">
<select name="to" onclick=sl('itemmove'); href="javascript:void(0);">
<option value="0">■ 位 置 ■
<!--{if $itms1}--><option value="1">包裹1:$itm1/$itme1/$itms1<!--{else}--><option value="1">包裹1<!--{/if}-->
<!--{if $itms2}--><option value="2">包裹2:$itm2/$itme2/$itms2<!--{else}--><option value="2">包裹2<!--{/if}-->
......@@ -59,4 +59,4 @@
<br>
<input type="button" class="cmdbutton" name="submit" value="提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -10,5 +10,5 @@
<!--{if $itms5}--><input type="checkbox" id="mitm5" name="mitm5" value="0"><a onclick="$('mitm5').click();" href="javascript:void(0);">$itm5/$itme5/$itms5</a><br><!--{/if}-->
<!--{if $itms6}--><input type="checkbox" id="mitm6" name="mitm6" value="0"><a onclick="$('mitm6').click();" href="javascript:void(0);">$itm6/$itme6/$itms6</a><br><!--{/if}-->
<br>
<input type="button" class="cmdbutton" name="submit" value="提交" onclick="$('command').value='itemmix';itemmixchooser();postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" name="submit" value="放弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]提交" onclick="$('command').value='itemmix';itemmixchooser();postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="x" name="submit" value="[X]放弃" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="hidden" id="mode" name="mode" value="itemmain">
<input type="hidden" id="command" name="command" value="itemmix">
<input type="hidden" id="mixmask" name="mixmask" value="{$mixmask}">
<input type="hidden" id="itemselect" name="itemselect" value="999">
<!--{eval $mt0='';}-->
<!--{loop $mix_res $mi $mv}-->
<!--{if $mv['type']!=$mt0}-->
<!--{eval $mtype = $mix_type[$mv['type']];}-->
可{$mtype}合成: <br>
<!--{eval $mt0=$mv['type'];}-->
<!--{/if}-->
<!--{eval $mname=$mv['result'][0];}-->
<input type="button" class="cmdbutton" style="width:200" value="{$mname}" onclick="$('itemselect').value='$mi';postCmd('gamecmd','command.php');this.disabled=true;"><br>
<!--{/loop}-->
\ No newline at end of file
<div style="width:720px">
<div class="b1" style="height:20px"><span>合成笔记</span></div>
<div class="b3" style="min-height:380px;display: flex;position:relative;justify-content: center;">
<div style="min-width: 500px;max-width:700px;max-height:400px;text-align:left;word-break:break-all;overflow:auto;">
<!--{eval include_once GAME_ROOT.'./include/game/itemplace.func.php';$mixhint = init_itemmix_tips();}-->
<form method="post" id="maincmd" name="maincmd">
<input type="hidden" name="itemindex" id="itemindex" value="">
{$mixhint}
</form>
</div>
</div>
</div>
<!--{if !empty($itemindex)}-->
<!--{eval include_once GAME_ROOT.'./include/game/itemplace.func.php';$mixhint2 = init_itemmix_tips($itemindex);}-->
<dialog id="itemmix_tips" style="min-width: fit-content; min-height: fit-content;max-width: 400px;max-height: 600px;">
<div id="tipsinfo">
<div class="b3" style="mdisplay: flex;position:relative;justify-content: center;">
<div style="text-align:left;word-break:break-all;overflow:auto;">
{$mixhint2}
</div>
</div>
</div>
<img class="dialog-background" src="img/profile.gif" onclick="closeDialog($('itemmix_tips'));this.disabled=true;">
</dialog>
<!--{/if}-->
\ No newline at end of file
......@@ -42,4 +42,4 @@
<!--{/if}-->
<br><br>
<input type="text" name="rename" value=""><br>
<input type="button" class="cmdbutton" name="submit" value="改名" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]改名" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="hidden" name="mode" value="command">
<input type="hidden" name="command" value="menu">
<input type="button" class="cmdbutton" name="submit" value="返回" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]返回" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
$restinfo[$state] 中。。。<br>
<input type="hidden" id="mode" name="mode" value="rest">
<input type="hidden" id="command" name="command" value="rest">
<input type="button" class="cmdbutton" name="rest" value="$restinfo[$state]" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" name="back" value="返回" onclick="$('command').value='back';postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="rest" value="[Z]{$restinfo[$state]}" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
<input type="button" class="cmdbutton" id="x" name="back" value="[X]返回" onclick="$('command').value='back';postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -14,4 +14,4 @@
<input type="hidden" name="buynum" value="1">
<!--{/if}-->
<br><br>
<input type="button" class="cmdbutton" name="submit" value="提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -20,4 +20,4 @@
<input type="radio" name="command" id="shop16" value="shop16"><a onclick=sl('shop16'); href="javascript:void(0);" onmouseover="status=' ';return true;"><font style="background:url(img/backround3.gif) repeat-x">【NPC解锁钥匙】</font></a><br>
<input type="radio" name="command" id="shop18" value="shop18"><a onclick=sl('shop18'); href="javascript:void(0);" onmouseover="status=' ';return true;"><font style="background:url(img/backround9.gif) repeat-x">【上级者向物品】</font></a><br>
<br><br>
<input type="button" class="cmdbutton" name="submit" value="提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
......@@ -4,4 +4,4 @@
<div>15个字以内。<div>
<div>队伍密码 : <input size="15" type="text" name="nteamPass" maxlength="30"></div>
<div>15个字以内。<div>
<input type="button" class="cmdbutton" name="submit" value="提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
<input type="button" class="cmdbutton" id="zz" name="submit" value="[Z]提交" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment