Jump to content
  • 0

removing close button


Get Backers

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.02
  • Content Count:  70
  • Reputation:   0
  • Joined:  11/23/20
  • Last Seen:  

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), .@count);
    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
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  208
  • Reputation:   22
  • Joined:  01/14/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   24
  • Joined:  02/11/16
  • Last Seen:  

Use goto function if you wish to redirect the players to another menu or message. 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.02
  • Content Count:  70
  • Reputation:   0
  • Joined:  11/23/20
  • Last Seen:  

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), .@count);
    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?
    $@empbreakpoints = 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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  208
  • Reputation:   22
  • Joined:  01/14/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.02
  • Content Count:  70
  • Reputation:   0
  • Joined:  11/23/20
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  208
  • Reputation:   22
  • Joined:  01/14/13
  • Last Seen:  

24 minutes ago, Get Backers said:

    close;

 

remove this as i mentioned.

 

1 hour ago, Cookie-rae said:

remove this close; from line 27.

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

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;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  208
  • Reputation:   22
  • Joined:  01/14/13
  • Last Seen:  

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), .@count);
    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?
    $@empbreakpoints = 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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.02
  • Content Count:  70
  • Reputation:   0
  • Joined:  11/23/20
  • Last Seen:  

Sorry late reply Thank you so much  Poring King and Cookie-rae 

 

Solved~

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...