Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #004965

  • 3 - Medium

  • Confirmed

Issue Confirmations

  • Yes (0)No (0)
Photo

@reloadscript causes warp into non-instance map

Posted by Hercules Bot on 14 June 2011 - 07:47 AM

Originally posted by ~AnnieRuru~
http://www.eathena.w...er&showbug=4965

let's say I want to make an instance script that's re-allow party members to go in back into instance

CODE
prontera,156,177,5    script    kjdhskjdh    100,{
    if ( getcharid(1) == 0 ) end;
    dispbottom has_instance("2@cata");
    if ( instance_id(1) && has_instance("2@cata") != "" ) { // party has instanced attached
        warp "2@cata", 79,55;
        instance_announce instance_id(1), strcharinfo(0) +" has join in", 0;
        end;
    }
    if ( set(.@ins, instance_create( "Poring Fun", getcharid(1) ) ) < 0 ) end;
    if ( instance_attachmap("2@cata", .@ins) == "" ) {
        instance_destroy .@ins;
        end;
    }
    instance_set_timeout 60, 0;
    instance_init .@ins;
    warp "2@cata", 79,55;
    end;
}
2@cata,79,55,0    script    kjsdfksjf    -1,0,0,{ // here's some npc
OnTouch:
    sleep2 1;
    dispbottom strcharinfo(3);
}
Note: the script has been edited

how to reproduce
1. create an instance
2. @reloadscript // some noob admin will use this command
3. go back in

you'll end up go inside 2@cata instead of 0012@cata

this bug only gone after 60 seconds the instance started (instance_set_timeout)

the only way to work around this problem is by using has_instance command
change
CODE
warp "2@cata", 79,55;
into
CODE
warp has_instance("2@cata"), 79,55;


this should be affecting official scripts too
has_instance will search for player

this is rare to happen in a live server though
because its not often anyone use @reloadscript on a live server
but its annoying when we need to test script in a test server found a workaround solution now, thx to Saithis

This post has been edited by ~AnnieRuru~: Jun 20 2011, 05:42 AM