viewing paste Unknown #20650 | Text

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 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345
dew_dun02   mapflag nobranch
dew_dun02   mapflag nomemo
dew_dun02   mapflag nosave
dew_dun02   mapflag nocommand   //wlng storage wlng butterflywing wlng reloadscript wlng @item daig pa na jail
dew_dun02   mapflag noreturn
dew_dun02   mapflag nowarp
dew_dun02   mapflag nowarpto
dew_dun02   mapflag noteleport
dew_dun02   mapflag novending
 
dew_dun02,305,30,0  warp    miningexit  2,2,que_house_s,11,36
 
que_house_s,10,38,4 script  Smuggler    853,{
if (getgmlevel() == 99) {
mes "Hello GM.";
switch  (select("Start Event:Settings:Check Event Status:Force Stop Event:StopSalary")) {
case 1:
    disablenpc  "miningexit";
    
    for (.@e = 0; .@e < getarraysize($@Players); .@e++) {
    set $@Players[.@e],0;
    }
    
    if (!$MineEvent) {
    if (!$mobs) set $mobs,100;
    set $p, 0;
    set $MineEvent,1;
    mes "Event is activated.";
    set $Controller,getcharid(3);
    goto    OnEventStart;
    close;
    end;
    }
    mes "Event is currently active.";
    close;
case 2:
    mes "Input security code: ";
    input $secode$;
    if ($secode$ != "imkairogm") close;
    if (!$MineEvent) {
    mes "Input Mob Count";
    input $mobs;
    if (!$mobs) {
    set $mobs, 100;
    mes "Can't make it zero!. Defaulting.. mobs = 100.";    
    }   
    next;
    mes "Type 0 to default. 1 Credits.";
    mes "Input Prize item ID num. ";
    input   $conso;
    mes "Input Prize amount.";
    input   $consoamount;
    if ($conso == 0) set    $conso,20080;
    if  ($consoamount == 0) set $consoamount,1;
    next;
    mes "Input number of Participants to activate.";
    input   $participants;
    if (!$participants) set $participants,10;
    close;
    }
    mes "You can't. Event is active.";
    close;
case 3:
    mes "Mobs to spawn: ^0066CC"+$mobs;
    mes "^000000Current Prize: ^0066CC"+getitemname($conso);
    mes "^000000Current Prize Amount: ^0066CC"+$consoamount;
    mes "^000000No. of participants to activate: ^0066CC"+$participants;
    mes "Current Players inside: ^FF0000"+getmapusers("dew_dun02")+"^000000";
    if ($MineEvent) {
    mes "^000000Event is currently ^FF0000active.^000000";
    close;
    }
    mes "^000000Event is currently ^FF0000not active.^000000";
    close;
 
case 4:
    set $temprid, getcharid(3);
    set $OnGoing,0;
    if ($MineEvent) {
    set $MineEvent,0;   
    mes "Event is forced stopped!";
    mes "Warping out....";
    killmonsterall  "dew_dun02";
    cleanmap    "dew_dun02";
    announce    "Mining Event is forced stopped.",0;
    enablenpc   "miningexit";
    for (.@b = 0; .@b < getarraysize ($@Players); .@b++) {
        attachrid   $@Players[.@b];     
        warp    "que_house_s",11,36;            
        detachrid;
    }
    attachrid   $temprid;
    for (.@f = 0; .@f < getarraysize($@Players); .@f++) {
    set $@Players[.@f],0;
    set $@Mobkills[.@f],0;
    }   
    close;
    end;
    }
    mes "Event is not currently active.";
    close;
    end;
case 5:
    mes "Stopping Event.."; 
    detachrid;
    for (.@b = 0; .@b < getarraysize ($@Players); .@b++) {
        attachrid   $@Players[.@b];
        warp    "que_house_s",11,36;
        dispbottom  "[Smuggler]: That's right! Here's your pay for participating in the event.";
        getitem $conso,$consoamount;        
        set $tempkills, $@Mobkills[.@b]/5;
        
        if ($tempkills > 0) {
        dispbottom  "[Smuggler]: Here's your bonus for killing more.";      
        getitem $conso,$tempkills;
        }
        set $@Players[.@b],0;
        set $@Mobkills[.@b],0;      
        set $tempkills, 0;
        detachrid;
    }   
    set $OnGoing,0;
    set $p, 0;
    set $MineEvent, 0;
    set $mobs,100;  
    enablenpc   "miningexit";
    hideoffnpc  "Smuggler";     
    end;
    
}
}
 
if ($OnGoing) end;
for (.@c = 0; .@c < getarraysize ($@Players); .@c++) {
        if (getcharid(3) == $@Players[.@c]) {
        mes "You are already registered. Just wait there.";
        mes $pleft+" players more, then we can start.";
        close;
        end;
        }
    }
    
if ($MineEvent) {
    mes "[Smuggler]";
    mes "Let me check you first for banned items.";
    for (set .@a,0; .@a < getarraysize($@usables); set .@a, .@a + 1) {      
                if (countitem($@usables[.@a]) > 0) {
                next;
                mes "You are currently holding [^FF0000"+getitemname($@usables[.@a])+"^000000] in your inventory";              
                set #bannedgoods,1;
            }
    }
    if (#bannedgoods) { next;   mes "Store them if you wanna join~."; set   #bannedgoods,0;  close; }   
    next;
    
    mes "[Smuggler]";
    mes "All Clear.";
    mes "Do you want to register for the event?";
    if (select("Yes:No") == 1) {    
    mes "Okay. wait here."; 
    set $@Players[$p],getcharid(3);
    set $p,$p+1;
    set $pleft, $participants - $p;
    mes "^009933"+$pleft+"^000000 players more, then we can start.";
    if ($p%2 == 0) {    announce    "[Smuggler]: "+$pleft+" more players, then we can start.",0; }
    if ($p == $participants)  {
        for (.@g = 0; .@g < getarraysize($@Players); .@g++) {
        attachrid   $@Players[.@g];
        for (set .@j,0; .@j < getarraysize($@usables); set .@j, .@j + 1) {      
                if (countitem($@usables[.@j]) > 0) {
                dispbottom  "[Smuggler]: I TOLD YOU DON'T BRING BANNED ITEMS!!.";
                npctalk strcharinfo(0)+" is caught cheating by bringing banned items.";
                set $@Players[.@g],0;
                set $@Mobkills[.@g],0;
                detachrid;
                break;
            }
        }       
        }   
    set $OnGoing, 1;
    hideonnpc   "Smuggler"; 
    goto OnWarpPlayers; 
    }
    close;
    }
    close;
}
mes "[Smuggler]";
mes "Move Along~~";
mes "Nothing to see here.";
close;
 
OnEventStart:
    announce    "Mining Event has started.",0;
    announce    "[Smuggler]: To those who wanna join come at me in the GM Room.",0;
    announce    "[Smuggler]: I will help you make some monney~~",0;     
    announce    "[Smuggler]: I need "+$participants+" only for the job. First come first serve.",0;
    close;
    end;    
    
OnWarpPlayers:
    for (.@b = 0; .@b < getarraysize ($@Players); .@b++) {
        attachrid   $@Players[.@b];     
        warp    "dew_dun02",305,30;
        dispbottom  "[Smuggler]: Get me alot of money.";        
        detachrid;
    }
    
    monster "dew_dun02",0,0,"--en--",3021,$mobs,"Smuggler::OnSummonDead";   
    close;
    end;
    
OnSummonDead:
    set $mobs, $mobs - 1;   
    getmapxy @map$,@x,@y,0;
        if (@map$ == "dew_dun02") {
            for (.@q = 0; .@q < getarraysize($@Players); .@q++) {
                if (getcharid(3) == $@Players[.@q]) {
                    set $@Mobkills[.@q],$@Mobkills[.@q] + 1;                    
                    break;
                }
            }
    }
        
    if ($mobs < 1) {
    announce "Boss has been summoned.",bc_map,0x9999FF;
    monster "dew_dun02",0,0,"--en--",3022,1,"Smuggler::OnBossDead"; 
    }   
    end;
 
OnBossDead:
    announce    rid2name(killerrid) + " has killed the Mining Boss.",0;
    attachrid $Controller;
    set $OnGoing,0;
    set $p, 0;
    set $MineEvent, 0;
    set $mobs,100;  
    enablenpc   "miningexit";
    hideoffnpc  "Smuggler"; 
    /*
    attachrid   killerrid;
    getmapxy @map$,@x,@y,0;
        if (@map$ == "dew_dun02") {
        atcommand   "@refresh";
    }
    */
    announce    "Warping players back in 10 seconds, don't logout.",bc_map,0x9999FF;    
    sleep 10000;
    detachrid;  
    for (.@b = 0; .@b < getarraysize ($@Players); .@b++) {
        attachrid   $@Players[.@b];
        warp    "que_house_s",11,36;
        dispbottom  "[Smuggler]: That's right! Here's your pay for participating in the event.";
        getitem $conso,$consoamount;        
        set $tempkills, $@Mobkills[.@b]/5;
        
        if ($tempkills > 0) {
        dispbottom  "[Smuggler]: Here's your bonus for killing more.";      
        getitem $conso,$tempkills;
        }
        set $@Players[.@b],0;
        set $@Mobkills[.@b],0;
        set $tempkills, 0;
        detachrid;
    }
        
    end;
    
OnPCDieEvent:
    getmapxy @map$,@x,@y,0;
        if (@map$ == "dew_dun02") {
            for (.@d = 0; .@d < getarraysize($@Players); .@d++) {
            if (getcharid(3) == $@Players[.@d]) {
                set $@Players[.@d], 0;
                break;
            }
            }
            warp "SavePoint",0,0;
            dispbottom  "[Miner]: Better luck next time. Dude";
        if (getmapusers("dew_dun02") == 0 && $MineEvent)  goto  allDied;
        }               
    end;
 
OnShowSmuggler:
    hideoffnpc  "Smuggler";
    end;
    
allDied:    
    announce    "All Died. Mining Event ended.",0;      
    killmonsterall  "dew_dun02";
    cleanmap    "dew_dun02";    
    for (.@f = 0; .@f < getarraysize($@Players); .@f++) {
    set $@Players[.@f],0;
    set $@Mobkills[.@f],0;
    }   
    cleararray $@Mobkills[0],0,getarraysize($@Mobkills);
    cleararray $@Players[0],0,getarraysize($@Players);
    set $OnGoing,0;
    set $p, 0;
    set $MineEvent, 0;
    set $mobs,100;  
    enablenpc   "miningexit";
    hideoffnpc  "Smuggler"; 
    close;
    end;
    
OnInit:     
    setarray    $@usables[0],607,12028,20130,13517,608,12016,13995,13994,504,505,12530;
    disablenpc  "miningexit";
    hideoffnpc  "Smuggler"; 
    set $OnGoing,0;
    set $mobs,100;
    set $participants, 50;
    set $conso,20080;
    set $consoamount,1;
    set $p, 0;
    set $MineEvent, 0;  
    //set   #bannedgoods,0; 
    end;
}
 
que_avan01,43,19,5  script  Gold Smith  813,{
if  (getgmlevel() == 99 &&  $MineEvent) {
mes "[Gold Smith]";
mes "Show Smuggler NPC?";
if  (select("Yes:No") == 1) hideoffnpc  "Smuggler";
close;
}
mes "[Gold Smith]";
mes "I can forge your gold ore into gold.";
mes "3 gold ore's for 1 gold. How's that?";
if (select("Yes, Let's Deal!:Not this time.") == 1) {
if (countitem(7231) >= 3) {
set .@goldcount, countitem(7231)/3;
getitem 969,.@goldcount;
delitem 7231,.@goldcount*3;
mes "Nice trading with yah!"; 
close;
}
mes "Eeekkk!! Your greedy matey, come back when you got gold ores.";
 
}
close;
}
 
Viewed 981 times, submitted by Guest.