Need help on a turn in
I'm hoping I can get some insight on why this script is not working correctly. I ran in through a perl command line with no syntax problems.
Quote:
|
if(plugin::check_handin{\%itemcount,13073 => 4})
swap curly brakets for parentesis here if(plugin::check_handin(\%itemcount,13073 => 4)) |
That did the trick :) Thanks!
I had actually (briefly) considered that possibility, but I had seen examples from others using the curly brackets and thought it must be a valid usage. |
np
the bracket prabobly work in some cases, but parentesis work always |
Okay, here's another one, then:
Quote:
Thoughts? |
Try the following. You forgot to put in an EVENT_SAY section:
Code:
sub EVENT_ITEM { |
Thanks Trevius. I made the change, but he's still returning the item. I'm just learning Perl, so I appreciate your patience with this. Fyi, I already have one EVENT_SAY section that comes before the EVENT_ITEM section (yours would be a second one that comes after). I didn't include it in the first post because it was working fine on it's own. The only section I'm having trouble with is the turn in. Any other suggestions?
|
You only want to have 1 EVENT_SAY in your quest. Put all of the ones in the script I posted into your pre-existing one and remove the one I put in.
You have to keep certain things like that completely separated for a reason, otherwise they will get messed up as you are now seeing. Anytime you have an "if" statement, whatever it is if'ing on is what section it should go in. So, if's on text should go in EVENT_SAY, and if's on turn ins should go in EVENT_ITEM, and if's on timers should go in EVENT_TIMER, etc. |
Okay, here's the entire script, annotated by me. Maybe this will help.
Quote:
|
i think you have an icorect follow up of elses and ifs in first part
there can only be ONE else inside a single if and i belvie you have incorect open closed brakets Code:
sub EVENT_SAY |
I made your change, Chaos, and (oddly enough) it made no difference in the quest (not sure why--you'd think placement of brackets would matter). I'm making live changes directly to the quest/zone folder, and I "reloadquest" after each change. As I mentioned above, that part of the script has always worked fine. It fails only once it calls the EVENT_ITEM script.
|
Okay, I have been experimenting with this code, and got it to (semi-) work. I replaced:
sub EVENT_ITEM { if(plugin::check_handin(\%itemcount,13732 == 1)) { with . . . sub EVENT_ITEM { if($item,13732) { I though, as long as I have only one item to turn in, maybe I won't need the count variable. I have no idea whether this is "sound" from a scripting standpoint, but the npc now takes the item and rewards me with the right exp, plat and faction. But now he'll also take just any item and give the same reward. Any way to modify this so only that item is recognized? |
oh yeah make sure than you only have ONE EVENT_SAY section as Trevies pointed out
and to be sure you need to place a closing curcly braket when I said and remove one where i said |
try this.
replace if(plugin::check_handin(\%itemcount,13732 == 1)) with if(plugin::check_handin(\%itemcount,13732 => 1)) |
Quote:
Thanks for all the help. Next up; mob spawns triggered by the same turn-in. Going to try my hand at solo-ing the quest:spawn feature, but I may be back. Thanks again. |
All times are GMT -4. The time now is 08:35 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.