viewing paste topic/11182-dressing_girl | Athena

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
prontera,155,185,5  script  Dressing Girl   1_F_MARIA,{
    addtimer 1, strnpcinfo(0)+"::OnChangeBack";
    mes "do you want to try out the look of some awesome headgear?";
    next;
    .@s = select( .menu$ ) -1;
    if ( getiteminfo( .headgear[.@s], 5 ) & 256 )
        changelook LOOK_HEAD_TOP, getiteminfo( .headgear[.@s], 11 );
    else if ( getiteminfo( .headgear[.@s], 5 ) & 512 )
        changelook LOOK_HEAD_MID, getiteminfo( .headgear[.@s], 11 );
    else if ( getiteminfo( .headgear[.@s], 5 ) & 1 )
        changelook LOOK_HEAD_BOTTOM, getiteminfo( .headgear[.@s], 11 );
    else {
        mes "this is not a headgear ...";
        close;
    }
    mes "that look nice on you";
    close;
OnChangeBack:
    if ( getequipid(EQI_HEAD_TOP) != -1 )
        changelook LOOK_HEAD_TOP, getiteminfo( getequipid(EQI_HEAD_TOP), 11 );
    else
        changelook LOOK_HEAD_TOP, 0;
    if ( getequipid(EQI_HEAD_MID) != -1 )
        changelook LOOK_HEAD_MID, getiteminfo( getequipid(EQI_HEAD_MID), 11 );
    else
        changelook LOOK_HEAD_MID, 0;
    if ( getequipid(EQI_HEAD_LOW) != -1 )
        changelook LOOK_HEAD_BOTTOM, getiteminfo( getequipid(EQI_HEAD_LOW), 11 );
    else
        changelook LOOK_HEAD_BOTTOM, 0;
    end;
OnInit:
    setarray .headgear, // add as many as possible
        Red_Tailed_Ribbon,
        Charming_Ribbon,
        Twin_Ribbon,
        Ribbon_Pink,
        Blush_Of_Groom,
        Ribbon_Of_Bride,
        Glasses,
        Flu_Mask;
    .headgearsize = getarraysize(.headgear);
    for ( .@i = 0; .@i < .headgearsize; .@i++ )
        .menu$ = .menu$ + getitemname(.headgear[.@i]) +":";
    end;
}
Viewed 1693 times, submitted by AnnieRuru.