Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #006362

  • 0 - None Assigned

  • Unable To Reproduce

Issue Confirmations

  • Yes (0)No (0)
Photo

Disguise event not working correctly

Posted by Hercules Bot on 29 July 2012 - 01:13 PM

Originally posted by Vali
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~

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

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

Originally posted by Euphy
Re-tested, could not reproduce.  x.x

Originally posted by Vali
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:

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;

to:

set $Rounds,10;
set $Prize,512;
set $PrizeAmt,1;
set $Rule,1;

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

Vali~

Originally posted by Vali

Do you have PCRE enabled?  Also, the "NPC Name" field is different for some event/special monsters.



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~

Originally posted by Euphy
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 $Points line and added a PCRE notice at the top in [rev=16540].