PDA

View Full Version : Quest command: Get Instance Flag


Rocker8956
10-13-2008, 03:00 PM
Below is a quest function for getting the instance flag of a character.

Zone\perlparser.cpp
Above XSRETURN_YES;
Insert
newXS(strcpy(buf, "getinstflag"), XS__getinstflag, file);

zone\perlparser.cpp
Above /*This is the callback perl will look for to setup the
Insert
XS(XS__getinstflag);
XS(XS__getinstflag)
{
dXSARGS;
if (items != 0)
Perl_croak(aTHX_ "Usage: getinstflag()");

int RETVAL;
dXSTARG;

RETVAL = quest_manager.getinstflag();
XSprePUSH; PUSHu((IV)RETVAL);

XSRETURN(1);
}

Zone\questmgr.h
Near line 179 Insert
int getinstflag();

zone\questmgr.cpp
At end Insert
int QuestManager::getinstflag()
{
return (database.GetCharInstFlagNum(initiator->CharacterID()));
}

Serryon123
11-05-2009, 09:29 AM
where do i copy the codes and insert them at? id like to do this.

Secrets
11-05-2009, 12:13 PM
where do i copy the codes and insert them at? id like to do this.

This is horribly outdated. The new instancing support does this and much more, read up on the quest sections of the wiki.