Please items for webshop season 6 ep 3
Hi I would like to ask you about the pictures for the webshop season 6 episode 3.
And I would like to ask if anyone have script for adding OPTION on the web I need help with one script for EnemyMuWeb. Items are displayed in a row beneath it and fail to display in my chest, I also have a problem when adding item option and empty sockets are displayed as full.
Here it is:
PHP Code:
<?php
include ("usernameaccess.php");
echo "<script type=\"text/javascript\">document.getElementById(\"h4\").innerHTML = \"Add Optinos in Items\"</script>
<input type='hidden' id='module_contet' value='Add Optinos in Items'>";
?>
<script type="text/javascript">
function harmonyselect(itemtype,itemlevel,harmonyoption)
{
var harmonyecho = "";
harmonyecho += "<select name=\"harmonyvalue\">";
if (itemtype < 5)
{
if (harmonyoption == 1)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Min. attack increase +2</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Min. attack increase +3</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Min. attack increase +4</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Min. attack increase +5</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Min. attack increase +6</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Min. attack increase +7</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Min. attack increase +9</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Min. attack increase +11</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Min. attack increase +12</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Min. attack increase +14</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Min. attack increase +15</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Min. attack increase +16</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Min. attack increase +17</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Min. attack increase +20</option>";
}
else if (harmonyoption == 2)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Max. attack increase +3</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Max. attack increase +4</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Max. attack increase +5</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Max. attack increase +6</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Max. attack increase +7</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Max. attack increase +8</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Max. attack increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Max. attack increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Max. attack increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Max. attack increase +17</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Max. attack increase +20</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Max. attack increase +23</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Max. attack increase +26</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Max. attack increase +29</option>";
}
else if (harmonyoption == 3)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required strength decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required strength decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required strength decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required strength decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required strength decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required strength decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required strength decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required strength decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required strength decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required strength decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required strength decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required strength decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required strength decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required strength decrease +40</option>";
}
else if (harmonyoption == 4)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required agility decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required agility decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required agility decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required agility decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required agility decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required agility decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required agility decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required agility decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required agility decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required agility decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required agility decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required agility decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required agility decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required agility decrease +40</option>";
}
else if (harmonyoption == 5)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Attack (Max, Min) +7</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Attack (Max, Min) +8</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Attack (Max, Min) +9</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Attack (Max, Min) +11</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Attack (Max, Min) +12</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Attack (Max, Min) +14</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Attack (Max, Min) +16</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Attack (Max, Min) +19</option>";
}
else if (harmonyoption == 6)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Critical Damage increase +6</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Critical Damage increase +14</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Critical Damage increase +16</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Critical Damage increase +18</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Critical Damage increase +20</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Critical Damage increase +22</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Critical Damage increase +24</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Critical Damage increase +30</option>";
}
else if (harmonyoption == 7)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Skill Damage increase +12</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Skill Damage increase +14</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Skill Damage increase +16</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Skill Damage increase +18</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Skill Damage increase +22</option>";
}
else if (harmonyoption == 8)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Attack Success Rate (PvP) increase +5%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Attack Success Rate (PvP) increase +7%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Attack Success Rate (PvP) increase +9%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Attack Success Rate (PvP) increase +11%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Attack Success Rate (PvP) increase +14%</option>";
}
else if (harmonyoption == 9)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>SD Reduction +3%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>SD Reduction +5%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>SD Reduction +7%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>SD Reduction +9%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Reduction +10%</option>";
}
else if (harmonyoption == 10)
{
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Ignore Rate +10%</option>";
}
}
else if (itemtype == 5)
{
if (harmonyoption == 1)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Wizardly attack increase +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Wizardly attack increase +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Wizardly attack increase +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Wizardly attack increase +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Wizardly attack increase +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Wizardly attack increase +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Wizardly attack increase +17</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Wizardly attack increase +18</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Wizardly attack increase +19</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Wizardly attack increase +21</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Wizardly attack increase +23</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Wizardly attack increase +25</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Wizardly attack increase +27</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Wizardly attack increase +31</option>";
}
else if (harmonyoption == 2)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required strength decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required strength decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required strength decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required strength decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required strength decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required strength decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required strength decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required strength decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required strength decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required strength decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required strength decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required strength decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required strength decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required strength decrease +40</option>";
}
else if (harmonyoption == 3)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required agility decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required agility decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required agility decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required agility decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required agility decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required agility decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required agility decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required agility decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required agility decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required agility decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required agility decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required agility decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required agility decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required agility decrease +40</option>";
}
else if (harmonyoption == 5)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Critical Damage increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Critical Damage increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Critical Damage increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Critical Damage increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Critical Damage increase +18</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Critical Damage increase +20</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Critical Damage increase +22</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Critical Damage increase +28</option>";
}
else if (harmonyoption == 4)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Skill Damage increase +7</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Skill Damage increase +10</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Skill Damage increase +13</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Skill Damage increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Skill Damage increase +19</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Skill Damage increase +22</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Skill Damage increase +25</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Skill Damage increase +30</option>";
}
else if (harmonyoption == 7)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Attack Success Rate (PvP) increase +5%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Attack Success Rate (PvP) increase +7%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Attack Success Rate (PvP) increase +9%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Attack Success Rate (PvP) increase +11%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Attack Success Rate (PvP) increase +14%</option>";
}
else if (harmonyoption == 6)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>SD Reduction +4%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>SD Reduction +6%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>SD Reduction +8%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>SD Reduction +10%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Reduction +13%</option>";
}
else if (harmonyoption == 8)
{
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Ignore Rate +15%</option>";
}
}
else if (itemtype > 5)
{
if (harmonyoption == 1)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Defense increase +3</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Defense increase +4</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Defense increase +5</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Defense increase +6</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Defense increase +7</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Defense increase +8</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Defense increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Defense increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Defense increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Defense increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Defense increase +18</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Defense increase +20</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Defense increase +22</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Defense increase +25</option>";
}
else if (harmonyoption == 2)
{
if (itemlevel >= 3) harmonyecho += "<option value='3'>Max. AG increase +4</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Max. AG increase +6</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Max. AG increase +8</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Max. AG increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Max. AG increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Max. AG increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Max. AG increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Max. AG increase +18</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Max. AG increase +20</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Max. AG increase +22</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Max. AG increase +25</option>";
}
else if (harmonyoption == 3)
{
if (itemlevel >= 3) harmonyecho += "<option value='3'>Max. HP increase +7</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Max. HP increase +9</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Max. HP increase +11</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Max. HP increase +13</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Max. HP increase +15</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Max. HP increase +17</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Max. HP increase +19</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Max. HP increase +21</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Max. HP increase +23</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Max. HP increase +25</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Max. HP increase +30</option>";
}
else if (harmonyoption == 4)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Life auto increment increase +1</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Life auto increment increase +2</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Life auto increment increase +3</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Life auto increment increase +4</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Life auto increment increase +5</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Life auto increment increase +6</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Life auto increment increase +7</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Life auto increment increase +8</option>";
}
else if (harmonyoption == 5)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Mana auto increment increase +1</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Mana auto increment increase +2</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Mana auto increment increase +3</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Mana auto increment increase +4</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Mana auto increment increase +5</option>";
}
else if (harmonyoption == 6)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Defense success rate increase(PVP) +3</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Defense success rate increase(PVP) +4</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Defense success rate increase(PVP) +5</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Defense success rate increase(PVP) +6</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Defense success rate increase(PVP) +8</option>";
}
else if (harmonyoption == 7)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Damage decrement increase +3%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Damage decrement increase +4%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Damage decrement increase +5%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Damage decrement increase +6%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Damage decrement increase +7%</option>";
}
else if (harmonyoption == 8)
{
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Ratio Rate increase +5%</option>";
}
}
harmonyecho += "</select>";
document.getElementById("hvalue").innerHTML=harmonyecho;
}
</script>
<?
function fibonaci($value, $first) {
if ($value == '0')
{
$i_current = 0;
}
elseif ($value == '1')
{
$i_current = $first;
}
else
{
$i_last = $first;
$i_current = $first;
$i = 0;
$k = 2;
do
{
$i = $i_current + $i_last;
$i_last = $i_current;
$i_current = $i;
$k++;
}
while ($k <= $value);
}
return $i_current;
}
function exeinc($value,$inc)
{
$return = 1;
if ($value > 1)
{
for ($i = 1; $i < $value; $i++)
{
$return = $return*$inc;
}
}
return $return;
}
if (isset($_POST['addexeop']))
{
$serial = $_POST['serial'];
$ex = $_POST['ex'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
$item_exe_info = hexdec(substr($item['code'], 14, 2)); /* Item Excellent Info/ Option */
if ($item['excellent'] < 64 and ($item['exe_count']+count($ex)) < $item['maxexe'])
{
$execount = $item['exe_count'];
$needkr = 0;
if ($item['excellent'] < 32)
{
foreach($ex as $value)
{
if ($value == 6)
{
$item_exe_info += 32;
$execount++;
$log .= "30, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -32; }
if ($item['excellent'] < 16)
{
foreach($ex as $value)
{
if ($value == 5)
{
$item_exe_info += 16;
$execount++;
$log .= "16, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -16; }
if ($item['excellent'] < 8)
{
foreach($ex as $value)
{
if ($value == 4)
{
$item_exe_info += 8;
$execount++;
$log .= "8, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -8; }
if ($item['excellent'] < 4)
{
foreach($ex as $value)
{
if ($value == 3)
{
$item_exe_info += 4;
$execount++;
$log .= "4, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -4; }
if ($item['excellent'] < 2)
{
foreach($ex as $value)
{
if ($value == 2)
{
$item_exe_info += 2;
$execount++;
$log .= "2, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -2; }
if ($item['excellent'] < 1)
{
foreach($ex as $value)
{
if ($value == 1)
{
$item_exe_info += 1;
$execount++;
$log .= "1, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -1; }
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $needkr)
{
$item_exe_info = sprintf("%02X", $item_exe_info,00);
$newitem = substr($item['code'], 0, 14).$item_exe_info.substr($item['code'], 16);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$needkr where memb___id='$username'");
$log_all = "Add exe options on item($item[sn]): $log";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$needkr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
}
elseif (isset($_POST['addexe']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['excellent'] < 64 and $item['exe_count'] < $item['maxexe'])
{
$krr = ($WebShop['exe_option']+$item['exe_count'])*$item['credits'];
echo "First exe option price: $krr credits.<br>Next exe option price: $krr * (".$WebShop['exe_option_inc']." * count of exe option) credits.";
if ($item['excellent'] < 32) { $item_optx6 = 0; } else { $item_optx6 = 1; $item['excellent'] += -32; }
if ($item['excellent'] < 16) { $item_optx5 = 0; } else { $item_optx5 = 1; $item['excellent'] += -16; }
if ($item['excellent'] < 8) { $item_optx4 = 0; } else { $item_optx4 = 1; $item['excellent'] += -8; }
if ($item['excellent'] < 4) { $item_optx3 = 0; } else { $item_optx3 = 1; $item['excellent'] += -4; }
if ($item['excellent'] < 2) { $item_optx2 = 0; } else { $item_optx2 = 1; $item['excellent'] += -2; }
if ($item['excellent'] < 1) { $item_optx1 = 0; } else { $item_optx1 = 1; $item['excellent'] += -1; }
eval(exe_type ($item['exe_type']));
echo "<form onsubmit=\"request('addexeop','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addexeop\">";
if ($item_optx6 == 0) echo "<input id=\"ex6\" type=\"checkbox\" name=\"ex[6]\" value=\"6\"><label for=\"ex6\">".$op6."</label><br>";
if ($item_optx5 == 0) echo "<input id=\"ex5\" type=\"checkbox\" name=\"ex[5]\" value=\"5\"><label for=\"ex5\">".$op5."</label><br>";
if ($item_optx4 == 0) echo "<input id=\"ex4\" type=\"checkbox\" name=\"ex[4]\" value=\"4\"><label for=\"ex4\">".$op4."</label><br>";
if ($item_optx3 == 0) echo "<input id=\"ex3\" type=\"checkbox\" name=\"ex[3]\" value=\"3\"><label for=\"ex3\">".$op3."</label><br>";
if ($item_optx2 == 0) echo "<input id=\"ex2\" type=\"checkbox\" name=\"ex[2]\" value=\"2\"><label for=\"ex2\">".$op2."</label><br>";
if ($item_optx1 == 0) echo "<input id=\"ex1\" type=\"checkbox\" name=\"ex[1]\" value=\"1\"><label for=\"ex1\">".$op1."</label><br>";
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addexeop\" value=\"Add This Options\"></form>";
}
else
{
echo "<ul><li>You dont have any options to add on item!</li></ul>";
}
}
}
}
}
if (isset($_POST['addsocket1']))
{
$serial = $_POST['serial'];
$socket = $_POST['socket'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
$newitem = $item['code'];
$kksock = 0;
$needkr = 0;
$log = "";
for ($k=1;$k<=5;$k++)
{
if ($item['socket'.$k] < 254) $kksock++;
}
foreach($socket as $key => $value)
{
if ($value < 254 and $value > -1 and $item['socket'.$key] == 254)
{
$kksock++;
$log .= "Socket $key: $value, ";
$needkr += $WebShop['socket_option'] * exeinc($kksock, $WebShop['socket_option_inc']) * $item['credits'];
$changesocket = sprintf("%02X", $value, 00);
$newitem = substr($newitem, 0, 20+(2*$key)).$changesocket.substr($item['code'], 22+(2*$key));
}
}
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $needkr)
{
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$needkr where memb___id='$username'");
$log_all = "Add socket options on item($item[sn]): $log";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$needkr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addsocket']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['issocket'] > 0 and ($item['socket1'] == 254 or $item['socket2'] == 254 or $item['socket3'] == 254 or $item['socket4'] == 254 or $item['socket5'] == 254))
{
$krr = $WebShop['socket_option']*$item['credits'];
echo "First socket option price: $krr credits.<br>Next socket option price: $krr * (".$WebShop['socket_option_inc']." * count of exe option) credits.";
echo "<form onsubmit=\"request('addsocket','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addsocket\">";
for ($k=1;$k<=5;$k++)
{
if ($item['socket'.$k] == 254)
{
echo "Socket $k:<select name=\"socket[$k];\">";
echo "<option value='254'>Socket $k: No item application</option>";
echo "<option value='0'>Socket $k: Fire((Level type)Attack/Wizardly increase +24)</option>";
echo "<option value='1'>Socket $k: Fire(Attack speed increase +7)</option>";
echo "<option value='2'>Socket $k: Fire(Maximum attack/Wizardly increase +30)</option>";
echo "<option value='3'>Socket $k: Fire(Minimum attack/Wizardly increase +20)</option>";
echo "<option value='4'>Socket $k: Fire(Attack/Wizardly increase +20)</option>";
echo "<option value='5'>Socket $k: Fire(Slight AG reduction +40%)</option>";
echo "<option value='10'>Socket $k: Ice(Attack defensibility increase +10)</option>";
echo "<option value='11'>Socket $k: Water(Defensibility increase +30)</option>";
echo "<option value='12'>Socket $k: Water(Shield protection increase +7%)</option>";
echo "<option value='13'>Socket $k: Water(Damage reflection +5%)</option>";
echo "<option value='14'>Socket $k: Water(Damage reduction +4%)</option>";
echo "<option value='16'>Socket $k: Ice(Monster destruction for the Life increase +8)</option>";
echo "<option value='17'>Socket $k: Ice(Monster destruction for the Mana increase +8)</option>";
echo "<option value='18'>Socket $k: Ice(Skill attack increase +37)</option>";
echo "<option value='19'>Socket $k: Ice(Attack accuracy increase +25)</option>";
echo "<option value='20'>Socket $k: Ice(Item strengthener +30%)</option>";
echo "<option value='21'>Socket $k: Ice(Automatic Life recovery increase +8)</option>";
echo "<option value='22'>Socket $k: Wind(Maximum Life increase +4%)</option>";
echo "<option value='23'>Socket $k: Wind(Maximum Mana increase +4%)</option>";
echo "<option value='24'>Socket $k: Wind(Automatic Mana recovery increase +8)</option>";
echo "<option value='25'>Socket $k: Wind(Maximum AG increase +25)</option>";
echo "<option value='26'>Socket $k: Wind(AG value increase +3)</option>";
echo "<option value='29'>Socket $k: Lighting(Excellent damage increase +30)</option>";
echo "<option value='30'>Socket $k: Lighting(Excellent damage rate increase +10%)</option>";
echo "<option value='31'>Socket $k: Lighting(Critical damage increase +30)</option>";
echo "<option value='32'>Socket $k: Lighting(Critical damage rate increase +8%)</option>";
echo "<option value='36'>Socket $k: Ground(Stamina increase +30)</option>";
echo "</select><br>";
}
}
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addsocket1\" value=\"Add This Options\"></form>";
}
else
{
echo "<ul><li>You dont have any options to add on item!</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addoption1']))
{
$serial = $_POST['serial'];
$item_option = $_POST['item_option'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $item_option))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['addoption'] < $item['maxaddoption'] and $item_option > $item['addoption'])
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$krr = (fibonaci($item_option, $WebShop['kr_per_option'])*$item['credits']) - (fibonaci($item['addoption'], $WebShop['kr_per_option'])*$item['credits']);
if ($myrow['credits'] >= $krr)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$luck = sprintf("%02X", ($item_opt+($item_option-$item['addoption'])),00);
$newitem = substr($item['code'], 0, 2).$luck.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$krr where memb___id='$username'");
$log_all = "Add additional options on item($item[sn]) +".($item_option-$item['addoption']);
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addoption']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['addoption'] < $item['maxaddoption'])
{
echo "<form onsubmit=\"request('addoption2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addoption2\">";
?>
<select name="item_option">
<?
if ($item['id_cat'] != 6)
{
$k = $item['addoption']+1;
$ap = $k*4;
do
{
$krr = (fibonaci($k, $WebShop['kr_per_option'])*$item['credits']) - (fibonaci($item['addoption'], $WebShop['kr_per_option'])*$item['credits']);
printf ("<option value='%s'>%s | %s credits</option>", $k, $ap, $krr);
$k++;
$ap = $ap + 4;
}
while ($k <= $item['maxaddoption']);
}
else
{
$k = $item['addoption']+1;
$ap = $k*5;
do
{
$krr = (fibonaci($k, $WebShop['kr_per_option'])*$item['credits']) - (fibonaci($item['addoption'], $WebShop['kr_per_option'])*$item['credits']);
printf ("<option value='%s'>%s | %s credits</option>",$k, $ap, $krr);
$k++;
$ap = $ap + 5;
}
while ($k <= $item['maxaddoption']);
}
?>
</select>
<?
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addoption1\" value=\"Add This Option\"></form>";
}
else
{
echo "<ul><li>You dont have any options to add on item!</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addlevelo1']))
{
$serial = $_POST['serial'];
$item_level = $_POST['item_level'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $item_level))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['level'] < $item['maxlevel'] and $item_level > $item['level'])
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$krr = (fibonaci($item_level, $WebShop['kr_per_level'])*$item['credits']) - (fibonaci($item['level'], $WebShop['kr_per_level'])*$item['credits']);
if ($myrow['credits'] >= $krr)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$luck = sprintf("%02X", ($item_opt+(($item_level-$item['level'])*8)),00);
$newitem = substr($item['code'], 0, 2).$luck.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$krr where memb___id='$username'");
$log_all = "Add Level on item($item[sn]) +".($item_level-$item['level']);
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addlevel']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['level'] < $item['maxlevel'])
{
echo "<form onsubmit=\"request('addlevela2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addlevela2\">";
?>
<select name="item_level">
<?
$k = $item['level']+1;
do
{
$krr = (fibonaci($k, $WebShop['kr_per_level'])*$item['credits']) - (fibonaci($item['level'], $WebShop['kr_per_level'])*$item['credits']);
printf ("<option value='%s'>%s | %s credits</option>",$k,$k,$krr);
$k++;
}
while ($k <= $item['maxlevel']);
?>
</select>
<?
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addlevelo1\" value=\"Add This Level\"></form>";
}
else
{
echo "<ul><li>You dont have any level to add on item!</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addancient1']))
{
$serial = $_POST['serial'];
$ancient = $_POST['ancient'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $ancient))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isancient'] == 1 and $item['ancient'] < 9)
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($ancient == 1)
{
$getanckr = $WebShop['ancient1'];
$ancientn = 5;
}
else
{
$getanckr = $WebShop['ancient2'];
$ancientn = 9;
}
$krr = $item['credits']*$getanckr;
if ($item['ancient'] >= 5) $krr -= $item['credits']*$WebShop['ancient1'];
if ($myrow['credits'] >= $krr)
{
$ancient = sprintf("%02X", $ancientn,00);
$newitem = substr($item['code'], 0, 16).$ancient.substr($item['code'], 18);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$krr where memb___id='$username'");
$log_all = "Add Ancient on item($item[sn]) +".$ancientn+1;
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addancient']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isancient'] == 1 and $item['ancient'] < 9)
{
echo "<form onsubmit=\"request('addancient2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addancient2\">";
if ($item['ancient'] < 4)
{
?>
<input id="ancient1" name="ancient" type="radio" value="1" checked><label for="ancient1">+5 Stamina |
<?
$krr = $item['credits']*$WebShop['ancient1'];
echo $krr." credits";
?>
</label>
<?
}
?>
<input id="ancient2" name="ancient" type="radio" value="2"><label for="ancient2">+10 Stamina |
<?
$krr = $item['credits']*$WebShop['ancient2'];
if ($item['ancient'] >= 4) $krr -= $item['credits']*$WebShop['ancient1'];
echo $krr." credits";
?>
</label>
<?
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addancient1\" value=\"Add This Option\"></form>";
}
}
}
}
elseif (isset($_POST['addharmony1']))
{
$serial = $_POST['serial'];
$harmony = $_POST['harmony'];
$harmonyvalue = $_POST['harmonyvalue'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $harmony) and preg_match('/^[0-9]/i', $harmonyvalue))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isharmony'] == 1)
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $WebShop['harmony_price'])
{
$harmony = sprintf("%01X", $harmony,0);
$harmonyvalue = sprintf("%01X", $harmonyvalue,0);
$newitem = substr($item['code'], 0, 20).$harmony.$harmonyvalue.substr($item['code'], 22);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$WebShop[harmony_price] where memb___id='$username'");
$log_all = "Add harmony on item($item[sn]) $harmony - $harmonyvalue";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addharmony']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isharmony'] == 1)
{
echo "<form onsubmit=\"request('addharmony2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addharmony2\">Harmony Option:<select onChange=\"harmonyselect($item[id_cat],$item[level],this.form.harmony.options[this.form.harmony.selectedIndex].value);\" name=\"harmony\" id=\"harmony\"><option value='0'>< < < NONE > > ></option>";
if ($item['id_cat'] < 5)
{
if ($item['level'] >= 0) echo "<option value='1'>Min. attack increase</option>";
if ($item['level'] >= 0) echo "<option value='2'>Max. attack increase</option>";
if ($item['level'] >= 0) echo "<option value='3'>Required strength decrease</option>";
if ($item['level'] >= 0) echo "<option value='4'>Required agility decrease</option>";
if ($item['level'] >= 6) echo "<option value='5'>Attack (Max, Min)</option>";
if ($item['level'] >= 6) echo "<option value='6'>Critical Damage increase</option>";
if ($item['level'] >= 9) echo "<option value='7'>Skill Damage increase</option>";
if ($item['level'] >= 9) echo "<option value='8'>Attack Success Rate (PvP) increase</option>";
if ($item['level'] >= 9) echo "<option value='9'>SD Reduction</option>";
if ($item['level'] >= 13) echo "<option value='10'>SD Ignore Rate</option>";
}
elseif ($item['id_cat'] == 5)
{
if ($item['level'] >= 0) echo "<option value='1'>Wizardly attack increase</option>";
if ($item['level'] >= 0) echo "<option value='2'>Required strength decrease</option>";
if ($item['level'] >= 0) echo "<option value='3'>Required agility decrease</option>";
if ($item['level'] >= 6) echo "<option value='4'>Skill Damage increase</option>";
if ($item['level'] >= 6) echo "<option value='5'>Critical Damage increase</option>";
if ($item['level'] >= 9) echo "<option value='6'>SD Reduction</option>";
if ($item['level'] >= 9) echo "<option value='7'>Attack Success Rate (PvP) increase</option>";
if ($item['level'] >= 13) echo "<option value='8'>SD Ignore Rate</option>";
}
else
{
if ($item['level'] >= 0) echo "<option value='1'>Defense increase</option>";
if ($item['level'] >= 3) echo "<option value='2'>Max. AG Increase</option>";
if ($item['level'] >= 3) echo "<option value='3'>Max. HP increase</option>";
if ($item['level'] >= 6) echo "<option value='4'>Life auto increment increase</option>";
if ($item['level'] >= 9) echo "<option value='5'>Mana auto increment increase</option>";
if ($item['level'] >= 9) echo "<option value='6'>Defense success rate increase(PVP)</option>";
if ($item['level'] >= 9) echo "<option value='7'>Damage decrement increase</option>";
if ($item['level'] >= 13) echo "<option value='8'>SD Ratio Rate increase</option>";
}
echo "</select>Harmony Value:<span id=\"hvalue\"></span><input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addharmony1\" value=\"Add This Option\"> | $WebShop[harmony_price] ".credits."</form>";
}
}
}
}
elseif (isset($_POST['addpvp']))
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $WebShop['refinery_price'])
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isrefinery'] == 1)
{
if ($item['refinery'] == 0)
{
$id_cat = hexdec(substr($item['code'], 18, 2)); /* Item Type */
$refinery = sprintf("%02X", ($id_cat+8),00);
$newitem = substr($item['code'], 0, 18).$refinery.substr($item['code'], 20);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$WebShop[refinery_price] where memb___id='$username'");
$log_all = "Add PVP Option on item($item[sn])";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$WebShop[refinery_price]','$date')");
}
else
{
echo "<ul><li>Item already have PVP Option</li></ul>";
}
}
}
}
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
elseif (isset($_POST['addluck']))
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isluck'] == 1)
{
if ($myrow['credits'] >= ($WebShop['item_luck']*$item['credits']))
{
if ($item['luck'] == 0)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$luck = sprintf("%02X", ($item_opt+4),00);
$newitem = substr($item['code'], 0, 2).$luck.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-($WebShop[item_luck]*$item[credits]) where memb___id='$username'");
$log_all = "Add Luck on item($item[sn])";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','".$WebShop['item_luck']*$item['credits']."','$date')");
}
else
{
echo "<ul><li>Item already have Luck Option</li></ul>";
}
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addskill']))
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isskill'] == 1)
{
if ($myrow['credits'] >= ($WebShop['item_skill']*$item['credits']))
{
if ($item['skill'] == 0)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$skill = sprintf("%02X", ($item_opt+128),00);
$newitem = substr($item['code'], 0, 2).$skill.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-($WebShop[item_skill]*$item[credits]) where memb___id='$username'");
$log_all = "Add Skill on item($item[sn])";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','".$WebShop['item_skill']*$item['credits']."','$date')");
}
else
{
echo "<ul><li>Item already have Skill Option</li></ul>";
}
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
echo "<table cellpadding=\"0\" cellspacing=\"6\" width=\"100%\">";
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['name'])
{
$refinery = "";
$excellent = "";
$luck = "";
$addoption = "";
$skill = "";
$ancient = "";
$addlevel = "";
$addharmony = "";
$addsocket = "";
if ($item['exe_type'] < 4)
{
if ($item['luck'] == 1) $luck = "Add Luck<br>";
elseif ($item['isluck'] == 1) $luck = "<a htef=\"#\" onclick=\"request('addluckx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Luck | ".$WebShop['item_luck']*$item['credits']." ".credits."</a><br>";
if ($item['ancient'] == 9) $ancient = "Add/Change Ancient Option<br>";
elseif ($item['isancient'] == 1) $ancient = "<a htef=\"#\" onclick=\"request('addancientx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add/Change Ancient Option</a><br>";
if ($item['skill'] == 1) $skill = "Add Skill<br>";
elseif ($item['isskill'] == 1) $skill = "<a htef=\"#\" onclick=\"request('addskillx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Skill | ".$WebShop['item_skill']*$item['credits']." ".credits."</a><br>";
if ($item['refinery'] > 0) $refinery = "Add 380 Level Options<br>";
elseif ($item['isrefinery'] == 1) $refinery = "<a htef=\"#\" onclick=\"request('addpvpx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add 380 Level Options | ".$WebShop['refinery_price']." ".credits."</a><br>";
if ($item['excellent'] >= 64 or $item['exe_count'] >= $item['maxexe']) $excellent = "Add Excelence Options<br>";
else $excellent = "<a htef=\"#\" onclick=\"request('addexex$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Excelence Options</a><br>";
if ($item['addoption'] >= $item['maxaddoption']) $addoption = "Add Additional Option<br>";
else $addoption = "<a htef=\"#\" onclick=\"request('addoptionx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Additional Options</a><br>";
if ($item['level'] >= $item['maxlevel']) $addlevel = "Add Item Level<br>";
else $addlevel = "<a htef=\"#\" onclick=\"request('addlevelx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Item Level</a><br>";
if ($item['isharmony'] == 1) $addharmony = "<a htef=\"#\" onclick=\"request('addharmonyx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add/Change Harmony Option</a><br>";
if ($item['issocket'] >= 1 and ($item['socket1'] == 255 or $item['socket1'] < 254) and ($item['socket2'] == 255 or $item['socket2'] < 254) and ($item['socket3'] == 255 or $item['socket3'] < 254) and ($item['socket4'] == 255 or $item['socket4'] < 254) and ($item['socket5'] == 255 or $item['socket5'] < 254))$addsocket = "Add Socket Options<br>";
elseif ($item['issocket'] >= 1) $addsocket = "<a htef=\"#\" onclick=\"request('addsocketx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Socket Options</a><br>";
}
echo "<tr>
<td width=\"50%\" style='font-size:10px; background-image:url(".$_SERVER['IMAGES_HOST']."http://forum.ragezone.com/images/back_item.png);'>$item[echo_item]</td>
<td>
<form action=\"\" method=\"post\" id=\"addexex$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addexe\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addpvpx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addpvp\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addluckx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addluck\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addskillx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addskill\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addoptionx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addoption\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addlevelx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addlevel\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addancientx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addancient\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addharmonyx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addharmony\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addsocketx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addsocket\" value=\"1\">
</form>
$addlevel$skill$luck$ancient$addoption$refinery$addharmony$excellent$addsocket
</td>
</tr>";
}
}
echo "</table>";
?>
Re: Please items for webshop season 6 ep 3
You want script whit New items for webshop ?
Re: Please items for webshop season 6 ep 3
Quote:
Originally Posted by
susanu
You want script whit New items for webshop ?
MuOnlineWebShop pictures of subjects.
Re: Please items for webshop season 6 ep 3
Quote:
Originally Posted by
leorond
Hi I would like to ask you about the pictures for the webshop season 6 episode 3.
And I would like to ask if anyone have script for adding OPTION on the web I need help with one script for EnemyMuWeb. Items are displayed in a row beneath it and fail to display in my chest, I also have a problem when adding item option and empty sockets are displayed as full.
Here it is:
PHP Code:
<?php
include ("usernameaccess.php");
echo "<script type=\"text/javascript\">document.getElementById(\"h4\").innerHTML = \"Add Optinos in Items\"</script>
<input type='hidden' id='module_contet' value='Add Optinos in Items'>";
?>
<script type="text/javascript">
function harmonyselect(itemtype,itemlevel,harmonyoption)
{
var harmonyecho = "";
harmonyecho += "<select name=\"harmonyvalue\">";
if (itemtype < 5)
{
if (harmonyoption == 1)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Min. attack increase +2</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Min. attack increase +3</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Min. attack increase +4</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Min. attack increase +5</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Min. attack increase +6</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Min. attack increase +7</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Min. attack increase +9</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Min. attack increase +11</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Min. attack increase +12</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Min. attack increase +14</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Min. attack increase +15</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Min. attack increase +16</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Min. attack increase +17</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Min. attack increase +20</option>";
}
else if (harmonyoption == 2)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Max. attack increase +3</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Max. attack increase +4</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Max. attack increase +5</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Max. attack increase +6</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Max. attack increase +7</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Max. attack increase +8</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Max. attack increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Max. attack increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Max. attack increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Max. attack increase +17</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Max. attack increase +20</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Max. attack increase +23</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Max. attack increase +26</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Max. attack increase +29</option>";
}
else if (harmonyoption == 3)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required strength decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required strength decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required strength decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required strength decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required strength decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required strength decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required strength decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required strength decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required strength decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required strength decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required strength decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required strength decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required strength decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required strength decrease +40</option>";
}
else if (harmonyoption == 4)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required agility decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required agility decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required agility decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required agility decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required agility decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required agility decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required agility decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required agility decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required agility decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required agility decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required agility decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required agility decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required agility decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required agility decrease +40</option>";
}
else if (harmonyoption == 5)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Attack (Max, Min) +7</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Attack (Max, Min) +8</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Attack (Max, Min) +9</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Attack (Max, Min) +11</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Attack (Max, Min) +12</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Attack (Max, Min) +14</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Attack (Max, Min) +16</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Attack (Max, Min) +19</option>";
}
else if (harmonyoption == 6)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Critical Damage increase +6</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Critical Damage increase +14</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Critical Damage increase +16</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Critical Damage increase +18</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Critical Damage increase +20</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Critical Damage increase +22</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Critical Damage increase +24</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Critical Damage increase +30</option>";
}
else if (harmonyoption == 7)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Skill Damage increase +12</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Skill Damage increase +14</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Skill Damage increase +16</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Skill Damage increase +18</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Skill Damage increase +22</option>";
}
else if (harmonyoption == 8)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Attack Success Rate (PvP) increase +5%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Attack Success Rate (PvP) increase +7%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Attack Success Rate (PvP) increase +9%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Attack Success Rate (PvP) increase +11%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Attack Success Rate (PvP) increase +14%</option>";
}
else if (harmonyoption == 9)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>SD Reduction +3%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>SD Reduction +5%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>SD Reduction +7%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>SD Reduction +9%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Reduction +10%</option>";
}
else if (harmonyoption == 10)
{
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Ignore Rate +10%</option>";
}
}
else if (itemtype == 5)
{
if (harmonyoption == 1)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Wizardly attack increase +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Wizardly attack increase +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Wizardly attack increase +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Wizardly attack increase +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Wizardly attack increase +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Wizardly attack increase +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Wizardly attack increase +17</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Wizardly attack increase +18</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Wizardly attack increase +19</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Wizardly attack increase +21</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Wizardly attack increase +23</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Wizardly attack increase +25</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Wizardly attack increase +27</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Wizardly attack increase +31</option>";
}
else if (harmonyoption == 2)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required strength decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required strength decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required strength decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required strength decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required strength decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required strength decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required strength decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required strength decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required strength decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required strength decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required strength decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required strength decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required strength decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required strength decrease +40</option>";
}
else if (harmonyoption == 3)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Required agility decrease +6</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Required agility decrease +8</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Required agility decrease +10</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Required agility decrease +12</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Required agility decrease +14</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Required agility decrease +16</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Required agility decrease +20</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Required agility decrease +23</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Required agility decrease +26</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Required agility decrease +29</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Required agility decrease +32</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Required agility decrease +35</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Required agility decrease +37</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Required agility decrease +40</option>";
}
else if (harmonyoption == 5)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Critical Damage increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Critical Damage increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Critical Damage increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Critical Damage increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Critical Damage increase +18</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Critical Damage increase +20</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Critical Damage increase +22</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Critical Damage increase +28</option>";
}
else if (harmonyoption == 4)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Skill Damage increase +7</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Skill Damage increase +10</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Skill Damage increase +13</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Skill Damage increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Skill Damage increase +19</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Skill Damage increase +22</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Skill Damage increase +25</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Skill Damage increase +30</option>";
}
else if (harmonyoption == 7)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Attack Success Rate (PvP) increase +5%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Attack Success Rate (PvP) increase +7%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Attack Success Rate (PvP) increase +9%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Attack Success Rate (PvP) increase +11%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Attack Success Rate (PvP) increase +14%</option>";
}
else if (harmonyoption == 6)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>SD Reduction +4%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>SD Reduction +6%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>SD Reduction +8%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>SD Reduction +10%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Reduction +13%</option>";
}
else if (harmonyoption == 8)
{
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Ignore Rate +15%</option>";
}
}
else if (itemtype > 5)
{
if (harmonyoption == 1)
{
if (itemlevel >= 0) harmonyecho += "<option value='0'>Defense increase +3</option>";
if (itemlevel >= 1) harmonyecho += "<option value='1'>Defense increase +4</option>";
if (itemlevel >= 2) harmonyecho += "<option value='2'>Defense increase +5</option>";
if (itemlevel >= 3) harmonyecho += "<option value='3'>Defense increase +6</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Defense increase +7</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Defense increase +8</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Defense increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Defense increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Defense increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Defense increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Defense increase +18</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Defense increase +20</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Defense increase +22</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Defense increase +25</option>";
}
else if (harmonyoption == 2)
{
if (itemlevel >= 3) harmonyecho += "<option value='3'>Max. AG increase +4</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Max. AG increase +6</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Max. AG increase +8</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Max. AG increase +10</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Max. AG increase +12</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Max. AG increase +14</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Max. AG increase +16</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Max. AG increase +18</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Max. AG increase +20</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Max. AG increase +22</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Max. AG increase +25</option>";
}
else if (harmonyoption == 3)
{
if (itemlevel >= 3) harmonyecho += "<option value='3'>Max. HP increase +7</option>";
if (itemlevel >= 4) harmonyecho += "<option value='4'>Max. HP increase +9</option>";
if (itemlevel >= 5) harmonyecho += "<option value='5'>Max. HP increase +11</option>";
if (itemlevel >= 6) harmonyecho += "<option value='6'>Max. HP increase +13</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Max. HP increase +15</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Max. HP increase +17</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Max. HP increase +19</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Max. HP increase +21</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Max. HP increase +23</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Max. HP increase +25</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Max. HP increase +30</option>";
}
else if (harmonyoption == 4)
{
if (itemlevel >= 6) harmonyecho += "<option value='6'>Life auto increment increase +1</option>";
if (itemlevel >= 7) harmonyecho += "<option value='7'>Life auto increment increase +2</option>";
if (itemlevel >= 8) harmonyecho += "<option value='8'>Life auto increment increase +3</option>";
if (itemlevel >= 9) harmonyecho += "<option value='9'>Life auto increment increase +4</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Life auto increment increase +5</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Life auto increment increase +6</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Life auto increment increase +7</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Life auto increment increase +8</option>";
}
else if (harmonyoption == 5)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Mana auto increment increase +1</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Mana auto increment increase +2</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Mana auto increment increase +3</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Mana auto increment increase +4</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Mana auto increment increase +5</option>";
}
else if (harmonyoption == 6)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Defense success rate increase(PVP) +3</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Defense success rate increase(PVP) +4</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Defense success rate increase(PVP) +5</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Defense success rate increase(PVP) +6</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Defense success rate increase(PVP) +8</option>";
}
else if (harmonyoption == 7)
{
if (itemlevel >= 9) harmonyecho += "<option value='9'>Damage decrement increase +3%</option>";
if (itemlevel >= 10) harmonyecho += "<option value='10'>Damage decrement increase +4%</option>";
if (itemlevel >= 11) harmonyecho += "<option value='11'>Damage decrement increase +5%</option>";
if (itemlevel >= 12) harmonyecho += "<option value='12'>Damage decrement increase +6%</option>";
if (itemlevel >= 13) harmonyecho += "<option value='13'>Damage decrement increase +7%</option>";
}
else if (harmonyoption == 8)
{
if (itemlevel >= 13) harmonyecho += "<option value='13'>SD Ratio Rate increase +5%</option>";
}
}
harmonyecho += "</select>";
document.getElementById("hvalue").innerHTML=harmonyecho;
}
</script>
<?
function fibonaci($value, $first) {
if ($value == '0')
{
$i_current = 0;
}
elseif ($value == '1')
{
$i_current = $first;
}
else
{
$i_last = $first;
$i_current = $first;
$i = 0;
$k = 2;
do
{
$i = $i_current + $i_last;
$i_last = $i_current;
$i_current = $i;
$k++;
}
while ($k <= $value);
}
return $i_current;
}
function exeinc($value,$inc)
{
$return = 1;
if ($value > 1)
{
for ($i = 1; $i < $value; $i++)
{
$return = $return*$inc;
}
}
return $return;
}
if (isset($_POST['addexeop']))
{
$serial = $_POST['serial'];
$ex = $_POST['ex'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
$item_exe_info = hexdec(substr($item['code'], 14, 2)); /* Item Excellent Info/ Option */
if ($item['excellent'] < 64 and ($item['exe_count']+count($ex)) < $item['maxexe'])
{
$execount = $item['exe_count'];
$needkr = 0;
if ($item['excellent'] < 32)
{
foreach($ex as $value)
{
if ($value == 6)
{
$item_exe_info += 32;
$execount++;
$log .= "30, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -32; }
if ($item['excellent'] < 16)
{
foreach($ex as $value)
{
if ($value == 5)
{
$item_exe_info += 16;
$execount++;
$log .= "16, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -16; }
if ($item['excellent'] < 8)
{
foreach($ex as $value)
{
if ($value == 4)
{
$item_exe_info += 8;
$execount++;
$log .= "8, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -8; }
if ($item['excellent'] < 4)
{
foreach($ex as $value)
{
if ($value == 3)
{
$item_exe_info += 4;
$execount++;
$log .= "4, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -4; }
if ($item['excellent'] < 2)
{
foreach($ex as $value)
{
if ($value == 2)
{
$item_exe_info += 2;
$execount++;
$log .= "2, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -2; }
if ($item['excellent'] < 1)
{
foreach($ex as $value)
{
if ($value == 1)
{
$item_exe_info += 1;
$execount++;
$log .= "1, ";
$needkr += $WebShop['exe_option'] * exeinc($execount, $WebShop['exe_option_inc']) * $item['credits'];
}
}
} else { $item['excellent'] += -1; }
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $needkr)
{
$item_exe_info = sprintf("%02X", $item_exe_info,00);
$newitem = substr($item['code'], 0, 14).$item_exe_info.substr($item['code'], 16);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$needkr where memb___id='$username'");
$log_all = "Add exe options on item($item[sn]): $log";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$needkr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
}
elseif (isset($_POST['addexe']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['excellent'] < 64 and $item['exe_count'] < $item['maxexe'])
{
$krr = ($WebShop['exe_option']+$item['exe_count'])*$item['credits'];
echo "First exe option price: $krr credits.<br>Next exe option price: $krr * (".$WebShop['exe_option_inc']." * count of exe option) credits.";
if ($item['excellent'] < 32) { $item_optx6 = 0; } else { $item_optx6 = 1; $item['excellent'] += -32; }
if ($item['excellent'] < 16) { $item_optx5 = 0; } else { $item_optx5 = 1; $item['excellent'] += -16; }
if ($item['excellent'] < 8) { $item_optx4 = 0; } else { $item_optx4 = 1; $item['excellent'] += -8; }
if ($item['excellent'] < 4) { $item_optx3 = 0; } else { $item_optx3 = 1; $item['excellent'] += -4; }
if ($item['excellent'] < 2) { $item_optx2 = 0; } else { $item_optx2 = 1; $item['excellent'] += -2; }
if ($item['excellent'] < 1) { $item_optx1 = 0; } else { $item_optx1 = 1; $item['excellent'] += -1; }
eval(exe_type ($item['exe_type']));
echo "<form onsubmit=\"request('addexeop','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addexeop\">";
if ($item_optx6 == 0) echo "<input id=\"ex6\" type=\"checkbox\" name=\"ex[6]\" value=\"6\"><label for=\"ex6\">".$op6."</label><br>";
if ($item_optx5 == 0) echo "<input id=\"ex5\" type=\"checkbox\" name=\"ex[5]\" value=\"5\"><label for=\"ex5\">".$op5."</label><br>";
if ($item_optx4 == 0) echo "<input id=\"ex4\" type=\"checkbox\" name=\"ex[4]\" value=\"4\"><label for=\"ex4\">".$op4."</label><br>";
if ($item_optx3 == 0) echo "<input id=\"ex3\" type=\"checkbox\" name=\"ex[3]\" value=\"3\"><label for=\"ex3\">".$op3."</label><br>";
if ($item_optx2 == 0) echo "<input id=\"ex2\" type=\"checkbox\" name=\"ex[2]\" value=\"2\"><label for=\"ex2\">".$op2."</label><br>";
if ($item_optx1 == 0) echo "<input id=\"ex1\" type=\"checkbox\" name=\"ex[1]\" value=\"1\"><label for=\"ex1\">".$op1."</label><br>";
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addexeop\" value=\"Add This Options\"></form>";
}
else
{
echo "<ul><li>You dont have any options to add on item!</li></ul>";
}
}
}
}
}
if (isset($_POST['addsocket1']))
{
$serial = $_POST['serial'];
$socket = $_POST['socket'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
$newitem = $item['code'];
$kksock = 0;
$needkr = 0;
$log = "";
for ($k=1;$k<=5;$k++)
{
if ($item['socket'.$k] < 254) $kksock++;
}
foreach($socket as $key => $value)
{
if ($value < 254 and $value > -1 and $item['socket'.$key] == 254)
{
$kksock++;
$log .= "Socket $key: $value, ";
$needkr += $WebShop['socket_option'] * exeinc($kksock, $WebShop['socket_option_inc']) * $item['credits'];
$changesocket = sprintf("%02X", $value, 00);
$newitem = substr($newitem, 0, 20+(2*$key)).$changesocket.substr($item['code'], 22+(2*$key));
}
}
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $needkr)
{
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$needkr where memb___id='$username'");
$log_all = "Add socket options on item($item[sn]): $log";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$needkr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addsocket']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['issocket'] > 0 and ($item['socket1'] == 254 or $item['socket2'] == 254 or $item['socket3'] == 254 or $item['socket4'] == 254 or $item['socket5'] == 254))
{
$krr = $WebShop['socket_option']*$item['credits'];
echo "First socket option price: $krr credits.<br>Next socket option price: $krr * (".$WebShop['socket_option_inc']." * count of exe option) credits.";
echo "<form onsubmit=\"request('addsocket','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addsocket\">";
for ($k=1;$k<=5;$k++)
{
if ($item['socket'.$k] == 254)
{
echo "Socket $k:<select name=\"socket[$k];\">";
echo "<option value='254'>Socket $k: No item application</option>";
echo "<option value='0'>Socket $k: Fire((Level type)Attack/Wizardly increase +24)</option>";
echo "<option value='1'>Socket $k: Fire(Attack speed increase +7)</option>";
echo "<option value='2'>Socket $k: Fire(Maximum attack/Wizardly increase +30)</option>";
echo "<option value='3'>Socket $k: Fire(Minimum attack/Wizardly increase +20)</option>";
echo "<option value='4'>Socket $k: Fire(Attack/Wizardly increase +20)</option>";
echo "<option value='5'>Socket $k: Fire(Slight AG reduction +40%)</option>";
echo "<option value='10'>Socket $k: Ice(Attack defensibility increase +10)</option>";
echo "<option value='11'>Socket $k: Water(Defensibility increase +30)</option>";
echo "<option value='12'>Socket $k: Water(Shield protection increase +7%)</option>";
echo "<option value='13'>Socket $k: Water(Damage reflection +5%)</option>";
echo "<option value='14'>Socket $k: Water(Damage reduction +4%)</option>";
echo "<option value='16'>Socket $k: Ice(Monster destruction for the Life increase +8)</option>";
echo "<option value='17'>Socket $k: Ice(Monster destruction for the Mana increase +8)</option>";
echo "<option value='18'>Socket $k: Ice(Skill attack increase +37)</option>";
echo "<option value='19'>Socket $k: Ice(Attack accuracy increase +25)</option>";
echo "<option value='20'>Socket $k: Ice(Item strengthener +30%)</option>";
echo "<option value='21'>Socket $k: Ice(Automatic Life recovery increase +8)</option>";
echo "<option value='22'>Socket $k: Wind(Maximum Life increase +4%)</option>";
echo "<option value='23'>Socket $k: Wind(Maximum Mana increase +4%)</option>";
echo "<option value='24'>Socket $k: Wind(Automatic Mana recovery increase +8)</option>";
echo "<option value='25'>Socket $k: Wind(Maximum AG increase +25)</option>";
echo "<option value='26'>Socket $k: Wind(AG value increase +3)</option>";
echo "<option value='29'>Socket $k: Lighting(Excellent damage increase +30)</option>";
echo "<option value='30'>Socket $k: Lighting(Excellent damage rate increase +10%)</option>";
echo "<option value='31'>Socket $k: Lighting(Critical damage increase +30)</option>";
echo "<option value='32'>Socket $k: Lighting(Critical damage rate increase +8%)</option>";
echo "<option value='36'>Socket $k: Ground(Stamina increase +30)</option>";
echo "</select><br>";
}
}
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addsocket1\" value=\"Add This Options\"></form>";
}
else
{
echo "<ul><li>You dont have any options to add on item!</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addoption1']))
{
$serial = $_POST['serial'];
$item_option = $_POST['item_option'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $item_option))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['addoption'] < $item['maxaddoption'] and $item_option > $item['addoption'])
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$krr = (fibonaci($item_option, $WebShop['kr_per_option'])*$item['credits']) - (fibonaci($item['addoption'], $WebShop['kr_per_option'])*$item['credits']);
if ($myrow['credits'] >= $krr)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$luck = sprintf("%02X", ($item_opt+($item_option-$item['addoption'])),00);
$newitem = substr($item['code'], 0, 2).$luck.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$krr where memb___id='$username'");
$log_all = "Add additional options on item($item[sn]) +".($item_option-$item['addoption']);
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addoption']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['addoption'] < $item['maxaddoption'])
{
echo "<form onsubmit=\"request('addoption2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addoption2\">";
?>
<select name="item_option">
<?
if ($item['id_cat'] != 6)
{
$k = $item['addoption']+1;
$ap = $k*4;
do
{
$krr = (fibonaci($k, $WebShop['kr_per_option'])*$item['credits']) - (fibonaci($item['addoption'], $WebShop['kr_per_option'])*$item['credits']);
printf ("<option value='%s'>%s | %s credits</option>", $k, $ap, $krr);
$k++;
$ap = $ap + 4;
}
while ($k <= $item['maxaddoption']);
}
else
{
$k = $item['addoption']+1;
$ap = $k*5;
do
{
$krr = (fibonaci($k, $WebShop['kr_per_option'])*$item['credits']) - (fibonaci($item['addoption'], $WebShop['kr_per_option'])*$item['credits']);
printf ("<option value='%s'>%s | %s credits</option>",$k, $ap, $krr);
$k++;
$ap = $ap + 5;
}
while ($k <= $item['maxaddoption']);
}
?>
</select>
<?
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addoption1\" value=\"Add This Option\"></form>";
}
else
{
echo "<ul><li>You dont have any options to add on item!</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addlevelo1']))
{
$serial = $_POST['serial'];
$item_level = $_POST['item_level'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $item_level))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['level'] < $item['maxlevel'] and $item_level > $item['level'])
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$krr = (fibonaci($item_level, $WebShop['kr_per_level'])*$item['credits']) - (fibonaci($item['level'], $WebShop['kr_per_level'])*$item['credits']);
if ($myrow['credits'] >= $krr)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$luck = sprintf("%02X", ($item_opt+(($item_level-$item['level'])*8)),00);
$newitem = substr($item['code'], 0, 2).$luck.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$krr where memb___id='$username'");
$log_all = "Add Level on item($item[sn]) +".($item_level-$item['level']);
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addlevel']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial)
{
if ($item['level'] < $item['maxlevel'])
{
echo "<form onsubmit=\"request('addlevela2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addlevela2\">";
?>
<select name="item_level">
<?
$k = $item['level']+1;
do
{
$krr = (fibonaci($k, $WebShop['kr_per_level'])*$item['credits']) - (fibonaci($item['level'], $WebShop['kr_per_level'])*$item['credits']);
printf ("<option value='%s'>%s | %s credits</option>",$k,$k,$krr);
$k++;
}
while ($k <= $item['maxlevel']);
?>
</select>
<?
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addlevelo1\" value=\"Add This Level\"></form>";
}
else
{
echo "<ul><li>You dont have any level to add on item!</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addancient1']))
{
$serial = $_POST['serial'];
$ancient = $_POST['ancient'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $ancient))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isancient'] == 1 and $item['ancient'] < 9)
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($ancient == 1)
{
$getanckr = $WebShop['ancient1'];
$ancientn = 5;
}
else
{
$getanckr = $WebShop['ancient2'];
$ancientn = 9;
}
$krr = $item['credits']*$getanckr;
if ($item['ancient'] >= 5) $krr -= $item['credits']*$WebShop['ancient1'];
if ($myrow['credits'] >= $krr)
{
$ancient = sprintf("%02X", $ancientn,00);
$newitem = substr($item['code'], 0, 16).$ancient.substr($item['code'], 18);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$krr where memb___id='$username'");
$log_all = "Add Ancient on item($item[sn]) +".$ancientn+1;
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addancient']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isancient'] == 1 and $item['ancient'] < 9)
{
echo "<form onsubmit=\"request('addancient2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addancient2\">";
if ($item['ancient'] < 4)
{
?>
<input id="ancient1" name="ancient" type="radio" value="1" checked><label for="ancient1">+5 Stamina |
<?
$krr = $item['credits']*$WebShop['ancient1'];
echo $krr." credits";
?>
</label>
<?
}
?>
<input id="ancient2" name="ancient" type="radio" value="2"><label for="ancient2">+10 Stamina |
<?
$krr = $item['credits']*$WebShop['ancient2'];
if ($item['ancient'] >= 4) $krr -= $item['credits']*$WebShop['ancient1'];
echo $krr." credits";
?>
</label>
<?
echo "<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addancient1\" value=\"Add This Option\"></form>";
}
}
}
}
elseif (isset($_POST['addharmony1']))
{
$serial = $_POST['serial'];
$harmony = $_POST['harmony'];
$harmonyvalue = $_POST['harmonyvalue'];
if (preg_match('/^[a-f0-9]/i', $serial) and preg_match('/^[0-9]/i', $harmony) and preg_match('/^[0-9]/i', $harmonyvalue))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isharmony'] == 1)
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $WebShop['harmony_price'])
{
$harmony = sprintf("%01X", $harmony,0);
$harmonyvalue = sprintf("%01X", $harmonyvalue,0);
$newitem = substr($item['code'], 0, 20).$harmony.$harmonyvalue.substr($item['code'], 22);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$WebShop[harmony_price] where memb___id='$username'");
$log_all = "Add harmony on item($item[sn]) $harmony - $harmonyvalue";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$krr','$date')");
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addharmony']))
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isharmony'] == 1)
{
echo "<form onsubmit=\"request('addharmony2','sh_','POST','getpage.php?cat=Add-Item-Options'); return false;\" action=\"\" method=\"post\" id=\"addharmony2\">Harmony Option:<select onChange=\"harmonyselect($item[id_cat],$item[level],this.form.harmony.options[this.form.harmony.selectedIndex].value);\" name=\"harmony\" id=\"harmony\"><option value='0'>< < < NONE > > ></option>";
if ($item['id_cat'] < 5)
{
if ($item['level'] >= 0) echo "<option value='1'>Min. attack increase</option>";
if ($item['level'] >= 0) echo "<option value='2'>Max. attack increase</option>";
if ($item['level'] >= 0) echo "<option value='3'>Required strength decrease</option>";
if ($item['level'] >= 0) echo "<option value='4'>Required agility decrease</option>";
if ($item['level'] >= 6) echo "<option value='5'>Attack (Max, Min)</option>";
if ($item['level'] >= 6) echo "<option value='6'>Critical Damage increase</option>";
if ($item['level'] >= 9) echo "<option value='7'>Skill Damage increase</option>";
if ($item['level'] >= 9) echo "<option value='8'>Attack Success Rate (PvP) increase</option>";
if ($item['level'] >= 9) echo "<option value='9'>SD Reduction</option>";
if ($item['level'] >= 13) echo "<option value='10'>SD Ignore Rate</option>";
}
elseif ($item['id_cat'] == 5)
{
if ($item['level'] >= 0) echo "<option value='1'>Wizardly attack increase</option>";
if ($item['level'] >= 0) echo "<option value='2'>Required strength decrease</option>";
if ($item['level'] >= 0) echo "<option value='3'>Required agility decrease</option>";
if ($item['level'] >= 6) echo "<option value='4'>Skill Damage increase</option>";
if ($item['level'] >= 6) echo "<option value='5'>Critical Damage increase</option>";
if ($item['level'] >= 9) echo "<option value='6'>SD Reduction</option>";
if ($item['level'] >= 9) echo "<option value='7'>Attack Success Rate (PvP) increase</option>";
if ($item['level'] >= 13) echo "<option value='8'>SD Ignore Rate</option>";
}
else
{
if ($item['level'] >= 0) echo "<option value='1'>Defense increase</option>";
if ($item['level'] >= 3) echo "<option value='2'>Max. AG Increase</option>";
if ($item['level'] >= 3) echo "<option value='3'>Max. HP increase</option>";
if ($item['level'] >= 6) echo "<option value='4'>Life auto increment increase</option>";
if ($item['level'] >= 9) echo "<option value='5'>Mana auto increment increase</option>";
if ($item['level'] >= 9) echo "<option value='6'>Defense success rate increase(PVP)</option>";
if ($item['level'] >= 9) echo "<option value='7'>Damage decrement increase</option>";
if ($item['level'] >= 13) echo "<option value='8'>SD Ratio Rate increase</option>";
}
echo "</select>Harmony Value:<span id=\"hvalue\"></span><input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"submit\" name=\"addharmony1\" value=\"Add This Option\"> | $WebShop[harmony_price] ".credits."</form>";
}
}
}
}
elseif (isset($_POST['addpvp']))
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
if ($myrow['credits'] >= $WebShop['refinery_price'])
{
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isrefinery'] == 1)
{
if ($item['refinery'] == 0)
{
$id_cat = hexdec(substr($item['code'], 18, 2)); /* Item Type */
$refinery = sprintf("%02X", ($id_cat+8),00);
$newitem = substr($item['code'], 0, 18).$refinery.substr($item['code'], 20);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-$WebShop[refinery_price] where memb___id='$username'");
$log_all = "Add PVP Option on item($item[sn])";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','$WebShop[refinery_price]','$date')");
}
else
{
echo "<ul><li>Item already have PVP Option</li></ul>";
}
}
}
}
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
elseif (isset($_POST['addluck']))
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isluck'] == 1)
{
if ($myrow['credits'] >= ($WebShop['item_luck']*$item['credits']))
{
if ($item['luck'] == 0)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$luck = sprintf("%02X", ($item_opt+4),00);
$newitem = substr($item['code'], 0, 2).$luck.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-($WebShop[item_luck]*$item[credits]) where memb___id='$username'");
$log_all = "Add Luck on item($item[sn])";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','".$WebShop['item_luck']*$item['credits']."','$date')");
}
else
{
echo "<ul><li>Item already have Luck Option</li></ul>";
}
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
elseif (isset($_POST['addskill']))
{
$result = mssql_query("select credits from ew_credits where memb___id='$username'");
$myrow = mssql_fetch_array($result);
$serial = $_POST['serial'];
if (preg_match('/^[a-f0-9]/i', $serial))
{
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['sn'] == $serial and $item['isskill'] == 1)
{
if ($myrow['credits'] >= ($WebShop['item_skill']*$item['credits']))
{
if ($item['skill'] == 0)
{
$item_opt = hexdec(substr($item['code'], 2, 2)); /* Item Level/Skill/Option Data */
$skill = sprintf("%02X", ($item_opt+128),00);
$newitem = substr($item['code'], 0, 2).$skill.substr($item['code'], 4);
$mynewitems = str_replace($item['code'], $newitem, $current_items);
mssql_query("update warehouse set items=$mynewitems where accountid='$username';
update ew_credits set credits=credits-($WebShop[item_skill]*$item[credits]) where memb___id='$username'");
$log_all = "Add Skill on item($item[sn])";
$insert_log = mssql_query("insert into EW_LOG (account,[index],credits,datetime) values ('$username','$log_all','".$WebShop['item_skill']*$item['credits']."','$date')");
}
else
{
echo "<ul><li>Item already have Skill Option</li></ul>";
}
}
else
{
echo "<ul><li>".eror_cr."</li></ul>";
}
}
}
}
}
mssql_query(" declare @items varbinary(1920);
set @items = (select items from warehouse where accountid='$username');
print @items;");
$itemlen = $_SERVER['itemlenght'];
$current_items = mssql_get_last_message();
$user_items = substr($current_items,2);
$i = -1;
echo "<table cellpadding=\"0\" cellspacing=\"6\" width=\"100%\">";
while ($i < 119)
{
$i++;
$item = ItemInfo(substr($user_items, ($itemlen * $i), $itemlen));
if ($item['name'])
{
$refinery = "";
$excellent = "";
$luck = "";
$addoption = "";
$skill = "";
$ancient = "";
$addlevel = "";
$addharmony = "";
$addsocket = "";
if ($item['exe_type'] < 4)
{
if ($item['luck'] == 1) $luck = "Add Luck<br>";
elseif ($item['isluck'] == 1) $luck = "<a htef=\"#\" onclick=\"request('addluckx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Luck | ".$WebShop['item_luck']*$item['credits']." ".credits."</a><br>";
if ($item['ancient'] == 9) $ancient = "Add/Change Ancient Option<br>";
elseif ($item['isancient'] == 1) $ancient = "<a htef=\"#\" onclick=\"request('addancientx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add/Change Ancient Option</a><br>";
if ($item['skill'] == 1) $skill = "Add Skill<br>";
elseif ($item['isskill'] == 1) $skill = "<a htef=\"#\" onclick=\"request('addskillx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Skill | ".$WebShop['item_skill']*$item['credits']." ".credits."</a><br>";
if ($item['refinery'] > 0) $refinery = "Add 380 Level Options<br>";
elseif ($item['isrefinery'] == 1) $refinery = "<a htef=\"#\" onclick=\"request('addpvpx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add 380 Level Options | ".$WebShop['refinery_price']." ".credits."</a><br>";
if ($item['excellent'] >= 64 or $item['exe_count'] >= $item['maxexe']) $excellent = "Add Excelence Options<br>";
else $excellent = "<a htef=\"#\" onclick=\"request('addexex$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Excelence Options</a><br>";
if ($item['addoption'] >= $item['maxaddoption']) $addoption = "Add Additional Option<br>";
else $addoption = "<a htef=\"#\" onclick=\"request('addoptionx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Additional Options</a><br>";
if ($item['level'] >= $item['maxlevel']) $addlevel = "Add Item Level<br>";
else $addlevel = "<a htef=\"#\" onclick=\"request('addlevelx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Item Level</a><br>";
if ($item['isharmony'] == 1) $addharmony = "<a htef=\"#\" onclick=\"request('addharmonyx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add/Change Harmony Option</a><br>";
if ($item['issocket'] >= 1 and ($item['socket1'] == 255 or $item['socket1'] < 254) and ($item['socket2'] == 255 or $item['socket2'] < 254) and ($item['socket3'] == 255 or $item['socket3'] < 254) and ($item['socket4'] == 255 or $item['socket4'] < 254) and ($item['socket5'] == 255 or $item['socket5'] < 254))$addsocket = "Add Socket Options<br>";
elseif ($item['issocket'] >= 1) $addsocket = "<a htef=\"#\" onclick=\"request('addsocketx$i','sh_','POST','getpage.php?cat=Add-Item-Options');\">Add Socket Options</a><br>";
}
echo "<tr>
<td width=\"50%\" style='font-size:10px; background-image:url(".$_SERVER['IMAGES_HOST']."http://forum.ragezone.com/images/back_item.png);'>$item[echo_item]</td>
<td>
<form action=\"\" method=\"post\" id=\"addexex$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addexe\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addpvpx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addpvp\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addluckx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addluck\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addskillx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addskill\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addoptionx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addoption\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addlevelx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addlevel\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addancientx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addancient\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addharmonyx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addharmony\" value=\"1\">
</form>
<form action=\"\" method=\"post\" id=\"addsocketx$i\">
<input type=\"hidden\" name=\"serial\" value=\"$item[sn]\">
<input type=\"hidden\" name=\"addsocket\" value=\"1\">
</form>
$addlevel$skill$luck$ancient$addoption$refinery$addharmony$excellent$addsocket
</td>
</tr>";
}
}
echo "</table>";
?>
you have only 1 file? can you post other file here or the link in ragezone where you got this script?
Re: Please items for webshop season 6 ep 3
MuWeb revamped Enemy Season 4 to Season 6 Episode 3 And adding Option on the site makes me problems. If you want to participate in the treatment and repair of this site here is my Skype name pepe.95