Jump to content
  • 0

Disguise Event - Player Check


Question

Posted

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" ?

4 answers to this question

Recommended Posts

Posted

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

Posted

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;

Posted

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

Posted

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;

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...