summaryrefslogblamecommitdiff
path: root/npc/006-7/ctrl.txt
blob: da46197aa711a3d86623bbdd3291192723f3984a (plain) (tree)


















































                                                                                             
// TMW2 Script
// Author:
//    Jesusalva

006-7,44,50,0	script	#OutOf0067	NPC_HIDDEN,0,0,{
    end;

OnTouch:
    if (!$@ICICLE_CHALLENGE)
        warp "006-6", 40, 36;
    end;
}

006-7,44,50,0	script	Ice Lord	NPC_YETIFLY,{
    if (.ticks > gettimetick(2)) end;
    mesn;
    mesq l("With Magic and Blades, The Icicle shall break. Do you undertake the challenge?");
    mesc l("Advised: 6+ players"), 1;
    mesc l("Advised: 1+ mage, 1+ tanker"), 1;
    mesc l("Time Limit: 90 minutes"), 1;
    next;
    if (askyesno() == ASK_NO) { closeclientdialog; close; }

    .ticks = gettimetick(2) + 5400; // 90 minutes

    disablenpc .name$;
    initnpctimer;
    closeclientdialog;
    close;

// Heart
OnTimer5000:
    if (.ticks < gettimetick(2) || !mobcount("006-7", "all")) {
        killmonsterall("006-7");
        enablenpc .name$;
        .ticks = gettimetick(2);
        .beats = 0;
        stopnpctimer;
        end;
    }
    .beats += 1;
    initnpctimer;
    end;

OnInit:
    .distance = 4;
    .ticks = gettimetick(2);
    .beats = 0;
    end;
}