Klar, aber es ist noch mehr drinnen:
#
#--------------[ FIND ]-------------
#
VALUES ( $user_id , '" . str_replace("\'", "''", $name )
'
#
#--------------[ FIND ]-------------
#
list($thief_percent_width, $thief_percent_empty) = adr_make_bars($row['character_skill_thief_uses'], $skills[6]['skill_req'], '250');
#
#--------------[ AFTER, ADD ]-------------
# remember you $skills will be your next number
list($alchemy_percent_width, $alchemy_percent_empty) = adr_make_bars($row['character_skill_alchemy_uses'], $skills[12]['skill_req'], '250');
#
#--------------[ AFTER, ADD ]-------------
#
# Note: This Code is based off cedô l'immortel's Mine Modification
# Note: Also if you are useing a different ID for the type_alchemy, then
# you have to replace 47 in this example
# The two lines in the function are:
#
# $new_item_type = ( $happiness > 9 ) ? 47 : 47;
#
# and
#
# if($new_item_type==47)
# remember you $skills will be your next number
function adr_use_skill_alchemy($user_id , $tool)
{
global $db;
$user_id = intval($user_id);
$item_id=intval($item_id);
$tool = intval($tool);
$new_item_id = 0;
$adr_general = adr_get_general_config();
// START skill limit check
$sql = " SELECT character_skill_limit FROM " . ADR_CHARACTERS_TABLE . "
WHERE character_id = $user_id ";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query skill limit value', '', __LINE__, __FILE__, $sql);
}
$limit_check = $db->sql_fetchrow($result);
if ( $adr_general['Adr_character_limit_enable'] != 0 && $limit_check['character_skill_limit'] < 1 )
{
adr_previous( Adr_skill_limit , adr_alchemy , '' );
}
// END skill limit check
$sql = " SELECT * FROM " . ADR_SHOPS_ITEMS_TABLE . "
WHERE item_in_shop = 0
AND item_owner_id = $user_id
AND item_id = $tool ";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query tool informations', '', __LINE__, __FILE__, $sql);
}
$item = $db->sql_fetchrow($result);
if ( $item['item_duration'] < 0 )
{
adr_previous( Adr_forge_alchemy_broken , adr_alchemy , "mode=alchemy" );
}
[..]
case 1:
$item_name = 'Small Wooden Crate';
$item_desc = 'Basic small wooden crate';
$item_icon = 'alchemy/1.png';
$item_quality = rand(1,6);
$item_duration = 1;
$item_power = rand(1,3);
break;
[..]
}
}
}
return $new_item_id;
}
#
#--------------[ OPEN ]-------------
#
adr/cache/cache_item_type.php
#
#--------------[ FIND ]-------------
#
'17' => array('item_type_id' => '17', 'item_type_base_price' => '1', 'item_type_lang' => 'Adr_items_type_misc'),
#
#--------------[ AFTER, ADD ]-------------
#
# NOTE: Each of the lines below have 2 item ID's per line. You should change them to the Item ID's You have been useing
'47' => array('item_type_id' => '47', 'item_type_base_price' => '517', 'item_type_lang' => ', Adr_items_type_tools_alchemy'),
'48' => array('item_type_id' => '48', 'item_type_base_price' => '517', 'item_type_lang' => 'Adr_items_type_alchemy'),
#
#--------------[ OPEN ]-------------
#
adr/cache/cache_skills.php
#
#--------------[ FIND ]-------------
#
'6' => array('skill_id' => '6', 'skill_name' => 'Adr_thief', 'skill_desc' => 'Adr_skill_thief_desc', 'skill_img' => 'skill_thief.gif', 'skill_req' => '25', 'skill_chance' => '1'),
#
#--------------[ AFTER, ADD ]-------------
# remember you $skills will be your next number
'12' => array('skill_id' => '12', 'skill_name' => 'Adr_alchemy', 'skill_desc' => 'Adr_skill_alchemy_desc', 'skill_img' => 'skill_alchemy.gif', 'skill_req' => '60', 'skill_chance' => '10'),
Außerdem sollten nicht erkannte Befehle rot unterlegt werden.