Dries390
Well-Known Member
- Joined
- Sep 8, 2007
- Messages
- 91
- Solutions
- 4
- Reaction score
- 70
Hello again everyone,
I wrote a script recently which uses the raids system (TFS 0.3.6 (8.60) V8.2) to spawn loot-filled chests in an area. Using the "raids timer" an event is initiated which spawns a chest in one of some pre-determined spaces if none has been spawned yet and skips spawning one if there -is- a chest already in one of the spaces. This system actually worked quite beautifully and I could probably do a tutorial if someone could help me fix the problem I ran in to. Seeing as it worked for one cave (Gallywain troll cave in this example) I decided to simply copy the entire script, making the neccesary changes, for it to also work in another area. The problem is now that, with both raids in the raids system, the first stops working. Chests no longer spawn in the first cave. The second cave works perfectly just as before with the chests spawning in one of five random locations. Additionally, firing up the first raid does produce a chest but in the second cave. It also contains loot specifically designated to the second area so I assume the scripts are interfering somehow. I've added a picture with the xml entries and .lua files and designated what I think the flow of the program should be (purple + orange arrows) and is going wrong (red arrow). I confirmed the first xml runs the second second .lua by adding doBroadCast statements to both.
I'd appreciate if anyone could try and help me solve this because I think it introduces a nice dynamic effect to hunting areas and such in what I thought was a not-too convoluted way.
Edit: I also add that all other raids, at least at the last time of testing, worked just as intended.
Edit2: One may notice I accidentally only have one position in the second .lua script. Re-adding the other locations, both raids place random chests in -one- location. This reduces the essential question to: Why do both xml files activate the same script?
I wrote a script recently which uses the raids system (TFS 0.3.6 (8.60) V8.2) to spawn loot-filled chests in an area. Using the "raids timer" an event is initiated which spawns a chest in one of some pre-determined spaces if none has been spawned yet and skips spawning one if there -is- a chest already in one of the spaces. This system actually worked quite beautifully and I could probably do a tutorial if someone could help me fix the problem I ran in to. Seeing as it worked for one cave (Gallywain troll cave in this example) I decided to simply copy the entire script, making the neccesary changes, for it to also work in another area. The problem is now that, with both raids in the raids system, the first stops working. Chests no longer spawn in the first cave. The second cave works perfectly just as before with the chests spawning in one of five random locations. Additionally, firing up the first raid does produce a chest but in the second cave. It also contains loot specifically designated to the second area so I assume the scripts are interfering somehow. I've added a picture with the xml entries and .lua files and designated what I think the flow of the program should be (purple + orange arrows) and is going wrong (red arrow). I confirmed the first xml runs the second second .lua by adding doBroadCast statements to both.
I'd appreciate if anyone could try and help me solve this because I think it introduces a nice dynamic effect to hunting areas and such in what I thought was a not-too convoluted way.
Edit: I also add that all other raids, at least at the last time of testing, worked just as intended.
Edit2: One may notice I accidentally only have one position in the second .lua script. Re-adding the other locations, both raids place random chests in -one- location. This reduces the essential question to: Why do both xml files activate the same script?
Attachments
-
chests.png73.8 KB · Views: 22 · VirusTotal
Last edited: