viewing paste topic/4610-h raid_instance_party | Athena

Posted on the | Last edited on
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
// http://herc.ws/board/topic/4610-hellothis-is-a-raid-for-party-i-made/?sortby=date
 
prontera,156,189,5  script  Raid    1_F_MARIA,{
    mes "This is Raid Dungeon.";
    mes "you need to make a party of MAXIMUM of 15Members and a MINIMUM of 10Members.. so i can allow you to dive inside.";
    mes "Inside this raid dungeon, there would be 7 Levels of Mob.";
    mes "Lever 1, Lever 2, Lever 3, and so on and so forth";
    mes "as the Lvl increases the more the mobs gets stronger. so better be carefull";
    mes "the next lever will appear after you finish the mobs  of ( e.g. Lever 1 )";
    mes "after Lever 1-7 which is normal mobs";
    mes "the Lever for boss of this raid dungeon will appear";
    mes "NOTE: this is a custom mob Boss Monster so u better be prepare what ever it happens";
    mes "and oh i forgot (your party has only 15 lives)";
    mes "you can ressurect them by using Yggdrasil leaf or Skill of priest";
    mes "but remember just 15 Lives. if ur party exceed this limit you party will be automatically warped out";
    mes "so are you ready?";
    mes "here we go";
    next;
    if ( !getcharid(CHAR_ID_PARTY) ) {
        mes "You have to form a party to play.";
        close;
    }
    if ( has_instance2("guild_vs2") >= 0 ) {
        mes "Your party currently have members inside the instance.";
        close;
    }
    if ( getpartyleader( getcharid(CHAR_ID_PARTY), 2 ) != getcharid(CHAR_ID_CHAR) ) {
        mes "Only the party leader can register.";
        close;
    }
    if ( !countitem( .register_item ) ) {
        mes "you don't have "+ getitemname( .register_item );
        close;
    }
    .@origin = getcharid(CHAR_ID_ACCOUNT);
    getpartymember getcharid(CHAR_ID_PARTY), 1;
    getpartymember getcharid(CHAR_ID_PARTY), 2;
    for ( .@i = 0; .@i < $@partymembercount; ++.@i ) {
        if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
            attachrid $@partymemberaid[.@i];
            if ( strcharinfo(PC_MAP) == strnpcinfo(NPC_MAP) )
                .@online++;
        }
    }
    attachrid .@origin;
    if ( $@partymembercount != .register_min ) {
        mes "You have to form a party with exactly "+ .register_min +" members to play.";
        close;
    }
    if ( .@online != .register_min )  {
        mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(NPC_MAP) +"'.";
        close;
    }
    if ( ( .@ins = instance_create( "Raid Dungeon", getcharid(CHAR_ID_PARTY), IOT_PARTY ) ) < 0 ) {
        mes "error : "+ .@ins;
        close;
    }
    if ( instance_attachmap( "guild_vs2", .@ins, 1, .@ins +"RAID" ) == "" ) {
        mes "error : 5";
        instance_destroy .@ins;
        close;
    }
    instance_set_timeout 0, 10, .@ins;
    instance_init .@ins;
    instance_attach .@ins;
    delitem .register_item, 1;
    warpparty has_instance("guild_vs2"), 0,0, getcharid(CHAR_ID_PARTY), strnpcinfo(NPC_MAP);
    'lives = .party_lives;
    end;
OnInit:
    .register_min = 2;
    .register_item = 501;
    .party_lives = 3; // party
 
    setarray .round1[0], 1001,20, 1002,20;
    setarray .round2[0], 1031,20, 1032,20;
    setarray .round3[0], 1111,20, 1113,20;
    .totalround = 3;
 
    getmapxy .map$, .x, .y, 1;
    end;
OnPCDieEvent:
    .@map$ = strcharinfo(PC_MAP);
    if ( .@map$ == has_instance("guild_vs2") ) {
        instance_attach has_instance2( "guild_vs2" );
        --'lives;
        if ( !'lives ) {
            instance_announce -1, "Your party has used up all the lives", bc_map;
            killmonsterall .@map$;
            sleep 5000;
            mapwarp .@map$, .map$, .x, .y;
            instance_destroy;
        }
        else {
            instance_announce -1, "Your party still has "+ 'lives +" lives left", bc_map;
        }
    }
    end;
}
guild_vs2,0,0,0 script  Raid_ins    FAKE_NPC,{
OnInstanceInit:
    sleep 2000; // delay abit
OnMobDead:
    if ( 'round ) 'killed++;
    if ( 'killed < 'total ) end;
    .@main$ = "Raid"; // main npc name
    ++'round;
    'killed = 0;
    if ( 'round == getvariableofnpc( .totalround, .@main$ ) +1 ) {
        instance_announce -1, "Congratulations !", bc_all;
        sleep 2000;
        instance_warpall getvariableofnpc( .map$, .@main$ ), getvariableofnpc( .x, .@main$ ), getvariableofnpc( .y, .@main$ );
        end;
    }
    instance_announce -1, "Prepare for Level "+ 'round +" Mobs...", bc_all;
    sleep 2000;
    .@size = getarraysize( getvariableofnpc( getd( ".round"+ 'round ), .@main$ ) );
    'total = 0;
    for ( .@j = 0; .@j < .@size; .@j += 2 ) {
        monster has_instance( "guild_vs2" ), 49,49, "--ja--", getvariableofnpc( getelementofarray( getd( ".round"+ 'round ), .@j ), .@main$ ), getvariableofnpc( getelementofarray( getd( ".round"+ 'round ), .@j +1 ), .@main$ ), instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead";
        'total = 'total + getvariableofnpc( getelementofarray( getd( ".round"+ 'round ), .@j +1 ), .@main$ );
    }
    end;
}
 
guild_vs2   mapflag nowarp
guild_vs2   mapflag nowarpto
guild_vs2   mapflag nomemo
guild_vs2   mapflag nosave  SavePoint
guild_vs2   mapflag partylock
Viewed 4086 times, submitted by AnnieRuru.