Druid Port Bot V1.0

Did you find this script Useful?

  • Yes

    Votes: 11 73.3%
  • No

    Votes: 4 26.7%

  • Total voters
    15

Syliac

Active Member
This bot will port via Tells. And Based on Variable Will zone threw his port after opened or just stay in place.

Default Tell's

Port To Commonlands Please!
Port To Antonica Please!
Port To Gfay Please!
Port To Butcherblock Please!
Port To Steamfont Please!

Stay Put!
/run druidportbot 0

Zone After Opening Port!
/run druidportbot 1


Special thanks to Pygar for helping on this.
 

Attachments

Ronin

Active Member
Very nice, i was thinking about making something just like this, but then remembered i didn't have any druid toon to test it with ( o_O )

//Ronin
 

gp1001

Active Member
This is really nice!
I love this script, Is there an easy way to make him only open ports for people of a certain guild or maybe people from a list you specify?
 

gp1001

Active Member
marcusw03 said:
only tell the people you want to be able to use it is the simple way
Next... =)

Lol I was really hoping someone could add an access list to it.

would it work if i modified the trigger?

AddTrigger QueueCommonlands "\\aPC @*@ @*@:mad:sender@\\/a tells@*@Port to Commonlands Please!@*@"
I am really bad at REGEX so i would not know where to start.
 
Last edited:

marcusw03

Active Member
gp1001 said:
Next... =)

Lol I was really hoping someone could add an access list to it.
what do you mean by an access list? the same thing you asked before about limiting it to certain people?
 

gp1001

Active Member
marcusw03 said:
what do you mean by an access list? the same thing you asked before about limiting it to certain people?
Yes, I can do it by editing the triggers. :D
It's allot of typing but it will work.

what would be ideal is to have a AllowedUsers.xml and just put the name of the users in that file.
I could send a tell to the bot: /tell portbot ADD playername
But this works, cut and paste for the win. I will play with trying to get that into the script later.
 
Last edited:

Jackabite

Active Member
I have mine set to a specific tell for each portal.


For example: I'm XXX port me to Kunzar Jungle!

the XXX would be guild name in my case. I have it set on my toons comment in guild so everyone knows. I think it works pretty well.
 

gp1001

Active Member
Syliac said:
Just do AddTrigger QueueCommonlands @*@Sender@*@Port to Commonlands Please!@*@
Where do i put the person name in?
Do I replace Sender with the name of the person?

I figured it out!
Thanks Syliac!
 
Last edited:

gp1001

Active Member
When sending the bot tells, it sometimes takes 2 tells before the bot actually fires off the port. This usually happens after the first port spell is cast. I checked and the spell re-use time is ready to be cast again. I cant seem to get this delay removed.

I think it has something to do with this line:

If ${Math.Calc[${Time.Timestamp}-${triggerTime.Timestamp}]} >=${triggerCheckTimer}
I have tried replaceing the 5 with a 0 here:

declare triggerCheckTimer int script 0
what exactly is the 5 for? 5 mins?
 

gp1001

Active Member
I did a little more testing and I have found that it happens right from the start of the script. I only want the bot useable by certain players so I have multiple triggers setup for each port. (players1-8 actual player names removed.)

