viewing paste Unknown #24394 | 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
prontera,150,150,4      script  Gold Easter Egg 4_DRAGON_EGG,{
OnInit:
    if (strnpcinfo(0) == "Gold Easter Egg")
        disablenpc strnpcinfo(0);
 
OnEnableGoldEgg:
getmapxy .@map$, .@x, .@y, 1;
for (.@i = 0; .@i < 50; .@i++) { // 50 will be spawned
    do {
        .@x = rand(300);
        .@y = rand(300);
    } while ( checkcell( .@map$, .@x, .@y, cell_chknopass ) );
     duplicatenpc(strnpcinfo(0),"Gold Easter Egg "+ .@i,"","prontera",.@x,.@y,5,998);
    donpcevent "Gold Easter Egg "+ @i +"::OnEggMove";
}
 
OnEggMove:
        npcspeed 100;
        while ( true ) {
                getmapxy .@map$, .@x, .@y, 1;
                while ( checkcell( .@map$, .@x2 = .@x + rand(-10,10), .@y2 = .@y + rand(-10,10), cell_chknopass ) );
                npcwalkto .@x2, .@y2;
                sleep rand(500,1000);
        }
}
prontera,151,152,4      script  Enabler 89,{
 
mes "Now enabling";
donpcevent ("Gold Easter Egg")+"::OnEnableGoldEgg";
}
Viewed 323 times, submitted by unknown.