Jump to content
  • 0

Disguise Event - Player Check


Nokia

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

Hi there, i need a simple player check for the disguise event v2 http://rathena.org/b...isguiseeventv2/

the npc is freezing, if a player guessed the right monster and the player logs out / disconnect.

i think, its this part:

winround:
 setnpctimer 0;
 deletepset 1;
 set .DisguiseWon, 1;
 set $DisguiseRound, $DisguiseRound + 1;
 npctalk strcharinfo(0) + " got my right name!",0;
 sleep2 3000;
 npctalk $MonsterName$ + " is the correct answer.";
 sleep2 3000;
 npctalk "Take this as a reward.";
 getitem $guessprize, $guessprizecount;

so, how can i add "if the player is offline just continue with the next round" ?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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

remove the sleep2 command should have improved your situation....

this will make the script proceed faster without waiting....

so that no need worry on users offline or online to proceed the next step..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

ah, i see, also set the price before the sleep steps will fix it too? like this?

winround:
 setnpctimer 0;
 deletepset 1;
 set .DisguiseWon, 1;
 set $DisguiseRound, $DisguiseRound + 1;
 getitem $guessprize, $guessprizecount;
 npctalk strcharinfo(0) + " got my right name!",0;
 sleep2 3000;
 npctalk $MonsterName$ + " is the correct answer.";
 sleep2 3000;
 npctalk "Take this as a reward.";
// getitem $guessprize, $guessprizecount;

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:  

LOL...my post just mentioned to remove SLEEP2 Command line... :)

if you dont want the disguise event to give prize..then remove that getitem command....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

ehw, you misunderstood that, you said the sleep2 command is the reason, why the npc is freezing if a player logout between the sleep2 / getitem step, so, i can also add the getitem thing before the sleep2 steps and it would be fine.

my sample. should also solve the npc freeze:

 getitem $guessprize, $guessprizecount;
 npctalk strcharinfo(0) + " got my right name!",0;
 sleep2 3000;

before / wrong:

 npctalk strcharinfo(0) + " got my right name!",0;
 sleep2 3000;
 getitem $guessprize, $guessprizecount;

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