Jump to content
  • 0
Tio Akima

instance check

Question

 

hy guys

 

I'm creating an instance, and I have some doubts

 

I created the instance setup:

      //  instance create =================================================================
                    
                        if ( FYC_deny + .deny > gettimetick(2) ) {
                            mes "["+ strnpcinfo(1) +"]";
                            mes "Você não pode tentar imediatamente... Precisa de uma pausa antes de enfrenta-lo novamente.";
                            mes "Tem que esperar "+ callfunc( "timeleft__", FYC_deny + .deny - gettimetick(2) ) +".";
                            close2;
                            cutin "", 255;
                            end;
                        }
                        
                        .@instance_name$ = "Piccolo Training";        //nome da instancia
                        .@map_name$ = "1@area";                     // nome do mapa
                        
                    
                    
                        if ( has_instance2("1@area") >= 0 )
                            instance_destroy has_instance2("1@area");
                            
                        .@instance = instance_create( .@instance_name$, getcharid( 3 ), IOT_CHAR);
                            if( .@instance < 0 ) { 
                                dispbottom "Ixe! A Instancia Falhou!";
                                end;
                            }
                            
                        dispbottom "^0000ff" + .@instance_name$ + "^000000- Criando Instancia...";
                        if( instance_attachmap(.@map_name$,.@instance) == "" ) {
                            instance_destroy( .@instance );
                            dispbottom "Houve uma falha ao criar a Instancia...";
                            close2;
                            cutin "", 255;
                            end;
                        }    
                                                    
                        instance_set_timeout 600, 1, .@instance; // 10 minutos para matar, 1 segundos para destruir                    
                        instance_init .@instance;

                        percentheal 100,100;
                        FYC_deny = gettimetick(2);
                        
                        //warp has_instance("1@area"), 104,84;                        
                        warp instance_mapname("1@area",.@instance),104,84;

 

Now, I don’t know how I can check to see if the player died, or if quit ...

Because if that happens, you have to get the player out of there, and destroy the instance, right?

 

how to do this?

 

ps* oh .. and also need to check for when time is up?

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.