Jump to content

question about op187 / local variables

Recommended Posts

I have a dialogue which lets you choose one of nine bonus prizes. This way if you pin the tail on the donkey again and get another prize, only  the remaining eight will be available to you. Operation:

IF ~GlobalLT("D5CSF6","LOCALS",1) GlobalGT("D5CS124F","GLOBAL",0)~ THEN REPLY @12041 GOTO d5cs124_6		//	determination

IF ~~ THEN BEGIN d5cs124_6 											// determination
 SAY @12042
 IF ~~ THEN REPLY @12002 DO ~SetGlobal("D5CSF6","LOCALS",1)~ DO ~ApplySpellRES("D5CSF6L",Myself)~ EXIT
 IF ~~ THEN REPLY @12003 GOTO d5cs124 

Simple. Works like a charm.

Separately, a different mod allowing NPC customization can break down the character to level 0 and let you rebuild it with a new class and kit, and among other things itshould let you run the bonus prize dialogue again and let you choose from the whole original set of nine. I already run op172 and op321 to remove all possible class/kit bonuses. I have added some op177 effects that run .EFFs, which use op187 to set all those local variables to 0. But it doesn't seem to be working - some of the dialogue options are closed off. It seems that the earlier SetGlobal script action cannot be removed by a later-applied op187 effect.

So... any ideas?

EDIT - maybe, the script can IncrementGlobal the LV and the later .EFF can set it... if  those stack, then the LV will  equal  2. And  I can just change the  condition in the dialogue  from

 IF ~GlobalLT("D5CSF6","LOCALS",1)


 IF ~OR(2) Global("D5CSF6","LOCALS",0) Global("D5CSF6","LOCALS",2)

...or whatever version of that has proper syntax. Depends on whether the LV will stack to 2.

Edited by subtledoctor
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...