Code:
AddTrigger QueueCommonlands "@*@player8@*@Commonlands@*@"
AddTrigger QueueCommonlands "@*@player1@*@Commonlands@*@"
AddTrigger QueueCommonlands "@*@player2@*@Commonlands@*@"
AddTrigger QueueCommonlands "@*@player3@*@Commonlands@*@"
AddTrigger QueueCommonlands "@*@player4@*@Commonlands@*@"
AddTrigger QueueCommonlands "@*@player5@*@Commonlands@*@"
AddTrigger QueueCommonlands "@*@player6@*@Commonlands@*@"
AddTrigger QueueCommonlands "@*@player7@*@Commonlands@*@"
AddTrigger QueueAntonica "@*@player8@*@Antonica@*@"
AddTrigger QueueAntonica "@*@player1@*@Antonica@*@"
AddTrigger QueueAntonica "@*@player2@*@Antonica@*@"
AddTrigger QueueAntonica "@*@player3@*@Antonica@*@"
AddTrigger QueueAntonica "@*@player4@*@Antonica@*@"
AddTrigger QueueAntonica "@*@player6@*@Antonica@*@"
AddTrigger QueueAntonica "@*@player5@*@Antonica@*@"
AddTrigger QueueAntonica "@*@player7@*@Antonica@*@"
AddTrigger QueueButcherBlock "@*@player8@*@Butcherblock@*@"
AddTrigger QueueButcherBlock "@*@player1@*@Butcherblock@*@"
AddTrigger QueueButcherBlock "@*@player2@*@Butcherblock@*@"
AddTrigger QueueButcherBlock "@*@player3@*@Butcherblock@*@"
AddTrigger QueueButcherBlock "@*@player4@*@Butcherblock@*@"
AddTrigger QueueButcherBlock "@*@player6@*@Butcherblock@*@"
AddTrigger QueueButcherBlock "@*@player7@*@Butcherblock@*@"
AddTrigger QueueButcherBlock "@*@player5@*@Butcherblock@*@"
AddTrigger QueueGfay "@*@player8@*@Gfay@*@"
AddTrigger QueueGfay "@*@player1@*@Gfay@*@"
AddTrigger QueueGfay "@*@player2@*@Gfay@*@"
AddTrigger QueueGfay "@*@player3@*@Gfay@*@"
AddTrigger QueueGfay "@*@player4@*@Gfay@*@"
AddTrigger QueueGfay "@*@player6@*@Gfay@*@"
AddTrigger QueueGfay "@*@player7@*@Gfay@*@"
AddTrigger QueueGfay "@*@player5@*@Gfay@*@"
AddTrigger QueueSteamfont "@*@player8@*@Steamfont@*@"
AddTrigger QueueSteamfont "@*@player1@*@Steamfont@*@"
AddTrigger QueueSteamfont "@*@player2@*@Steamfont@*@"
AddTrigger QueueSteamfont "@*@player3@*@Steamfont@*@"
AddTrigger QueueSteamfont "@*@player4@*@Steamfont@*@"
AddTrigger QueueSteamfont "@*@player5@*@Steamfont@*@"
AddTrigger QueueSteamfont "@*@player6@*@Steamfont@*@"
AddTrigger QueueSteamfont "@*@player7@*@Steamfont@*@"
AddTrigger QueueKunzar "@*@player8@*@Kunzar@*@"
AddTrigger QueueKunzar "@*@player1@*@Kunzar@*@"
AddTrigger QueueKunzar "@*@player2@*@Kunzar@*@"
AddTrigger QueueKunzar "@*@player3@*@Kunzar@*@"
AddTrigger QueueKunzar "@*@player4@*@Kunzar@*@"
AddTrigger QueueKunzar "@*@player5@*@Kunzar@*@"
AddTrigger QueueKunzar "@*@player6@*@Kunzar@*@"
AddTrigger QueueKunzar "@*@player7@*@Kunzar@*@"
AddTrigger QueueKylong "@*@player8@*@Kylong@*@"
AddTrigger QueueKylong "@*@player1@*@Kylong@*@"
AddTrigger QueueKylong "@*@player2@*@Kylong@*@"
AddTrigger QueueKylong "@*@player3@*@Kylong@*@"
AddTrigger QueueKylong "@*@player4@*@Kylong@*@"
AddTrigger QueueKylong "@*@player5@*@Kylong@*@"
AddTrigger QueueKylong "@*@player6@*@Kylong@*@"
AddTrigger QueueKylong "@*@player7@*@Kylong@*@
Could it be that there are too many triggers causeing some kind of latency in processing the triggers?
 

Jackabite

Active Member
Why not use a specific tell to actually call the port? then give the characters the "magic phrase" that actuates the port script. :) its how I do it.
 

gp1001

Active Member
Jackabite said:
Why not use a specific tell to actually call the port? then give the characters the "magic phrase" that actuates the port script. :) its how I do it.
Because some people have big mouths and word gets around...
This way it can only be used by a certain player.

