Author Sticky: Post Working Scripts Here
Nirran Posted: Sunday, 14 July 01:42PM
ok what this is more of a way to keep int's and jurnal entries when players log off of persistant worlds

essentialy it creataes a item that is whatever you want and epuips it in the armor creature slot,then when you set your int's,instead of using int's,create a small misc item and euip it on the applicable pc,when that item is no longer valid(ie the int changed) destroy it and create the applicable one.this requiers a custom item for every int state.the thing to do is create a container(or use one in the game,i dont think it matters)when the charracter loggs on the first time,then when quest 1 is accepted,instead of jurnal on this,create item and equip it in the slot,and have your trigger(i used on heartbeat)check to see if the item is possessedby() and if it is,jurnal update,then in conversation with the quest related npc's,check for the applicable item(i check for it in the slot),these are my simple scripts,i left in the debugging lines.


create container and equip it

NWScript:
void main()

{

object oTarget = GetPCSpeaker();

CreateItemOnObject("bag",oTarget);

ActionEquipItem(GetObjectByTag("bag"),INVENTORY_SLOT_CARMOUR);

}



to use the trigger i used and make it work in all casses,just check for the bag before it and if it is valid dont make another one.

this is the check if the item(quest or jurnal) is valid
(if it is,applicable jurnal entries and quest flags)

NWScript:
void main()

{

object oTarget = GetPCSpeaker();

CreateItemOnObject("it",oTarget);

ActionEquipItem(GetObjectByTag("it"),INVENTORY_SLOT_CARMOUR);

}



i already checked if you can destroy the item without destroying the bag,you can

now when the player logs off and on again,the jurnal will be updated with anytrigger you want(on enter would be good,though that script will get huge if you have alot of quests)

plausable workaround for quest local int and jurnal entries when the player logs off of persistant worlds.and it will allow pc specific quest flags,because now everything is itempossesedby() specific.

Author Sticky: Post Working Scripts Here
Nirran Posted: Sunday, 14 July 02:03PM
well since i cant edit ill finnish what i started above

(both of those scritpts only create the items

neccesary,well really the bag is the only one

nessesary,and your specific items)

oh change the "it" and "bag" in the above scripts to what

your items are

check if pc posseses the item

NWScript:
void main()

{

object oPC = GetEnteringObject();

if (GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC)==(GetObjectByTag("it"))){

//stuff to do,this script is useless without do stuff,and wont compile

}

}



the above will work for the jurnal and quest flags on

login,youl need to check for each item and do stuf for

each one

now a simple script to destroy the no longer valid item

NWScript:
void main()

{

object oPC = GetFirstPC();

if (GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC)==(GetObjectByTag("it"))){

DestroyObject(GetObjectByTag("it"));

}

}



use the above script when changing the would be int ,

just create the applicable item

this method will also prevent players from doing quests

more than once because when finnished,the item wont be

deleted unless you want it to be,also the players cant

manipulate the item.it would be a good idea to make the

items as light as possible,0 if it lets you,dont know

havent looked,otherwise the pc will wind up with no

carring room because of weight.