Argh... test before you commit, Cekis!

This commit is contained in:
Cekis
2018-03-23 15:45:37 -07:00
committed by CekisSWG
parent 99403d58f0
commit c77fbd0c44
@@ -39,13 +39,14 @@ public class death_target extends script.base_script
obj_id player = (obj_id) players.get(i);
messageTo(player, "youWin", null, 1, false);
if(!prizeAwarded) {
// the ITV should be a 12.5% chance to be awarded.
int prize = rand(0, 7);
if (prize == 4) {
obj_id inv = utils.getInventoryContainer(player);
obj_id itv = createObject("object/tangible/veteran_reward/instant_travel_terminal.iff", inv, "");
if (isIdValid(itv)) {
CustomerServiceLog("Loot", "User: (" + player + ") " + getName(player) + " has won the factional Instant Travel Vehicle.");
sendSystemMessage(player, "Congratulations! You've looted the factional Instant Travel Vehicle!");
sendSystemMessage(player, "Congratulations! You've looted the factional Instant Travel Vehicle!", null);
playMusic(player, "sound/music_mission_complete.snd");
prizeAwarded = true;
}