You know what i am talking about...

friend1 that has the magic phrase tells a friend here is the magic phrase but dont give it out to anyone else, I;m not even supposed to give it to you but i can trust you. friend of that friend gives it out to someone else and so on...
 

gp1001

Active Member
Todo:
  • Add some code so that if someone sends the bot a tell for example Kylong Plains and the bot is already in Kylong plains to tell the requester so.
  • Fix the bot not responding to ports even though his ability is available. I added a work around, that checks if the ability is ready and if it is not it send the requester a tell.
  • Fix the group invites to only accept invite to people in the authorize_users access list.
  • Add code to save authorized_users to a file instead of having it hardcoded in the script.
I am very new to scripting and I received allot of help from Cybertech, Pygar and ownagejoo. Thanks guys!
Thanks Syliac for creating the original code!

The script works fairly well, except for the group invite portion.
Just edit authorized_users:Add[Player1] changing Player1 to the toon you would like to have access.
I tried to make it so that the bot would only accept invites from people on the authorized list. If anyone can lend a hand fixing this I would appreciate it greatly!

For some reason when the bot receives its first tell and usually ports right away. the second tell it receives it will report that the ability is not ready even though ingame it is.


Code:
;Druid Port Bot v1.2 1.17.08
;Gp1001
;Credits
;Original author Syliac
;Cybertech for the help on authorized_users
;Pygar for helping me with ChoiceWindows.
 
variable set authorized_users
 
;For saving settings to a file in the future.
;variable filepath mainpath="${LavishScript.HomeDirectory}/Scripts/"
 
function initPortBot()
{
ext -require isxeq2
wait 200 ${ISXEQ2.IsReady}
if !${ISXEQ2.IsReady}
    {
        echo ISXEQ2 failed to load, bailing out
        return ERROR
    }
    Event[EQ2_onChoiceWindowAppeared]:AttachAtom[EQ2_onChoiceWindowAppeared]
    authorized_users:Add[Player1]
    authorized_users:Add[Player2]
    declare FollowMode bool script 0
    declare triggerCheckTimer int script 1
    call Clear_Triggers
    AddTrigger QueueCommonlands "\\aPC @*@ @*@:@sender@\\/a tells@*@Commonlands@*@"
    AddTrigger QueueAntonica "\\aPC @*@ @*@:@sender@\\/a tells@*@Antonica@*@"    
    AddTrigger QueueButcherBlock "\\aPC @*@ @*@:@sender@\\/a tells@*@ButcherBlock@*@"
    AddTrigger QueueGfay "\\aPC @*@ @*@:@sender@\\/a tells@*@Gfay@*@"
    AddTrigger QueueSteamfont "\\aPC @*@ @*@:@sender@\\/a tells@*@Steamfont@*@"
    AddTrigger QueueKunzar "\\aPC @*@ @*@:@sender@\\/a tells@*@Kunzar@*@"
    AddTrigger QueueKylong "\\aPC @*@ @*@:@sender@\\/a tells@*@Kylong@*@"
    AddTrigger QueueDisband "\\aPC @*@ @*@:@sender@\\/a tells@*@Disband Group@*@"
}
 
atom(script) EQ2_onChoiceWindowAppeared()
{
    if ${ChoiceWindow.Text.Find[${sender}]} && ${authorized_users.Contains[${sender}]}
    {
        echo ${sender}
        ChoiceWindow:DoChoice1
        return        
    }
    else
    {
        echo ${sender}
        ChoiceWindow:DoChoice2
        return
    }
}
 
function main(int Follow)
{
 
    EQ2Echo Initializing Druid Port Bot!
    call initPortBot
    FollowMode:Set[${Follow}]
 
    do
    {
        ;waitframe
        call Check_Triggers
 
    } 
    while 1     
 
}
 
