Discussion in 'Scripts' started by viniculum8, Jan 4, 2017.

  1. viniculum8

    viniculum8 Active Member

    Messages:
    17
    Thank you... Here is the code.

    How do I get this fixed?


    Code (Text):
    ;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
    }
  2. Isnewbie

    Isnewbie Active Member

    Messages:
    141
    Me:InitializeEffects has been removed.
  3. Amadeus

    Amadeus The Maestro Staff Member

    Messages:
    8,264
    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 (Text):

    ;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
    }
     
  4. bowbies

    bowbies Member

    Messages:
    27
    my original pc broke and i lost the actual script for examine. How would i go about finding it again.
  5. Amadeus

    Amadeus The Maestro Staff Member

    Messages:
    8,264
    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.
  6. appleuser

    appleuser Well-Known Member

    Messages:
    297
  7. bowbies

    bowbies Member

    Messages:
    27
    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: Nov 8, 2017
  8. appleuser

    appleuser Well-Known Member

    Messages:
    297
    Right click on the link I gave you, 'save link as' into your scripts folder. Let it overwrite the one that doesn't work.
  9. Kannkor

    Kannkor Ogre

    Messages:
    3,632
    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.

Share This Page