I'm working on a campagin in which the PC starts with no equipment except for his clothes. I plan to use this script (will it work? If not, pointout it's flaws). Only problem is, I can't figure out where to put the script. Help would be appreciated, thanks in advance.
void StripPC(object oPC)
{
// Removing PC's equipment.
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_BELT, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_BELT, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_ARMS, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_ARMS, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_BOLTS, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_BOLTS, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_BOOTS, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_BOOTS, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_HEAD, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_HEAD, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_LEFTRING, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_LEFTRING, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_NECK, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_NECK, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_ARROWS, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_ARROWS, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_BOLTS, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_BOLTS, oPC)); }
if(GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_BULLETS, oPC))) { DestroyObject(GetItemInSlot(INVENTORY_SLOT_BULLETS, oPC)); }
// Removing PC's inventory.
object oStuff = GetFirstItemInInventory(oPC);
while(GetIsObjectValid(oStuff))
{
DestroyObject(oStuff);
oStuff = GetNextItemInInventory(oPC);
}
}
void GiveNewPC()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetHitDice(oPC) <= 2)
{
int ngold=d10(10)+ 100;// starting gold of you choice
GiveGoldToCreature(oPC,ngold);
// this is where you would have items added to the player, you can set this up by class if you wanted to..
CreateItemOnObject("nw_cloth001", oPC);
}
}
Starting without default equipment.
Débuté par
simomate
, sept. 22 2010 03:06
#1
Posté 22 septembre 2010 - 03:06
#2
Posté 22 septembre 2010 - 01:40
This would go either into a trigger in your starting area or in your module's OnEnter event. But, ... I'd not use this particular script as anyone relogging that hasn't reached 2nd level will get restripped each time.
I recommend the following instead.
http://nwvault.ign.c....Detail&id=2676
I recommend the following instead.
http://nwvault.ign.c....Detail&id=2676
#3
Posté 22 septembre 2010 - 02:57
oh, it's a single player, so they won't I assure you. When I try to open script example.. it says both expansions required?
Modifié par simomate, 22 septembre 2010 - 04:13 .
#4
Posté 22 septembre 2010 - 08:41
simomate wrote...
oh, it's a single player, so they won't I assure you. When I try to open script example.. it says both expansions required?
You don't have HOTU and SOU installed as well?
Your script will likely suit your need if it is a SP module. Just use it in a trigger in your starting area.
#5
Posté 22 septembre 2010 - 08:45
You don't have HOTU and SOU installed as well?
hopely in a month I will have them
Thanks for your advice.
#6
Posté 22 septembre 2010 - 09:35
You really should just get a copy of NWN Diamond or Platinum editions. They can often be found from $10-30 dollars US.simomate wrote...
You don't have HOTU and SOU installed as well?
hopely in a month I will have them![]()
Thanks for your advice.
#7
Posté 22 septembre 2010 - 10:23
Sometimes, though, you can find new copies of SoU and HotU for a few dollars apiece, so I'd look for any and all of them. I picked up a brand new copy of HotU for 2 bucks at a local Micro Center a while back.
Modifié par Khuzadrepa, 22 septembre 2010 - 10:23 .
#8
Posté 23 septembre 2010 - 08:29
They don't sell them in Australia anymore.





Retour en haut






