Jump to content
  • 0

Need help on Bug/ Problem with this npc script


xRyusuke

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   0
  • Joined:  07/24/12
  • Last Seen:  

What the npc do is, it will generate a random number and let players guess for it and win a prize.

Only one winner at a time.

The bug is that player that click but have not answer the guess, could wait until a person actually guessed it and announced, then only he/she input the correct number. Making it possible for 2 or even 10 winner per round. Prone to abuse, a player could have tons of dual character waiting for the guess.

The code snippet is here http://pastebin.com/6wL2SuZN

Can someone help me with this issue?

Thanks

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Add this:

if (!.guessstart) {
mes .@n$;
mes "I'm sorry, the event is over.";
close;
}

After this line:

} else if(.@guessnumber == .usednumber) {

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

input .@guessnumber;
next;
if( !.guessstart ){
mes "Sorry you are late...";
close;
}

Edited by Emistry
ops...Jospeh is faster..
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   0
  • Joined:  07/24/12
  • Last Seen:  

Thanks guys! Awesome!

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