Quote:
Code:
sub EVENT_SAY { |
I don't know how to test a NOT TRUE case in perl. If you can figure that out, then you can get that quest::say to work.
|
Next time you log on my server Jim try handing the armor quest NPC a random item, the quest::say and everything works with him. I'm honestly not sure what the issue is hehe. I'll admit I'm pretty noob with most of this. I've never messed with C++ or perl any. I do manage some sql databases and websites that are pretty php intensive which helps a lot. But I'm no guru for sure. This stuff still confuses me :)
|
Yeah, i'm not sure. unless i put the return_item in an if statement, the turn in wouldn't even work. I'm not sure why, perl seems strange with it's logic if you ask me.
|
you may try taking the version that you said you got working earlier, and adding single quotations around the number in quest::summon_item('3453'); <---Like that. Maybe that'll work.
|
This kind of works, but I'm tired of looking at it today, going to go populate my next zone. In this code, the quest works, you get the ding, say, exp, and item, but he also says I cannot use this item, you can have it back and gives you the mold. So now you get the mold back+ the item your supposed to get *boggle* Thinking about this is hurting my head though. I'll sleep on it and tinker more tomorrow :)
Code:
sub EVENT_SAY { |
Your last quest is how you must write quests with checkhandin now. (except there my be an extra } at its end, check that if it does not work).
If you don't want the NPC to say that he returns items, you must test that there's still some items left in the %itemcount hashtable. Code:
if (scalar(%itemcount)>0) { To test that a string isn't something, use 'ne' and != for an integer Code:
if ($class ne "Paladin") { } |
Final Working version of quest. Works Perfectly ( Thank you Doodman for all the help )
Code:
sub EVENT_SAY |
If you're using the last plugin, i bet you my shirt and my shoes than this won't work for any other class than warrior.
L8rs. |
Just tested with a Beastlord, Warrior, and Necro, give the right item he hands you your wep. Give the wrong item and all you get back is what you gave him with the message telling you it's the wrong item. It seems to work fine even with that last plugin. I have 2 quests that use it and give multiple items. My other quest has 8 different rewards and works.
|
I retire what i said about warrior. That quest works, but writing it like this is so risky that i wouldn't advise it to a perl beginner (inverse the tests and write 'if (plugin::check_handin(\%itemcount,6461=>1) && ($class eq "Warrior")) {' and it won't work anymore... but well...
Anyway, for that same quest, try to give the item 6461 plus another item, the one you want, and the npc won't return you the extra item. |
ehh too much typing i'd just do this
Code:
sub EVENT_ITEM { |
Just to throw yet another solution to the same problem out:
Code:
sub EVENT_ITEM { |
All times are GMT -4. The time now is 11:16 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.