Issue information

Issue ID
#2776
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Feb 17, 2009 5:16
Last Post
Hercules Elf Bot
Mar 5, 2012 9:46
Confirmation
N/A

Hercules Elf Bot - Feb 17, 2009 5:16

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

Basically, the problem is that the warps to from ice_dun03 to ice_dun04 are always open. I'm pretty sure they're only supposed to open after killing Ktullanux, and only for a period of time. I'm not sure if this is how it's supposed to be done, but it seemed to work when I replaced the "hideonnpc" and "hideoffnpc" with "enablenpc" and "disablenpc".

Current code:
CODE
ice_dun03,1,175,3    script    #ice_sec    -1,{
OnStart:
    initnpctimer;
    hideoffnpc "#ice_4f_1";
    hideoffnpc "#ice_4f_2";
    hideoffnpc "#ice_4f_3";
    hideoffnpc "#ice_4f_4";
    donpcevent "#ice_4f_1::OnEnable";
    donpcevent "#ice_4f_2::OnEnable";
    donpcevent "#ice_4f_3::OnEnable";
    donpcevent "#ice_4f_4::OnEnable";
    end;

OnTimer60000:
    stopnpctimer;
    hideonnpc "#ice_4f_1";
    hideonnpc "#ice_4f_2";
    hideonnpc "#ice_4f_3";
    hideonnpc "#ice_4f_4";
    end;
}

ice_dun03,150,137,0    script    #ice_4f_1    45,2,2,{
OnTouch:
    warp "ice_dun04",33,144;
    end;

OnInit:
    hideonnpc "#ice_4f_1";
    end;

OnEnable:
    misceffect EF_MAPPILLAR2;
    end;

}
...


Altered code:
CODE
ice_dun03,1,175,3    script    #ice_sec    -1,{
OnStart:
    initnpctimer;
    enablenpc "#ice_4f_1";
    enablenpc "#ice_4f_2";
    enablenpc "#ice_4f_3";
    enablenpc "#ice_4f_4";
    donpcevent "#ice_4f_1::OnEnable";
    donpcevent "#ice_4f_2::OnEnable";
    donpcevent "#ice_4f_3::OnEnable";
    donpcevent "#ice_4f_4::OnEnable";
    end;

OnTimer60000:
    stopnpctimer;
    disablenpc "#ice_4f_1";
    disablenpc "#ice_4f_2";
    disablenpc "#ice_4f_3";
    disablenpc "#ice_4f_4";
    end;
}

ice_dun03,150,137,0    script    #ice_4f_1    45,2,2,{
OnTouch:
    warp "ice_dun04",33,144;
    end;

OnInit:
    disablenpc "#ice_4f_1";
    end;

OnEnable:
    misceffect EF_MAPPILLAR2;
    end;

}
...