Need Script Help for Balmora Undercity

Post » Fri Jan 01, 2010 1:26 pm

Alrighty then, I have a few scripts that I am using but they are not functioning as they do not have the intended affect.

Script 1

I need to place a script on an NPC so that he only appears when a player's journal = x. (x being the journal number)
I then need the same script to update the journal when that NPC is killed.

The background of this script is that a scout from a rival faction invades a faction controlled territory and needs to be killed. So the scout needs to appear after the quest is given and the journal needs to update after the scout is killed.

Script 2

I need to place a script on an NPC to modify her health by -1000 if the player is in the same faction.
BUT I also need to run a death check if the player is in a certain faction so as to update the journal

The background behind this script is that the player needs to find out what happened to a trader who was bringing supplies. But I need the Trade to be dead if the player is in the same faction and alive if the player isn't because the trader has to be killed in another faction quest.


If anyone can help me with a script for this please do. If you need the esp to see what I am talking about then just ask and I will send it.
User avatar
MarilĂș
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am

Post » Fri Jan 01, 2010 11:25 am

very simple for script 1;

Begin MyScript1Short Doneif ( Done == 1 )     returnendifif ( GetJournalIndex, MyJournalTopic < 10 )     disable   else     enableendifif ( GetHealthGetRatio < 0.1 )     setHealth -1000     journal MyJournalIndex 20     set Done to 1endifend


I can't remember if GetHealthGetRatio require a fix when used on the calling object or not.


For Script 2;

Begin MyScript2Short Doneif ( Done == 1 )     returnendifIf ( GetPCRank, MyFactionID, == 1 ) ;enumerator is rank specific {-1=not a member}     setHealth -1000     journal, MyJournalIndex 10     set Done to 1   else     returnendifend


I can't test these because of a bad game disk, but try them anyways. Hopefully I understood what you needed for the second script. <_<
User avatar
Nicole Kraus
 
Posts: 3432
Joined: Sat Apr 14, 2007 11:34 pm

Post » Fri Jan 01, 2010 10:55 am

if ( OnDeath == 1 )

should do the trick, rather than:

if ( GetHealthGetRatio < 0.1 )
User avatar
{Richies Mommy}
 
Posts: 3398
Joined: Wed Jun 21, 2006 2:40 pm

Post » Fri Jan 01, 2010 11:26 am

if ( OnDeath == 1 )

should do the trick, rather than:

if ( GetHealthGetRatio < 0.1 )


It can be somewhat unreliable. I've used it many times without issue, but many people have experienced problems.
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am

Post » Fri Jan 01, 2010 4:07 am

The first script works so that is handled. But onto the second script, I spent the better half of 3 hours trying to get it work to no avail. Plus I realized I need a few functions in this one script.

The Functions are:
The script should make an NPC dead if the play is in the same faction
The script should update the player's journal when the NPC is activated
The script should update the player's journal when the player kills the NPC. (this is for the opposite faction quest)

To explain everything clearly, if the player is in the 'Hobo' Faction, they have to go find the dead supply Caravan. Where they then need to get the supplies object. However, if the player is in the Guard Squad they must go and kill the Supply Caravan. This needs a rather complex script and I do not have the ability to write one. If anyone can help it would be greatly appreciated.
User avatar
CHARLODDE
 
Posts: 3408
Joined: Mon Apr 23, 2007 5:33 pm

Post » Fri Jan 01, 2010 5:05 am

I suspect the difficulty you had testing the second script was not being the appropriate rank in the faction. This script will process regardless of the player's rank (depends only on faction membership).

Begin SecondScriptshort doOnceif ( doOnce == 2 )    returnendifif ( doOnce == 1 )    if ( OnActivate == 1 )        set doOnce to 2        Journal "Journal_ID" 50 ; replace with relevent journal index    endif    returnendifif ( ( GetPCRank "Hobo" ) >= 0 ) ; player is member of Hobo faction    set doOnce to 1    SetHealth 0elseif ( ( GetPCRank "Guard Squad" ) >= 0 ) ; player is member of Guard Squad    if ( GetHealthGetRatio < 0.1 ) ; just to be safe        set doOnce to 2        ModCurrentHealth -100        Journal "Journal_ID" 100 ; replace with relavent journal index    endifendifEnd SecondScript

User avatar
OTTO
 
Posts: 3367
Joined: Thu May 17, 2007 6:22 pm


Return to III - Morrowind