Issue information

Issue ID
#4963
Status
Needs more Info
Severity
None
Started
Hercules Elf Bot
Jun 14, 2011 7:43
Last Post
Hercules Elf Bot
Dec 17, 2011 4:49
Confirmation
N/A

Hercules Elf Bot - Jun 14, 2011 7:43

Originally posted by [b]~AnnieRuru~[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4963

this is the official instance script used, no error

CODE
prontera,156,177,5    script    kjdhskjdh    100,{
    if ( getcharid(1) == 0 ) end;
    if ( set(.@ins, instance_create( "Poring Fun", getcharid(1) ) ) < 0 ) end;
    if ( instance_attachmap("2@cata", .@ins) == "" ) {
        instance_destroy .@ins;
        end;
    }
    warp "2@cata", 79,55;
    instance_set_timeout 15, 5;
    instance_init .@ins;
    instance_attach .@ins;
    monster "2@cata",79,55,"--ja--",1002,3, instance_npcname("test") +"::Onkill";
    end;
}
2@cata,79,55,0    script    test    -1,{
Onkill:
    if ( mobcount( strcharinfo(3), instance_npcname(strnpcinfo(0))+"::Onkill" ) ) end;
    sleep 1; // this one has been reported
    instance_destroy;
    end;
}





now there's 2 bugs if write a custom instance script, that will produce error

CODE
prontera,156,177,5    script    kjdhskjdh    100,{
    if ( getcharid(1) == 0 ) end;
    if ( set(.@ins, instance_create( "Poring Fun", getcharid(1) ) ) < 0 ) end;
    if ( instance_attachmap("2@cata", .@ins) == "" ) {
        instance_destroy .@ins;
        end;
    }
    warp "2@cata", 79,55;
    instance_set_timeout 15, 5; // only happens when there is a timeout
    instance_init .@ins;
//    instance_attach .@ins; // note 2
    monster has_instance("2@cata"),79,55,"--ja--",1002,3, instance_npcname("test") +"::Onkill";
    end;
}
2@cata,79,55,0    script    test    -1,{
    end;
Onkill:
    if ( mobcount( strcharinfo(3), instance_npcname(strnpcinfo(0))+"::Onkill" ) ) end;
    sleep 1; // this one has been reported
    instance_destroy;
    end;
}


can only reproduce this error when the instance has a timeout

somehow I can summon a monster in this way using has_instance command without using instance_attach command
and everything still work out perfectly fine

but the problem is, when I do a @reloadscript on this 2nd custom script
15 seconds after the instance created, this error pops up

CODE
[Error]: delete_timer error : function mismatch 00536F80(connect_check_clear) != 0051B64E(map_removemobs_timer)


but this error doesn't show up if I use the official method (1st script posted above)
maybe ... in the souce,
the monster summon with has_instance(<map>) does start a timer, but doesn't delete the timer
but monster summon with instance_attach does delete the timer
what a weird logic ....


2nd error
after uncomment the instance_attach line
it looks fine...
try double client with different party ID, it creates 2nd instance
and this error pops up

CODE
[Error]: map_instance_mapid2imapid: already instanced (763 / 2)
[Error]: buildin_monster: Trying to spawn monster (1002) on instance map (002#2@cata) without instance attached.


again this problem doesn't show up with 1st script posted above

just that ... this really makes people frustrating, making instance script very hard to learn
especially all these error at most times doesn't make any sense

Hercules Elf Bot - Dec 17, 2011 4:49

Originally posted by [b]Ind[/b]
well yes, but i wonder if it isn't working as intended? i'd rather discuss this on the forum.