viewing paste Unknown #21860 | C++

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
prontera,160,162,4  script  Farming Instance    630,{
    if( #HuntRoomDelay > gettimetick(2) ){
        set .last,#HuntRoomDelay - gettimetick(2);
        set .@min,  .last % ( 24 * 3600 ) % 3600 / (60);
        mes "Wait for ^FF0000"+.@min+" Minutes^000000.";
        close;
}
/*  if( CK_cooldown < gettimetick(2) ) {
        mes "I'm sorry, you can't create yet another instance for 1 hour." + callfunc("Time2Str",CK_cooldown);
        close;
*/
    .@md_namenpc$ = "[ ^551A8B Farming Instance ^000000 ]";
    .@md_name$ = "Farming Instance";
    mes .@md_namenpc$;
    mes "Hello there "+strcharinfo(0)+".";
    mes "I have something I want to tell you..";
    next;
    mes .@md_namenpc$;
    mes "etc";
    next;
    mes .@md_namenpc$;
    mes "etc";
    mes "";
    mes "~^FF0000 Farming Instance^000000~";
    mes"~~^FF0000EXTREME-DIFFUCULTY^000000~~";
    next;
    mes .@md_namenpc$;
    switch(select("Yes, I want to farm: No thanks.")) {
    case 1:
    mes "Attempting to open the dimension gate to enter the realm of bountiful item farming.";
    sleep2 (2000);
    mes "...";
    sleep2 (2000);;
    mes "The gate is OPEN! Good luck on farming!";
    mes "Watch as the rift engulfs you!";
    specialeffect2 777;
    announce "[Entering Farming Instance]",bc_self;
    sleep2 (450);
    specialeffect2 14;
    specialeffect2 587;
    sleep2 (200);
    
    .@instance = instance_create( .@md_name$, getcharid( 3 ), IOT_CHAR);
    if( .@instance < 0 ) { 
        dispbottom "Instance Failed.";
        end;
    }
    dispbottom "^0000ff" + .@md_name$ + "^000000- Attempting to create Farm Instance.";
    if( instance_attachmap("1@cake",.@instance) == "" ) {
        instance_destroy( .@instance );
        dispbottom "Failed to instance yuno_fild02/Instance Name: 1@cake";
        end;
    }
 
    dispbottom "^0000ff" + .@md_name$ + " attempt successful on Instance attach!";
    instance_set_timeout( 3600, 300, .@instance );
    instance_init( .@instance );
//  CK_cooldown = gettimetick(2) + 3600; // 1 hour cooldown
    warp instance_mapname("1@cake",.@instance),92,189;
    end;
    case 2:
    mes "Alright then, come again another time, Cakering might not last too long from now.";
    next;
    break;
}
}
1@cake,90,189,1 script  FarmInstance#Ins    -1,{
 
OnInstanceInit:
// Adding X Minutes of Delay before can go in again.
set .DelayMin,1;
// Maximum Hunt Limit per round inside the Zone.
set .MaxItemLimit,50;
// Map that will be used in thos Zone.
set .Map$,"1@cake";
 
    'Farm_Count = 0;
    'Farm_Start = 0;
/*if(!'Farm_Start)
{
    donpcevent instance_npcname("FarmInstance#Ins::FARM_START");
    'Farm_Start++;
end;
}*/
FARM_START:
    instance_announce -1,"Activated",bc_map;
    monster instance_mapname("1@cake"),94,190,"[ Farm Zone ] Resident",1829,10,instance_npcname("FarmInstance#Ins")+"::OnNormalKill";
    monster instance_mapname("1@cake"),94,190,"[ Farm Zone ] Resident",1829,10,instance_npcname("FarmInstance#Ins")+"::OnNormalKill";
end;
OnNormalKill:
    instance_announce -1,"Kills",bc_map;
//function  RandomizeItem;
//callfunc ("RandomizeItem");
'Farm_Count++;
if ('Farm_Count >= 20)
{
    instance_announce -1,"[Farming Instance] Farming instance Completed.",bc_map;
    instance_destroy();
    end;
} else
    instance_announce -1,"oh",bc_map;
}
function    script  RandomizeItem   {
set #FarmHunt,#FarmHunt + getarg(1);
 
 
// Normal Monster in Zone Drops Lists
if( getarg(0) == 0 ) setarray .ItemList[0],13989,14232,13517,7139,12016,14534;
// Normal Boss in Zone Drops Lists
if( getarg(0) == 1 ) setarray .ItemList[0],14536,12267,12266,14601,13830,13831,13832,13833;
 
 
for( set .@i,1; .@i <= getarg(1); set .@i,.@i + 1 ){
    getitem .ItemList[ rand( getarraysize( .ItemList ) ) ],1;
    }
deletearray .ItemList,getarraysize( .ItemList );
dispbottom "[ Farm Zone ] : Farmed "+#FarmHunt+" / "+.MaxItemLimit+" Items";
if( #FarmHunt >= .MaxItemLimit ){
    message strcharinfo(0),"Limit Reach , you may join again later.";
    sleep2 2000;
    instance_destroy();
    warp "prontera",147,164;
    }
return;
}
Viewed 994 times, submitted by Guest.