Пример #1
0
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();
}
Пример #2
0
     $item = substr($command, 3);
     use_func_item($usemode, $item);
 } elseif ($mode == 'itemmain') {
     include_once GAME_ROOT . './include/game/itemmain.func.php';
     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);
         //itemadd();
     } elseif (strpos($command, 'swap') === 0) {
         $swap_item = substr($command, 4);
         itemdrop($swap_item);
         itemadd();
     } elseif ($command == 'itemmix') {
         if (isset($itemselect) && $itemselect == 999) {
             $mode = 'command';
         } else {