viewing paste Unknown #20945 | Athena

Posted on the
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
mosk_que    mapflag nowarp
mosk_que    mapflag nowarpto
mosk_que    mapflag nosave
mosk_que    mapflag nodrop
mosk_que    mapflag noteleport
mosk_que    mapflag nocommand   50
mosk_que    mapflag noloot
 
/// Custom XXRO farm rooms.
/// Ygg berries, gold rooms.
/// (C) Oxxy, 2015
 
atlantis,123,183,6  script  Special Room    700,{
 
    mes .npcName$;
    mes "Приветствую, "+strcharinfo(0);
    mes "Я предоставляю доступ к одной уникальной комнате,"
    "в которой, в зависимости от Вашего выбора, Вам будет выпадать одна из вещей:";
    mes "1.) Yggdrassil Berry (шанс дропа 5%)";
    mes "2.) Gold (шанс дропа 5%)";
    mes "3.) Witherless Rose или Frozen Rose (шанс дропа 10% и 15%)";
    switch(select("> Yggdrassil Berry:> Gold:> Witherless / Frozen Rose:> Отмена")) {
    
        case 1: // Berry
        case 2: // Gold
        case 3: // Witherless / Frozen Rose
            dispbottom "Monsters in special room will drop "+getitemname(.g_item[@menu])+" for you at "+.g_chance[@menu]/100+"% chance.";
            warp "mosk_que",0,0;
            end;
        
        case 4: // Отмена
            close;
    }
 
    OnInit:
        .npcName$ = "^FF0000[XXRO] ^0000FFSpecial Room^000000";
        delwaitingroom;
        waitingroom "[XXRO] Special Room",0;
        setarray .g_item[0],607,969,768,769;
        setarray .g_chance[0],500,1000,1000,1500;
        setarray .g_amount[0],1,1,1,1;
        setarray .g_randamount[0],1,0,0,0;
        end;
        
    OnSpecialMobKill:
        if(@menu != 3) {
            if(rand(101) <= .g_chance[@menu]/100) {
                if(.g_randamount[@menu])
                    getitem .g_item[@menu],rand(1,.g_amount[@menu]);
                else getitem .g_item[@menu],.g_amount[@menu];
            }
            end;
            
        } else if(@menu == 3) {
            if(rand(101) <= .g_chance[@menu]/100) {
                if(.g_randamount[@menu])
                    getitem .g_item[@menu],rand(1,.g_amount[@menu]);
                else getitem .g_item[@menu],.g_amount[@menu];
            } else if(rand(101) <= .g_chance[@menu+1]/100) {
                if(.g_randamount[@menu+1])
                    getitem .g_item[@menu+1],rand(1,.g_amount[@menu+1]);
                else getitem .g_item[@menu+1],.g_amount[@menu+1];
            }
            
            end;
        }
        end;
        
}
 
//<map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>{,<mob size>,<mob ai>}
mosk_que,0,0,0,0    monster SpecialMonster  1002,100,300000,0,"Special Room::OnSpecialMobKill"
Viewed 666 times, submitted by Guest.