I have an armor quest, and the item turn in isn't functioning as I want it to. The spell being cast on the user summons the specified item. The problem is that ANY turn in attempts to cast all the spells in the code on the user.
Code:
EVENT_ITEM {
if ($itemcount("210") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your chestplate. Congratulations!") castspell("$userid","523") }
if ($itemcount("211") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your leggings. Congratulations!") castspell("$userid","637") }
if ($itemcount("212") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your bracer. Congratulations!") castspell("$userid","638") }
if ($itemcount("213") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your helm. Congratulations!") castspell("$userid","639") }
if ($itemcount("214") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your armplates. Congratulations!") castspell("$userid","751") }
if ($itemcount("215") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your boots. Congratulations!") castspell("$userid","852") }
if ($itemcount("216") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your gauntlets. Congratulations!") castspell("$userid","887") }
if ($itemcount("220") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your mask. Congratulations!") castspell("$userid","888") }
}
Could someone please correct me on this code? I'm sure something isn't right.