Acis 370 rev.
Interlude.
First you must create the item Surprise Box in server and client sides. It's for server side.
go to data/stats/items/
create 10000-10099.xml
start of file must be <list> in end, the same of start but with ending tag</list>
between <list> and </list> insert this:
Код:
<item id="10000" type="Item" name="Surprise Box">
<set name="default_action" val="capsule" />
<set name="material" val="LIQUID" />
<set name="weight" val="600" />
<set name="price" val="0" />
<set name="is_tradable" val="false"/>
<set name="is_droppable" val="false"/>
<set name="handler" val="ItemSkills" />
<set name="item_skill" val="10000-1" />
</item>
Second add the skill whose will invoked by the item.
find data/stats/skill/
create in folder the new file with .xml direction
for example: 10000-10099.xml
and insert this code to your created .xml
Код:
<skill id="10000" levels="1" name="Surprise Box">
<table name="#extractableItems">
<!-- 4037 - item id, 50 - item count, 100 - chance of drop when you extract the item
in this example i put items
COL, 50 units, 100% chance
ADENA, 1kk, with 50% chance
ENRIA, 1 unit, with 20% chance
-->
4037,50,100;
57,1000000,50;
4042,450,20
</table>
<set name="capsuled_items_skill" val="#extractableItems"/>
<set name="mpConsume" val="366"/>
<set name="target" val="TARGET_SELF"/>
<set name="hitTime" val="3000"/>
<set name="skillType" val="EXTRACTABLE"/>
<set name="operateType" val="OP_ACTIVE"/>
<set name="isMagic" val="true"/>
<set name="itemConsumeId" val="1461"/>
<set name="itemConsumeCount" val="1"/>
<set name="reuseDelay" val="180000"/>
</skill>
@Notice
You must create the item in client side, or your item will not be usable.
@See
Java code of realisation for Skill, you can find in
Java code of realisation for Item, you can find in
Good Luck dude.