View Single Post
  #7  
Old 11-08-2004, 03:37 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

im sorry, but theres NOTHING that cannot be ported to the new quest system that was avaliable in the old quest system.... It took me about 45 minutes to port EVERY command in the old system to the new stuff.

And actually, if you disable EMBPERL_XS, you can do everything exactly like it was.... pile all your code in parser.cpp like a giant pile of crap, I dont care, it will work just fine...

Emu will not remain a pile of crap just to make it easier to work with. The new system is much more cleanly defined, and works in all circumstances.

also, if you take the time to read the code, heres the text at the top of questmgr.cpp that tells you how to add a quest command.
Quote:
Assuming you want to add a new perl quest function named joe
that takes 1 integer argument....

1. Add the prototype to the quest manager:
questmgr.h: add (~line 50)
void joe(int arg);

2. Define the actual function in questmgr.cpp:
void QuestManager::joe(int arg) {
//... do something
}

3. ... perl parser.


4.
If you want it to work in old mode perl and .qst, edit parser.cpp
Parser::ExCommands (~line 777)
else if (!strcmp(command,"joe")) {
quest_manager.joe(atoi(arglist[0]));
}

And then at then end of embparser.cpp, add:
"sub joe{push(@cmd_queue,{func=>'joe',args=>join(',',@_ )});}"
it even skips over the perl stuff that you hate so much, isnt that nice of me?
Reply With Quote