Server Totals
Visimontium - (1)
Mikona - (1)
Ferrell - (0)
Le'Or - (0)
Elysia - (0)
M'Chek - (0)
Deglos - (0)
Wilderness - (0)
Underdark - (0)
Total players: 2
Gallery

Links Menu

Remove trash script

Moderators: Nighthawk4, Dungeon Masters

Remove trash script

PostAuthor: Neve » Sat Aug 23, 2003 9:38 am

Place this in an OnExit of an area. If a player triggers the OnExit, the function will check wether there are players in the area. If not, all the remains will be emptied and removed.

Code: Select all
/*
    August 21 - 2003 - Raiko - zeiren@hotmail.com
    This script removes remains on exiting an area
*/

void main(){
    object oArea        = GetArea(OBJECT_SELF);
    object oRemains     = GetFirstObjectInArea(oArea);
    object oInventory;

    while(oRemains != OBJECT_INVALID){
        if(GetIsPC(oRemains)) return;
        oRemains = GetNextObjectInArea(oArea);
    }

    oRemains = GetFirstObjectInArea(oArea);

    while(oRemains != OBJECT_INVALID){
        if(GetName(oRemains) == "Remains"){
            SetPlotFlag(oRemains, FALSE);
            oInventory = GetFirstItemInInventory(oRemains);
            while(oInventory != OBJECT_INVALID){
                DestroyObject(oInventory);
                oInventory = GetNextItemInInventory(oRemains);
            }
        }
        oRemains = GetNextObjectInArea(oArea);
    }
}
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands

PostAuthor: The Gray » Sat Aug 23, 2003 4:13 pm

But then we can't wander into areas and loot the bodies of enemies the characters who were there before us missed.
User avatar
The Gray
Whiney Peasant
 
Posts: 11
Joined: Sat Jul 26, 2003 8:36 pm
Location: (GMT - 5)

PostAuthor: Jordicus » Sat Aug 23, 2003 4:24 pm

that's why the one that Avlis uses waits 5 minutes after the last PC exits the area before it cleans uo...
User avatar
Jordicus
Team Member; Retired with Honors
 
Posts: 8048
Joined: Tue Jan 21, 2003 3:46 pm
Location: Whitehall, PA (GMT -4)

PostAuthor: Neve » Sat Aug 23, 2003 4:59 pm

that's why the one that Avlis uses waits 5 minutes after the last PC exits the area before it cleans uo...


Whoops... I didn't know that Avlis has one now =)

Well, just put a localint on the lootbag with the time at that moment, and check for that time at the moment you cleanup if you'd like them to stay there for x hours.
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
User avatar
Neve
Prince of Bloated Discourse
 
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]