Neverwinter Nights > NwN Building
I need a bit of help
(1/1)
Elessar Telrunya:
Usually 420's got me covered when I need help scripting(thanks 420! :lol: ) but I haven't seen 420 to ask him how to tag people so when they come into a mod they receive an item(like when the sents come in they get the sent stone thing)
Any one know how?
420:
Easiest way would be to set a "campaign" variable using the persons public CD key, account name or character name. (or a combination of all three)
So you can make an item for yourself that when you use it on people will toggle their "Sentinel" status. (I use "Official" instead of "Sentinel" in the scripts below.)
I just finished the custom drinks (whew, took forever) so Ill have more time to help with your scripting. I haven't started on the item filter (yet) but I can put up a sample of how to handle this.
This script should be activated by an item with the "Activate Item" or "Unique Power" property.
--- Quote ---//Toggle "Official" status
//by: 420 6/25/04
//Make an item with a "Activate Item" or "Unique Power" property and name this
//script the same name as the items tag and make sure you have the tag based
//script in your Modules OnActivateItem event trigger
void main()
{
object oPC = GetItemActivator();
object oTarget = GetItemActivatedTarget();
string sName = GetName(oTarget);
string sCDKey = GetPCPublicCDKey(oTarget);
int iOfficial = GetCampaignInt("Official", sCDKey, oTarget);
if(iOfficial == 0)
{
SetCampaignInt("Official", sCDKey, 1, oTarget);
FloatingTextStringOnCreature(sName+" is now an Official.", oPC, FALSE);
}
else
{
DeleteCampaignVariable("Official", sCDKey, oTarget);
FloatingTextStringOnCreature(sName+" is no longer an Official.", oPC, FALSE);
}
}
--- End quote ---
Put this in: Module Properties/Events/OnClientEnter:
--- Quote ---//Check "Official" status, give item to Officials
//by: 420 6/25/04
//Put in the OnClientEnter event trigger of the Module Properties
void main()
{
object oTarget = GetEnteringObject();
string sCDKey = GetPCPublicCDKey(oTarget);
int iOfficial = GetCampaignInt("Official", sCDKey, oTarget);
if(iOfficial == 1)
{
CreateItemOnObject("itemsblueprintresref", oTarget);
}
}
--- End quote ---
This uses the players CDKey to determine if they are an "Official", if they are it creates the item with the Blueprint Resref "itemsblueprintresref".
Hope that helps,
420
EDIT: I made "ItemsBlueprintRresref" lowercase since Blueprint Resref can only be lower case. I also added a bunch of comments to both scripts
Elessar Telrunya:
Thanks 420 you're the best. Maybe I should enlarge the tribute to you in my mod....
Well anyways can you send the item filter to me as soon as it's done? I finnished making the first quest in the mod which was when I had priorly deemed it the time to officially launch Rune(the name of my server, full name is
--- Quote ---0 0 {DE} Rune
--- End quote ---
) Maybe I will wait till i finish making the first divine quest too...
Oh and (sry i don't mean to be bombarding you with requests and adding to your workload 420 but) have I asked you about the scripting for a duel manager type thing?
~Lord Elessar
420:
--- Quote --- Well anyways can you send the item filter to me as soon as it's done?
Oh and (sry i don't mean to be bombarding you with requests and adding to your workload 420 but) have I asked you about the scripting for a duel manager type thing?
~Lord Elessar
--- End quote ---
Just finished the item filter, I'll send it in a private message.
I'll work on the duel manager next.
420
Elessar Telrunya:
thanks 420 :lol: I'm gonna start making the tribute to you EVEN BIGGER! lol
Navigation
[0] Message Index
Go to full version