User:Phenaxkian/blar


 * Okay, here we go; First of all we create some code to get the correct skill id, these functions will be used later as explained below. Simply add this code somewhere (preferably at the end) of gwbbcode.inc.php:

 // Skill ID conversion database $pvpSkillIds = array( 2657 => 415, 2852 => 79, 2853 => 39, 2855 => 176, 2856 => 562, 2857 => 257, 2858 => 348,   2859 => 2628, 2860 => 181, 2861 => 398, 2862 => 826, 2863 => 817, 2864 => 1191, 2865 => 1217,    2866 => 791, 2867 => 1246, 2868 => 792, 2869 => 1639, 2870 => 1367, 2871 => 1397, 2872 => 104,    2873 => 1484, 2874 => 1485, 2875 => 1549, 2876 => 1555, 2877 => 1564, 2878 => 1771, 2879 => 1596,    2880 => 1598, 2882 => 15, 2883 => 343, 2884 => 1516, 2885 => 118, 2887 => 294, 2888 => 1539,    2891 => 268, 2892 => 1114, 2893 => 793, 2895 => 2005, 2925 => 2069, 2959 => 1724, 2965 => 1239,    2966 => 1742, 2967 => 1520, 2969 => 432, 2998 => 19, 2999 => 243, 3002 => 374, 3003 => 1232,    3004 => 1238, 3005 => 911, 3006 => 871, 3007 => 3042, 3008 => 920, 3009 => 1266, 3010 => 1249,    3011 => 1250, 3012 => 1251, 3013 => 981, 3014 => 921, 3015 => 1252, 3016 => 982, 3017 => 923,    3018 => 963, 3019 => 1253, 3020 => 3043, 3021 => 1380, 3022 => 1734, 3023 => 1745, 3024 => 1747, 3025 => 1748, 3026 => 1558, 3027 => 1572, 3028 => 1575, 3029 => 1580, 3030 => 1778, 3031 => 1780,   3032 => 1589, 3033 => 1592, 3034 => 1781, 3035 => 1593, 3036 => 1594, 3037 => 1595, 3038 => 2205,    3039 => 2204, 3040 => 2018, 3045 => 436, 3047 => 429, 3048 => 1031, 3049 => 1041, 3050 => 1194,    3051 => 1202, 3052 => 1540, 3053 => 2186, 3054 => 2139, 3058 => 110, 3059 => 145, 3060 => 448,    3061 => 775, 3062 => 1577, 3063 => 17 );

function getSkillIdPvP( $pve ) {   return ( isset( $pvpSkillIds[ $pve ] ) ? $pvpSkillIds[ $pve ] : $pve ); } function getSkillIdPvE( $pvp ) {   $pveSkillIds = array_flip( $pvpSkillIds ); return ( isset( $pveSkillIds[ $pvp ] ) ? $pveSkillIds[ $pvp ] : $pvp ); }
 * Now we simply call those funtions at the correct place to translate the skill ids. The following changes do exactly that:
 * gwwbbcode.inc.php line 1594:

$skill_id = binval($reg2[1]);
 * change to:

$skill_id = getSkillIdPvP( binval($reg2[1]) );
 * gwwbbcode.inc.php line 612

$template .= int2bin($id, $skill_bit_size);
 * change to:

$template .= getSkillIdPvE( int2bin($id, $skill_bit_size) );
 * And that's basically all there is to do to translate it. Now there is only a simple database needed that keeps track of PvE->PvP skill id relations. I'll try to get that list compiled later. It then needs to be added somewhere at the top or in a separate file (which then get's included by ). I have included the complete array for the current skill balancing already in the code above. You can also move that array definition out of the file into something else (so you only have to update that file when something changes). The format of the array simply goes like this.
 * I have not tested the code, but I'm quite sure that it should work like this :) poke | talk 23:47, November 28, 2009 (UTC)