var pinv = player.getInventory();
var dejafait;
for(i = 0; i < 40; i++)
{
var thisItem = pinv.getItemInSlot(i);
if (thisItem != null)
{
if (thisItem.getItemID() == 285)
{
if (dejafait)
{ effect.setOverlay("guide.png");
break;
}
if (thisItem.getQuantity() > 1)
{
effect.setOverlay("guide.png");
}
else
{
pinv.emptySlot(i);
}
switch(conv)
{
case 0:effect.setOverlay("t guide 5.png");conv=1;player.setStunned(1E4);sound.playSoundUI("sound.next");break;case 1:effect.setOverlay("guide 6.png");conv=2;sound.playSoundUI("sound.next");break;case 2:effect.setOverlay("guide 7.png");conv=3;sound.playSoundUI("sound.next");break;case 3:effect.setOverlay("guide 8.png");conv=4;sound.playSoundUI("sound.next");break;case 4:effect.setOverlay("guide 9.png");conv=5;
sound.playSoundUI("sound.next");break;case 5:effect.setOverlay("guide 10.png");conv=6;sound.playSoundUI("sound.next");break;case 6:effect.setOverlay("guide 11.png");conv=7;sound.playSoundUI("sound.next");break;case 7:effect.setOverlay("guide 12.png");conv=8;sound.playSoundUI("sound.next");break;case 8:effect.setOverlay("guide 13.png");conv=9;sound.playSoundUI("sound.next");break;case 9:effect.setOverlay("guide 14 y.png");conv=10;sound.playSoundUI("sound.next");
break;case 10:effect.setOverlay("guide 15.png");conv=11;sound.playSoundUI("sound.next");break;case 11:effect.setOverlay("guide 16.png");conv=12;sound.playSoundUI("sound.next");
break;case 12:effect.clearOverlay(),conv=0,sound.playSoundUI("sound.done"),player.setStunned(0);
}
dejafait = true;
break;
}
}
}