function QueueDisband(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
        EQ2Execute "/tell ${sender} Disbanding group!"
        call CastPort DisbandGroup
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function QueueCommonlands(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
            if !${Me.Ability[Circle of Commonlands].IsReady}
            {
            EQ2Execute "/tell ${sender} Circle of Commonlands is not ready yet!"
            }
            else
        EQ2Execute "/tell ${sender} Incoming port to Commonlands!"
        call CastPort Commonlands
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function QueueAntonica(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
            if !${Me.Ability[Circle of Antonica].IsReady}
            {
            EQ2Execute "/tell ${sender} Circle of Antonica is not ready yet!"
            }
            else
        EQ2Execute "/tell ${sender} Incoming port to Antonica!"
        call CastPort Antonica
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function QueueButcherBlock(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
            if !${Me.Ability[Circle of ButcherBlock].IsReady}
            {
            EQ2Execute "/tell ${sender} Circle of ButcherBlock is not ready yet!"
            }
            else
        EQ2Execute "/tell ${sender} Incoming port to Butcher Block!"
        call CastPort ButcherBlock
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function QueueGfay(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
            if !${Me.Ability[Circle of Greater Faydark].IsReady}
            {
            EQ2Execute "/tell ${sender} Circle of Greater Faydark is not ready yet!"
            }
            else
        EQ2Execute "/tell ${sender} Incoming port to Greater Faydark!"
        call CastPort Gfay
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function QueueSteamfont(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
            if !${Me.Ability[Circle of Steamfont].IsReady}
            {
            EQ2Execute "/tell ${sender} Circle of Steamfont is not ready yet!"
            }
            else
        EQ2Execute "/tell ${sender} Incoming port to Steamfont!"
        call CastPort Steamfont
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function QueueKunzar(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
            if !${Me.Ability[Circle of Kunzar Jungle].IsReady}
            {
            EQ2Execute "/tell ${sender} Circle of Kunzar Jungle is not ready yet!"
            }
            else
        EQ2Execute "/tell ${sender} Incoming port to Kunzar Jungle!"
        call CastPort Kunzar
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function QueueKylong(string Line, string sender)
{        
        if ${sender(exists)} && ${authorized_users.Contains[${sender}]}
        {
            if !${Me.Ability[Circle of Kylong Plains].IsReady}
            {
            EQ2Execute "/tell ${sender} Circle of Kylong Plains is not ready yet!"
            }
            else
        EQ2Execute "/tell ${sender} Incoming port to Kylong Plains!"
        call CastPort Kylong
        }
        else
        EQ2echo Unauthorized Attemp!
}
 
function CastPort(string destination)
{
    switch ${destination}
    {
        case DisbandGroup
            EQ2Execute /disband
            break
        case Commonlands
            Me.Ability[Circle of Commonlands]:Use
            break
        case Antonica
            Me.Ability[Circle of Antonica]:Use
            break
        case ButcherBlock
            Me.Ability[Circle of ButcherBlock]:Use
            break
        case Gfay    
            Me.Ability[Circle of Greater Faydark]:Use
            break
        case Steamfont
            Me.Ability[Circle of Steamfont]:Use
            break
        case Kunzar
            Me.Ability[Circle of Kunzar Jungle]:Use
            break
        case Kylong
            Me.Ability[Circle of Kylong Plains]:Use
            break    
        case default
            Eq2echo ERROR!
            break
    }
 
    if ${FollowMode}
    {
        call ClickZone ${destination}
    }
 
}
 
function ClickZone(string destination)
{
    wait 200
    switch ${destination}
    {
        case DisbandGroup
            EQ2echo Disbanding from Group
            break
        case Commonlands
            Actor[portal_to_commonlands]:DoubleClick
            wait 10
            EQ2UIPage[popup,ZoneTeleporter].Child[list,Destinations.DestinationList]:HighlightRow[2] 
            EQ2:ConfirmZoneTeleporterDestination 
            if ${EQ2.Zoning}
            {
            ; Ok EQ2 is zoning.
                do
                {
                wait 20
                if !${EQ2.Zoning}
                ; EQ2 is now zoned...
                break
                }
                while 1>0
                break
            }
            break
        case Antonica
            Actor[portal_to_antonica]:DoubleClick
            wait 10
            EQ2UIPage[popup,ZoneTeleporter].Child[list,Destinations.DestinationList]:HighlightRow[2] 
            EQ2:ConfirmZoneTeleporterDestination 
            if ${EQ2.Zoning}
            {
            ; Ok EQ2 is zoning.
                do
                {
                wait 20
                if !${EQ2.Zoning}
                ; EQ2 is now zoned...
                break
                }
                while 1>0
                break
            }
            break
        case ButcherBlock
            Actor[portal_to_butcherblock]:DoubleClick
            wait 10
            EQ2UIPage[popup,ZoneTeleporter].Child[list,Destinations.DestinationList]:HighlightRow[2] 
            EQ2:ConfirmZoneTeleporterDestination 
            if ${EQ2.Zoning}
            {
            ; Ok EQ2 is zoning.
                do
                {
                wait 20
                if !${EQ2.Zoning}
                ; EQ2 is now zoned...
                break
                }
                while 1>0
                break
            }
            break
        case Gfay    
            Actor[portal_to_greater_fay]:DoubleClick
            wait 10
            EQ2UIPage[popup,ZoneTeleporter].Child[list,Destinations.DestinationList]:HighlightRow[2] 
            EQ2:ConfirmZoneTeleporterDestination 
            if ${EQ2.Zoning}
            {
            ; Ok EQ2 is zoning.
                do
                {
                wait 20
                if !${EQ2.Zoning}
                ; EQ2 is now zoned...
                break
                }
                while 1>0
                break
            }
            break
        case Steamfont
            Actor[portal_to_steamfont]:DoubleClick
            wait 10
            EQ2UIPage[popup,ZoneTeleporter].Child[list,Destinations.DestinationList]:HighlightRow[2] 
            EQ2:ConfirmZoneTeleporterDestination 
            if ${EQ2.Zoning}
            {
            ; Ok EQ2 is zoning.
                do
                {
                wait 20
                if !${EQ2.Zoning}
                ; EQ2 is now zoned...
                break
                }
                while 1>0
                break
            }
            break
        case Kunzar
            Actor[portal_to_kunzar_jungle]:DoubleClick
            wait 10
            EQ2UIPage[popup,ZoneTeleporter].Child[list,Destinations.DestinationList]:HighlightRow[2] 
            EQ2:ConfirmZoneTeleporterDestination 
            if ${EQ2.Zoning}
            {
            ; Ok EQ2 is zoning.
                do
                {
                wait 20
                if !${EQ2.Zoning}
                ; EQ2 is now zoned...
                break
                }
                while 1>0
                break
            }
            break
        case Kylong
            Actor[portal_to_kylong_plains]:DoubleClick
            wait 10
            EQ2UIPage[popup,ZoneTeleporter].Child[list,Destinations.DestinationList]:HighlightRow[2] 
            EQ2:ConfirmZoneTeleporterDestination 
            if ${EQ2.Zoning}
            {
            ; Ok EQ2 is zoning.
                do
                {
                wait 20
                if !${EQ2.Zoning}
                ; EQ2 is now zoned...
                break
                }
                while 1>0
                break
            }
            break
        case default
            Eq2echo ERROR!
            break
    }
}
 
; === Resets the triggers so we dont get spammed with tells ===
; === This should be run BEFORE adding any triggers! ===
; ================================================================
function Clear_Triggers()
{
    FlushQueued
}    
 
; ================================================================
; === This function will check any queued events. This can ===
; === can maximum be activated so often as the given var in ===
; === Initialize() ===
; ================================================================
function Check_Triggers() 
{
 
If ${Math.Calc[${Time.Timestamp}-${triggerTime.Timestamp}]} >=${triggerCheckTimer}
{
 
    if ${QueuedCommands} 
    {
        do 
        {
            ExecuteQueued 
        }
        while ${QueuedCommands}
    }
 
    triggerTime:Set[${Time.Timestamp}]
}
}
 
; ================================================================
; === Runs when script ends                 ===
; ================================================================
function atexit()
{
    Event[EQ2_onChoiceWindowAppeared]:DetachAtom[EQ2_onChoiceWindowAppeared]
    EQ2Echo Druid Port Bot is now exiting!
}
 
Last edited:
Top Bottom