PDA

View Full Version : Bug: Bots loading scripts


surrus
01-30-2014, 05:30 AM
Hello,
ran into a strange bug. If the conditions are correct a Bot attempts to load a scriptfile.

Bot ID: 1
- No problem

Bot ID: 1
quests/global/1.pl
- no problem

Bot ID: 1
quests/global/1.pl
npctype ID exists: 1
- Bot attempts to load the script

Bot ID: 1
quests/global/test.pl
npctype ID exists: 1 (Name: test)
- Bot attempts to load the script


So if there is a Bot with the same ID as a existing NPC and a script linked to this NPC either by ID or Name it will attempt to load the script. This does happen everywhere when in the global folder or only in the specific zone if there is a script for this npc/id in the zone folder.

Id actually doesnt matter if 1 or 100000.

It will only react to sub EVENT_SPAWN and then only if there is a quest::ze() in it. Anything else before and after crashed the script in my tests.

I tried it in 3 different compiles i have, in all of them it happened.

surrus
01-31-2014, 03:37 PM
Still no edit button here...

I have to correct myself there, they can use pretty much any command including setting globals.

Still not sure if this is a general problem or just with my compiles. Also with the latest revs no changes there for me.