当前位置: 首页>>代码示例>>PHP>>正文


PHP adr_get_lang函数代码示例

本文整理汇总了PHP中adr_get_lang函数的典型用法代码示例。如果您正苦于以下问题:PHP adr_get_lang函数的具体用法?PHP adr_get_lang怎么用?PHP adr_get_lang使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了adr_get_lang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: adr_battle_equip_initialise

function adr_battle_equip_initialise($user_id, $armor, $buckler, $helm, $gloves, $amulet, $ring, $greave, $boot)
{
    global $db, $lang, $adr_general, $template, $board_config, $phpEx;
    $user_id = intval($user_id);
    $armor = intval($armor);
    $buckler = intval($buckler);
    $helm = intval($helm);
    $gloves = intval($gloves);
    $amulet = intval($amulet);
    $ring = intval($ring);
    // Get the user infos
    $char = adr_get_user_infos($user_id);
    ### START restriction checks ###
    $item_sql = adr_make_restrict_sql($char);
    ### END restriction checks ###
    // Be sure he has a character
    if (!is_numeric($char['character_id'])) {
        adr_previous(Adr_your_character_lack, adr_character, '');
    }
    // Calculate the base stats
    $hp = 0;
    $mp = 0;
    $level = $char['character_level'];
    $char_element = $char['character_element'];
    $char_mp = $char['character_mp'];
    // Create base attack & defence stats
    $att = adr_battle_make_att($char['character_might'], $char['character_constitution']);
    $ma = adr_battle_make_magic_att($char['character_intelligence']);
    $def = adr_battle_make_def($char['character_ac'], $char['character_dexterity']);
    $md = adr_battle_make_magic_def($char['character_wisdom']);
    // Modify stats depending to zone element
    $zone_user = adr_get_user_infos($user_id);
    $actual_zone = $zone_user['character_area'];
    $sql = "SELECT * FROM " . ADR_ZONES_TABLE . "\r\n\t\tWHERE zone_id = {$actual_zone}";
    $result = $db->sql_query($sql);
    if (!$result) {
        message_die(GENERAL_ERROR, 'Could not obtain zones information', "", __LINE__, __FILE__, $sql);
    }
    $zone_check = $db->sql_fetchrow($result);
    if ($board_config['zone_bonus_enable'] == '1' && $zone_check['zone_element'] == '$char_element') {
        $bonus_att = $board_config['zone_bonus_att'];
        $bonus_def = $board_config['zone_bonus_def'];
        $att = ($char['character_might'] + $char['character_constitution']) * 2 + $bonus_att;
        $def = $char['character_dexterity'] + $char['character_wisdom'] + $char['character_ac'] + $bonus_def;
    }
    // Start party
    $party = $char['character_party'];
    if ($party > 0) {
        $sql = " SELECT character_party FROM " . ADR_CHARACTERS_TABLE . "\r\n\t\t\t WHERE character_party = {$party} ";
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not query count for info page', '', __LINE__, __FILE__, $sql);
        }
        $count_members = $db->sql_numrows($result);
    } elseif ($party = 0) {
        $sql = " SELECT character_party FROM " . ADR_CHARACTERS_TABLE . "\r\n\t\t\t WHERE character_party = 0 ";
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not query count for info page', '', __LINE__, __FILE__, $sql);
        }
        $count_members = $db->sql_numrows($result);
    }
    // Boost ATT
    $att = $att + $count_members + $count_members + $count_members;
    $att = round($att);
    // Boost DEF
    $def = $def + $count_members + $count_members + $count_members + $count_members + $count_members;
    $def = round($def);
    // Boost MA
    $ma = $ma + $count_members + $count_members + $count_members;
    $ma = round($ma);
    // Boost MD
    $md = $md + $count_members + $count_members + $count_members + $count_members + $count_members;
    $md = round($md);
    // End Party
    if ($armor) {
        $sql = "SELECT * FROM " . ADR_SHOPS_ITEMS_TABLE . "\r\n\t\t\tWHERE item_in_shop = '0'\r\n\t\t\tAND item_owner_id = '{$user_id}'\r\n\t\t\tAND item_in_warehouse = '0'\r\n\t\t\t{$item_sql}\r\n\t\t\tAND item_id = '{$armor}'";
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not query battle list', '', __LINE__, __FILE__, $sql);
        }
        $item = $db->sql_fetchrow($result);
        $armor_id = $item['item_id'];
        $def = $def + ($item['item_power'] + $item['item_add_power']);
        adr_use_item($armor, $user_id);
        $armour_name = adr_get_lang($item['item_name']);
    }
    $def = $def + $adr_general['shield_bonus'] * $char['character_skill_shield_level'];
    if ($buckler) {
        $sql = "SELECT * FROM " . ADR_SHOPS_ITEMS_TABLE . "\r\n\t\t\tWHERE item_in_shop = '0'\r\n\t\t\tAND item_owner_id = '{$user_id}'\r\n\t\t\tAND item_in_warehouse = '0'\r\n\t\t\t{$item_sql}\r\n\t\t\tAND item_id = '{$buckler}'";
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not query battle list', '', __LINE__, __FILE__, $sql);
        }
        $item = $db->sql_fetchrow($result);
        $buckler_id = $item['item_id'];
        $def = $def + ($item['item_power'] + $item['item_add_power']);
        adr_use_item($buckler, $user_id);
        $buckler_name = adr_get_lang($item['item_name']);
    }
    if ($gloves) {
        $sql = "SELECT * FROM " . ADR_SHOPS_ITEMS_TABLE . "\r\n\t\t\tWHERE item_in_shop = '0'\r\n\t\t\tAND item_owner_id = '{$user_id}'\r\n\t\t\tAND item_in_warehouse = '0'\r\n\t\t\t{$item_sql}\r\n\t\t\tAND item_id = '{$gloves}'";
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, 'Could not query battle list', '', __LINE__, __FILE__, $sql);
//.........这里部分代码省略.........
开发者ID:Nekrofage,项目名称:FJR,代码行数:101,代码来源:adr_functions_battle_setup.php

示例2: adr_get_lang

     $tools = $db->sql_fetchrowset($result);
     $tool_list = '<select name="item_tool">';
     $tool_list .= '<option value = "0" >' . $lang['Adr_forge_mining_no_tool'] . '</option>';
     for ($i = 0; $i < count($tools); $i++) {
         $tool_list .= '<option value = "' . $tools[$i]['item_id'] . '" >' . adr_get_lang($tools[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $tools[$i]['item_power'] . ' - ' . $lang['Adr_items_duration'] . ' : ' . $tools[$i]['item_duration'] . ' )' . '</option>';
     }
     $tool_list .= '</select>';
     $sql = " SELECT * FROM " . ADR_SHOPS_ITEMS_TABLE . "\r\n\t\t\t\tWHERE item_owner_id = {$user_id}\r\n\t\t\t\tAND item_quality < 5 \r\n\t\t\t\tAND item_in_shop = 0\r\n\t\t\t\tAND item_in_warehouse = 0\r\n\t\t\t\tAND item_duration > 0\r\n\t\t\t\tAND item_type_use IN ( 1 , 2 ) ";
     if (!($result = $db->sql_query($sql))) {
         message_die(GENERAL_ERROR, 'Could not check user items', "", __LINE__, __FILE__, $sql);
     }
     $items = $db->sql_fetchrowset($result);
     $items_list = '<select name="item_to_repair">';
     $items_list .= '<option value = "0" >' . $lang['Adr_forge_repair_no_item'] . '</option>';
     for ($i = 0; $i < count($items); $i++) {
         $items_list .= '<option value = "' . $items[$i]['item_id'] . '" >' . adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $items[$i]['item_power'] . ' - ' . $lang['Adr_items_quality'] . ' : ' . adr_get_item_quality($items[$i]['item_quality'], simple) . ' - ' . $lang['Adr_items_type_use'] . ' : ' . adr_get_item_type($items[$i]['item_type_use'], simple) . ')' . '</option>';
     }
     $items_list .= '</select>';
     $template->assign_vars(array('ITEMS_LIST' => $items_list, 'TOOL_LIST' => $tool_list, 'L_SELECT_TOOL' => $lang['Adr_forge_mining_select_tool'], 'L_SELECT_ITEMS' => $lang['Adr_forge_stone_select_item'], 'L_GO_REPAIR' => $lang['Adr_forge_stone_go'], 'L_STONE_EXPLAIN' => $lang['Adr_forge_stone_explain']));
     break;
 case 'stone_action':
     $tool = intval($HTTP_POST_VARS['item_tool']);
     $item_to_repair = intval($HTTP_POST_VARS['item_to_repair']);
     // No tool , no repair
     if (!$tool) {
         adr_previous(Adr_forge_stone_tool_needed, adr_TownMap_forge, "mode=stone");
     }
     // No item to repair ?
     if (!$item_to_repair) {
         adr_previous(Adr_forge_stone_item_to_repair_needed, adr_TownMap_forge, "mode=stone");
     }
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:adr_TownMap_forge.php

示例3: message_die

        message_die(GENERAL_ERROR, 'Could not obtain items information', "", __LINE__, __FILE__, $sql);
    }
    $items = $db->sql_fetchrowset($result);
    $s_hidden_fields = '<input type="hidden" name="mode" value="add_item" /><input type="hidden" name="item_type" value="' . $category_id . '" />';
    for ($k = 0; $k < count($items); $k++) {
        $row_class = !($k % 2) ? $theme['td_class1'] : $theme['td_class2'];
        if ($items[$k]['item_chance'] == '0') {
            $chance = $lang['Adr_beggar_chance_common'];
        } elseif ($items[$k]['item_chance'] == '1') {
            $chance = $lang['Adr_beggar_chance_uncommon'];
        } elseif ($items[$k]['item_chance'] == '2') {
            $chance = $lang['Adr_beggar_chance_rare'];
        } elseif ($items[$k]['item_chance'] == '3') {
            $chance = $lang['Adr_beggar_chance_very_rare'];
        } elseif ($items[$k]['item_chance'] == '4') {
            $chance = $lang['Adr_beggar_chance_super_rare'];
        }
        $template->assign_block_vars("items", array("ROW_CLASS" => $row_class, "ITEM_NAME" => adr_get_lang($items[$k]['item_name']), "ITEM_DESC" => adr_get_lang($items[$k]['item_desc']), "ITEM_CHANCE" => $chance, "ITEM_IMG" => $items[$k]['item_icon'], "ITEM_TYPE" => $lang[$items[$k]['item_type_lang']], "ITEM_QUALITY" => $lang[$items[$k]['item_quality_lang']], "ITEM_DURATION" => $items[$k]['item_duration'], "ITEM_MAX_DURATION" => $items[$k]['item_duration_max'], "ITEM_POWER" => $items[$k]['item_power'], "ITEM_ADD_POWER" => $items[$k]['item_add_power'], "ITEM_MP_USE" => $items[$k]['item_mp_use'], "ITEM_PRICE" => $items[$k]['item_price'], "U_ITEM_EDIT" => append_sid("admin_adr_beggar_donations.{$phpEx}?mode=edit_item&amp;item_id=" . $items[$k]['item_id']), "U_ITEM_DELETE" => append_sid("admin_adr_beggar_donations.{$phpEx}?mode=delete_item&amp;item_id=" . $items[$k]['item_id'])));
    }
    $sql = "SELECT count(*) AS total FROM " . ADR_BEGGAR_DONATIONS . "\r\n\t\tWHERE item_owner_id = '1'";
    if (!($result = $db->sql_query($sql))) {
        message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
    }
    if ($total = $db->sql_fetchrow($result)) {
        $total_items = $total['total'];
        $pagination = generate_pagination("admin_adr_beggar_donations.{$phpEx}?mode2={$mode2}&amp;order={$sort_order}&amp;cat={$cat}", $total_items, $board_config['topics_per_page'], $start) . '&nbsp;';
    }
    $template->assign_vars(array("L_ITEM_NAME" => $lang['Adr_shops_categories_item_name'], "L_ITEM_DESC" => $lang['Adr_shops_categories_item_desc'], "L_ITEM_TITLE" => $lang['Adr_beggar_title'], "L_ITEM_TEXT" => $lang['Adr_beggar_title_explain'], "L_ITEM_TYPE" => $lang['Adr_items_type_use'], "L_ADD_ITEM" => $lang['Adr_shops_item_add'], "L_ITEM_QUALITY" => $lang['Adr_items_quality'], "L_ITEM_POWER" => $lang['Adr_items_power'], "L_ITEM_WEIGHT" => $lang['Adr_shops_item_weight'], "L_ITEM_DURATION" => $lang['Adr_items_duration'], "L_ITEM_CHANCE" => $lang['Adr_beggar_chance'], "L_ITEM_CHANCE_EXPLAIN" => $lang['Adr_beggar_chance_explain'], "L_ACTION" => $lang['Action'], "L_ITEMS" => $lang['Adr_shops_categories_items'], "L_EDIT" => $lang['Edit'], "L_DELETE" => $lang['Delete'], "L_ITEM_IMG" => $lang['Adr_races_image'], "L_ITEM_PRICE" => $lang['Adr_items_price'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_ORDER' => $lang['Order'], 'L_SORT' => $lang['Sort'], 'L_SUBMIT' => $lang['Sort'], 'S_MODE_SELECT' => $select_sort_mode, 'S_ORDER_SELECT' => $select_sort_order, 'SELECT_CAT' => $select_category, 'L_SELECT_CAT' => $lang['Adr_items_select'], 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $board_config['topics_per_page']) + 1, max(1, ceil($total_items / $board_config['topics_per_page']))), 'L_GOTO_PAGE' => $lang['Goto_page'], "L_GIVE" => $lang['Adr_items_give'], "L_SELL" => $lang['Adr_items_sell'], "L_EDIT" => $lang['Adr_items_edit'], "L_SHOP" => $lang['Adr_items_into_shop'], "S_SHOPS_ACTION" => append_sid("admin_adr_beggar_donations.{$phpEx}?mode2={$mode2}&amp;order={$sort_order}"), "S_HIDDEN_FIELDS" => $s_hidden_fields));
    $template->pparse("body");
}
include './page_footer_admin.' . $phpEx;
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:admin_adr_beggar_donations.php

示例4: adr_pvp_armour_set_check

function adr_pvp_armour_set_check($battle_id, $challenger_id, $opponent_id, $armour = '', $shield = '', $gloves = '', $helm = '', $amulet = '', $ring = '', $greave = '', $boot = '')
{
    global $db;
    $battle_id = intval($battle_id);
    $challenger_id = intval($challenger_id);
    $opponent_id = intval($opponent_id);
    // Check if current armour is equal to a set in table
    $sql = " SELECT a.*, b.* FROM " . ADR_ARMOUR_SET_TABLE . " a, " . ADR_BATTLE_PVP_TABLE . " b\r\n\t\t\tWHERE a.set_helm = '" . str_replace("\\'", "''", $helm) . "'\r\n\t\t\tAND a.set_armour = '" . str_replace("\\'", "''", $armour) . "'\r\n\t\t\tAND a.set_gloves = '" . str_replace("\\'", "''", $gloves) . "'\r\n\t\t\tAND a.set_shield = '" . str_replace("\\'", "''", $shield) . "'\r\n\t\t\tAND a.set_greave = '" . str_replace("\\'", "''", $greave) . "'\r\n\t\t\tAND a.set_boot = '" . str_replace("\\'", "''", $boot) . "'\r\n\t\t\tAND b.battle_id = '{$battle_id}'";
    if (!($result = $db->sql_query($sql))) {
        message_die(GENERAL_ERROR, 'Could not query armour set table for PvP', '', __LINE__, __FILE__, $sql);
    }
    $bat = $db->sql_fetchrow($result);
    if ($bat['set_id'] != '0' && $bat['set_id'] != '') {
        if ($challenger_id == $bat['battle_challenger_id']) {
            // Calculate bonuses & penalties for armour set
            $att = $bat['battle_challenger_att'] + ($bat['set_might_bonus'] + $bat['set_constitution_bonus']);
            $att = $att - ($bat['set_might_penalty'] + $bat['set_constitution_penalty']);
            $att = $att < 1 ? 1 : $att;
            $def = $bat['battle_challenger_def'] + ($bat['set_dexterity_bonus'] + $bat['set_ac_bonus']);
            $def = $def - ($bat['set_dexterity_penalty'] + $bat['set_ac_penalty']);
            $def = $def < 1 ? 1 : $def;
            $m_att = $bat['battle_challenger_magic_attack'] + $bat['set_intelligence_bonus'];
            $m_att = $m_att - $bat['set_intelligence_penalty'];
            $m_att = $m_att < 1 ? 1 : $m_att;
            $m_def = $bat['battle_challenger_magic_resistance'] + $bat['set_wisdom_bonus'];
            $m_def = $m_def - $bat['set_wisdom_penalty'];
            $m_def = $m_def < 1 ? 1 : $m_def;
            $armour_set = adr_get_lang($bat['set_name']);
            // Now update the database
            $sql = " UPDATE " . ADR_BATTLE_PVP_TABLE . "\r\n\t\t\t\tSET battle_challenger_att = {$att}, \r\n\t\t\t\t\tbattle_challenger_def = {$def},\r\n\t\t\t\t\tbattle_challenger_magic_attack = {$m_att},\r\n\t\t\t\t\tbattle_challenger_magic_resistance = {$m_def},\r\n\t\t\t\t\tbattle_challenger_armour_set = '" . str_replace("\\'", "''", $armour_set) . "'\r\n\t\t\t\tWHERE battle_id = '{$battle_id}'\r\n\t\t\t\tAND battle_challenger_id = '{$challenger_id}'";
            $result = $db->sql_query($sql);
            if (!$result) {
                message_die(GENERAL_ERROR, "Couldn't update challenger armour set stats", "", __LINE__, __FILE__, $sql);
            }
            return;
        } elseif ($opponent_id == $bat['battle_opponent_id']) {
            // Calculate bonuses & penalties for armour set
            $att = $bat['battle_opponent_att'] + ($bat['set_might_bonus'] + $bat['set_constitution_bonus']);
            $att = $att - ($bat['set_might_penalty'] + $bat['set_constitution_penalty']);
            $att = $att < 1 ? 1 : $att;
            $def = $bat['battle_opponent_def'] + ($bat['set_dexterity_bonus'] + $bat['set_ac_bonus']);
            $def = $def - ($bat['set_dexterity_penalty'] + $bat['set_ac_penalty']);
            $def = $def < 1 ? 1 : $def;
            $m_att = $bat['battle_opponent_magic_attack'] + $bat['set_intelligence_bonus'];
            $m_att = $m_att - $bat['set_intelligence_penalty'];
            $m_att = $m_att < 1 ? 1 : $m_att;
            $m_def = $bat['battle_opponent_magic_resistance'] + $bat['set_wisdom_bonus'];
            $m_def = $m_def - $bat['set_wisdom_penalty'];
            $m_def = $m_def < 1 ? 1 : $m_def;
            $armour_set = adr_get_lang($bat['set_name']);
            // Now update the database
            $sql = " UPDATE " . ADR_BATTLE_PVP_TABLE . "\r\n\t\t\t\tSET battle_opponent_att = {$att}, \r\n\t\t\t\t\tbattle_opponent_def = {$def},\r\n\t\t\t\t\tbattle_opponent_magic_attack = {$m_att},\r\n\t\t\t\t\tbattle_opponent_magic_resistance = {$m_def}, \r\n\t\t\t\t\tbattle_opponent_armour_set = '" . str_replace("\\'", "''", $armour_set) . "'\r\n\t\t\t\tWHERE battle_id = '{$battle_id}'\r\n\t\t\t\tAND battle_opponent_id = '{$opponent_id}'";
            $result = $db->sql_query($sql);
            if (!$result) {
                message_die(GENERAL_ERROR, "Couldn't update opponent armour set stats", "", __LINE__, __FILE__, $sql);
            }
            return;
        }
    }
}
开发者ID:Nekrofage,项目名称:FJR,代码行数:60,代码来源:adr_functions_armour_sets.php

示例5: message_die

     message_die(GENERAL_ERROR, 'Could not obtain a list of items', '', __LINE__, __FILE__, $sql);
 }
 $items = $db->sql_fetchrowset($result);
 $select_quantity = '<select name="quantity">';
 for ($i = 1; $i < 21; $i++) {
     $select_quantity .= '<option value="' . $i . '">' . $i . '</option>';
 }
 $select_quantity .= '</select>';
 $action_select = '<select name="mode">';
 $action_select .= '<option value = "">' . $lang['Adr_items_select_action'] . '</option>';
 $action_select .= '<option value = "give">' . $lang['Adr_items_give'] . '</option>';
 $action_select .= '</select>';
 for ($k = 0; $k < count($items); $k++) {
     $row_class = !($k % 2) ? $theme['td_class1'] : $theme['td_class2'];
     $item_image = $adr_image_path . $items[$k]['spell_icon'];
     $template->assign_block_vars('view_store.items', array("ROW_CLASS" => $row_class, "ITEM_ID" => $items[$k]['spell_id'], "ITEM_NAME" => adr_get_lang($items[$k]['spell_name']), "ITEM_DESC" => adr_get_lang($items[$k]['spell_desc']), "ITEM_IMG" => $item_image, "ITEM_TYPE" => $lang[$items[$k]['item_type_lang']], "ITEM_POWER" => $items[$k]['spell_power'], "SELECT_QUANTITY" => $select_quantity));
 }
 // Check if power limit is enabled
 if ($adr_general['item_power_level'] == 1) {
     $lang_power = $lang['Adr_items_level'];
 } else {
     $lang_power = $lang['Adr_items_power'];
 }
 $cat_sql = $cat ? 'AND item_type_use = ' . $cat : '';
 $sql = "SELECT count(*) AS total FROM " . ADR_SHOPS_SPELLS_TABLE . " \r\n\t\tWHERE spell_owner_id = 1 \r\n\t\t{$cat_sql}";
 if (!($result = $db->sql_query($sql))) {
     message_die(GENERAL_ERROR, 'Error getting total number of items', '', __LINE__, __FILE__, $sql);
 }
 if ($total = $db->sql_fetchrow($result)) {
     $total_items = $total['total'];
     $pagination = generate_pagination("admin_adr_give_users_spells.{$phpEx}?mode2={$mode2}&amp;order={$sort_order}", $total_items, $board_config['topics_per_page'], $start) . '&nbsp;';
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:admin_adr_give_users_spells.php

示例6: ON

                 break;
         }
         $sql = "SELECT i.* , q.item_quality_lang , t.item_type_lang FROM " . ADR_SHOPS_ITEMS_TABLE . " i\n\t\t\t\tLEFT JOIN " . ADR_SHOPS_ITEMS_QUALITY_TABLE . " q ON ( i.item_quality = q.item_quality_id )\n\t\t\t\tLEFT JOIN " . ADR_SHOPS_ITEMS_TYPE_TABLE . " t ON ( i.item_type_use = t.item_type_id )\n\t\t\t\tWHERE i.item_owner_id = '{$user_id}'\n\t\t\t\t{$cat_sql}\n\t\t\t\tORDER BY {$order_by}";
         if (!($result = $db->sql_query($sql))) {
             message_die(GENERAL_ERROR, 'Could not query WH items', '', __LINE__, __FILE__, $sql);
         }
         $action_select = '<select name="mode">';
         $action_select .= '<option value = "">' . $lang['Adr_items_select_action'] . '</option>';
         $action_select .= '<option value = "delete_item">' . $lang['Delete'] . '</option>';
         $action_select .= '<option value = "delete_inventory">' . $lang['Adr_delete_inventory'] . '</option>';
         $action_select .= '</select>';
         if ($row = $db->sql_fetchrow($result)) {
             $i = 0;
             do {
                 $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
                 $template->assign_block_vars('inventory.items', array("ROW_CLASS" => $row_class, "ITEM_ID" => $row['item_id'], "ITEM_NAME" => adr_get_lang($row['item_name']), "ITEM_DESC" => adr_get_lang($row['item_desc']), "ITEM_IMG" => $row['item_icon'], "ITEM_QUALITY" => $lang[$row['item_quality_lang']], "ITEM_TYPE" => $lang[$row['item_type_lang']], "ITEM_DURATION" => $row['item_duration'], "ITEM_DURATION_MAX" => $row['item_duration_max'], "ITEM_POWER" => $row['item_power'], "ITEM_PRICE" => $row['item_price']));
                 $i++;
             } while ($row = $db->sql_fetchrow($result));
         }
         $cat_sql = $cat ? 'AND item_type_use = ' . $cat : '';
         $sql = "SELECT count(*) AS total FROM " . ADR_SHOPS_ITEMS_TABLE . " \n\t\t\t\tWHERE item_owner_id = '{$user_id}'\n\t\t\t\t{$cat_sql}\n\t\t\t\tAND item_duration > '0'";
         if (!($result = $db->sql_query($sql))) {
             message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
         }
         if ($total = $db->sql_fetchrow($result)) {
             $total_items = $total['total'];
             $pagination = generate_pagination("admin_adr_users.{$phpEx}?mode=inventory&amp;order={$sort_order}&amp;cat={$cat}&amp;user_id=" . $user_id . "", $total_items, $board_config['topics_per_page'], $start) . '&nbsp;';
         }
         $template->assign_vars(array('ORDER_BY' => $order_by, 'ACTION_SELECT' => $action_select, 'SELECT_CAT' => $select_category, 'SELECT_QUANTITY' => $select_quantity, 'SHOP_OWNER_ID' => $shop_owner, 'OWNER_S' => $lang['Adr_warehouse_s'], 'WAREHOUSE_NAME' => $lang['Adr_warehouse_name'], 'OWNER_NAME' => $userdata['username'], 'OWNER_NAME' => $other_user_infos['character_name'], 'INVENTORY_NAME' => $lang['Adr_character_inventory_title'], 'L_CHECK_ALL' => $lang['Adr_check_all'], 'L_UNCHECK_ALL' => $lang['Adr_uncheck_all'], "L_SELECT_CAT" => $lang['Adr_items_select'], "L_SELECT_QUANTITY" => $lang['Adr_items_select_quantity'], "L_ITEM_NAME" => $lang['Adr_shops_categories_item_name'], "L_ITEM_DESC" => $lang['Adr_shops_categories_item_desc'], "L_ITEM_QUALITY" => $lang['Adr_items_quality'], "L_ITEM_POWER" => $lang['Adr_items_power'], "L_ITEM_DURATION" => $lang['Adr_items_duration'], "L_ACTION" => $lang['Adr_items_action'], "L_ITEM_IMG" => $lang['Adr_races_image'], "L_ITEM_PRICE" => $lang['Adr_items_price'], "L_ITEM_TYPE" => $lang['Adr_items_type_use'], "L_NO_ITEMS" => $lang['Adr_items_none'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_ORDER' => $lang['Order'], 'L_SORT' => $lang['Sort'], 'L_SUBMIT' => $lang['Submit'], 'S_MODE_SELECT' => $select_sort_mode, 'S_ORDER_SELECT' => $select_sort_order, 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $board_config['topics_per_page']) + 1, ceil($total_items / $board_config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page'], 'S_MODE_ACTION' => append_sid("admin_adr_users.{$phpEx}?mode=inventory")));
         break;
 }
开发者ID:ZerGabriel,项目名称:adr-rpg,代码行数:31,代码来源:admin_adr_users.php

示例7: adr_attack_weap

function adr_attack_weap()
{
    global $monster, $bat, $adr_user, $opponent_element, $item, $db, $lang, $user_id, $power, $crit_result;
    global $challenger, $battle_message, $user_action, $monster_action, $attack_img, $attackwith_overlay;
    global $damage, $dice;
    // weaprof
    $attbonus = adr_weapon_skill_check($user_id);
    if ($diff === TRUE && $dice != '1' || $dice >= $threat_range) {
        // Prefix msg if crit hit
        $battle_message .= $crit_result === TRUE ? '<br>' . $lang['Adr_battle_critical_hit'] . '</b><br />' : '';
        $damage = adr_calc_item_damage($item, $power, $attbonus);
        $damage = $damage > $bat['battle_opponent_hp'] ? $bat['battle_opponent_hp'] : $damage;
        // V: fix element
        $element_name = adr_get_element_infos($item['item_element']);
        // Here we apply text colour if set
        if ($element_name['element_colour'] != '') {
            $item['item_name'] = '<span style="color: ' . $element_name['element_colour'] . '">' . $item['item_name'] . '</span>';
        } else {
            $item['item_name'] = $item['item_name'];
        }
        // Fix attack msg type
        if ($item['item_element'] > '0' && $element_name['element_name'] != '') {
            $battle_message .= sprintf($lang['Adr_battle_attack_success'], $challenger['character_name'], $monster['monster_name'], $item['item_name'], adr_get_lang($element_name['element_name']), floor($attbonus), $damage) . '<br>';
        } else {
            $battle_message .= sprintf($lang['Adr_battle_attack_success_norm'], $challenger['character_name'], $monster['monster_name'], $item['item_name'], floor($attbonus), $damage) . '<br>';
        }
    } else {
        $damage = 0;
        $battle_message .= sprintf($lang['Adr_battle_attack_failure'], $challenger['character_name'], $monster['monster_name'], $item['item_name']) . '<br>';
    }
}
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:adr_functions_refactor_battle_item_types.php

示例8: adr_get_lang

            $armor_pic = $items[$i]['item_icon'];
        }
        if ($items[$i]['item_type_use'] == 8 && $items[$i]['item_id'] == $equip_buckler) {
            $buckler_list = adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $items[$i]['item_power'] . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )';
            $buckler_pic = $items[$i]['item_icon'];
        }
        if ($items[$i]['item_type_use'] == 9 && $items[$i]['item_id'] == $equip_helm) {
            $helm_list = adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $items[$i]['item_power'] . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )';
            $helm_pic = $items[$i]['item_icon'];
        }
        if ($items[$i]['item_type_use'] == 10 && $items[$i]['item_id'] == $equip_gloves) {
            $gloves_list = adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $items[$i]['item_power'] . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )';
            $gloves_pic = $items[$i]['item_icon'];
        }
        if ($items[$i]['item_type_use'] == 13 && $items[$i]['item_id'] == $equip_amulet) {
            $amulet_list = adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $items[$i]['item_power'] . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )';
            $amulet_pic = $items[$i]['item_icon'];
        }
        if ($items[$i]['item_type_use'] == 14 && $items[$i]['item_id'] == $equip_ring) {
            $ring_list = adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $items[$i]['item_power'] . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )';
            $ring_pic = $items[$i]['item_icon'];
        }
    }
}
$template->assign_vars(array('ARMOR_IMG' => $armor_pic, 'BUCKLER_IMG' => $buckler_pic, 'HELM_IMG' => $helm_pic, 'GLOVES_IMG' => $gloves_pic, 'AMULET_IMG' => $amulet_pic, 'RING_IMG' => $ring_pic, 'SELECT_ARMOR' => $armor_list, 'SELECT_BUCKLER' => $buckler_list, 'SELECT_HELM' => $helm_list, 'SELECT_GLOVES' => $gloves_list, 'SELECT_AMULET' => $amulet_list, 'SELECT_RING' => $ring_list, 'L_EQUIPMENT' => $equip_title, 'L_SELECT_ARMOR' => $equip_larmor, 'L_SELECT_BUCKLER' => $equip_lbuckler, 'L_SELECT_HELM' => $equip_lhelm, 'L_SELECT_GLOVES' => $equip_lgloves, 'L_SELECT_AMULET' => $equip_lamulet, 'L_SELECT_RING' => $equip_lring, 'L_EQUIP' => $lang['Adr_equip']));
include $phpbb_root_path . 'adr/includes/adr_header.' . $phpEx;
$template->pparse('body');
include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
?>
 
