Closed ConfuzzledWolf closed 11 years ago
turn on /denizen debug and put the output on pastebin.com. Do the same for the script as you see github kinda screws it up. For the 2nd question take a look at the LISTEN KILL command, which will make a Denizen run a task script when the players kills certain mobs or npcs.
Oh I see your problem you have the chat triggers in Step 2 and no ZAP command to get there.
Such a fast reply, wow. Thanks. I only started scripting these yesterday, so how would a ZAP command work with this script?
Scripts do not move between steps automatically.Best thing there is to put the click the and chat triggers all in Step 1. Run listen kill using a task script that sets a Flag or calls Finish when its complete. Then make another interact script with a requirement that said Flag is set, and reward the player.
Alright, sounds complicated but I'm sure it'll be simple once I get back into it. I'll try that out now.
Okay, I've managed to get most of it working. I've got the chat trigger working but he doesn't recognise when the task is completed. Here's the scripts themselves: http://pastebin.com/f6jmhKxr It doesn't show up as me completing the task in the saves, so maybe something with the task imitating?
The listen kill is a command that goes in the Interact script. The task runs once the denizen has 'heard' the required kills. nothing runs if you put it in the task script. Also I think you need Type:NPC and NPCID:16
So the listen kill would go into the second interact script and would apply to if the player has killed that NPC? Would the NPC need to be dead at the time for him to reward or just for the player to have killed him at some point? Also, how would the task script fit in if the listen kill command is required in the interact script? (Sorry for being so dense at this)
Check this guy out, been meaning to write it.
http://scripts.citizensnpcs.com/view/h0i1td
(I just wrote it up in notepad and haven't tested it, so I'm not guaranteeing i didn't screw up the syntax :) If it don't work turn on /denizen debug and let me know.
It doesn't work for me. :( I assigned it to Steve in the assignment.yml and added the script to the bottom of my scripts.yml (Also, can scripts be done in separate files, which might be more organised since CitizensUI just puts them all in one and it's a bit cluttered) Here's the debug: 23:29:27 [INFO] | ERROR! Could not find any scripts assigned! 23:29:27 [INFO] +---------------------+ 23:29:27 [INFO] +- Parsing click trigger: Steve/ConfuzzledWolf -+ 23:29:27 [INFO] | Getting current step: 23:29:27 [INFO] | ...current step not found, assuming '1'. 23:29:27 [INFO] | ERROR! Could not find script at: 23:29:27 [INFO] | null.Steps.1.Click Trigger.Script 23:29:27 [INFO] | Check YML spacing, or is something spelled wrong in your script
I also tried opening it in CitizensUI to assign it to Steve through that and it couldn't locate any of the scripts (Hope this info helps at all)
Looks like something is wrong with the assignment (hence the 'no scripts assigned' error). Yes scripts can be in multiple files, the UI does 1 file by default but you can change that in the options.
Also there was an indent error on the script, step 2: needed to be 1 space over. I fixed it.
Oh, that'd be incredibly useful. I'll do that and test it out for you tomorrow when I get the time to. Hopefully that'll help me with my script too.
The script was still broken at some points but I managed to find and fix them. I hope you don't mind. It will now load in CitizensUI and can be assigned to the NPC sucessfully except I can't get it to recognise the LISTEN KILL command. The NPC just tells me to kill 10 zombies and then doesn't acknowledge it. Here's the link to the "fixed" script: http://pastebin.com/pstTUM9K
I just fixed it do you want it ?it's adapeted to my quest but it does what you wanted !
assignements.yml
Denizens: Maggie: Interact Scripts:
thief.yml
'Thiefs': Type: Interact Requirements: Mode: All List:
'GuardDeath': Type: Interact Requirements: Mode: All List:
'Reward': Type: Trigger Requirements: Mode: All List:
- ENGAGE
- CHAT "Thank you so much! Here, take this as a reward!/Aqui tens a recompenssa!"
- GIVE Money QTY:1000
- NARRATE 'You just received 1000$!/Recebes-te 1000$'
- WAIT 1
- CHAT "And have a good day!/E tenha um bom dia!"
#These next 2 commands reset the quest so it can be repeated. If you don't want it repeatable make a step 2 on this script and call ZAP instead.
- ZAP 1 SCRIPT:Thiefs
- RESET FINISHED SCRIPT:KillComplete
#Always disengagae after an Engage
- FINISH
- DISENGAGE
'2': Click Trigger: Script:
Hello,
I'm having an issue with a script involving an assassin quest line I'm writing for my server. I've put in a chat trigger for the player to say "Yes" or "Sure" to accept but the NPC just tells the player he doesn't understand as the default response instead of continuing on. I'm also using the CitizensUI to make the scripts. Here is the script:
Hooded_Man Script 1: Type: Interact Requirements: Mode: All List:
On a further note, is there (or is it possible to add) a NPCdeath trigger that isn't the NPC itself. For instance, "Go and kill X" and once that NPC is dead, you can carry on with the script.