Jump to content
  • 0
Get Backers

removing close button

Question

Hello there, any idea how to remove ---> close; thanks you for the help!

ps: see the picture

prontera,95,72,3    script    Breaker Points Shop    512,{
    query_sql("SELECT `count` FROM `breaker_ladder` WHERE `char_id` = "+ getcharid(0), [email protected]);
    cutin "woe_2020",2;
    mes "[ ^C6A518WoE Points Staff^000000 ]";
    mes "Hey sir!";
    mes " ";
    mes "WoE Points: ^1DCE63 "+#EMPBREAKERPTS+" Points^000000 ";
    mes "Did you enjoy the WoE today?, Hows your day?";
    next;
    switch(select("I want to check shop","I'm good thank you..",(getgmlevel()> 60) ? "~ [GM MENU] Reset data":"")) {
    case 1:
        callshop "EmpBreakerShop",4;
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
        break;

close.png

shop2.png

Edited by Mael
Use a codebox

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Why are you going to remove close button?
try using end;.

The player will hang up on that dialog if you remove close button.

  • Upvote 1

Share this post


Link to post
Share on other sites
  • 0

The only reason this will happen if you code on the wrong way...

prontera,x,y	script test	99{

	mes "blablabla";
	close; // <<<<---- Because of this
	switch(select("test:test2")){
		case 1:
		case 2:
				end;
	}
	end;
}


It should be like this

prontera,x,y	script test	99{

	mes "blablabla";
	switch(select("test:test2")){
		case 1:
		case 2:
				end;
	}
	end;
}


The cause of close is this following ( Close , End , Break )

Edited by Poring King

Share this post


Link to post
Share on other sites
  • 0

Hello,

thanks to those who replied but I mean like this please look at the difference of two npc video and even open shop can walk player this a script sorry for my bad english thank you guys!!


guildhall,95,72,3    script    Breaker Points Shop    512,{
    query_sql("SELECT `count` FROM `breaker_ladder` WHERE `char_id` = "+ getcharid(0), [email protected]);
    cutin "woe_2020",2;
    mes "[ ^C6A518WoE Points Staff^000000 ]";
    mes "Hey sir!";
    mes " ";
    mes "Breaker Points: ^1DCE63 "+#EMPBREAKERPTS+" Points^000000 ";
    mes "Did you enjoy the WoE today?, Hows your day?";
    next;
    switch(select("I want to check shop","I'm good thank you..")) {
    case 1:
        callshop "EmpBreakerShop", 4;
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
        end;
    case 2:    
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Thats good to hear!";
        close2;
        cutin "",255;
        end;
    }
    close;

OnInit:
    // how much points gained per emp break?
    [email protected] = 1; 

    query_sql("CREATE TABLE IF NOT EXISTS `breaker_ladder` (`char_id` int(11) unsigned NOT NULL, `count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY ( `char_id` )) ENGINE=InnoDB");
}

-    pointshop    EmpBreakerShop    -1,#EMPBREAKERPTS,12202:1,12203:1,12207:1,12206:1,12205:1,12204:1,13517:1,14004:2

guildhall    mapflag    loadevent

Share this post


Link to post
Share on other sites
  • 0
21 minutes ago, Get Backers said:

 }
    close;

remove this close; from line 27.

replace the end; to break; line 19.
 

case 1:
        callshop "EmpBreakerShop", 4;
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
	break;
    case 2:    
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Thats good to hear!";
        close2;
        cutin "",255;
        end;
    }
    

image.png.f7897d0dd925bf2c1942c77184338421.png

Edited by Cookie-rae

Share this post


Link to post
Share on other sites
  • 0

Hi Cookie-rae nothing changed. still not removed close on message


        callshop "EmpBreakerShop", 4;
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
        break;
    case 2:    
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Thats good to hear!";
        close2;
        cutin "",255;
        end;
    }
    close;

shop 1.png

Edited by Get Backers

Share this post


Link to post
Share on other sites
  • 0
24 minutes ago, Get Backers said:

    close;

 

remove this as i mentioned.

 

1 hour ago, Cookie-rae said:

remove this close; from line 27.

 

 

Share this post


Link to post
Share on other sites
  • 0

Well to understand the whole script and the behavior from my phone . Im very sure the fault is you call first the shop before it use break . 

This is what you do
 

	callshop "EmpBreakerShop", 4;
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
        break;


Im pretty sure this time it will fix.. Do this

        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
	callshop "EmpBreakerShop", 4;
        end;

 

Share this post


Link to post
Share on other sites
  • 0
1 minute ago, Poring King said:

Well to understand the whole script and the behavior from my phone . Im very sure the fault is you call first the shop before it use break . 

This is what you do
 

	callshop "EmpBreakerShop", 4;
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
        break;


Im pretty sure this time it will fix.. Do this

        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
	callshop "EmpBreakerShop", 4;
        end;

 

I think this will still trigger close function because of the end; and the close; is in the end of switch he need to remove it first.
 

just a simple fix is this as i mention on my reply.

This is what exact should be.

guildhall,95,72,3    script    Breaker Points Shop    512,{
    query_sql("SELECT `count` FROM `breaker_ladder` WHERE `char_id` = "+ getcharid(0), [email protected]);
    cutin "woe_2020",2;
    mes "[ ^C6A518WoE Points Staff^000000 ]";
    mes "Hey sir!";
    mes " ";
    mes "Breaker Points: ^1DCE63 "+#EMPBREAKERPTS+" Points^000000 ";
    mes "Did you enjoy the WoE today?, Hows your day?";
    next;
    switch(select("I want to check shop","I'm good thank you..")) {
    case 1:
        callshop "EmpBreakerShop", 4;
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Every and of the month the shop";
        mes "Will have a new headgears manually";
        mes "picked by the Players!";
        mes " ";
        mes "^FF0000NOTE^000000: Please choose wisely";
        break;
    case 2:    
        mes "[ ^C6A518WoE Points Staff^000000 ]";
        mes "Thats good to hear!";
        close2;
        cutin "",255;
        end;
	break;
    }

OnInit:
    // how much points gained per emp break?
    [email protected] = 1; 

    query_sql("CREATE TABLE IF NOT EXISTS `breaker_ladder` (`char_id` int(11) unsigned NOT NULL, `count` int(11) NOT NULL DEFAULT '0', PRIMARY KEY ( `char_id` )) ENGINE=InnoDB");
}

-    pointshop    EmpBreakerShop    -1,#EMPBREAKERPTS,12202:1,12203:1,12207:1,12206:1,12205:1,12204:1,13517:1,14004:2

guildhall    mapflag    loadevent


Thus always break; a statement on switch case because it will continues until end of function.

Share this post


Link to post
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...

Important Information

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