Jump to content
  • 0

Disguise Event


Question

Posted

Hi, I'm currently using the disguise event that comes with rAthena and the script seems to work properly, except it doesn't register when I type the correct monster... I'm running the latest version of rAthena off my home PC with windows 7 (for the moment) I've searched around and the problem seems to be with PCRE. I've implemented the MouseJstr script (in doc/sample/npc_pcre.txt) and no matter what I type, I keep getting one of these responses:

Lquote41:
switch(rand(6)) {
case 0: npctalk "Very interesting"; break;
case 1: npctalk "I am not sure I understand you fully"; break;
case 2: npctalk "What does that suggest to you?"; break;
case 3: npctalk "Please continue"; break;
case 4: npctalk "Go on"; break;
case 5: npctalk "Do you feel strongly about discussing such things?"; break;
}

Which stems from:

defpattern 1, "([^:]+) .*)", "Lquote41";

Can anyone help me please?

-Thanks

10 answers to this question

Recommended Posts

Posted

Why do you copy sample PCRE script into disguise? Let me tell me what this do:

Lquote41:
switch(rand(6)) {
case 0: npctalk "Very interesting"; break;
case 1: npctalk "I am not sure I understand you fully"; break;
case 2: npctalk "What does that suggest to you?"; break;
case 3: npctalk "Please continue"; break;
case 4: npctalk "Go on"; break;
case 5: npctalk "Do you feel strongly about discussing such things?"; break;
}
......
defpattern 1, "([^:]+).*)", "Lquote41";

Which mean listen no whatever, and try random from 1 to 6 and execute the randomized case.

The disguise event should work properly without any edit.

Posted

I haven't copied the script into disguise.. I've just implemented it to see if PCRE was working or not... And I haven't edited the disguise event script either. I'm confused, what are you telling me?

Posted

Yeah i know i'm getting those responses, but i should be getting different ones according to what i say.. like if i say hello or computer

defpattern 1, "([^:]+):.*\\shello.*", "Lquote0";

// hello

Lquote0:

npctalk "How do you do. Please state your problem.";

end;

defpattern 1, "([^:]+):.*\\scomputer.*", "Lquote1";

// computer

Lquote1:

switch(rand(4)) {

case 0: npctalk "Do computers worry you?"; break;

case 1: npctalk "What do you think about machines?"; break;

case 2: npctalk "Why do you mention computers?"; break;

case 3: npctalk "What do you think machines have to do with your problem?"; break;

}

end;

No matter what i say i just get the same responses :(

Posted (edited)

Yes, I implemented that script, and the poring copies exactly what I'm saying.. However, I also get the debug in the console saying |00 before everything I say :(

Edited by LOLSIF
Posted

http://www.eathena.w...howtopic=271175

try the script in post#10 and see you get the |00 generated from your hexed client or not

Yeah ~ Annie save my day again ~ >.<

i know that different langtype will affect the defpattern stuff...but i didnt know it's because of the "|00" .........LOL

it took me so long to figure out how to solve this.....till today ~ xD

/me give another +1 rep to annie ^^

and damn..i alway forget to use debugmes to debug script ==''

Posted (edited)

Thanks, that works prefectly :) So essentially I just need to use (\\|\\d{2})to accomodate for the |00 ?

Thanks for the help Annie and Emistry !!

Edited by LOLSIF

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