Broken Script... Not Sure How To Fix. Help?

viniculum8

Active Member
Thank you... Here is the code.

How do I get this fixed?


Code:
;Examine.iss
;
;This script will open an examine window on detrimental effects as they happen.
;
variable(script) collection:string RecentDebuffs

function main()
{
	variable int count
	variable int examineTimer
	do
	{
		Me:InitializeEffects

		if ${Me.CountEffects[detrimental]}
		{
			count:Set[0]
			do
			{
				if !${RecentDebuffs.Element[${Me.Effect[detrimental,${count}].Name}](exists)}
				{
					Me.Effect[detrimental,${count}]:Examine
					RecentDebuffs:Set[${Me.Effect[detrimental,${count}].Name},${Me.Effect[detrimental,${count}].Description}]
					examineTimer:Set[${Time.Timestamp}]
					wait 1
				}
			}
			while ${count:Inc}<=${Me.CountEffects[detrimental]}
		}
		wait 5
		if (${examineTimer}<${Math.Calc64[${Time.Timestamp}-300]})
		{
			examineTimer:Set[${Time.Timestamp}]
			if ${RecentDebuffs.Used} > 0
			{
				RecentDebuffs:Clear
			}
		}
	}
	while 1
}
 

Amadeus

The Maestro
Staff member
Well, first of all, this script was really poorly designed. It shouldn't have been doing "InitializeEffects" every 5 frames.

Below is the fixed script. For more information, view the following links:
I would also suggest using 'effect' members to keep track of things rather than "Name" and/or "Description" (which only available as part of 'effectinfo')

Code:
;Examine.iss
;
;This script will open an examine window on detrimental effects as they happen.
;
variable(script) collection:string RecentDebuffs

function main()
{
	variable int count
	variable int examineTimer
	do
	{
		if ${Me.CountEffects[detrimental]}
		{
			count:Set[0]
			do
			{
				if !${RecentDebuffs.Element[${Me.Effect[detrimental,${count}].ToEffectInfo.Name}](exists)}
				{
					Me.Effect[detrimental,${count}]:Examine
					RecentDebuffs:Set[${Me.Effect[detrimental,${count}].ToEffectInfo.Name},${Me.Effect[detrimental,${count}].ToEffectInfo.Description}]
					examineTimer:Set[${Time.Timestamp}]
					wait 1
				}
			}
			while ${count:Inc}<=${Me.CountEffects[detrimental]}
		}
		wait 5
		if (${examineTimer}<${Math.Calc64[${Time.Timestamp}-300]})
		{
			examineTimer:Set[${Time.Timestamp}]
			if ${RecentDebuffs.Used} > 0
			{
				RecentDebuffs:Clear
			}
		}
	}
	while 1
}
 

bowbies

Active Member
my original pc broke and i lost the actual script for examine. How would i go about finding it again.
 

Amadeus

The Maestro
Staff member
I don't understand your question. I can't help you recover files on your PC. Otherwise, if you're looking for what's in this thread, just create new file, copy/paste the stuff in there, and then save it as examine.iss or whatever.

There are a lot of script examples on these forums, it shouldn't be that hard to figure out how to create a new script file, copy/paste stuff into it, etc.
 

bowbies

Active Member
what do I use to create a new file in order to make this. everytime i try to use mine it says

error; no such 'character' method 'initializeffects' @me'initializeeffects
error parsing data sequence
 
Last edited:

appleuser

Well-Known Member
Right click on the link I gave you, 'save link as' into your scripts folder. Let it overwrite the one that doesn't work.
 

Kannkor

Ogre
I made an extremely lightweight, no server call version of this.
From my patch notes:
ISXOgre
  • Added: ogre examine | ogre end examine
    • This is a very short, no server call script that will examine every detrimental you get ONCE. If you close a detrimental down, it will not reopen it again (until you restart the script). So you can close down any unwanted detrimentals while keeping any useful and future ones opening.
    • Note: It will not examine res sickness... I think we all know what that does... Especially freedo.
 
Top Bottom