Issue information

Issue ID
#6362
Status
Unable to Reproduce
Severity
None
Started
Hercules Elf Bot
Jul 29, 2012 13:13
Last Post
Hercules Elf Bot
Jul 31, 2012 17:20
Confirmation
N/A

Hercules Elf Bot - Jul 29, 2012 13:13

Originally posted by [b]Vali[/b]
npc/custom/events/disguise.txt is not working correctly. Sometimes it doesn't disguise, others, even if the player say the correct monster name doesn't accept it....

Vali~

Hercules Elf Bot - Jul 29, 2012 18:33

Originally posted by [b]Euphy[/b]
Do you have PCRE enabled? Also, the "NPC Name" field is different for some event/special monsters.

Hercules Elf Bot - Jul 29, 2012 19:28

Originally posted by [b]Vali[/b]
Its installed, also, the first time without change nothing from the NPC the NPC doesn't disguise and you win the prize writing anything.

Hercules Elf Bot - Jul 29, 2012 23:58

Originally posted by [b]Euphy[/b]
Re-tested, could not reproduce. x.x

Hercules Elf Bot - Jul 31, 2012 13:55

Originally posted by [b]Vali[/b]
Ok, here is my problem and how I fixed. The first time I launch the script the NPC doesn't disguise. This was because $Rule was set to other thing that was not 1 or 2 by default (maybe for the OS or any other thing, I dont know). My fix was modify the OnInit from:

[CODE]
if (!$Rounds) set $Rounds,10;
else set $Rounds,$Rounds;
if (!$Prize) set $Prize,512;
else set $Prize,$Prize;
if (!$PrizeAmt) set $PrizeAmt,1;
else set $PrizeAmt,$PrizeAmt;
if ($Rule) set $Rule,1;
else set $Rule,$Rule;
[/CODE]

to:

[CODE]
set $Rounds,10;
set $Prize,512;
set $PrizeAmt,1;
set $Rule,1;
[/CODE]

Also there is a param that is not used in the script: "set $Points,$Points;"

The other problem is a bug, now is accepting me the names of the monsters, but if I write the name of the monster and more things after that, it also accept it. I attached the screenshot with the [b]matyr[/b]asdfasdf.

Vali~

Hercules Elf Bot - Jul 31, 2012 13:58

Originally posted by [b]Vali[/b]
[quote name='Euphy' timestamp='1343586826' post='12701']
Do you have PCRE enabled? Also, the "NPC Name" field is different for some event/special monsters.
[/quote]


You had reason, I had PCRE installed but not enabled with --with-pcre. Maybe a note in the header of the script would be great, something like "This script needs PCRE enabled to work correctly".

Vali~

Hercules Elf Bot - Jul 31, 2012 17:20

Originally posted by [b]Euphy[/b]
The OnInit label is there to prevent @reloadscript causing catastrophes (I'm guessing, at least), and I haven't touched a lot of this script. XD I deleted the [b]$Points[/b] line and added a PCRE notice at the top in [rev=16540].