EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Task System need Perl? (https://www.eqemulator.org/forums/showthread.php?t=28936)

djeryv 07-18-2009 08:41 AM

Task System need Perl?
 
I made a couple of Tasks in the database...

Code:

INSERT INTO tasks (id, duration, title, description, reward, rewardid, cashreward, xpreward, rewardmethod, startzone, minlevel, maxlevel, repeatable) VALUES ('900000000', '0', 'Kill 10 Orc Pawns', 'Go forth into Greater Faydark. Slay 10 of the Orc Pawns that roam the woods.', 'Small Bronze Helm', '4213', '325', '100', '0', '54', '0', '0', '0');
INSERT INTO activities (taskid, activityid, step, activitytype, text1, text2, text3, goalid, goalmethod, goalcount, delivertonpc, zoneid, optional) VALUES ('900000000', '0', '0', '2', 'Orc Pawns', '', '', '54015', '0', '5', '0', '54', '0');
INSERT INTO tasks (id, duration, title, description, reward, rewardid, cashreward, xpreward, rewardmethod, startzone, minlevel, maxlevel, repeatable) VALUES ('900000001', '0', 'Get Orc Skull', 'Go forth into Greater Faydark and bring General Jyleel [in Felwithe] a skull of an orc.', 'Fine Steel Scimitar', '5353', '600', '200', '0', '54', '0', '0', '0');
INSERT INTO activities (taskid, activityid, step, activitytype, text1, text2, text3, goalid, goalmethod, goalcount, delivertonpc, zoneid, optional) VALUES ('900000001', '0', '0', '1', 'General Jyleel', 'Orc Skull', '', '16174', '0', '1', '61026', '54', '0');

...I can get them from a NPC (I added it to their perl script), but I cannot seem to make them work. I killed orc pawns...nothing. I tried to give an orc skull to the General...he gave it back. Do I have to use perl to make the task system work? Do I have to put an ondeath event in an orc pawn perl script? I was hoping I could make tasks without needing perl at all.

- Djeryv

joligario 07-18-2009 08:58 AM

No need for perl in these situations.

joligario 07-18-2009 09:13 AM

Have you tried entering your description in brackets?

'[0,Go forth into Greater Faydark. Slay 10 of the Orc Pawns that roam the woods.]'

Have you tried making these guys step 1 instead of step 0?

I'm sure you saw, but you also have it set to kill 5 rather than 10.

Derision 07-18-2009 09:22 AM

These tasks shouldn't even be loaded from the database, as the max task ID is 9999. Guess I need to update the Wiki to mention that.

Derision 07-18-2009 09:56 AM

I tested them both, changing the Task IDs to 9000 and 9001.

First one works fine. For the second one, I needed to change the zoneid to 61 (felwithea) for it to work.

I also noticed the General gave back the Orc Skull. This is because in the PEQ quest repo he has a sub EVENT_ITEM and as the Orc Skull is not checked for in there, he gives it back.

You could add:
Code:

elsif(plugin::check_handin(\%itemcount, 16174 => 1))
{
# Quietly eat the Orc Skull
}

If you had more activities in the task, you could use quest::istaskactivityactive to only eat the skull if the player is doing the task, however in this case, the task is already marked complete by the time the Perl sub EVENT_ITEM is called.

djeryv 07-18-2009 10:37 AM

I'll try the things mentioned here...but...do you have to use perl to get the task started? Is there a non-perl way to get one going?

- Djeryv

Derision 07-18-2009 10:46 AM

No, the only way to bring up the task selector window to allow a player to accept a task, or to forcibly assign a task to a player is via Perl.

djeryv 07-18-2009 11:34 AM

Well...everything does work fine now. The 2 test tasks I made worked...as I changed the NPC from the General to a Guard (who had no ITEM event in their perl script). Thanks for all the help...this task system is pretty cool.

- Djeryv


All times are GMT -4. The time now is 10:00 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.