开发者ID:ZerGabriel,项目名称:adr-rpg,代码行数:29,代码来源:adr_character_equipment.php

示例9: switch

} else {
    $mode = "";
}
if ($mode != "") {
    switch ($mode) {
        case 'lumberjacking':
            $template->assign_block_vars('lumberjacking', array());
            $sql = " SELECT * FROM " . ADR_SHOPS_ITEMS_TABLE . "\r\n\t\t\t\tWHERE item_owner_id = {$user_id}\r\n\t\t\t\tAND item_in_shop = 0\r\n\t\t\t\tAND item_in_warehouse = 0\r\n\t\t\t\tAND item_duration > 0\r\n\t\t\t\tAND item_type_use = 37 ";
            if (!($result = $db->sql_query($sql))) {
                message_die(GENERAL_ERROR, 'Could not check user tools', "", __LINE__, __FILE__, $sql);
            }
            $tools = $db->sql_fetchrowset($result);
            $tool_list = '<select name="item_tool">';
            $tool_list .= '<option value = "0" >' . $lang['Adr_forge_lumberjack_no_tool'] . '</option>';
            for ($i = 0; $i < count($tools); $i++) {
                $tool_list .= '<option value = "' . $tools[$i]['item_id'] . '" >' . adr_get_lang($tools[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $tools[$i]['item_power'] . ' - ' . $lang['Adr_items_duration'] . ' : ' . $tools[$i]['item_duration'] . ' )' . '</option>';
            }
            $tool_list .= '</select>';
            $template->assign_vars(array('TOOL_LIST' => $tool_list, 'L_SELECT_TOOL' => $lang['Adr_forge_lumberjack_select_tool'], 'L_GO_LUMBERJACK' => $lang['Adr_forge_lumberjack_go'], 'L_LUMBERJACK_EXPLAIN' => $lang['Adr_forge_lumberjack_explain']));
            break;
        case 'lumberjack_action':
            $tool = intval($HTTP_POST_VARS['item_tool']);
            // No tool , no lumberjacking
            if (!$tool) {
                adr_previous(Adr_forge_lumberjack_tool_needed, adr_lumberjack, "mode=lumberjacking");
            } else {
                //Tool gets used even if character doesn't find anything
                adr_use_item($tool, $user_id);
                $item = drop_gather_loot($actual_zone, $user_id, 'herbalism', 8);
                if (!$item) {
                    include $phpbb_root_path . 'adr/includes/adr_header.' . $phpEx;
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:adr_lumberjack.php

示例10: isset

            $combine_result = isset($HTTP_POST_VARS['item_created']) ? trim($HTTP_POST_VARS['item_created']) : trim($HTTP_GET_VARS['item_created']);
            $new_id = $fields_data['pack_id'] + 1;
            if ($combine1 == '0' || $combine2 == '0' || $combine3 == '0' || $combine_result == '0') {
                message_die(MESSAGE, $lang['Fields_empty']);
            }
            $sql = "INSERT INTO " . ADR_CAULDRON_TABLE . " \r\n\t\t\t\t( pack_id , item1_id , item2_id ,  item3_id , itemwin_id )\r\n\t\t\t\tVALUES ( {$new_id},'" . intval($combine1) . "', '" . intval($combine2) . "' , '" . intval($combine3) . "' , '" . intval($combine_result) . "' )";
            $result = $db->sql_query($sql);
            if (!$result) {
                message_die(GENERAL_ERROR, "Couldn't insert new cauldron pack", "", __LINE__, __FILE__, $sql);
            }
            adr_previous(Adr_cauldron_pack_successful_added, admin_adr_cauldron, '');
            break;
    }
} else {
    adr_template_file('admin/config_adr_cauldron_list_body.tpl');
    $template->assign_vars(array('LINK' => 'admin_adr_cauldron.' . $phpEx . '?mode=add&sid=' . $userdata['session_id']));
    $sql = "SELECT *\r\n\t\tFROM " . ADR_CAULDRON_TABLE;
    $result = $db->sql_query($sql);
    if (!$result) {
        message_die(GENERAL_ERROR, 'Could not obtain cauldron pack information', "", __LINE__, __FILE__, $sql);
    }
    $cauldron_pack = $db->sql_fetchrowset($result);
    for ($i = 0; $i < count($cauldron_pack); $i++) {
        $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
        // V: annoyingly enough, we need to call adr_get_item/adr_get_lang (I added it) here.. :(
        $template->assign_block_vars("cauldron", array("ROW_CLASS" => $row_class, "ITEM_CREATED" => adr_get_lang(adr_get_item($cauldron_pack[$i]['itemwin_id'])['item_name']), "ITEM_COMBINE1" => adr_get_lang(adr_get_item($cauldron_pack[$i]['item1_id'])['item_name']), "ITEM_COMBINE2" => adr_get_lang(adr_get_item($cauldron_pack[$i]['item2_id'])['item_name']), "ITEM_COMBINE3" => adr_get_lang(adr_get_item($cauldron_pack[$i]['item3_id'])['item_name']), "U_CAULDRON_EDIT" => append_sid("admin_adr_cauldron.{$phpEx}?mode=edit&amp;id=" . $cauldron_pack[$i]['pack_id']), "U_CAULDRON_DELETE" => append_sid("admin_adr_cauldron.{$phpEx}?mode=delete&amp;id=" . $cauldron_pack[$i]['pack_id'])));
    }
    $template->assign_vars(array("L_CAULDRON_TITLE" => $lang['Adr_cauldron'], "L_CAULDRON_TEXT" => $lang['Adr_cauldron_explain'], "L_ITEM_CREATED" => $lang['Adr_item_created_name'], "L_ITEM_COMBINE1" => $lang['Adr_item1_combine_name'], "L_ITEM_COMBINE2" => $lang['Adr_item2_combine_name'], "L_ITEM_COMBINE3" => $lang['Adr_item3_combine_name'], "L_CAULDRON_ADD" => $lang['Adr_cauldron_add'], "L_ACTION" => $lang['Action'], "L_DELETE" => $lang['Delete'], "L_EDIT" => $lang['Edit'], "L_SUBMIT" => $lang['Submit'], "S_CAULDRON_ACTION" => append_sid("admin_adr_cauldron.{$phpEx}")));
    $template->pparse("body");
}
include_once './page_footer_admin.' . $phpEx;
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:admin_adr_cauldron.php

示例11: adr_get_lang

     }
     if ($items[$i]['item_type_use'] == 9) {
         $helm_selected = $equip_helm == $items[$i]['item_id'] ? 'selected' : '';
         $helm_list .= '<option value = "' . $items[$i]['item_id'] . '" ' . $helm_selected . '>' . adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $item_power . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )' . '</option>';
     }
     if ($items[$i]['item_type_use'] == 10) {
         $gloves_selected = $equip_gloves == $items[$i]['item_id'] ? 'selected' : '';
         $gloves_list .= '<option value = "' . $items[$i]['item_id'] . '" ' . $gloves_selected . '>' . adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $item_power . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )' . '</option>';
     }
     if ($items[$i]['item_type_use'] == 13) {
         $amulet_selected = $equip_amulet == $items[$i]['item_id'] ? 'selected' : '';
         $amulet_list .= '<option value = "' . $items[$i]['item_id'] . '" ' . $amulet_selected . '>' . adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $item_power . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )' . '</option>';
     }
     if ($items[$i]['item_type_use'] == 14) {
         $ring_selected = $equip_ring == $items[$i]['item_id'] ? 'selected' : '';
         $ring_list .= '<option value = "' . $items[$i]['item_id'] . '" ' . $ring_selected . '>' . adr_get_lang($items[$i]['item_name']) . ' ( ' . $lang['Adr_items_power'] . ' : ' . $item_power . ' - ' . $lang['Adr_items_duration'] . ' : ' . $items[$i]['item_duration'] . ' )' . '</option>';
     }
 }
 $armor_list .= '</select>';
 $buckler_list .= '</select>';
 $helm_list .= '</select>';
 $gloves_list .= '</select>';
 $amulet_list .= '</select>';
 $ring_list .= '</select>';
 $sql = " SELECT * FROM " . ADR_BATTLE_PVP_TABLE . "\n\t\t\t\tWHERE ( battle_result = 0 OR battle_result = 3 )\n\t\t\t\tAND ( battle_opponent_id = {$user_id}\tOR battle_challenger_id = {$user_id} ) ";
 if (!($result = $db->sql_query($sql))) {
     message_die(GENERAL_ERROR, 'Could not obtain user list', '', __LINE__, __FILE__, $sql);
 }
 $targets = $db->sql_fetchrowset($result);
 $ever = '(';
 for ($i = 0; $i < count($targets); $i++) {
开发者ID:ZerGabriel,项目名称:adr-rpg,代码行数:31,代码来源:adr_character_pvp.php

示例12: adr_steal_item


//.........这里部分代码省略.........
        adr_previous(Adr_store_not_stealable, adr_shops);
    }
    // Check for successful steal or not
    $success = adr_use_skill_thief($user_id, $item_data['item_steal_dc']);
    if ($success == TRUE) {
        // Make the new id for the item
        $sql = "SELECT item_id FROM " . ADR_SHOPS_ITEMS_TABLE . "\n\t\t\tWHERE item_owner_id = '{$user_id}'\n\t\t\tORDER BY item_id\n\t\t\tDESC LIMIT 1";
        $result = $db->sql_query($sql);
        if (!$result) {
            message_die(GENERAL_ERROR, 'Could not obtain item information', "", __LINE__, __FILE__, $sql);
        }
        $data = $db->sql_fetchrow($result);
        $new_item_id = $data['item_id'] + 1;
        if ($shop_owner_id != '1') {
            // This will never be TRUE as of v0.4.3 because there is no player store stealing allowed
            $sql = "UPDATE " . ADR_SHOPS_ITEMS_TABLE . "\n\t\t\t\tSET item_owner_id = {$user_id},\n\t\t\t\t\titem_id = {$new_item_id},\n\t\t\t\t\titem_bought_timestamp = " . time() . ",\n\t\t\t\t\titem_in_shop = '0', \n\t\t\t\t\titem_auth = '0'\n\t\t\t\t\titem_stolen_by = '',\n\t\t\t\t\titem_stolen_timestamp = " . time . "\n\t\t\t\tWHERE item_owner_id = '{$shop_owner_id}'\n\t\t\t\tAND item_id = '{$item_id}'";
            $result = $db->sql_query($sql);
            if (!$result) {
                message_die(GENERAL_ERROR, 'Could not obtain shops items information', "", __LINE__, __FILE__, $sql);
            }
        } else {
            // Insert item details
            $type = 1;
            //This is so the insert function knows that this is a stolen item for update purposes only (optional function variable)
            adr_shop_insert_item($item_id, $new_item_id, $user_id, $shop_owner_id, $type, $shop_id);
        }
        adr_thief_limit($user_id);
        adr_store_stats_update_steal($success, $user_id, $shop_owner_id, $store_id);
        $message = sprintf($lang['Adr_steal_item_success'], $sum, $points_name);
        $message .= '<br /><br />' . sprintf($lang['Adr_return'], "<a href=\"" . $direction . "\">", "</a>");
        message_die(GENERAL_MESSAGE, $message);
    } else {
        $message = sprintf($lang['Adr_steal_item_failure'], $sum, $points_name);
        if ($adr_general['skill_thief_failure_damage']) {
            // Select the item price
            $shop_more_sql = $shop_owner_id != 1 ? 'AND i.item_in_shop = 1' : '';
            // Prevents users to buy items not in shops
            $sql = "SELECT i.item_price, i.item_name, u.user_points FROM " . ADR_SHOPS_ITEMS_TABLE . " i , " . USERS_TABLE . " u\n\t\t\t\tWHERE i.item_owner_id = {$shop_owner_id}\n\t\t\t\t\tAND u.user_id = {$user_id}\n\t\t\t\t\tAND i.item_id = {$item_id} \n\t\t\t\t{$shop_more_sql} ";
            $result = $db->sql_query($sql);
            if (!$result) {
                message_die(GENERAL_ERROR, 'Could not obtain shops items information', "", __LINE__, __FILE__, $sql);
            }
            $data = $db->sql_fetchrow($result);
            $user_points = $data['user_points'];
            $price = $data['item_price'];
            $fine = $price < intval($adr_general['skill_thief_failure_damage']) ? intval($adr_general['skill_thief_failure_damage']) : $price;
            if ($fine > $user_points && $adr_general['skill_thief_failure_punishment']) {
                $sql = " SELECT owner_id , account_sum FROM " . ADR_VAULT_USERS_TABLE . "\n\t\t\t\t\t\tWHERE owner_id = {$user_id} ";
                if (!($result = $db->sql_query($sql))) {
                    message_die(GENERAL_ERROR, 'Could not query user stats page', '', __LINE__, __FILE__, $sql);
                }
                $vault_sum = $db->sql_fetchrow($result);
                if ($adr_general['skill_thief_failure_punishment'] == 1) {
                    if (is_numeric($vault_sum['owner_id']) && $vault_sum['account_sum'] >= $fine) {
                        $vault_fine = $fine;
                        $fine = 0;
                        // Remove cash from Vault instead
                        $sql = "UPDATE " . ADR_VAULT_USERS_TABLE . "\n\t\t\t\t\t\t\tSET account_sum = account_sum - {$vault_fine}\n\t\t\t\t\t\t\tWHERE owner_id = {$user_id} ";
                        if (!$db->sql_query($sql)) {
                            message_die(GENERAL_ERROR, 'Could not update user points from Vault', "", __LINE__, __FILE__, $sql);
                        }
                    } elseif (is_numeric($vault_sum['owner_id']) && $vault_sum['account_sum'] > 0 && $vault_sum['account_sum'] < $fine) {
                        $vault_fine = $vault_sum['account_sum'];
                        $fine = 0;
                        // Remove cash from Vault instead
                        $sql = "UPDATE " . ADR_VAULT_USERS_TABLE . "\n\t\t\t\t\t\t\tSET account_sum = account_sum - {$vault_fine}\n\t\t\t\t\t\t\tWHERE owner_id = {$user_id} ";
                        if (!$db->sql_query($sql)) {
                            message_die(GENERAL_ERROR, 'Could not update user points from Vault', "", __LINE__, __FILE__, $sql);
                        }
                    } else {
                        $fine = $user_points;
                        $vault_fine = 0;
                    }
                } else {
                    if ($adr_general['skill_thief_failure_punishment'] == 2) {
                        adr_cell_imprison_user($user_id, 0, $adr_general['skill_thief_failure_time'], 0, $price, 1, 1, $lang['Adr_steal_item_failure_critical_all_sentence'], $adr_general['skill_thief_failure_type']);
                        $failure[0] = $lang['Adr_steal_item_failure_critical_all'];
                        $failure[1] = $lang['Adr_steal_item_failure_critical_post'];
                        $failure[2] = $lang['Adr_steal_item_failure_critical_read'];
                        $fail = $failure[$adr_general['skill_thief_failure_type']];
                        $fail_message = sprintf($lang['Adr_steal_item_failure_critical'], '<b>', adr_get_lang($data['item_name']), '</b>') . '<br /><br />' . $fail;
                        $fail_message .= '<br /><br />' . sprintf($lang['Adr_return'], "<a href=\"" . $direction . "\">", "</a>");
                        message_die(GENERAL_MESSAGE, $fail_message);
                    }
                }
            }
            adr_thief_limit($user_id);
            adr_store_stats_update_steal($success, $user_id, $shop_owner_id, $store_id);
            subtract_reward($user_id, $fine);
        }
        if ($fine != 0) {
            $fine = $fine;
        } else {
            $fine = $vault_fine;
        }
        $message .= '<br /><br />' . sprintf($lang['Adr_steal_item_failure_suite'], $fine, $points_name);
        $message .= '<br /><br />' . sprintf($lang['Adr_return'], "<a href=\"" . $direction . "\">", "</a>");
        message_die(GENERAL_MESSAGE, $message);
    }
}
开发者ID:ZerGabriel,项目名称:adr-rpg,代码行数:101,代码来源:adr_functions_shops.php

