Peace & Love Guys,
In the New Version all "Items" the Droprates in XML files (MIN="" |Max="")(Holy crap? Why?) When i change now the DeathDropAmount to 2 all items that dropps are amount of two... etc... if i change to 4 all items 4..
so but what i want is that the Items Amount between 2 - 10 ..
... i hope i dont must change all XML for this crap...... ?
now to my question: It is Possible to Change the Drop Amount between to numbers.. (like 10 - 25 something..) or per percent...
PS: Sorry for my very very very good englisch..^^
L2J Change Drop Amount for all items
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Bencratus
- Posts: 51
- Joined: Wed Jan 07, 2015 11:38 pm
- Contact:
Re: L2J Change Drop Amount for all items
Seems everything good as you said by yourself.PacWhite wrote:In the New Version all "Items" the Droprates in XML files (MIN="" |Max="")(Holy crap? Why?) When i change now the DeathDropAmount to 2 all items that dropps are amount of two... etc... if i change to 4 all items 4..
In XML files it have min,max.PacWhite wrote: so but what i want is that the Items Amount between 2 - 10
<item id="57" min="902" max="1804" chance="100" />
it means it can be from 902 to 1804 rnd also it can be 902 or 1804
Need rework core, you can do only this.PacWhite wrote:now to my question: It is Possible to Change the Drop Amount between to numbers.. (like 10 - 25 something..) or per percent...
<item id="57" min="902" max="1804" chance="100" />
-
- Posts: 22
- Joined: Sat Sep 22, 2012 9:56 pm
Re: L2J Change Drop Amount for all items
Really?... what is that 4 a crap?
I want to change the Drop chance percently .... or like factor X ..
Is this the only way?...
I want to change the Drop chance percently .... or like factor X ..
Is this the only way?...
-
- Posts: 22
- Joined: Sat Sep 22, 2012 9:56 pm
Re: L2J Change Drop Amount for all items
Ok.. now, i change the Problem.. with PHP Code^^
Yu need only 2 Folders xml (for all XML from data/stats/npc/) and empty folder edit (here you found the changed XMLs)
The Vars = $rate (the normal deathdroprate) and $spoilrate (for spoilrate)...
Have fun use it extend it.. Thanks to all.
Can be Close...
Yu need only 2 Folders xml (for all XML from data/stats/npc/) and empty folder edit (here you found the changed XMLs)
The Vars = $rate (the normal deathdroprate) and $spoilrate (for spoilrate)...
Have fun use it extend it.. Thanks to all.
Code: Select all
<?php
$handle = opendir("xml/");
$rate = 1.3;
$spoilrate = 1.3;
while($xmls = readdir($handle))
{
$isxml = pathinfo($xmls, PATHINFO_EXTENSION);
if($isxml == "xml")
{
$xml = simplexml_load_file("xml/".$xmls);
echo "Edit of File: ".$xmls;
foreach($xml->children() as $childs)
{
foreach($childs->drop_lists->death->group as $dropgroups)
{
foreach($dropgroups->item as $item)
{
$newrate = (float)$item["chance"];
$newrate = $newrate*$rate;
$item["chance"] = $newrate;
}
}
foreach($childs->drop_lists->corpse->group as $dropgroups)
{
foreach($dropgroups->item as $item)
{
$newrate = (float)$item["chance"];
$newrate = $newrate*$spoilrate;
$item["chance"] = $newrate;
}
}
}
echo "End of File: ".$xmls;
$xml->asXML("edit/".$xmls);
}
}
?>
- Battlecruiser
- L2j Veteran
- Posts: 332
- Joined: Thu May 01, 2008 9:44 am