Multiple Turn-Ins working?
Are multiple turn ins working in 5.9DR2 release? Here is what I'm trying to do:
Code:
sub EVENT_ITEM |
Use
Code:
if (($itemcount{123456} == 1) && ($itemcount{78910} ==1) && ($itemcount{23456} == 1)) And I am not too sure Else is part of Perl's else statements, may try 'elsif' instead, not sure though. GL. The_Horrid |
I've tried that too. Else works fine, if you hand him any item he'll give you the else stuff. If i shorten the script to require 1 item, it works fine too. If i require multiple items, he just eats them, but the script works because you can talk to him.
|
The Ifs (()) works.
Remove the Else parts, and check the turn-in then, if it works, then there is some syntax your not following with If/Else The_Horrid |
Caught this just now,
Code:
quest::spawnitem(); Code:
quest::summonitem(); The_Horrid |
why not just use $item1,$item2,etc...
|
Got it to work. Not sure why but the else makes it break. I tried it without the else before and it didnt work but I probably had a syntax error somewhere.
Working example of multiple item hand in: Code:
sub EVENT_ITEM |
If you minimize the code does it still break? I am not sure how the exp/spawnitem commands would affect the other block, but I am curious. Example:
Code:
if ($itemcount{a} == 1 && |
You know thats what I thought too, so I wrote alot of quests that way. Then when I went to try them, none of them work. So I added the else in there as a test to see if just the multi line was the bad one, and sure enough, the npcs would react to the else statement. Now, even if you 'properly' code the multi line and include an else, it still breaks. So i ended up removing the else line of all my hand in quests for now. I would like to have it because it shows the player that they didnt just eat items but were handed the wrong thing.
Its kind of wierd the perl parser is that picky, i mean geeze. Thats like saying (1)+(1) != 1+1 |
It's more likely that there is some sort of bug in the implementation. Would you be able to create a script that calls multiple functions, but makes them the same function? For instance, on turn-in use four separate quest::say calls, with varying input, then try quest::summonitem:
Code:
if ($itemcount{a} == 1) |
Sorry to post to a 2-month-old thread, but I just realized this, and thought it might be helpful for others to know:
Quote:
If you use the ($itemcount{x} == 1) && ($itemcount{x} == 1) syntax, it doesn't matter what order the items are handed in. Basically, using $itemcount is more player-friendly. The only time I can think of to use $item1, etc would be if you were designing some evil quest where you wanted to penalize the player for not handing in the items in the specified order... |
Quote:
|
So.... perl > sonys quest system! Stacking works ^_^
|
hm for some reason my npc is just eating my items, was wondering if anyone could spot my error
Quote:
|
for turn in, try this instead
Code:
sub EVENT_ITEM |
All times are GMT -4. The time now is 12:57 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.