示例13: ON

    default:
        $order_by = "c.character_name {$sort_order} LIMIT {$start}, " . $board_config['topics_per_page'];
        break;
}
$sql = "SELECT c.*, j.*, u.user_id FROM " . ADR_CHARACTERS_TABLE . " c\r\n\t\tLEFT JOIN " . ADR_JOB_TABLE . " j ON ( j.job_id = c.character_job_id )\r\n\t\tLEFT JOIN " . USERS_TABLE . " u ON ( u.user_id = c.character_id )\r\n\t\tWHERE c.character_job_id <> 0\r\n\t\tORDER BY {$order_by}";
if (!($result = $db->sql_query($sql))) {
    message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
if ($row = $db->sql_fetchrow($result)) {
    $i = 0;
    do {
        $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2'];
        $image = $row['job_img'] != '' ? '<img src="adr/images/jobs/' . $row['job_img'] . '">' : '';
        $completed = $row['character_job_completed'] != 0 ? round($row['character_job_completed'] / $row['character_job_times_employed'] * 100) : 0;
        $days_remaining = ceil(($row['character_job_end'] - time()) / 86400);
        $template->assign_block_vars('characters', array("ROW_CLASS" => $row_class, "JOB_NAME" => adr_get_lang($row['job_name']), "JOB_SALARY" => number_format($row['job_salary']), "JOB_TOTAL_EARNED" => number_format($row['character_job_total_earned']), "JOB_IMG" => $image, "CHARACTER_NAME" => $row['character_name'], "CHARACTER_LEVEL" => $row['character_level'], "CHARACTER_DURATION" => $days_remaining, "CHARACTER_TOTAL_JOBS" => $row['character_job_times_employed'], "CHARACTER_COMPLETED" => $completed, "U_CHARACTER_NAME" => append_sid("adr_character.{$phpEx}?" . POST_USERS_URL . "=" . $row['user_id'])));
        $i++;
    } while ($row = $db->sql_fetchrow($result));
}
$sql = "SELECT count(*) AS total FROM " . ADR_CHARACTERS_TABLE . "\r\n\t\tWHERE character_job_id <> 0";
if (!($result = $db->sql_query($sql))) {
    message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
}
if ($total = $db->sql_fetchrow($result)) {
    $total_users = $total['total'];
    $pagination = generate_pagination("adr_character_jobs.{$phpEx}?" . POST_USERS_URL . "={$searchid}&amp;mode2={$mode2}&amp;order={$sort_order}", $total_users, $board_config['topics_per_page'], $start) . '&nbsp;';
}
$template->assign_vars(array('POINTS' => $board_config['points_name'], 'L_CHARACTER_NAME' => $lang['Adr_character'], 'L_LEVEL' => $lang['Adr_character_level'], 'L_JOB_NAME' => $lang['Adr_job_list_name'], 'L_JOB_COMPLETED' => $lang['Adr_job_list_completed'], 'L_JOB_TOTAL_EARNED' => $lang['Adr_job_list_total_earnings'], 'L_JOB_SALARY' => $lang['Adr_job_list_salary'], 'L_JOB_DURATION' => $lang['Adr_job_list_duration'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_ORDER' => $lang['Order'], 'L_SORT' => $lang['Sort'], 'S_MODE_SELECT' => $select_sort_mode, 'S_ORDER_SELECT' => $select_sort_order, 'PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $board_config['topics_per_page']) + 1, ceil($total_users / $board_config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page'], "S_LIST_ACTION" => append_sid("adr_character_jobs.{$phpEx}?" . POST_USERS_URL . "={$searchid}&amp;mode2={$mode2}&amp;order={$sort_order}"), "S_HIDDEN_FIELDS" => $s_hidden_fields));
include $phpbb_root_path . 'adr/includes/adr_header.' . $phpEx;
$template->pparse('body');
include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:adr_character_jobs.php

示例14: adr_display_poster_infos


//.........这里部分代码省略.........
                        for ($pvp = 0; $pvp < count($pvp_info); $pvp++) {
                            if (($pvp_info[$pvp]['battle_opponent_id'] == $userdata['user_id'] || $pvp_info[$pvp]['battle_challenger_id'] == $userdata['user_id']) && ($pvp_info[$pvp]['battle_result'] == '0' || $pvp_info[$pvp]['battle_result'] == '3')) {
                                $total_battles = $total_battles + 1;
                                if (!$pvp_info[$pvp]['battle_opponent_id']) {
                                    break;
                                }
                            }
                        }
                        $total = $total_battles;
                        if ($adr_general['battle_pvp_defies_max'] >= $total && $adr_general['battle_pvp_defies_max'] && $poster_id != $userdata['user_id']) {
                            $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_pvp_post_text'] . ':&nbsp;<a href="' . append_sid("adr_character_pvp.{$phpEx}?mode=defy_action&amp;defied=" . $poster_id) . '" target="_parent">' . $lang['Adr_pvp_post_attack'] . '</a><br />';
                        }
                    }
                }
                #==== Close 2nd if statement
            }
            #==== End of pvp check
            if (!empty($topic_config[8])) {
                $adr_topic_box .= '<br>' . $lang['Adr_character_battle_stats_title'] . ':<br>';
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_monster_list_hp'] . ': ' . $character_info[$adr]['character_hp'] . '/' . $character_info[$adr]['character_hp_max'] . '<br>';
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_monster_list_mp'] . ': ' . $character_info[$adr]['character_mp'] . '/' . $character_info[$adr]['character_mp_max'] . '<br>';
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_monster_list_att'] . ':&nbsp;' . adr_battle_make_att($character_info[$adr]['character_might'], $character_info[$adr]['character_dexterity']) . '<br>';
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_monster_list_def'] . ':&nbsp;' . adr_battle_make_def($character_info[$adr]['character_ac'], $character_info[$adr]['character_dexterity']) . '<br>';
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_monster_list_ma'] . ':&nbsp;' . adr_battle_make_magic_att($character_info[$adr]['character_intelligence']) . '<br>';
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_monster_list_md'] . ':&nbsp;' . adr_battle_make_magic_def($character_info[$adr]['character_wisdom']) . '<br>';
            }
            if ($topic_config[1] || $topic_config[2] || $topic_config[3] || $topic_config[4]) {
                $adr_topic_box .= '<br>' . $lang['Adr_character_characteristics'] . ':<br>';
            }
            if ($topic_config[1]) {
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_topics_class'] . ':&nbsp;&nbsp;';
                for ($class = 0; $class < count($class_info); $class++) {
                    if ($character_info[$adr]['character_class'] == $class_info[$class]['class_id']) {
                        $class_lang = adr_get_lang($class_info[$class]['class_name']);
                        $class_img = $class_info[$class]['class_img'];
                        break;
                    }
                }
                if ($topic_config[1] == '1') {
                    $adr_topic_box .= $class_lang;
                } else {
                    $adr_topic_box .= '<img src="adr/images/classes/' . $class_img . '">';
                }
                $adr_topic_box .= '<br />';
            }
            #==== Close topic_config[1] if statement
            if ($topic_config[2]) {
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_topics_race'] . ':&nbsp;&nbsp;';
                for ($race = 0; $race < count($race_info); $race++) {
                    if ($character_info[$adr]['character_race'] == $race_info[$race]['race_id']) {
                        $race_lang = adr_get_lang($race_info[$race]['race_name']);
                        $race_img = $race_info[$race]['race_img'];
                        break;
                    }
                }
                if ($topic_config[2] == '1') {
                    $adr_topic_box .= $race_lang;
                } else {
                    $adr_topic_box .= '<img src="adr/images/races/' . $race_img . '">';
                }
                $adr_topic_box .= '<br />';
            }
            #==== Close topic_config[2] if statement
            if ($topic_config[3]) {
                $adr_topic_box .= '&nbsp;&nbsp;' . $lang['Adr_topics_element'] . ':&nbsp;&nbsp;';
                for ($elements = 0; $elements < count($element_info); $elements++) {
开发者ID:Nekrofage,项目名称:FJR,代码行数:67,代码来源:adr_functions_alone.php

示例15: array

 }
 if ($row['item_restrict_con'] > '0') {
     // Constitution restriction. Has to be more than 0 otherwise pointless restriction
     $char_resist_list .= $lang['Adr_char_con'] . ' [' . $row['item_restrict_con'] . ']; ';
 }
 if ($row['item_restrict_int'] > '0') {
     // Intelligence restriction. Has to be more than 0 otherwise pointless restriction
     $char_resist_list .= $lang['Adr_char_int'] . ' [' . $row['item_restrict_int'] . ']; ';
 }
 if ($row['item_restrict_wis'] > '0') {
     // Wisdom restriction. Has to be more than 0 otherwise pointless restriction
     $char_resist_list .= $lang['Adr_char_wis'] . ' [' . $row['item_restrict_wis'] . ']; ';
 }
 if ($row['item_restrict_cha'] > '0') {
     // Charisma restriction. Has to be more than 0 otherwise pointless restriction
     $char_resist_list .= $lang['Adr_char_cha'] . ' [' . $row['item_restrict_cha'] . ']';
 }
 if ($row['item_restrict_level'] > '1' || $row['item_restrict_str'] > '0' || $row['item_restrict_dex'] > '0' || $row['item_restrict_con'] > '0' || $row['item_restrict_int'] > '0' || $row['item_restrict_wis'] > '0' || $row['item_restrict_cha'] > '0') {
     $template->assign_block_vars('main.items.resist_chars', array("CHAR_RESIST_LIST" => $char_resist_list, "L_CHAR_RESIST_LIST" => $lang['Adr_char_restrict_title']));
 }
 ##=== END: Show any level or characteristic restrictions for this item
 ##=== START: Show stolen info
 if ($row['item_stolen_id'] > '0') {
     // Loop through the shop infos array and grab info
     for ($s = 0; $s < count($shop_info); $s++) {
         if ($row['item_stolen_id'] == $shop_info[$s]['shop_id']) {
             $shop_name = $shop_info[$s]['shop_name'];
         }
     }
     // Make sure we have a shop name!
     $shop_name = $shop_name == '' ? 'Unknown' : adr_get_lang($shop_name);
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:adr_character_inventory.php


注:本文中的adr_get_lang函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。