The following warnings occurred:
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)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Close/Open door
Author Message
an0n!m0use
Journeyman
*

Posts: 56
Likes Given: 16
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #1
Information Close/Open door
Hi, i have some problem with my script ...
I have locked door
PHP Code:
[ITEMDEF i_door_locked]
DEFNAME=i_door_locked
NAME
=Locked door
ID
=0693
TYPE
=t_door_locked

On
=@DClick
    
IF <SRC.ACCOUNT.PLEVEL> > 3
        
RETURN 0
    
ENDIF
    
SRC.MESSAGE That door is locked
    
RETURN 1

CATEGORY 
PvP Arena Items
SUBSECTION 
Diffrent
DESCRIPTION 
Barred Metal Door (locked) (nw

And NPC with triggers:
PHP Code:
On=@EnvironChange
    
IF <SRC.REGION.TAG0.door_uid>
      
REF1 = <SRC.REGION.TAG0.door_uid>
    
SAY 1 // This working ! NPC say "1"
        
IF <REF1.DispID> == 0694 // open
          
REF1.DispID 0693
          REF1
.MOVE 0,1
        
ENDIF
    ENDIF

On=@Death
    
IF <REGION.TAG0.door_uid>
        
REF1 = <REGION.TAG0.door_uid>
    
SAY 2 // And this working when NPC die ...
          
IF <REF1.DispID> == 0693 // closed
            
REF1.DispID 0694
            REF1
.MOVE 0,-1
            REF1
.SOUND 235
        
ENDIF
    ENDIF 

P.S - REGION.TAGLIST = TAG.door_uid=01

Why not working ? Doubt
(This post was last modified: 11-17-2015 04:22 PM by an0n!m0use.)
11-15-2015 11:46 PM
Find all posts by this user Like Post Quote this message in a reply
azmanomer
Journeyman
*

Posts: 139
Likes Given: 4
Likes Received: 18 in 16 posts
Joined: Nov 2013
Reputation: 1



Post: #2
RE: Close/Open door
did you check the tag? are they match with door uid? why are you moving doors? just use "dclick <ref1>"
11-16-2015 08:26 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes azmanomer's post
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #3
RE: Close/Open door
you must your door UID on TAG.door_id instead set a random "1" just to fill the tag

if you use this:
Code:
TAG.door_uid = 01
REF1=<TAG0.door_uid>
it will be the same as set REF1=01, so this REF1 will point to UID 01 and not to your door UID. So if your door UID is 123456, you must set TAG.door_uid=123456
11-16-2015 10:47 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
an0n!m0use
Journeyman
*

Posts: 56
Likes Given: 16
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #4
RE: Close/Open door
(11-16-2015 08:26 AM)azmanomer Wrote:  did you check the tag? are they match with door uid? why are you moving doors? just use "dclick <ref1>"
Thx for help! And for the advice about "dclick <ref1>"


(11-16-2015 10:47 AM)Coruja Wrote:  So if your door UID is 123456, you must set TAG.door_uid=123456
Thx man Wink It working perfectly !
11-17-2015 05:54 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)