View Single Post
  #2  
Old 11-19-2004, 12:46 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

some additions:

1. you shouldent need to call GetInitiator()... you can access it directly as 'initiator'... as well as the npc the quest is running on as 'npc'. Be careful as initiator is allowed to be null... on the other hand, npc is garunteed to never be null.

2. if you want your methods to work with the old non-XS based system, you need to do this:
Code:
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(',',@_)});}"
3. when writting the XS callbacks like XS(XS__qcalc)
The SvUV thing can take several forms:
SvUV == string to unsigned value (char->ulong)
SvIV == string to signed value (char->long)
SvNV == string to real value (float,double)
SvPV_nolen == string with no length restriction
Reply With Quote