Files
dsrc/sku.0/sys.server/compiled/game/script/item/dna/cracktooth_dna.java
T

29 lines
870 B
Java
Executable File

package script.item.dna;
import script.dictionary;
import script.library.*;
import script.location;
import script.obj_id;
public class cracktooth_dna extends script.base_script
{
public cracktooth_dna()
{
}
public static final String CRACKTOOTH_NARGLATCH_DNA_LOOT_ITEM = "item_cs_dna_mutated_narglatch";
public static final int CRACKTOOTH_NARGLATCH_DNA_LOOT_CHANCE = 15;
public int aiCorpsePrepared(obj_id self, dictionary params) throws InterruptedException
{
int chanceDna = rand(1, 100);
if (chanceDna > CRACKTOOTH_NARGLATCH_DNA_LOOT_CHANCE)
{
return SCRIPT_CONTINUE;
}
obj_id inv = utils.getInventoryContainer(self);
obj_id dna = static_item.createNewItemFunction(CRACKTOOTH_NARGLATCH_DNA_LOOT_ITEM, inv);
return SCRIPT_CONTINUE;
}
}