Author Topic: Virtue v19 bug  (Read 7510 times)

Phil Krzeminski

  • Guest
Virtue v19 bug
« on: May 26, 2009, 03:33:30 PM »
When my alignment changed it started an infinite loop of "<Characters Name> - Alignment changed to true neutral." Any ideas how to fix this?

Offline Salk

  • Planewalker
  • *****
  • Posts: 873
Re: Virtue v19 bug
« Reply #1 on: February 10, 2017, 01:52:07 AM »
I know there is very low activity and interest nowadays but I am trying to debug Virtue (with my very limited knowledge).

I was wondering if anyone has encountered the problem mentioned above?

The script block seems to correctly prevents an infinite loop:

Code: [Select]
IF
Global("VirtueSetup","GLOBAL",1)
GlobalGT("D0VIRTUE","GLOBAL",8)
GlobalLT("D0VIRTUE","GLOBAL",13)
!Alignment(Player1,MASK_GENEUTRAL) <--- False if alignment is LN, TN or CN
Alignment(Player1,MASK_LCNEUTRAL)
Global("D0Change","GLOBAL",0)
!Global("D0VirtueDisable","GLOBAL",1)
THEN
RESPONSE #100
ChangeAlignment(Player1,NEUTRAL)
DisplayStringHead(Player1,@9)
END
« Last Edit: February 10, 2017, 01:52:49 AM by Salk »

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: Virtue v19 bug
« Reply #2 on: February 23, 2017, 02:57:18 PM »
I don't know enough about the Alignment(Player1,MASK_LCNEUTRAL) and what ChangeAlignment(Player1,NEUTRAL) does. Maybe the change alignment somehow included the MASK_LCNEUTRAL for the player's PC?

Offline Salk

  • Planewalker
  • *****
  • Posts: 873
Re: Virtue v19 bug
« Reply #3 on: February 25, 2017, 12:34:54 AM »
I don't know enough about the Alignment(Player1,MASK_LCNEUTRAL) and what ChangeAlignment(Player1,NEUTRAL) does. Maybe the change alignment somehow included the MASK_LCNEUTRAL for the player's PC?

NEUTRAL is TRUE NEUTRAL.

GENEUTRAL covers LAWFUL NEUTRAL, TRUE NEUTRAL and CHAOTIC NEUTRAL alignments.

LCNEUTRAL covers  NEUTRAL GOOD, TRUE NEUTRAL and NEUTRAL EVIL alignments.

The !Alignment(Player1,MASK_GENEUTRAL) condition should stop any looping.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: