Can I get another set of eyes on these quests?
For some reason they aren't working completely so hoping another set of eyes can spot any errors:
First quest, so far the dialogue is working fine but I'm getting repeats of some messages and when I turn in items I'm getting the item return message even though the turn in is correct (and fires correctly). Code:
####################################### Code:
####################################### |
In the second quest you have $hateblade as a saylink, that might be screwing up your qglobal check and breaking the dialogue.
|
Quote:
The handins work too but I'm still getting the "item returned" message even though the handins were successful. |
Quote:
Does this answer your questions and issues? Let me know. ~Akkadius |
Quote:
Can you shed any light on why my successful handins are giving me the items returned message though? Appreciate the info. |
Quote:
To access your qglobal it needs to be accessed as such: Code:
$qglobals{"hateblade"} Code:
elsif(plugin::check_handin(\%itemcount, 2668=>1) && $qglobals{"hateblade"} == 4}) Also you can debug your quests by spitting out what the value of your qglobal actually holds by doing this: Code:
quest::say($qglobals{"hateblade"}); |
In your example:
elsif(plugin::check_handin(\%itemcount, 2668=>1) && $qglobals{"hateblade"} == 4}) Where is that other bracket coming from? |
Below is the updated trader quest. I moved the saylink to the item section.
Still existing issues: Whenever I hand the platinum to the trader I get the failed turn in message even though the turn in is successful (and I get the global). Once I have hateblade==1 flag, I'm getting 4 messages when I hail the trader. The messages for hateblade==0 and the messages for hateblade==1. Why is this? I've tried using !defined, hateblade==undef, and hateblade==0. No matter which I use my warrior is sitll getting 4 messages. I have a shaman standing nearby who is only receiving the first message (which is perfect). Code:
###Description: Quest NPC for the Hateblade Quest |
You need to think a little about how if/else works. The else you have will happen if the last if isn't true. If you want it to only happen if all of the other checks fail you need to use if/elsif/else all the way through.
Another thing that might be easier to debug would be to group some things together. Like if($text=~/hail/i) and then check all the qglobal values inside that if. You could also group some together, like if($globals{"hateblade"} >= 5 && $globals{"hateblade"} <= 7), etc. If you're seeing more than one response, add some debugging to the script. Print out what the qglobal is set to and it will help you determine where things are going wrong. |
Quote:
ARGH! Code:
if($text=~/hail/i) |
Just started looking at your conversation. Is qglobals set to 1 on this NPC in the npc_types table?
Oh, and you don't need quotes in your $qglobals{hateblade} |
Quote:
|
I know, just letting you know you don't need them.
Missing the "Q" in $qglobals will mess things all up though. |
Quote:
|
Both quests work great now. Thanks everyone!
|
All times are GMT -4. The time now is 09:48 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.