Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File
Line
Function
/inc/functions.php
3388
errorHandler->error
/showthread.php
116
build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File
Line
Function
/inc/functions.php
3331
errorHandler->error
/inc/functions.php
3324
build_forum_breadcrumb
/showthread.php
195
build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
I am using the code below to open and close the doors, but I am having difficulty closing the doors when the char is inside the building ..
To be able to close the door it is necessary to be on top of the same tile, but the behavior must be that if it is 3 2 tiles from the door it must be closed!
when i have active .gm the port works the way i need ...
I don't know why you're calling 3x the same FORITEMS loop, but DCLICK function is the same thing as make the char dclick the item, so the item must be in range/LOS otherwise the DCLICK will fail, and that's why the 2nd door doesn't open/close when its out of LOS or distance is > 2 tiles. To fix this you must replace DCLICK with USEITEM, which is the same thing but USEITEM will ignore dist/LOS checks
Or you can manually link the door on each other (just use ".xlink" command or set LINK=012345) instead use this script, this will make sphere internal code automatically open the linked door
(12-01-2019 09:34 AM)Coruja Wrote: I don't know why you're calling 3x the same FORITEMS loop, but DCLICK function is the same thing as make the char dclick the item, so the item must be in range/LOS otherwise the DCLICK will fail, and that's why the 2nd door doesn't open/close when its out of LOS or distance is > 2 tiles. To fix this you must replace DCLICK with USEITEM, which is the same thing but USEITEM will ignore dist/LOS checks
Or you can manually link the door on each other (just use ".xlink" command or set LINK=012345) instead use this script, this will make sphere internal code automatically open the linked door