Discussion in 'EQ2Bot (Freeware)' started by TheHaydens, Jun 29, 2012.

  1. TheHaydens

    TheHaydens Member

    Messages:
    66
    For EQ2Bot, Trying to make the dirge remove rez sickness from players that are afflicted with it..

    I got him to reconize the rez sickness from himself and remove it..

    But now I want to implement a loop to always check everyone in the group for rez sickness at all times...

    This is what I have right now and am stuck:

    HTML:

    ;loop group members    
        do    
      {        
         ;;Scans the Group for Rez Sickness      
         if ${Me.Group[${temph2}].ToActor(exists)}  && ${Me.Group[${temph2}].IsAfflicted} && ${Me.Group[${temph2}].ToActor.Distance}<=${Me.Ability[${SpellType[384]}].Range} && ${Me.Ability[${SpellType[384]}].IsReady}        
    {          
        echo shit          
               ;Remove the rez sickness          
                if ${Actor.Effect[detrimental,Revived Sickness](exists)}          
                 {                    
                 echo fuck          
                         call CastSpellRange 384 0 0 0 ${Me.Group[${temph2}].ID} 0 0 0 0 1 0    
                         eq2execute gsay Removing Rez Sickness on ${Me.Group[${temph2}].ToActor}        
                         wait 2    
                  }    
       }  
      }  
      while ${temph2:Inc} <= ${Me.GroupCount}

    ^^This is a lot messier than what I have in my Notepad++, not sure why it doesn't keep the "tabs"/"new lines" I tried to make it easier on the eyes here, sorry....
  2. Kannkor

    Kannkor Ogre

    Messages:
    3,620
    Effects on others aren't available to you, unless you have them [Target/Implied Target].

    You have Actor.Effect.. Actor is used to find and return an Actor, you aren't giving it anything to search by.

    Also, effect names are server calls. In the above example, "${Actor.Effect[detrimental,Revived Sickness](exists)}" - you don't have any delay with this. So you are spamming the server, your FPS every second. So if you are running 30 FPS, you are hitting the server 30 times per second, every second.

    When they have server latency issues, and they check character usage, scripts using the above will show up on top. It's said that bots usually use over 100 times the resources as a human.

    Back in the day, I had a bunch of server calls in Ogrebot (prior to knowing they were server calls), and when we got a raid together (20+ people in 1 zone), it would lag the entire zone for everyone (humans not running bots too) and give the entire zone a 4-5 second delay.
    Fixed all that up, and now ogrebot won't even keep an instance active without specifying it! (meaning, it has 0 server calls, which is a good thing).

    To simply answer your question, it's not possible to see when others have res effects. You can make decent educated guesses based on some information, but you can't "check" for sure.
  3. TheHaydens

    TheHaydens Member

    Messages:
    66

    What would be the best course of action on this dilemma? I don't wan't to throw it away and never use it, because it is a very nice spell especially in the new raid zones..
  4. Kannkor

    Kannkor Ogre

    Messages:
    3,620
    I'd say the least technical way, is to do an event that reads incoming text and base it off the text, since every res has a specific text it says when it reses. Downside is, you have to hardcode all of these, and add/update them where needed.
  5. TheHaydens

    TheHaydens Member

    Messages:
    66

    Did not know that!!! I help my friends raid so they don't have to deal with 23 other people's schedules and drama, and lately they been reporting spell lag and spell delay... My scripts been experiencing the same problem.. One guy has it so bad it sometimes crashes his game and now I see it all may be my fault..

    Do you have any tips to help this??






    In bed I couldn't sleep and thought of when someone in my group gets rez sickness they send a tell to the dirge (Which than acts like the necro/conjy heart/shard requests) the dirge replies with the rez sickness spell...

    I may do it like that..
    Last edited: Jun 30, 2012
  6. Kannkor

    Kannkor Ogre

    Messages:
    3,620
    Well, remove all server calls. I've briefly looked at it (was quite some time ago), and it would take some serious work on the core of eq2bot. There's a document some where that lists most of the server calls to avoid. This will be by far, the largest thing you'll do with eq2bot if you complete it. Took me a solid week or 2 of straight coding to completely revamp Ogre (years ago now).


    That's what I do.

    Just remember, checking for an effect name is a server call. IE: Me.Effect[detrimental,blah] does ping the server EVERY time you run it.
  7. TheHaydens

    TheHaydens Member

    Messages:
    66

    Can you give me an idea what you mean, I am not a programmer and nor do I really know anything about this.. I am just a player who is using this as a learning tool for my future classes in college.

    Examples of server calls would be and a fix to them ((You don't need to explain everyone but please give me an idea))
  8. bob_the_builder

    bob_the_builder Well-Known Member

    Messages:
    675
    An example of this would be in the EQ2botlib.iss file there are calls for ${Me.Effect[${i}].Name}](exists)}
    Line 404-420 i.e.

    This is what Kannkor said to avoid
    There maybe other examples of server calls but that one was pretty blatant vs. what Kannkor was saying.
  9. bob_the_builder

    bob_the_builder Well-Known Member

    Messages:
    675
    Editing and copy/pasting the class routines for eq2bot isn't even scratching the surface of the issues that the core script of eq2bot has.

    just saying ...
  10. Kannkor

    Kannkor Ogre

    Messages:
    3,620
    There's 2 types of information. Information instantly available on the client (your computers memory), and information that can be available on the client after requesting it from the server.

    Server sends the client certain information and it retains it forever. Such as, your toons name, their level, etc. It stores some basic information also, such as ability IDs.
    There's information that the server will only send to the client if it's requested, then it will remove it from memory shortly after. Such as, ability names, ability information (power cost, range, etc).

    A good example of this, if you open the character window, all that information is instantly there.

    If you hover over a spell, it can take 1/2 - 1 second or so for it to populate, this is the client requesting the information from the server, then the client displaying it.

    How to fix it? It's no easy task. You have to go through, line by line, and change anything that is a server call, to something that isn't. And it's not just as simple as changing that line. You need to build objects that can handle the same task, without using a server call.
  11. TheHaydens

    TheHaydens Member

    Messages:
    66

    So....

    are you saying everything that checks for anything from other characters? The reason this is mind blowing because this is the entire structure of eq2bot.. But let me try to understand..

    As long as I don't have toons checking the (Effects, Beneficial, Detrimental) of other toons there will be no server calls... Right??
  12. Kannkor

    Kannkor Ogre

    Messages:
    3,620
    No, that's not what I'm saying at all.

    Those were examples of server calls.

    Give me an email address and I'll email you the list. Can PM it if you don't want it on the forums.

    Doing something as simple as: Me.Ability[sprint] is a server call. Ability NAMES aren't stored client side, they are server side.
  13. pr517

    pr517 Active Member

    Messages:
    118
    When checking Me.Effect[detrimental,${i}] use .MainIconID instead of .Name as it will never ask the server and it will be immediately available.
  14. TheHaydens

    TheHaydens Member

    Messages:
    66

    so,
    Me.Effect[detrimental,${i}] = Bad

    ${MainIconID.Effect[detrimental,Revived Sickness](exists)} = Good?​
  15. macker0407

    macker0407 Active Member

    Messages:
    270
    No.

    Good:

    if ${Me.Effect[detrimental,${i}].MainIconID} == <whatever id the res sickness icon is>

    Bad:

    if ${Me.Effect[detrimental,${i}].Name} == <name of some effect>

    (yes, I know, I'm trying to make this as simple as possible so excuse the operator abuse)

    The first retrieves information the client already knows, the second requires the client to make a server side call because the client doesn't immediately know. In fact the second example will probably be NULL the first time its called depending on how fast your script is executing.

    Now please, I beg of you: load up the LavishScript wiki and read it. It's clear you don't understand how the language itself works and you're going to land up doing far more harm than good until you have a better grasp of what you're putting into scripts.

Share This Page