viewing paste Extra Mob Drops 1.1 [Aeromesi] | 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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
// Created by Aeromesi
// Version 1.0
// Works with Hercules & rAthena
-   script  ExtraDropSystem -1,{
OnNPCKillEvent:
    .@killedRID = killedrid;
    for ( .@i = 1; .@i <= .SelectedMob; .@i++ ) {
    if ( .@killedRID == .MonsterID[.@i]) {
        if ( !.EnableItem && !.EnableCash && !.EnableZeny ) {
            dispbottom "Disabled System";
            end;
        }
 
                if ( rand(100) > .DropRate[.@i] ) {
                    if ( .EnableItem ) {
                        if ( .ItemRewards[.@i] == 0 ) {
                        debugmes "[Warning] Did not recieve Item reward! Data entry for "+strmobinfo( .MonsterID[.@i],1 )+"s Item is currently 0!";  
                        end;
                            }
                        getitem .ItemRewards[.@i], .RewardAmount[.@i];
                        dispbottom "Obtained "+getitemname ( .ItemRewards[.@i] )+" x "+.RewardAmount[.@i]+".";
                }
 
                    if ( .EnableZeny ) {
                            if ( .ZenyAmount[.@i] == 0 ) {
                                 debugmes "[Warning] Did not recieve Zeny reward! Data entry for "+strmobinfo(.MonsterID[.@i],1)+"s Zeny is currently 0!";  
                                end;
                            }
                        Zeny += .ZenyAmount[.@i];
                        dispbottom "Obtained "+.ZenyAmount[.@i]+" Zeny.";
                }
 
                    if ( .EnableCash ) {
                            if ( .CashAmount[.@i] == 0 ) {
                                debugmes "[Warning] Did not recieve Cash reward! Data entry for "+strmobinfo(.MonsterID[.@i],1)+"s Cash is currently 0!";  
                                end;
                        }
 
                        #CASHPOINTS += .CashAmount[.@i];
                        dispbottom "Obtained "+.CashAmount+" Cash Points.";
                }
    end;
    } else {
                        dispbottom "Did not get rewards at "+.DropRate[.@i]+"% drop rate.";
    end;
}
}
}
                /* ---      Format:     
                        Poring(1002)
                        Zeny: 5000
                        Cash: 10
                        Item: Red Potion (501)
                        Amount of Red Potion: 6
                                                --- */
                                    
    OnInit:
    .MinGM = 99; // Minimum GM level to access Mob edit system via @extradrops
    .SelectedMob = 4; // Edit this to the max amount of monsters you have, currently in .MonsterID we have a total of 4 monsters, so we put 4.
    bindatcmd "extradrops",strnpcinfo(0)+"::OnAtExtraDrops"; // Command '@extradrops' allows player to view extra mob drop data, but GM can edit extra mob drop data in real-time ingame!
    bindatcmd "onoffdrops",strnpcinfo(0)+"::OnAtOnOffDrops",99; // ON / OFF toggle for GM to disable / enable the Extra Drops System.
 
    // Enable Item / Zeny / Cash Points - Enter 0 for all to disable this basically disable the script.
    .EnableItem = 1; // 1 for True, 0 for False -- Enable Item feature, will your mob give an specified item or not?
    .EnableZeny = 1; // 1 for True, 0 for False -- Enable Zeny feature, will mob give zeny or not?
    .EnableCash = 1; // 1 for True, 0 for False -- Enable Cash feature, will mob give Cash Points or not? ( HINT: Change the variable to any other variable you want to use).
    .EnableSystem = 1; // 1 for True, 0 for False -- Enable/Disable whole system or not.
 
    if ( $EditStarted ) {
    end;
    }
 
    setarray .MonsterID[1],1002,1004,1005,1007; // Monster ID's, make sure to keep count of how many you're adding for .SelectedMob array.
    setarray .ZenyAmount[1],5000,3000,4000,1000; // 1002 would be poring, so he would get 5000 zeny, set the item rewards/cash amounts in accordance to each monster.
    setarray .ItemRewards[1],501,502,503,504; // Poring would drop a Red Potion.
    setarray .RewardAmount[1],6,5,5,5; // Reward Amounts for items
    setarray .CashAmount[1],5,6,7,8,9; // Cash Amounts
    setarray .DropRate[1],50,5,5,1; // Drop Rates for each specified monster ;)
    end;
 
    OnAtExtraDrops:
    if ( getgmlevel() >= .MinGM )
        callsub GMMenu;
    
    if ( getgmlevel() < .MinGM )
        callsub PlayerMenu;
    end;
 
    GMMenu:
        if ( !.EnableSystem ) {
            mes "System is currently disabled.";
            end;
        }
        EditMenu:
            mes "Select Monster to edit data:";
            .@menu$ = implode( strmobinfo (.MonsterID ,":"));
            .@choice = select(.@menu$) - 1;
            next;
            mes "Currently editing: "+strmobinfo ( .MonsterID[.@choice],1 )+ ".";
                switch(select("[Edit] Item data","[Edit] Zeny data","[Edit] Cash data"))
                {
                    case 1:
                        dispbottom "Input Item ID.";
                        input .@TempChoice;
                        next;
                        mes "Previous Item: "+.ItemRewards[.@choice]+".";
                        mes "New item: "+.ItemRewards[.@TempChoice]+".";
                        mes "Is this okay?";
                        next;
                    switch(select("Confirm","Redo","Main Menu")) {
        
                    case 1:
                        .ItemRewards[.@choice] = .ItemRewards[.@TempChoice];
                        mes "New item: "+.ItemRewards[.@choice]+".";
                        $EditStarted = 1;
                        close;
 
                    case 2:
                        callsub EditMenu;
                        end;
 
                    case 3:
                        callsub GMMenu;
                        end;
 
}
                    case 2:
                    dispbottom "Input new amount of Zeny.";
                        input .@TempChoice;
                        next;
                        mes "Previous Zeny "+.ZenyAmount[.@choice]+".";
                        mes "New Zeny "+.ZenyAmount[.@TempChoice]+".";
                        mes "Is this okay?";
                        next;
                    switch(select("Confirm","Redo","Main Menu")) {
        
                    case 1:
                        .ZenyAmount[.@choice] = .ZenyAmount[.@TempChoice];
                        $EditStarted = 1;
                        mes "New Zeny: "+.ZenyAmount[.@choice]+".";
                        close;
 
                    case 2:
                        callsub EditMenu;
                        end;
 
                    case 3:
                        callsub GMMenu;
                        end;
                    }
                        
                    case 3:
                        dispbottom "Input Cash Amount.";
                        input .@TempChoice;
                        next;
                        mes "Previous Cash Amount: "+.CashAmount[.@choice]+".";
                        mes "New Cash Amount: "+.ItemRewards[.@TempChoice]+".";
                        mes "Is this okay?";
                        next;
                            switch(select("Confirm","Redo","Main Menu")) {
        
                                case 1:
                                    .ItemRewards[.@choice] = .ItemRewards[.@TempChoice];
                                    $EditStarted = 1;
                                    mes "New item: "+.ItemRewards[.@choice]+".";
                                    close;
                                case 2:
                                    callsub EditMenu;
                                    end;
                                case 3:
                                    callsub GMMenu;
                                    end;
                                }
}
 
    PlayerMenu:
        if ( !.EnableSystem ) {
            mes "System is currently disabled.";
            end;
        }
            mes "Extra Mob Drop Information:";
            for ( .@i = 1; .@i <= .SelectedMob; .@i++ ) {
            dispbottom " || :Monster: "+strmobinfo( .MonsterID[.@i],1)+" :Item: "+getitemname(.ItemRewards[.@i])+"/ID:"+.ItemRewards[.@i]+" :Zeny: "+.ZenyAmount[.@i]+" :Cash: "+CashAmount[.@i]+" ||";
        }
    end;
 
    OnAtOnOffDrops:
        if ( !$EnableSystem ) {
                $EnableSystem = 1;
                dispbottom "Enabled Extra Drops System";
                end;
        }
        if ( $EnableSystem ) {
                $EnableSystem = 0;
                dispbottom "Disabled Extra Drops System";
                end;
        }
}
Viewed 856 times, submitted by Guest.