Jump to content
  • 0

Endless Tower


ZuortswarK

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  10/14/17
  • Last Seen:  

I'm starting to learn a little bit of script and wanted to by the time of generating the tower dungeon to charge 100kk and get it.

But after I created it click to create it again it is charging the same 100kk, I would like a check for the player not being able to click the option again in case it is with the dungeon generated.

Note: My tower does not have time to enter, because I added a high amount and took the delay.

 

switch(select("Gerar Calabouço da "+.@md_name$+":Entrar no Calabouço:Retornar para Alberta:Cancelar")) {
            case 1:
                }
                mes "Para criar o calabouço você precisa de 100.000.000 zeny";
                next;
                
                if (Zeny < 100000000){
                    mes "Sinto muito mas você não tem 100.000.000 de zeny!";
                    close;
                }
                
                set Zeny,Zeny - 100000000;
                mes "Muito Bem, podem prosseguir e boa sorte!";
                    close2;
                .@instance = instance_create(.@md_name$,.@party_id);
                if (.@instance < 0) {
                    mes "Nome do grupo: "+.@p_name$;
                    mes "Líder do grupo: "+strcharinfo(0);
                    mes "^0000ff"+.@md_name$+" ^000000- A reserva falhou!";
                    close;
                }
                mes "^0000ff"+.@md_name$+"^000000 - Tentar reservar";
                mes "Depois de fazer uma reserva, você tem que falar com o NPC logo atrás e selecionar o menu 'Entrar no Calabouço' para entrar no calabouço.";
                for (.@i = 1; .@i <= 6; ++.@i) {
                    if( instance_attachmap(.@i + "@tower", .@instance) == "" ) {
                        mes "^0000ff"+.@md_name$+" ^000000- A reserva falhou!";
                        instance_destroy(.@instance);
                        close;
                    }
                }

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   704
  • Joined:  12/21/14
  • Last Seen:  

switch(select("Gerar Calabouço da "+.@md_name$+":Entrar no Calabouço:Retornar para Alberta:Cancelar")) {
            case 1:
                }
                mes "Para criar o calabouço você precisa de 100.000.000 zeny";
                next;
                if(select("no:yes") == 1){close;}
                if (Zeny > 100000000){
                    set Zeny,Zeny - 100000000;
                    mes "Muito Bem, podem prosseguir e boa sorte!";
                        //close2;
                    .@instance = instance_create(.@md_name$,.@party_id);
                    if (.@instance < 0) {
                        mes "Nome do grupo: "+.@p_name$;
                        mes "Líder do grupo: "+strcharinfo(0);
                        mes "^0000ff"+.@md_name$+" ^000000- A reserva falhou!";
                        close;
                    }
                    mes "^0000ff"+.@md_name$+"^000000 - Tentar reservar";
                    mes "Depois de fazer uma reserva, você tem que falar com o NPC logo atrás e selecionar o menu 'Entrar no Calabouço' para entrar no calabouço.";
                    for (.@i = 1; .@i <= 6; ++.@i) {
                        if( instance_attachmap(.@i + "@tower", .@instance) == "" ) {
                            mes "^0000ff"+.@md_name$+" ^000000- A reserva falhou!";
                            instance_destroy(.@instance);
                            close;
                        }
                    }
                }else{
                    mes "Sinto muito mas você não tem 100.000.000 de zeny!";
                    close;
                }
                
                

try like this

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  10/14/17
  • Last Seen:  

13 hours ago, sader1992 said:


                    
                
                

tente assim

 

I made some mistakes and I made this change and the option "Yes or No" appeared. But after it is generated I can generate it again and it charges another 100kk. Would it be like after generating Endless Tower to disappear the option? Thank you

 

 

switch(select("Gerar Calabouço da "+.@md_name$+":Entrar no Calabouço:Retornar para Alberta:Cancelar")) {
            case 1:
                mes "Para criar o calabouço você precisa de 100.000.000 zeny";
                next;
                if(select("no:yes") == 1){close;}
                if (Zeny > 100000000)
                    {
                    set Zeny,Zeny - 100000000;
                    mes "Muito Bem, podem prosseguir e boa sorte!";
                        //close2;
                    .@instance = instance_create(.@md_name$,.@party_id);
                    if (.@instance < 0) {
                        mes "Nome do grupo: "+.@p_name$;
                        mes "Líder do grupo: "+strcharinfo(0);
                        mes "^0000ff"+.@md_name$+" ^000000- A reserva falhou!";
                        close;
                    }
                    mes "^0000ff"+.@md_name$+"^000000 - Tentar reservar";
                    mes "Depois de fazer uma reserva, você tem que falar com o NPC logo atrás e selecionar o menu 'Entrar no Calabouço' para entrar no calabouço.";
                    for (.@i = 1; .@i <= 6; ++.@i) {
                        if( instance_attachmap(.@i + "@tower", .@instance) == "" ) {
                            mes "^0000ff"+.@md_name$+" ^000000- A reserva falhou!";
                            instance_destroy(.@instance);
                            close;
                        }
                    }
                }else{
                    mes "Sinto muito mas você não tem 100.000.000 de zeny!";
                    close;
                }

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   704
  • Joined:  12/21/14
  • Last Seen:  

why is this ??  instance_destroy(.@instance);

 

put after case 1:

if(!instance_id()){

and before break; case 2:

}

and next time use code <> to import scripts

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  10/14/17
  • Last Seen:  

3 hours ago, sader1992 said:

why is this ??  instance_destroy(.@instance);

 

put after case 1:


if(!instance_id()){

and before break; case 2:


}

 

 

 

This command did not work. 

if(!instance_id()){

}

This npc is unique from the emulator. I just added some monsters on the floors and the zeny charge on the npc Stone. He has the option that passed me everything OK. The only thing missing there is the player can not access the option "Gerar Dungeon" when it is already generated. "or when the quest is already in progress"

https://pastebin.com/kcAw9j7a

Edited by ZuortswarK
Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

×
×
  • Create New...