View Full Version : 5.8 and EVENT_ITEM
ajb20
09-14-2004, 12:06 AM
I, among others, noticed that with the release of 5.8, the sub EVENT_ITEM for perl is no longer functional. Me and another server op have spent the entire night now comparing between 5.7 and 5.8 files to find the error but with no luck. If anyone has found the problem and would be willing to share the solution, I would be very grateful.
ajb20
09-15-2004, 04:44 AM
Ok its pinpointed to itemcount{} not working. can use $item1, $item2, etc, but not $itemcount{}....
smogo
09-15-2004, 04:54 AM
hmm, that would mean something is broken in perl->eval() ?
As this is where itemcount is built (and it's pure perl processing)
string hashname = packagename + std::string("::itemcount");
perl->eval(std::string("%").append(hashname).append(" = ();").c_str());
perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item1};").c_str());
perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item2};").c_str());
perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item3};").c_str());
perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item4};").c_str());
Merely rebulds the %quest::itemcount hash everytime before EVENT_ITEM sub is entrered.
This part didn't change from 0.5.7dr6 to 0.5..8. Or did it ?
Strange, very strange ...
monalin crusader
09-15-2004, 08:30 AM
maybe your useing the wrong syntax, use $itemcount{"ID"}
instead of $itemcount{ID}
ajb20
09-15-2004, 06:50 PM
if($itemcount{"40001"} == 1)
{
quest::say("Make Haste! Evil Spreads Fast!");
quest::summonitem(40001);
quest::movepc(158,-1186,366,-38);
}
if($itemcount{40001} == 1)
{
quest::say("Make Haste! Evil Spreads Fast!");
quest::summonitem(40001);
quest::movepc(158,-1186,366,-38);
}
neither way worked, just ate the item, so its not the syntax that is the problem /sigh
jimbox114
09-16-2004, 03:10 PM
This sure would cause a major problem for my server :/ I use itemcount on all my item turn in quests.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.