Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Animated Lance Rack
Author  Proleric
Submitted / Updated  11-04-2008 / 02-13-2009
Category  Placeable Item
Expansions  NWN-1.69
Format  Module and Code
Type  Type - General
Description
This script is for the new animated lance rack in 1.69. On using the rack, one lance is removed from it, and a lance of the same colour appears in the players' hand.

I couldn't find an existing script, so I made one.

The demo module and erf include the placeable, script and lance templates, so it's plug-and-play.

By default, once the rack is empty, it provides an infinite supply of blue lances. There's a switch in the script to turn this off, so the rack does nothing once empty.

I've been using this with Suspender's Jousting System, which requires a supply of lances (quite reasonably, you can't continue with a broken lance).

UNSUPPORTED

The author no longer supports this work. Please feel free to use, amend or republish as you see fit.

Files

NameTypeSizeDownloads
lance_rack_v1.00.ziplance_rack_v1.00.zip
Submitted: 11-04-2008 / Last Updated: 11-04-2008
zip9.73Kb173
Demo module and erf.
SCORE OUT OF 10
10
2 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (2):

Posted by BelowTheBelt at 2009-07-20 22:53:21    Voted 10.00 on 07/20/09
Love this script!

Made a slight tweak to the script to make the rack respawn with a full set of lances once the 4 have been removed.

It maintains the sequence of lance colors aligned to the lances created in inventory.

You need to have the rack added to your custom palette and use that tag in the script.

This bypasses the function to set the bInfinite variable, which prevents the the lance rack from giving more than 4 lances...but if you want a respawning lance rack, you probably want to be able to distribute more than four lances anyway... I'm sure someone could script it to do both.

// Animated lance rack
// OnUsed script for an animated lance rack.
// If you want it to be empty after all the lances have been taken,
// set bInfinite to FALSE. By default, it keeps handing out blue
// lances forever.
// It expects lance item templates with the following resrefs:
// lance_yellow
// lance_red
// lance_blue
// lance_black
void main()
{
object oPC = GetLastUsedBy();
object oLever = OBJECT_SELF;
int nStatus = GetLocalInt(oLever, "Status") + 1;
string sLance = "blue";
int bInfinite = TRUE;
object oItem;
location lLoc = GetLocation (oLever);
SetLocalInt(oLever, "Status", nStatus);
if (nStatus == 1)
{
sLance = "yellow";
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE, 1.0, 1.0);
}
if (nStatus == 2)
{
sLance = "red";
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE, 1.0, 1.0);
}
if (nStatus == 3)
{
sLance = "blue";
PlayAnimation(ANIMATION_PLACEABLE_OPEN, 1.0, 1.0);
}
if (nStatus == 4)
{
sLance = "black";
DestroyObject (oLever);
CreateObject (OBJECT_TYPE_PLACEABLE, "plc_lance001", lLoc);
}
if (nStatus > 4)
{
if (!bInfinite)
{
return;
}
}
oItem = CreateItemOnObject("lance_" + sLance, oPC);
AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_RIGHTHAND));
}

Posted by frudillao at 2008-11-17 16:13:04    Voted 10.00 on 11/17/08
Great work as usual! hehe :)
_________________________

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Tools


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters