Jump to content

A scripting question


zymurgy65

Recommended Posts

I want to modify the MG16 Mage script to ensure the necromancers at Fort Ontus produce hidden weapons (maces) once Caranya is dead. I've copied the UOP script to my own mod, and I'd like to know if my "additem" command should be placed after the UOP edit. The edit is to make sure any dead necromancers don't change their robes, so it would make sense; I'd just like to be sure.

Link to comment
Share on other sites

Could you post the script here, too? That might make it easier to give ideas on what to do. And with hidden weapons you mean... weapons added to them posthumously, ones that are tagged as playable? Or ones that are tagged unplayable (hence invisible in the inventory menu)? Or something else?

Link to comment
Share on other sites

Sorry, I'm not online at home, so I have to use a library computer. That's why I'm AFK for so long.

 

When you kill Caranya, the Fort Ontus mages are scripted to change into necromancer robes and attack you. The UOP modifies this script so that any you've already killed won't suddenly change clothes, which would be silly. The problem is that these "mages" (like many other necromancers in the Mages Guild quest line) are armed with daggers rather than maces. I wanted them to re-arm with maces at the same time as they change robes, and I'm guessing that I'll have to enter the "additem LL0NPCWeaponMace100 1" command after the UOP edit that keeps dead necromancers from switching clothes. Does that make sense?

Link to comment
Share on other sites

OK, I've copied the script, but for some reason I can't paste it. Anyway, this is the relevant part:

 

if ( GetDeadCount Caranya > 0 )

if ( GetStage MG16Amulet >= 30 ) && ( doonce == 0 )

setfactionrank MG16FortOntusMageFaction -1

setfactionrank NecromancerFaction 0

if (GetDead == 0) ;UOP -- because this was just silly.

removeitem magerobe 1

additem necromancerrobe 1

EquipItem Necromancerrobe

endif

 

What I intend to do is replace the command to switch robes with a command to switch weapons from daggers to maces. If I were a necromancer, I'd be more interested in getting hold of a weapon with which I had some skill than in making a fashion statement!

Edited by zymurgy65
Link to comment
Share on other sites

Look carefully on that line.

EquipItem Necromancerrobe

If you just give the NPC a leveled list, he would not equip it automatically (especially if he has another weapon in his hand).

You need either pick one object and add+equip it straightly, or to find a mace in necromancer's inventory and equip it after giving a leveled item.

something like that

ref rItem
ref rContainer

begin whatever
   ...
   EquipItem Necromancerrobe
   AddItem LL0NPCWeaponMace100 1
   set rContainer to GetSelf
   foreach rItem <- rContainer
      if rItem.IsWeapon && rItem.GetWeaponType == 2
         rItem.EquipMe
         break
      endif
   loop
   ...
end
Edited by ProgMath2
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...