Jump to content

Script conditions not in sync


ManiumX

Recommended Posts

Hey everyone. I was hoping someone out there could help me figure out what's wrong with this script.

 

 

Begin 1Dum_ScryDetect

 

short OnPCDrop

short DoOnce

 

if ( GetPCCell "Sadrith Mora, Telvanni Council House" == 1 )

 

if ( GetPCCell "Sadrith Mora Tevlanni Council House, Entry" == 0 )

 

if ( GetDetected Player == 0 )

 

if ( OnPCDrop == 1 )

 

if ( DoOnce == 0 )

 

Journal "1Dum_lil_Telvanni" 10

 

set DoOnce to 1

 

endif

 

endif

 

endif

 

endif

 

endif

 

end

 

(Sorry for the crappy formatting. It wouldn't let me paste the script here so I just typed it in by hand.)

 

Anyhow, the script works mostly. The issue I'm having is that the player doesn't have to be undetected and drop the required item at the same time. They can drop the item, wait ten minutes. Hide. And get the journal entry regardless.

 

Any ideas on how to fix this?

Edited by ManiumX
Link to comment
Share on other sites

Once OnPCDrop is true it continues to be true until it is manually reset to zero (false). That you should do as soon as it is true. Also, GetDetected is a fairly resource-hungry function. I suggest you move it inside the OnPCDrop block since it hardly matters if the player is seen if he/she is not dropping the item. Also, a quick return after the journal is set would be welcome. Something like this might work:

Begin 1Dum_ScryDetect
 
short OnPCDrop
short doOnce
 
if ( doOnce == 1 )
    return
elseif ( menumode == 1 )
    return
endif
 
if ( ( GetPCCell "Sadrith Mora, Telvanni Council House" ) == 1 )
    if ( ( GetPCCell "Sadrith Mora Tevlanni Council House, Entry" ) == 0 )
        if ( OnPCDrop == 1 )
            set OnPCDrop to 0
            if ( ( GetDetected Player ) == 0 )
                Journal "1Dum_lil_Telvanni" 10
                set doOnce to 1
            endif
        endif
    endif
endif
 
End
Link to comment
Share on other sites

  • 3 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...