viewing paste /tracker/issue-8024- fightyourclone | 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
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";
        if ( ( .@ins = instance_create( "Fight Your Clone", getcharid(3), IOT_CHAR ) ) < 0 ) {
                mes "error : "+ .@ins;
                close;
        }
        if ( instance_attachmap( "2@g_vs", .@ins ) == "" ) {
                mes "error : 5";
                close;
        }
        instance_set_timeout 0, 1, .@ins;
        instance_init .@ins;
        instance_attach .@ins;
        warp "2@g_vs", 0,0;
        clone has_instance("2@g_vs"), 0,0, instance_npcname( "FYC_instance_npc" )+"::Onaa", getcharid(0), 0, 0x8D;
        'evil_clone_killed = 0;
        end;
OnPCDieEvent:
        dispbottom instance_id() +"";
        if ( strcharinfo(3) == has_instance("2@g_vs") ) {
                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;
}
 
2@g_vs,0,0,0    script  FYC_instance_npc        -1,{
Onaa:
        'evil_clone_killed++;
        clone has_instance("2@g_vs"), 0,0, instance_npcname( "FYC_instance_npc" )+"::Onaa", getcharid(0), 0, 0x8D;
        clone has_instance("2@g_vs"), 0,0, instance_npcname( "FYC_instance_npc" )+"::Onaa", getcharid(0), 0, 0x8D;
        end;
}
 
2@g_vs  mapflag nosave  SavePoint
2@g_vs  mapflag nowarp
2@g_vs  mapflag nowarpto
2@g_vs  mapflag noteleport
2@g_vs  mapflag nomemo
2@g_vs  mapflag nopenalty
2@g_vs  mapflag nobranch
2@g_vs  mapflag noicewall
Viewed 614 times, submitted by AnnieRuru.