function act() { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'player', 'input')); if ($mode == 'command' && strpos($command, 'itm') === 0) { $item = substr($command, 3); itemuse_wrapper($item); return; } if ($mode == 'command' && $command == 'itemmain' && ($itemcmd == 'itemmerge' || $itemcmd == 'itemmove' || $itemcmd == 'itemdrop')) { ob_clean(); if ($itemcmd == 'itemmerge') { include template(MOD_ITEMMAIN_ITEMMERGE); } if ($itemcmd == 'itemmove') { include template(MOD_ITEMMAIN_ITEMMOVE); } if ($itemcmd == 'itemdrop') { include template(MOD_ITEMMAIN_ITEMDROP); } $cmd = ob_get_contents(); ob_clean(); } if ($mode == 'itemmain') { if ($command == 'itemget') { itemget(); } elseif ($command == 'itemadd') { itemadd(); } elseif ($command == 'itemmerge') { if ($merge2 == 'n') { itemadd(); } else { itemmerge($merge1, $merge2); } } elseif ($command == 'itemmove') { itemmove($from, $to); } elseif (strpos($command, 'drop') === 0) { $drop_item = substr($command, 4); itemdrop($drop_item); } elseif (strpos($command, 'off') === 0) { $off_item = substr($command, 3); itemoff($off_item); } elseif (strpos($command, 'swap') === 0) { $swap_item = substr($command, 4); itemdrop($swap_item); itemadd(); } } $chprocess(); }
$mask = (int) $mask; for ($i = 1; $i <= 6; $i++) { if ($mask & 1 << $i - 1) { $mixlist[] = $i; } } itemmix($mixlist); } else { if ($command == "itemadd") { include_once GAME_ROOT . './include/game/itemmain.func.php'; itemadd(); } else { if (strpos($command, 'off') === 0) { include_once GAME_ROOT . './include/game/itemmain.func.php'; $off_item = substr($command, 3); itemoff($off_item); } else { if ($command == "selectclub") { if ($club == 0 && isset($var1) && (int) $var1 <= 16) { $club = (int) $var1; include_once GAME_ROOT . './include/game/clubslct.func.php'; updateskill(); } } else { if ($command == "verify") { $endtime = 1; //用于程序开始时调用,获取全部消息列表 } } } }