instance check

Tio Akima

New member
Messages
349
Points
0
Age
36
Discord
TioAkima#0636
Github
Tio Akima
Emulator
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?

 
Back
Top