//Script written by Lilac Soul, aka Carsten Hjorthoj //Stores the used Ke'haar stone in the book of ke'haar on //the first free page, and sets the appropriate token to //the name of the area that stone is in. void main() { object oBook=GetItemPossessedBy(GetPCSpeaker(), "bookofkehaar"); //A bit of visual effects DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_EVIL_HELP), OBJECT_SELF)); int nCustom; string sPage; string nPage; //Find the first free page if (GetLocalInt(oBook, "LS_IPAGE1")!=1) { nCustom=601; sPage="LS_PAGE1"; nPage="LS_IPAGE1"; } else if (GetLocalInt(oBook, "LS_IPAGE2")!=1) { nCustom=602; sPage="LS_PAGE2"; nPage="LS_IPAGE2"; } else { nCustom=603; sPage="LS_PAGE3"; nPage="LS_IPAGE3"; } //Store the stone on the book SetLocalObject(oBook, sPage, OBJECT_SELF); //Store the name of the stone's area in a custom token SetCustomToken(nCustom, GetName(GetArea(OBJECT_SELF))); SetLocalInt(oBook, nPage, 1); }