Jump to content
  • 0

Script Help


cozzy09

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

I am trying to make new event NPC I' almost done but I have 1 minor problem when it does all what I wanted to do it the NPC won't close it's message window my script goes like this

// ----------------------------------- STATE: ON -------------------------------------
 on:
 mes "[ ^336699Warper^000000 ]";
 mes "Do you want to stop me warping?";
 menu "Yes, Stop warping",yesStop,"No, Wait",noStop;

 yesStop:
 next;
 set $state,0;
 set $qstate,0;
 delwaitingroom;
 mes "[ ^336699Warper^000000 ]";
 mes "Ok, stopping now";

 if (condition)
 {
  goto yesWin;
 }
 else if (condition)
 {
  goto noWin;
 }
 else
 {
  goto draw;
 }

 noStop:
 next;
 mes "[ ^336699Warper^000000 ]";
 mes "Ok talk to me when you want to stop me warping";
 close;

// ---------------------------------- WARP PLAYERS ---------------------------------
yesWin:
next;
mapwarp "map","map2",xxx,yyy;
sleep 5000;
mapannounce "map","message",0;
sleep 3000;
mapannounce "map","message",0;
next;
close;

noWin:
next;
mapwarp "map","map2",xxx,yyy;
sleep 5000;
mapannounce "map","message",0;
sleep 3000;
mapannounce "map","message",0;
next;
close;

draw:
next;
mapwarp "map","map2",xxx,yyy;
mapwarp "map","map2",xxx,yyy;
sleep 5000;
mapannounce "map","message",0;
sleep 3000;
mapannounce "map","message",0;
next;
close;

when I go yesStop it will do all the commands I put there even the conditional statement but it won't close the final window where the NPC says "Ok, stopping now"

hope someone can help me and thanks in advance for those who will try to help ^_^

Edited by cozzy09
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

when I go yesStop it will do all the commands I put there even the conditional statement but it won't close the final window where the NPC says "Ok, stopping now"

that ?

   mes "Ok, stopping now";
   close;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   34
  • Joined:  05/30/12
  • Last Seen:  

or this?

 mes "[ ^336699Warper^000000 ]";
 mes "Ok, stopping now";
close2;
 if (condition)  {
  goto yesWin;
end;
 }
 else if (condition)  {
  goto noWin;
end;
 }
 else  {
  goto draw;
end;
 }

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

@capuche

yup that will work but it won't go on my conditional statement if I put close before the conditional statement already tried that

@snow

it closes the message of my NPC that says stopping now but it will open a new message where there is nothing in it and it doesn't go on my conditional statement as well

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   34
  • Joined:  05/30/12
  • Last Seen:  

alright i took a look on it again, you wrote the if condition with the { and }, which is wrong if you use labels. So remove them and try it like this:

 if (condition) goto yesWin;

 else if (condition) goto noWin;

 else	 goto draw;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

still not working T_T

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Post your whole script or a script with your real conditional statements

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