ecosse wrote: ↑Wed Feb 19, 2025 4:58 pm
Apologies for 101 question - been messing about with lua scripts but getting nowhere fast. I have the druids / hag /halsin drop to zero hit points issue so I want to give them invunerabilty for a while as per a previous post - how to I wrap those up in a script please. Or point me to an example so I can learn from that would be great
ApplyStatus("S_HAG_Hag_c457d064-83fb-4ec6-b74d-1f30dfafd12d","INVULNERABLE")
RemoveStatus("S_HAG_Hag_c457d064-83fb-4ec6-b74d-1f30dfafd12d","INVULNERABLE")
I've tried to use existing tables but as most apply on player character not got very far. Thank you
Greetings ecosse!
The codes you posted are written in a format for Norbyte's Script Extender. If you're interested in using one of our cheat tables you should use the format provided in this reply.
The Transformation bug where an NPC dies on completing their transformation has come up a few times recently and I've looked into several of the top solutions. Please review these detailed explanations and get back to me if you still have questions:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In the interests of adding new content to the forum (it's also relevant to the question) I'll take this opportunity to share an ExecuteCall code I've been working on to ENABLE/DISABLE a status condition on any character. For this method, you need their unique character UUID.
Here is the correct code to target Halsin:
Code: Select all
{$lua}
if syntaxcheck then return end
------------------------------------------------
target = "7628bc0e-52b8-42a7-856a-13a6fd413323" -- S_GLO_Halsin
------------------------------------------------
status = "INVULNERABLE"
------------------------------------------------
[ENABLE]
SetArgToString(0,target)
SetArgToString(1,status)
SetArgToLong(2,-1)
ExecuteCall("ApplyStatus")
------------------------------------------------
[DISABLE]
SetArgToString(0,target)
SetArgToString(1,status)
SetArgToString(2,target)
ExecuteCall("RemoveStatus")
------------------------------------------------
This is oversimplified but someone might come across this as a complete NOOBZOR:
Download a table (Zanzer has linked several active tables to the first page) and complete the
Start-Up Instructions. You can add new codes directly to the table. Consider organizing your codes in a way that makes sense to you. The simplest/fastest way I've found to add something new is to copy and paste an existing code then changing its name by double clicking on it. You can change the content of the code by double clicking on the <script> word and pressing OK at the bottom to save it.
When you click the box to activate the code an [
X] will fill the box signaling that it has successfully executed the script under [ENABLE]. And when you uncheck the box, it will activate what's written under [DISABLE]. All codes are written a bit differently. This explanation is specifically for the code above.
If you want to target another NPC (like the Hag) replace Halsin's UUID out for hers:
"c457d064-83fb-4ec6-b74d-1f30dfafd12d" -- S_HAG_Hag
Be sure to only change the UUID and leave everything else the same.
I've never had this Transformation bug in one of my games but from what I've read it isn't fixable and may affect any/all characters who transform for the rest of the game. That's a lot of characters and might even include yourself--depending on your choices. I'd hate to wipe on purpose but consider this could be a sunk cost issue to make another character. If you plan on pushing through, please let us know how it goes!