How do I give an incoming player an item, but not every time they log off and back in?
What I'm trying to do is give a new, incoming player a Recall Stone. But, if they log off and log back in, I don't want them to get another of the same item. I am not good at scripting, so help would be great. Thanks!
0
Comments
object oPC = GetEnteringObject(); //get the player string sTag = "recall_stone"; //get item tag string sResRef = "item_stone_05"; //blueprint reference if (GetIsPC(oPC) == TRUE && GetIsObjectValid(GetItemPossessedBy(oPC, sTag)) == FALSE) { CreateItemOnObject(sResRef, oPC, 1, sTag); }object oPC = GetEnteringObject(); string sTag = "my_tag"; string sResRef = "item_res_ref"; if(GetLocalInt(oPC, "HAS_HAD_GIFT")){ SetLocalInt(oPC, "HAS_HAD_GIFT", TRUE); CreateItemOnObject(sResRef, oPC, 1, sTag); }And you may want to do the GetIsPC check as above.
Many people use a special starting area, which the PC gets teleported out of immediately. You could put in the onEnter event for that area. Or you could paint a trigger around your starting location and put it in the trigger onenter event.