viewing paste /tracker/issue-8024-fightyourclone2 | 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
prontera,155,180,0  script  fight your clone    123,{
    if ( instance_id() > 0 ) { // this one also doesn't work ... logically
        mes "you are currently running another instance";
        close;
    }
    mes "want to fight your clones ";
    next;
    select "yeah";
    dispbottom "~!~ "+ has_instance("guild_vs2");
    if ( has_instance("guild_vs2") != "" ) {
        instance_destroy instance_id(); // should be instance_id(1) here ...
        end;
    }
    if ( ( .@ins = instance_create( "Fight Your Clone", getcharid(3), IOT_CHAR ) ) < 0 ) {
        mes "error : "+ .@ins;
        close;
    }
    if ( instance_attachmap( "guild_vs2", .@ins, 1, ++.id +"@g_vs" ) == "" ) {
        mes "error : 5";
        close;
    }
    instance_set_timeout 0, 1, .@ins;
    instance_init .@ins;
    instance_attach .@ins;
    warp has_instance("guild_vs2"), 0,0;
    clone has_instance("guild_vs2"), 49,49, instance_npcname( "FYC_instance_npc" )+"::Onaa", getcharid(0), 0, 0x8D;
    'evil_clone_killed = 0;
    end;
OnPCDieEvent:
    dispbottom "Instance ID : "+ instance_id() +" | Instance Map : "+ has_instance("guild_vs2");
    if ( strcharinfo(3) == has_instance("guild_vs2") ) {
        instance_attach instance_id(); // change into instance_id(1) and it throws error
        announce strcharinfo(0) +" die at killing "+ 'evil_clone_killed +" clones", bc_map;
    }
    end;
}
 
guild_vs2,0,0,0 script  FYC_instance_npc    -1,{
Onaa:
    'evil_clone_killed++;
    clone has_instance("guild_vs2"), 49,49, instance_npcname( "FYC_instance_npc" )+"::Onaa", getcharid(0), 0, 0x8D;
    clone has_instance("guild_vs2"), 49,49, instance_npcname( "FYC_instance_npc" )+"::Onaa", getcharid(0), 0, 0x8D;
    end;
}
 
guild_vs2   mapflag nosave  SavePoint
guild_vs2   mapflag nowarp
guild_vs2   mapflag nowarpto
guild_vs2   mapflag noteleport
guild_vs2   mapflag nomemo
guild_vs2   mapflag nopenalty
guild_vs2   mapflag nobranch
guild_vs2   mapflag noicewall
Viewed 1065 times, submitted by AnnieRuru.