BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Generic custom modules => Topic started by: Getrix on November 05, 2009, 05:59:50 pm

Title: Instance Bound Tracker b2.x.x
Post by: Getrix on November 05, 2009, 05:59:50 pm
Script found here: http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps

New lockouts stuff have been added to AoC latly and there have been couple request for keeping track of all timers..
I have rewritten the bound script to handle instance lockout based on hours and not only Raid reset every tuesday night.

To get this new version work, altering of mysql table is needed. Best is to just remove them and let script create them again.
Old data isnt much usable as the rewritten is completed different.

If there is missing any instances that would be nice to keep track of, please tell me.

Places allready added: Shortname, Fullname, Type, lockout in minutes
Code: [Select]
                ('Vistrix', 'Tier 1 - The Dragon''s Lair', 'Raid', 0),
('Yakhmar', 'Tier 1 - Yakhmar''s Cave', 'Raid', 0),
('Kyllikki', 'Tier 1 - Kyllikki''s Crypt', 'Raid', 0),
('BRC-W1', 'Tier 2 - Black Ring Citadel: Wing 1', 'Raid', 0),
('BRC-W2', 'Tier 2 - Black Ring Citadel: Wing 2', 'Raid', 0),
('BRC-W3', 'Tier 2 - Black Ring Citadel: Wing 3', 'Raid', 0),
('T3', 'Tier 3 - Thoth-Amon''s Tower', 'Raid', 0),
('T4', 'Tier 4 - The Jade Citadel', 'Raid', 0),
('BR', 'The Battle for Blood Ravine', 'PvP', 360),
('HV', 'The Battle for Hallowed Vaults', 'PvP', 360),
('LT', 'The Battle for Lost Temple', 'PvP', 360),
('TT', 'Totem Destruction', 'PvP', 360),
('CoJS', 'Blessings of an Ancient God', 'PvP', 360),
('CoJS', 'Blessings of Jhebbal Sag', 'PvP', 360),
('CoJS', 'Diving Calling', 'PvP', 360),
('RoKW', 'Refuge Of Apostate', 'Solo', 1200)");

Quote
/*
* Changelog History
* b2.0.2  - 2010-08-16 Getrix - Fixed bounding raids bug when bot runs on Windows machine.
* b2.0.1  - 2010-05-02 Getrix - Getting it ready for public test. Old tables need to be deleted.
* b2.0.0  - 2010-05-01 Getrix - Rewritten script to handle more lockout types: Raid, Group (6mans), Solo, Minigame
* b1.0.10 - 2010-02-04 Getrix - fixed typos that caused it to crash
* b1.0.9  - 2010-02-04 Getrix - added update_table to add instances when they arrives. T3 is being added to tblv2
* b1.0.8  - 2009-12-14 Kyr    - added admin ability to add/remove binds for others
* b1.0.7  - 2009-12-13 Getrix - Added "!bound raid" for LEADER(default) to bound whole raid within a instance.
* b1.0.6  - 2009-11-21 Kyr    - added setting for ServerResetTime
* b1.0.5  - 2009-11-21 Getrix - Fixed typos
* b1.0.4  - 2009-11-19 Getrix - Fixed bug in function bound()
* b1.0.3 Added !bound <nick>
* First release. Added "add interfaces"
*/

OLD Info:
Simpel module to keep track of whatever your char is bound to a boss instance.
Not much function, but it get your life abit better :P
Should work for both AoC and AO (Do AO have this kinda bound?)

Script found here: http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps

NOTE: Only a beta as there is not much "extras". Dunno when or if i have time to make more to it.


There isnt any function to add instances, on the first run with b1.0.1 and nothing added to instance table the module will add current raid content for AoC.

Another NOTE:
As this is a beta, there probly will be changes in MySQL so you need to remove all stored data for this on a upgrade...
Title: Re: Instance Bound Tracker
Post by: viggen on November 05, 2009, 07:49:02 pm
[10:47] [Guild] [xxx]: !bound add Vistrix
[10:47] [Guild] [xxx]: Bound failed, instance doesnt exist! Bound info


----

not able to add char to list...   cmds for the script?

Edit:  Anyone else using this mod?  working for you?
Title: Re: Instance Bound Tracker
Post by: Getrix on November 05, 2009, 10:22:46 pm
Is it my english that causes ppl to not understand what im writing?

This function is made verry simpel. All you have todo is type "!bound" with any char that have access to the bot and minimum "Member" status. Then you will get a verry easy interface in the link.
And then, read the first post again about instances.

"!help bound"
Title: Re: Instance Bound Tracker
Post by: viggen on November 05, 2009, 10:50:29 pm
were do you insert the script that add the bound raids that u posted for AOC raids?
Title: Re: Instance Bound Tracker
Post by: BoA-Gert on November 05, 2009, 11:57:36 pm
Nice - works fine and easy to use...just one quick question, does it reset at 04:00GMT Tuesdays or just when it reaches Tuesday?

/edit

I suggest the instance list SQL be:

Code: [Select]
INSERT INTO `PREFIX_bound_instance` (`instance_id`, `instance_shortname`, `instance_fullname`) VALUES
  (1, 'BRC-W1', 'Tier 2 - Black Ring Citadel, W1'),
  (2, 'BRC-W2', 'Tier 2 - Black Ring Citadel, W2'),
  (3, 'BRC-W3', 'Tier 2 - Black Ring Citadel, W3'),
  (4, 'Vistrix', 'Tier 1 - The Dragon''s Lair'),
  (5, 'Yakhmar', 'Tier 1 - Yakhmar''s Cave'),
  (6, 'Kyllikki', 'Tier 1 - Kyllikki''s Crypt');

So that the display names show which Wing ;)

@ Viggen - I used phpMyAdmin to run the SQL - depends what access and utils you have :)
Title: Re: Instance Bound Tracker
Post by: Getrix on November 06, 2009, 06:57:00 am
Hehe thanks BoA-Gert. The Wing number was forgotton when i copy posted from my dev base. :S

Atm it resets at Tuesday 00:00. Didnt remember the time exact, but there shouldnt be the biggest problem for ppl in that 4hr time-frame?
Title: Re: Instance Bound Tracker
Post by: BoA-Gert on November 06, 2009, 12:25:36 pm
Shouldn't be a problem - just wasn't sure if it was checking the time as well as day...
Title: Re: Instance Bound Tracker
Post by: Getrix on November 06, 2009, 01:08:09 pm
I made a verry simpel calculation on the reset time.
As tuesday is the 2nd day of ordinary week, mondays will be Week nr X - 1 (minus). And then only save the week number ppl are bounding in the database. Verry simpel, but it works.

I thougt everyone running a bot should have experience enough to put the instance information into SQL when i made the commands needed, but maybe im wrong..
Uploaded a new file where it checks and add current AoC raid instances if nothing else is added.
Title: Re: Instance Bound Tracker
Post by: Baldrick on November 06, 2009, 03:44:45 pm
This is exactly what I was on about in my recent post. Thanks a lot for this, it is really appreciated!

Title: Re: Instance Bound Tracker
Post by: viggen on November 06, 2009, 08:21:52 pm
it works GREAT!  excellent job!

Thanks!
Title: Re: Instance Bound Tracker
Post by: Margon on November 07, 2009, 10:22:45 am
can you add the function "!bound <name>" to show the bounds of a different charakter?
if <name> is empty the own charakter name will be shown
Title: Re: Instance Bound Tracker
Post by: Kyr on November 08, 2009, 09:23:26 pm
This is great, thanks!
~Kyr
Title: Re: Instance Bound Tracker
Post by: viggen on November 09, 2009, 09:46:50 am
can you add the function "!bound <name>" to show the bounds of a different charakter?
if <name> is empty the own charakter name will be shown


Ya would love to see a way to search other players or even your own without having to log on that specific character

Title: Re: Instance Bound Tracker
Post by: Getrix on November 09, 2009, 10:23:58 am
can you add the function "!bound <name>" to show the bounds of a different charakter?
if <name> is empty the own charakter name will be shown

This function is added to b1.0.2: http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps
Title: Re: Instance Bound Tracker
Post by: Margon on November 09, 2009, 11:44:19 am
<3 Gentrix! :)
Title: Re: Instance Bound Tracker
Post by: Runemy on November 09, 2009, 12:01:40 pm
Haha, and the next obvious request is !bound instance InstanceID (Or Instance name) to get a list over all bound chars in the org for the specific instance.

But thanks again Getrix for another useful addition to the bot.
Title: Re: Instance Bound Tracker
Post by: viggen on November 09, 2009, 09:48:23 pm
Haha, and the next obvious request is !bound instance InstanceID (Or Instance name) to get a list over all bound chars in the org for the specific instance.

But thanks again Getrix for another useful addition to the bot.

A List of all of your alt character's and what they are bound too.
!bound alts

Title: Re: Instance Bound Tracker
Post by: Getrix on November 09, 2009, 10:39:43 pm
Haha, and the next obvious request is !bound instance InstanceID (Or Instance name) to get a list over all bound chars in the org for the specific instance.

"!bound list <id/shortname>" is aviable in b1.0.3
Title: Not 100% reset?
Post by: Kyr on November 11, 2009, 04:33:47 am
Did the reset happen for everyone this week?  Some toons with bound instances did not reset on my bot.

Anyone else experiencing this or am I smokin' crack again?

~Kyr
Title: Re: Instance Bound Tracker
Post by: Getrix on November 11, 2009, 07:07:57 am
There isnt a "reset" on bounded chars. It just checks whatever the char has been bounded the current week. To determ the current week it use date('N') (Minus 1week when its a monday).
This looked bulletproof when i made it, but ofc there can be some glitches. Nice if you could provide me with some info from your tables. Is the bound_week set to a correct number? And when typing "!bound" do you get current week number?

And check if your server clock/date is correct.
Title: Re: Instance Bound Tracker
Post by: Kyr on November 11, 2009, 10:24:50 am
I will pay closer attention for next weeks reset.  Most people seem to have the correct bound settings.  Its possible the one toons locks were added after the reset. 

Thanks for making this awesome module!

~Kyr
Title: Re: Instance Bound Tracker
Post by: Sanrye on November 12, 2009, 03:06:52 am
Could it have something to do with the reset being at a time other than midnight? If someone's clock is on local time, it may not sync well with when the servers actually roll over to the next raid week.
Title: Re: Instance Bound Tracker
Post by: Getrix on November 12, 2009, 07:02:17 am
Yes. This module is using the local server clock to know when a new week starts. This happens Tuesday 00:00.
Title: Re: Instance Bound Tracker
Post by: Sanrye on November 15, 2009, 03:32:28 am
Maybe add a setting that you can set through the settings interface so that it persists across updates that allows you to specify a number of hours to add or subtract for the start of a new week so that we can account for the difference between our local time and the AOC server time?

If not I can manually change my copy to do it.
Title: Re: Instance Bound Tracker
Post by: Poonjab on November 21, 2009, 03:37:45 am
I noticed the following error message in the console window when people are using the bound module.

Code: [Select]
Darknessbot [2009-11-21 02:31:07]       [TELL]  [INC]   Shartgasm: !bound add 4

Warning: Missing argument 2 for Bound::bound(), called in C:\xampp\darkbot\custom\modules\Bound.php on line 116 and defined in C:\xampp\darkbot\custom\modules\Bound.php on line 120

Other than seeing the error message it seems to be working, so I'm not sure what's going on there.
Title: Re: Instance Bound Tracker
Post by: Kyr on November 21, 2009, 07:15:17 am
Made some minor change to those funciton calls that should fix that. Also some spelling/grammer changes. 

Let me know if it doesn't fix it.  I never really saw it happen.

~Kyr
Title: Re: Instance Bound Tracker
Post by: Getrix on November 21, 2009, 11:28:29 am
Quote
// b1.0.5 - 2009-11-21 Fixed typos
// b1.0.4 - 2009-11-19 Fixed bug in function bound()

@Poonjab: That was fixed with b1.0.4 - 2009-11-19. Forgot to announce it :S

@Kyr: Thanks for the spelling/grammer changes=)
Title: ServerResetTime added
Post by: Kyr on November 24, 2009, 02:50:30 am
Added a setting for ServerResetTime. 

This will bring up the interface to set it:

It defaults to 5, offers settings for hours 1-12, but you can type in anything you like.

For example if your reset was 14 hours after midnight (GMT) you would send this to your bot: 
Title: Re: Instance Bound Tracker
Post by: Getrix on November 24, 2009, 07:05:20 am
Thanks kyr, uploaded to host.

Didnt have time to test, but asume you tested it to work as you wanted;)
Title: Re: Instance Bound Tracker
Post by: MysterF on December 07, 2009, 01:49:14 pm
I changed my copy of this cool module to say:

Quote
"You have now labeled yourself as being bound to this instance!"

"You already labeled yourself as being bound to this instance."

I think this line can help people  who aren't that smart, to understand what they do when they use !bound, and yes I had to explain to a guy, that  using !bound is not actually binding u to that instance :))

Title: Re: Instance Bound Tracker
Post by: Kyr on December 08, 2009, 08:50:29 pm
There was some confusion about that from my guild mates too.  Good idea changing the text, but those confused people are prolly the same ones that don't read it anyway.

I'm not cynical, really.

~Kyr
Title: Re: Instance Bound Tracker
Post by: Taker on December 12, 2009, 08:51:55 pm
Is there anyway yo ucould update it to make Bot Owners/admins beable to use the command for other people as well?

say Jim doesn't update his instance, Bob is an admin and he can update it for him.
Title: Re: Instance Bound Tracker
Post by: Kyr on December 13, 2009, 07:09:21 am
I am working on a change to allow admin to set bound info.
Title: Re: Instance Bound Tracker
Post by: Getrix on December 13, 2009, 01:52:53 pm
Quote
b1.0.7 - 2009-12-13 Getrix - Added "!bound raid" for LEADER(default) to bound whole raid within a instance.

"!bound raid" Will bound every bot member inside same game instance as you to the choicen boss instance
Default access is "LEADER"

Ask if this command is unclear :P
Title: Re: Instance Bound Tracker
Post by: Taker on December 13, 2009, 05:31:10 pm
Very nice! Thank you
Title: Re: Instance Bound Tracker
Post by: Kyr on December 16, 2009, 12:04:08 am
// b1.0.8 - 2009-12-14 Kyr - added admin ability to add/remove binds for others
Title: Re: Instance Bound Tracker
Post by: Getrix on December 16, 2009, 07:17:18 am
Thanks Kyr, uploaded b1.0.8 as latest version here: http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps
Title: Re: Instance Bound Tracker
Post by: Taker on December 16, 2009, 05:55:44 pm
Can you change it so we can use !bound raid Vistrix instead of the instance number
Title: Re: Instance Bound Tracker
Post by: Kyr on December 16, 2009, 07:41:54 pm
If you use:
It will bring up a window so you can click the instance you want to bind everyone to.
Title: Re: Instance Bound Tracker
Post by: Poonjab on December 18, 2009, 05:19:11 pm
Just a little suggestion here:

Can you change the link text on the GUI from "Bound" / "Unbound" to "Bind" / "Unbind" or "Bind me now" / "Unbind me now"?

I find myself having to explain to some people that the "Bound" link after each raid name doesn't mean they are bound to that instance, but that it's the button they use to bind themselves to the instance.

Thanks.
Title: Re: Instance Bound Tracker
Post by: Kyr on December 18, 2009, 09:55:31 pm
@Poonjab - That should be included in the latest version.

~Kyr
Title: Re: Instance Bound Tracker
Post by: Poonjab on December 19, 2009, 02:12:49 am
@Poonjab - That should be included in the latest version.

~Kyr

Thanks...  I guess I'm falling behind on things lately.
Title: Re: Instance Bound Tracker
Post by: dillinger on January 04, 2010, 03:45:20 pm
Hi community

I realy like the script of Getrix! So I includet the script couple of mins. ago, so far so good.

When I enter !bound it will show my instance bindings, but all of them are RED, when I klick on Unbind nothing happen, the instance is still RED.

The headline of the script window is: :::: Bound info week 0 for: MyPlayer ::::

Do I have to wait for the first instance reset to get the script working properly?

With my mainchar I'm a SUPER ADMIN of the Bot, the only changes I've made was !commands subs bound and set the permissions from LEADER to SUPER ADMIN

Can anyone help?

Thanx, dill
Title: Re: Instance Bound Tracker
Post by: Kyr on January 04, 2010, 03:51:04 pm
There is a bug in it that it wont work during the first week of the year.  I just noticed it too. It will work again next week, I am pretty sure anyway. 

Also, there is another problem in that all your bound info from last year is stored and users will show with the same bindings for the same weeks they were bound last year.  Prolly be a good idea to clear out the table of data for those of us that have been using it.

For me, I was going to hold out to clear the table until the expansion comes out, since there is likely to be a new instance to add to the list at that time.

~Kyr
Title: Re: Instance Bound Tracker
Post by: Getrix on January 04, 2010, 05:10:19 pm
Yeah, the problem is the new year. It takes the week-1=0 and that week nr doesnt exist.
Not that big problem. Same with weeks comming over again, 2009w40, 2010w40.
Title: Re: Instance Bound Tracker
Post by: altera on January 04, 2010, 05:20:08 pm
Also, there is another problem in that all your bound info from last year is stored and users will show with the same bindings for the same weeks they were bound last year.  Prolly be a good idea to clear out the table of data for those of us that have been using it.

How do we clear out the current data from the db; (sorry, not mysql savvy) ?
Title: Re: Instance Bound Tracker
Post by: Getrix on January 04, 2010, 05:47:13 pm
You will not get any problem with this the first weeks. I got week nr45 as first in my table, and thats 44weeks untill it f***s up. In that time i may have worked around this problem with a new release.
Title: Re: Instance Bound Tracker
Post by: dillinger on January 06, 2010, 05:56:18 pm
*wahahaha* now it's working!

The headline shows: :::: Bound info week 01 for: PlayerName ::::

Cheers, dill
Title: Re: Instance Bound Tracker
Post by: Getrix on February 04, 2010, 09:27:29 am
Quote
* b1.0.9 - 2010-02-04 Getrix - added update_table to add instances when they arrives. T3 is being added to tblv2

"Tier 3 - Thoth-Amon's Tower" will be added when upgrading module.
Title: Re: Instance Bound Tracker
Post by: Getrix on February 04, 2010, 11:13:22 am
Quote
* b1.0.10 - 2010-02-04 Getrix - fixed typos that caused it to crash

*remind myself of testing before releasing no mather how big the change was*
Title: Re: Instance Bound Tracker
Post by: GBH on February 04, 2010, 12:41:00 pm
What would be excellent is if there was a way to force it to show all your bounds from all your characters using the alts database.

I have a huge number of level 80's and I swop between many of them regularly. While I know you can check the bound info of a specific character one at a time, what would be much easier is to do !bound all and have it show (and be able to change) your bound status on ALL your linked characters.

It's probably only a smallish change as most of the code is there but would save me hacking it ;)

GBH


Title: Re: Instance Bound Tracker
Post by: Yite on February 04, 2010, 04:25:58 pm
I'd be happy if a !bound registeredalt would allow me to change the bind info for that alt.

Title: Re: Instance Bound Tracker
Post by: Drizzurdeen on February 11, 2010, 02:39:04 pm
have added the t3 boss-encounter in the bound module ... further i changed the list ... every boss would be now able to bound

here is the code

Code: [Select]
<?php
/*
* _Bound.phps - Instance bound tracker.
* <Copyright Getrix @ Fury AoC>
*/ 
$version "b1.0.7 - 2009-12-13";
// b1.0.7 - 2009-12-13 Getrix - Added "!bound raid" for LEADER(default) to bound whole raid within a instance.
// b1.0.6 - 2009-11-21 Kyr    - added setting for ServerResetTime
// b1.0.5 - 2009-11-21 Getrix - Fixed typos
// b1.0.4 - 2009-11-19 Getrix - Fixed bug in function bound()
// b1.0.3 Added !bound <nick>
// First release. Added "add interfaces"
/*
* BeBot - An Anarchy Online & Age of Conan Chat Automaton
* Copyright (C) 2004 Jonas Jax
* Copyright (C) 2005-2007 Thomas Juberg Stensås, ShadowRealm Creations and the BeBot development team.
*
*/

$Bound = new Bound($bot);
$Bound -> version $version;

class 
Bound extends BaseActiveModule
{
    var 
$version;
   
    function 
__construct (&$bot)
    {
        
/* Constructor: Hands over a referance to the "Bot" class. */
        //Initialize the base module
        
parent::__construct(&$botget_class($this));
    
        
$this -> bot -> db -> query("CREATE TABLE IF NOT EXISTS " $this -> bot -> db -> define_tablename("bound""true") . " (
           `bound_id` int(10) unsigned NOT NULL auto_increment,
           `bound_instance_id` int(4) NOT NULL,
           `bound_charname` varchar(25) default NULL,
           `bound_week` int(3) default NULL,
           PRIMARY KEY  (`bound_id`)
        )"
);

        
$this -> bot -> db -> query("CREATE TABLE IF NOT EXISTS " $this -> bot -> db -> define_tablename("bound_instance""true") . " (
           `instance_id` int(10) unsigned NOT NULL auto_increment,
           `instance_shortname` varchar(25) default NULL,
           `instance_fullname` varchar(40) default NULL,
           PRIMARY KEY  (`instance_id`)
        )"
);
        
$this -> instance_add();
    
     
$this -> register_command("all""bound""MEMBER", array('raid' => 'LEADER'));
    
        
$this -> help['description'] = "This module helps you keep track of what instances your characters are bound.";
        
$this -> help['command']['bound <nick>'] = "Give you a list of bindings for a character.";
        
$this -> help['command']['bound list [instance_id]'] = "Shows list of instances and optionally what characters are bound to them.";
    
$this -> help['command']['bound raid [instance_id]'] = "Will bound every bot member inside same game instance as you to the choicen boss instance.";
        
$this -> help['notes'] = "(C) Module By Getrix@Fury\n";
        
$this -> bot -> core("settings") -> create("Bound""ServerResetTime"5"How many hours after midnight (GMT) Monday night does your server reset the raid instances   ?""1;2;3;4;5;6;7;8;9;10;11;12");
    }


    function 
command_handler($name$msg$origin)
    {
        
/*
            Unified message handler
            $source: The originating player
            $msg: The actual message, including command prefix and all
            $type: The channel the message arrived from. This can be either "tell", "pgmsg" or "gc"
        */
        
$com $this->parse_com($msg);
        switch(
$com['com'])
        {
            case 
'bound':
                return(
$this -> sub_handler($name$com1));
            break;
            default:
                return 
"Error 1";
            break;
        }
    }
    
    function 
sub_handler($name$com$type)
    {
        switch(
$com['sub'])
        {
        case 
'raid':
        return(
$this -> bound_raid($name$com['args']));
        break;
            case 
'add':
                return(
$this -> bound_add($com['args'], $name));
            break;
            case 
'rem':
                return(
$this -> bound_rem($com['args'], $name));
            break;
            case 
'list':
                return(
$this -> bound_list($com['args'], $name));
            break;
            default:
                return(
$this -> bound($name$com['sub']));
            break;
        }
    }

    function 
bound_rem($args$name) {
        
preg_match("/([0-9]+)$/i"$args$info);
        
$instance_id $info[1];
        
$bound_week  $this -> get_weeknr();
        
$this -> bot -> db -> query("DELETE FROM #___bound WHERE bound_charname='$name' AND bound_instance_id='$instance_id' AND bound_week='$bound_week' LIMIT 1");
        return 
"Removed the bound. ".$this->bound($name);
    }
    
    function 
bound_add($args$name) {
        
preg_match("/([0-9]+)$/i"$args$info);
        
$instance_id $info[1];
        
$bound_week  $this -> get_weeknr();
    
        
$chk_bound $this -> bot -> db -> select("SELECT bound_charname FROM #___bound WHERE bound_charname='$name' AND bound_instance_id='$instance_id' AND bound_week='$bound_week' LIMIT 1");
        if(!
$chk_bound) {
          
$chk_instance $this -> bot -> db -> select("SELECT instance_id FROM #___bound_instance WHERE instance_id='$instance_id' LIMIT 1");
          if (
$chk_instance) {
            
$this -> bot -> db -> query("INSERT INTO #___bound (bound_charname, bound_instance_id, bound_week) VALUES ('$name', '$instance_id', '$bound_week')");
            
$output "You are now bound to this instance!";
          }
          else { 
$output "Bind failed, instance doesn't exist!"; }
        }
        else {
          
$output "You are already bound to this instance.";
        }
        
$output .= " ".$this->bound($name);
        return 
$output;
    }
    
    
    function 
bound_raid($name$args="")
    {
    if (!empty(
$args)) {
        
preg_match("/([0-9]+)$/i"$args$info);
        
$instance_id $info[1];

        
$bound_week  $this -> get_weeknr();
        
        
$bound_count "0";
        
$output "<center>##ao_infoheadline##:::: Bounding the raid to instance  ::::##end##</center>\n";
        
        
$chk_instance $this -> bot -> db -> select("SELECT instance_id FROM #___bound_instance WHERE instance_id='$instance_id' LIMIT 1");
        if (
$chk_instance) {
        
$me_sql "SELECT location FROM whois WHERE nickname='".$name."'";
        
$me_result $this -> bot -> db -> select($me_sql);
        if (!empty(
$me_result)) {
            
$instanceID $me_result[0][0];
            
$sql  "SELECT t1.nickname,level,class, ";
            
$sql .= "t2.notify,user_level ";
            
$sql .= "FROM whois AS t1 ";
            
$sql .= "LEFT JOIN #___users AS t2 ON t1.nickname = t2.nickname ";
            
$sql .= "WHERE location='".$instanceID."' AND notify='1' AND user_level='2' ";
            
$sql .= "ORDER BY nickname";
            
$result $this -> bot -> db -> select($sql);
            if(
$result) {
              foreach (
$result as $val) {
            
$bound_nick $val[0];
            
$chk_bound $this -> bot -> db -> select("SELECT bound_charname FROM #___bound WHERE bound_charname='$bound_nick' AND bound_instance_id='$instance_id' AND bound_week='$bound_week' LIMIT 1");
            if(!
$chk_bound) {
                
$this -> bot -> db -> query("INSERT INTO #___bound (bound_charname, bound_instance_id, bound_week) VALUES ('$bound_nick', '$instance_id', '$bound_week')");
                
$output .= $bound_nick $this->brfix();
            }
            else {
                
$output .= $bound_nick $this->brfix(); // Allready bounded
            
}
            
$bound_count $bound_count 1;
              }
              
$output .= $this->brfix(2)."In total: $bound_count in raid was bound.";
            } else { 
$output "Didnt find any at your location"; }
        } else { 
$output "Didnt find your location $instanceID ($instance_id)."; }
        
        } else { 
$output "Bind failed, instance doesn't exist!";  }
    
    } else {
        
$chk_inst $this -> bot -> db -> select("SELECT instance_id, instance_fullname FROM #___bound_instance");
        if (!empty(
$chk_inst)) {
        
$output "<center>##ao_infoheadline##::::  Bound raid to instance  ::::##end##</center>\n";    
        foreach (
$chk_inst as $ir) {
        
$instance_id   $ir[0];
        
$instance_name $ir[1];
        
$output .= "<a href='chatcmd:///tell ".$this -> bot -> botname." !bound raid $instance_id'>$instance_name</a>".$this->brfix();
        }
        
$output $this -> bot -> core("tools") -> make_blob("Instance list"$output);
        return 
$output;
        }
        else { return 
"Instances not found $args"; }
        }
    
        return 
$this -> bot -> core("tools") -> make_blob("Raid bound info"$output);
    }
    
    function 
bound($name$args="") {
        if (!empty(
$args)) {
          
$bound_name mysql_real_escape_string($args);
        } else {
          
$bound_name $name;
        }

        
$current_week $this->get_weeknr();
        
$output "<center>##ao_infoheadline##:::: Bound info week $current_week for: $bound_name ::::##end##</center>\n";

        
$select  "SELECT i.*, b.bound_week ";
        
$select .= "FROM #___bound_instance AS i ";
        
$select .= "LEFT JOIN #___bound AS b ON ";
        
$select .= "i.instance_id=b.bound_instance_id AND b.bound_charname='$bound_name' AND b.bound_week='$current_week'";
        
$chk_char $this -> bot -> db -> select($select);
        if (!empty(
$chk_char)) {
          foreach (
$chk_char as $ar) {
            
$instance_id         $ar[0];
            
$instance_shortname  $ar[1];
            
$instance_fullname   $ar[2];
            
$bound_week          $ar[3];
            
            if (
$current_week == $bound_week) {
              
$bound_color "red";
              if (
$bound_name == $name) { $bound_link  "- <a href='chatcmd:///tell ".$this -> bot -> botname." !bound rem $instance_id'>Unbound</a>"; }
            }
            else {
              
$bound_color "green";
              if (
$bound_name == $name) { $bound_link  "- <a href='chatcmd:///tell ".$this -> bot -> botname." !bound add $instance_id'>Bound</a>"; }
            }
            
$output .= "<font color=$bound_color>$instance_fullname $bound_link</font>".$this->brfix();  
          }
        }
        else {
          
$output .= "You are not bound to any instances!";
        }
        
$output $this -> bot -> core("tools") -> make_blob("Bound info for $bound_name"$output);
        return 
$output;
    }
    
    function 
bound_list($args$name) {
      
$bound_week $this->get_weeknr();
      
$output "<center>##ao_infoheadline##:::: Bound chars week $bound_week ::::##end##</center>\n";
      if (
is_numeric($args)) {
        
$select "SELECT instance_id,instance_fullname FROM #___bound_instance WHERE instance_id='$args' LIMIT 1";
      }
      else {
        
$select "SELECT instance_id,instance_fullname FROM #___bound_instance WHERE instance_shortname='$args' LIMIT 1";
      }
    
      
$chk_inst $this -> bot -> db -> select($select);
      if (!empty(
$chk_inst)) {
        foreach (
$chk_inst as $ir) {
          
$instance_id   $ir[0];
          
$instance_name $ir[1];
        
          
$output "<center>##ao_infoheadline##:::: $instance_name ::::##end##</center>\n";

          
$chk_char $this -> bot -> db -> select("SELECT bound_charname FROM #___bound WHERE bound_instance_id='$instance_id' AND bound_week='$bound_week' ORDER BY bound_charname"); 
          if (!empty(
$chk_char)) {
            foreach (
$chk_char as $ar) {
              
$output .= $ar[0].$this->brfix();
            }
          }
          else { 
$output .= "No chars bound."; }
        }
      }
      else {
        
$chk_inst $this -> bot -> db -> select("SELECT instance_id, instance_fullname FROM #___bound_instance");
        if (!empty(
$chk_inst)) {
          
$output "<center>##ao_infoheadline##::::  Instance list  ::::##end##</center>\n";    
          foreach (
$chk_inst as $ir) {
            
$instance_id   $ir[0];
            
$instance_name $ir[1];
            
$output .= "<a href='chatcmd:///tell ".$this -> bot -> botname." !bound list $instance_id'>$instance_name</a>".$this->brfix();
          }
          
$output $this -> bot -> core("tools") -> make_blob("Instance list"$output);
          return 
$output;
        }
        else { return 
"Instances not found $args"; }
      }
    
      
$output $this -> bot -> core("tools") -> make_blob("Bound list for instance: $instance_name"$output);
      return 
$output;
    }
    
    function 
get_weeknr($date="") {
        if (empty(
$date)) { $date gmmktime(); }
        else { 
$date strtotime($date); }
        
$day_number  date("N"$date);
        
$week_number date("W"$date);
        
$hour_number = (int)date("H"$date);
        
$reset_number = (int)$this -> bot -> core("settings") -> get("Bound""ServerResetTime");
        if (
$day_number == "1" || ($day_number == "2" && $hour_number $reset_number)) { $week_number $week_number 1; }        
        return 
$week_number;
    }
    
    function 
brfix($count=1) {
        if (
$count == 2) { $br "<b></b><br><b></b><br>";}
        elseif (
$count == 3) { $br "<b></b><br><b></b><br><b></b><br>"; }
        else { 
$br "<b></b><br>"; }
        return 
$br;
    }
    
    function 
instance_add() {
      
$chk_inst $this -> bot -> db -> select("SELECT instance_id FROM #___bound_instance LIMIT 1");
      if(!
$chk_inst) {    
        
$this -> bot -> db -> query("INSERT INTO `#___bound_instance` (`instance_id`, `instance_shortname`, `instance_fullname`) VALUES
            (1, 'T1kom', 'Tier 1 - T1 komplett'),
            (2, 'T1Kymde', 'Tier 1 - Kyllikki - Meister d. Ehrengarde'),
            (3, 'T1Ky', 'Tier 1 - Kyllikki'),
            (4, 'T1Yak', 'Tier 1 - Yakhmar'),
            (5, 'T1Vis', 'Tier 1 - Vistrix'),
            (6, 'T2kom', 'Tier 2 - komplett'),
            (7, 'T2rEx', 'Tier 2 (Rechts) - Excorant'),
            (8, 'T2rYa', 'Tier 2 (Rechts) - Yaremka'),
            (9, 'T2rSa', 'Tier 2 (Rechts) - Sabazios'),
            (10, 'T2lAZ', 'Tier 2 (Links) - Ahazu Zagam'),
            (11, 'T2lIn', 'Tier 2 (Links) - Incubus&Succubus'),
            (12, 'T2lSe', 'Tier 2 (Links) - Seruah'),
            (13, 'T2lCh', 'Tier 2 (Links) - Chatta'),
            (14, 'T2mAB', 'Tier 2 (Mitte) - Athyr Bast'),
            (15, 'T2mLe', 'Tier 2 (Mitte) - Leviathus'),
            (16, 'T3kom', 'Tier 3 - Toth Amons Festung : komplett'),
            (17, 'T3KDI', 'Tier 3 - Kharon, Daimore und Ixion'),
            (18, 'T3HKa', 'Tier 3 - Hathor-Ka'),
            (19, 'T3Arb', 'Tier 3 - Arbanus'),
            (20, 'T3FoL', 'Tier 3 - Favored of Louhi'),
            (21, 'T3KoA', 'Tier 3 - Keeper of Artefacts'),
            (22, 'T3TAm', 'Tier 3 - Toth-Amon')"
);
        
$this->bot->log("Bound""DB""Added T1+T2 instances");
      }
    }
}
?>
   
Title: Re: Instance Bound Tracker
Post by: keirou on February 11, 2010, 07:54:40 pm
drizz the issue i see with yours

player A goes for a wing 1 raid, drops after excorant, but the group in there kills yaremka and sabazio.. player A is still raid locked to that instance unless they completly dropped raid, then rezoned to get bound to a different ID.
Title: Re: Instance Bound Tracker
Post by: Drizzurdeen on February 11, 2010, 08:11:15 pm
.... just make the db's empty an everything ist fine ;) ... done it by our bot ... this workaround works fine ... mybee make the db's empty on monday evening ... should be ok so i think
Title: Re: Instance Bound Tracker
Post by: Zar on February 22, 2010, 06:43:41 pm
drizz the issue i see with yours

player A goes for a wing 1 raid, drops after excorant, but the group in there kills yaremka and sabazio.. player A is still raid locked to that instance unless they completly dropped raid, then rezoned to get bound to a different ID.

Once the first boss in an instance is killed your char is bound to that instance just the Raid instance name is needed.

I have been having an Issue with !bound raid . From reading I assume a box should pop up and  the raid leader can choose what raid instance to bind everyone to and everyone in that Raid instance at that time should be bound. We've tried a few times and nothing happens when we do !bound raid

Does the Raid leader need specific rights to the BeBot to be able to do this?

Thanks
Z
Title: Re: Instance Bound Tracker
Post by: Drizzurdeen on February 22, 2010, 06:56:15 pm
yes he needs minimum leader access to the bot
Title: Re: Instance Bound Tracker
Post by: Kyr on March 03, 2010, 01:30:47 am
Just one small change here.  Not with Drizzurdeen version since he started with .7 and most recent changes were in .10.  I might look at merging Drizzurdeen's changes into the .11 version some other time.
 
 - changed ! to <pre> so bots that don't use ! for the syntax character will work
Title: Re: Instance Bound Tracker
Post by: Getrix on March 03, 2010, 09:18:05 am
I realy dont see the point of Drizzurdeen's changes with adding all the bossnames.
Whenever you enter W1 and kill the first boss you are bound to that instance. Boss 2-3 etc doesnt have anything todo with bound. Better make a separated BossKillCount module.

Keep it simpel, T1-Vistrix, T1-Yak, T1-Kyl(Bounded after HG down), T2-W1, T2-W2, T2-W3, T3
Title: Re: Instance Bound Tracker
Post by: Kyr on March 03, 2010, 09:23:15 am
Yes, after reviewing his changes I agree with you.

That said if Drezz or others want to have a custom list of instances or bosses, they can.  If public changes are made to the module it would affect the ease of installing them.
Title: Re: Instance Bound Tracker
Post by: Getrix on March 03, 2010, 09:31:08 am
Thanks for your fix Kyr, updated the file on my link.

http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps
Title: Re: Instance Bound Tracker
Post by: Kyr on March 06, 2010, 01:51:40 am
this was misposted  -- moved to http://bebot.link/aoc-0-6-x-customunofficial-modules/items-crafted-by-guild/
Title: Re: Instance Bound Tracker
Post by: Drizzurdeen on March 06, 2010, 10:57:10 am
hmmmmm we use the id-tracker with a raid-allianz and with a lot of twinks ... sometimes u have an id with just one boss ... than u can see this on ur twink ... and u are able to go to raids with a twink hwo have no id ... and go further with ur main ... who have the id ...

hope my idea is clear ... my english ist horrible without coffee ;)

greez da drizz
Title: Re: Instance Bound Tracker
Post by: Huesos on March 08, 2010, 10:56:30 am
[08-Mar-2010 01:52:36] PHP Parse error:  syntax error, unexpected T_STRING in D:\Storage\Age of conan tools\bot\bebot-hyborian.6.3\modules\Bound.php on line 2
[08-Mar-2010 01:52:41] PHP Warning:  Unexpected character in input:  '\' (ASCII=92) state=1 in D:\Storage\Age of conan tools\bot\bebot-hyborian.6.3\modules\Bound.php on line 2
[08-Mar-2010 01:52:41] PHP Parse error:  syntax error, unexpected T_STRING in D:\Storage\Age of conan tools\bot\bebot-hyborian.6.3\modules\Bound.php on line 2
[08-Mar-2010 01:52:46] PHP Warning:  Unexpected character in input:  '\' (ASCII=92) state=1 in D:\Storage\Age of conan tools\bot\bebot-hyborian.6.3\modules\Bound.php on line 2
[08-Mar-2010 01:52:46] PHP Parse error:  syntax error, unexpected T_STRING in D:\Storage\Age of conan tools\bot\bebot-hyborian.6.3\modules\Bound.php on line 2


I am getting this error
and doenst start up
Title: Re: Instance Bound Tracker
Post by: Yite on March 08, 2010, 12:34:44 pm
[08-Mar-2010 01:52:36] PHP Parse error:  syntax error, unexpected T_STRING in D:\Storage\Age of conan tools\bot\bebot-hyborian.6.3\modules\Bound.php on line 2
.
.
[08-Mar-2010 01:52:46] PHP Parse error:  syntax error, unexpected T_STRING in D:\Storage\Age of conan tools\bot\bebot-hyborian.6.3\modules\Bound.php on line 2


I am getting this error
and doenst start up

Did you do a copy paste of the code or did you do a right click and save as? It looks like your local file might be missing some bits.
Title: Re: Instance Bound Tracker
Post by: Huesos on March 11, 2010, 02:26:41 am
ok well I did that now saved as bound.php and the bound doesnt' even work , !boudn doenst exist at all
Title: Re: Instance Bound Tracker
Post by: Getrix on March 11, 2010, 07:03:52 am
You are not getting the file as you should...
Ctrl+A (Selecting everything)
Ctrl+C (Copy)
Ctrl+V (Pasting it into a local file)
Title: Re: Instance Bound Tracker
Post by: Kentarii on March 16, 2010, 12:48:50 am
Thanks for this module Getrix and Kyr :)
Title: Re: Instance Bound Tracker
Post by: squattinbull on June 01, 2010, 08:19:34 am
I have this module and it isn't working.  Actually I was going to make a separate post about this but thought I might just add it in this since it also involves this module.

All of the custom modules I have added are not working in the bot.  When I type !modules they all show up listed being in there and enabled.  But when you type a command (e.g.  !homer !bound !beer).  You get a response stating that there is no such module/command.  I have looked on the forums and I don't see this issue being posted.  Is this a known issue?  If you guys need any more from me I can add if need be.

Thanks in advance too.  :)
Title: Re: Instance Bound Tracker
Post by: Yite on June 01, 2010, 10:13:36 am
Where did you put the module?

It should be in custom/modules and have a name that does not start with a _

so for example:

bebot/custom/modules/Bound.php

Title: Re: Instance Bound Tracker
Post by: squattinbull on June 02, 2010, 05:46:17 am
Sorry bout the delay.  Was at work a while today.  Yes they are under the custom directory and none of the modules begin with a _

Title: Re: Instance Bound Tracker
Post by: Yite on June 02, 2010, 09:38:21 am
Hmmm are you running on windows or on linux? Could be a permissions issue perhaps.
Title: Re: Instance Bound Tracker
Post by: squattinbull on June 03, 2010, 06:08:03 am
Windows 7 YiTe.  Need me to start sending PM's then post final solution in here when resolved?
Title: Re: Instance Bound Tracker
Post by: jonnyrocker on August 25, 2010, 11:53:53 am
Hey there was gonna try this one out but i get an error msg that i have not seen before.

Code: [Select]
Fatal error: Cannot redeclare class Bound in C:\bebot\custom\modules\Bound.php o
n line 332

And yes i have made ctrl-a then ctrl-v and saved it as Bound.php

JR
Title: Re: Instance Bound Tracker
Post by: Getrix on August 25, 2010, 12:53:30 pm
You have the file loaded twice. Probly two files with different file names.
Or copied the text twice into same file..
Title: Re: Instance Bound Tracker
Post by: jonnyrocker on August 25, 2010, 01:29:07 pm
Thx Getrix puttin me in the right direction there found which file it was and changed it to much copy paste today.
Also ty for the item db thingy works like a charm. :)

Anyone know why when you take code from the forum and paste it inside notepad ++ which i use for editing everything comes on one line but when you pase regular text you dont get that just curious :).

JR
Title: Re: Instance Bound Tracker
Post by: Khalem on August 25, 2010, 02:43:45 pm
Anyone know why when you take code from the forum and paste it inside notepad ++ which i use for editing everything comes on one line but when you pase regular text you dont get that just curious :).

Sounds like a browser issue.

Using Firefox 4 and Notepad++ and not having any copy/paste issues here.
Title: Re: Instance Bound Tracker
Post by: Getrix on August 25, 2010, 05:19:22 pm
Its because your program use one standard (ANSI, UTF) and the text you copied in another one.
Linux uses UTF and windows ANSI mainly afaik.
What i have noticed is that Wordpad and Notepad dont use the same, atleast does it show correct in one but not the other when it happens.
If you code alot, Notepad++ or Komodo Edit is suggested codeparses.
Title: Re: Instance Bound Tracker
Post by: Yite on January 03, 2011, 11:55:18 am
Noticed today that due to the new week starting !bound returns a week number of 0 and all binds of the past week are gone, also as the db will already have binds for the past year you might run into an issue there.

I made the following change to allow for this.

I changed line 301 where it returns the week from:
Code: [Select]
return $week_number;
to:
Code: [Select]
return $week_number + 52;
Which is not an ideal fix but will allow my guildies to be able to use the module properly.
Title: Re: Instance Bound Tracker
Post by: Getrix on January 03, 2011, 04:21:18 pm
Yeah, this problem is comming each first week of a year.
I was sure i fixed it but probly didnt use time on it as it was pritty minor bug..
Title: Re: Instance Bound Tracker
Post by: Kentarii on January 11, 2011, 02:08:01 pm
Quote
also as the db will already have binds for the past year you might run into an issue there.
Perhaps add some kind of cleanup command to remove past entries since you only work with bound_week and not bound_year as well.

Otherwise, I guess a simple sql command can fix this:
Code: [Select]
TRUNCATE <botname>_bound
Title: Re: Instance Bound Tracker
Post by: Getrix on January 11, 2011, 02:23:09 pm
Was pritty sure i fixed this, but looking on all version i have there isnt anyone resolving the problem.
I have not had use for !bound in half a year, so if anyone is interested in making the fix needed please do so and i can add it and give credit. Got so many things on my todo list so dunno when i get chance to look on this.
Title: [REWRITTEN] Instance Bound Tracker b2.x.x
Post by: Getrix on May 02, 2011, 11:08:50 am
Script found here: http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps

New lockouts stuff have been added to AoC latly and there have been couple request for keeping track of all timers..
I have rewritten the bound script to handle instance lockout based on hours and not only Raid reset every tuesday night.

To get this new version work, altering of mysql table is needed. Best is to just remove them and let script create them again.
Old data isnt much usable as the rewritten is completed different.

If there is missing any instances that would be nice to keep track of, please tell me.

Places allready added: Shortname, Fullname, Type, lockout in minutes
Code: [Select]
                ('Vistrix', 'Tier 1 - The Dragon''s Lair', 'Raid', 0),
('Yakhmar', 'Tier 1 - Yakhmar''s Cave', 'Raid', 0),
('Kyllikki', 'Tier 1 - Kyllikki''s Crypt', 'Raid', 0),
('BRC-W1', 'Tier 2 - Black Ring Citadel: Wing 1', 'Raid', 0),
('BRC-W2', 'Tier 2 - Black Ring Citadel: Wing 2', 'Raid', 0),
('BRC-W3', 'Tier 2 - Black Ring Citadel: Wing 3', 'Raid', 0),
('T3', 'Tier 3 - Thoth-Amon''s Tower', 'Raid', 0),
('T4', 'Tier 4 - The Jade Citadel', 'Raid', 0),
('BR', 'The Battle for Blood Ravine', 'PvP', 360),
('HV', 'The Battle for Hallowed Vaults', 'PvP', 360),
('LT', 'The Battle for Lost Temple', 'PvP', 360),
('TT', 'Totem Destruction', 'PvP', 360),
('CoJS', 'Blessings of an Ancient God', 'PvP', 360),
('CoJS', 'Blessings of Jhebbal Sag', 'PvP', 360),
('CoJS', 'Diving Calling', 'PvP', 360),
('RoKW', 'Refuge Of Apostate', 'Solo', 1200)");

Quote
/*
* Changelog History
* b2.0.1  - 2010-05-02 Getrix - Getting it ready for public test. Old tables need to be deleted.
* b2.0.0  - 2010-05-01 Getrix - Rewritten script to handle more lockout types: Raid, Group (6mans), Solo, Minigame
* b1.0.10 - 2010-02-04 Getrix - fixed typos that caused it to crash
* b1.0.9  - 2010-02-04 Getrix - added update_table to add instances when they arrives. T3 is being added to tblv2
* b1.0.8  - 2009-12-14 Kyr    - added admin ability to add/remove binds for others
* b1.0.7  - 2009-12-13 Getrix - Added "!bound raid" for LEADER(default) to bound whole raid within a instance.
* b1.0.6  - 2009-11-21 Kyr    - added setting for ServerResetTime
* b1.0.5  - 2009-11-21 Getrix - Fixed typos
* b1.0.4  - 2009-11-19 Getrix - Fixed bug in function bound()
* b1.0.3 Added !bound <nick>
* First release. Added "add interfaces"
*/
Title: Re: Instance Bound Tracker b2.x.x
Post by: Runemy on May 02, 2011, 07:04:20 pm
Skip remark. Working well! :)

Thanks for this update mate
Title: Re: Instance Bound Tracker b2.x.x
Post by: Sheeth on May 04, 2011, 12:32:44 am
A very nice and welcome update to the bound module.

However I experienced a crash with it today. A user typed "!bound add ro" in guild chat and the bot crashed.

Fatal error: Cannot use string offset as an array in \bebot\custom\modules\bound.php on line 358

Line 358 = "$inst['type'] = $sql[0][0];"


To be thorough, I had both a superadmin and a normal user type both "ro" and "asdf". both resulted in the same crash.

Is anybody else experiencing this?
Title: Re: Instance Bound Tracker b2.0.2
Post by: Getrix on May 04, 2011, 07:00:26 am
Thanks for reporting.
I found the problem, small nasty one :P

OLD Line 347: 
Code: [Select]
if(!$chk_bound) {NEW Line 347:
Code: [Select]
if($sql) {
Changes uploaded to: http://dump.sjef.biz/aoc/bebot/Bound/Bound.phps
Title: Re: Instance Bound Tracker b2.x.x
Post by: Vainamoinen on June 02, 2011, 11:30:56 pm
I'm propably being an idiot, but I updated an old version of !bound module to ze newest one, nuked the database clear any bound-stuff and put the new one in /custom/modules and restarted the bot.

Module works well, it shows me new inis and minigames, but when I click "bind" button it says: Bind failed, instance doesn't exist!

when i log to phpmyadmin, i see the two tables <dbname>_bound and <dbname>_bound_instance , and in instance i see the bound table has been created, there is all the raids and minigames and prostate instance and their cooldown timers.

i'm a little bit puzzled. can you give some advice for a noob please :)
Title: Re: Instance Bound Tracker b2.x.x
Post by: Zorrna on June 06, 2011, 07:28:51 am
HI

if i make a !bound list in the old version i got a list with an bind/unbind link at the end of the line.

now i got only the list without link´s.

In the sourcecode i find the code for this link but ....

what do i wrong?

LG Zorrna

(sorry for my bad english)

Title: Re: Instance Bound Tracker b2.x.x
Post by: Getrix on June 06, 2011, 01:47:44 pm
To get b2.x.x to work you first need to remove the old tables if you have old b1.x.x in your database..
Title: Re: Instance Bound Tracker b2.x.x
Post by: Zorrna on June 07, 2011, 11:42:10 pm
so that works now thanks but nobody cant bound to raid´s (pvp and solo is ok)

the bound infos are in the database but it didn´t show me on !bound  (still green)

LG Zorrna
Title: Re: Instance Bound Tracker b2.x.x
Post by: Vainamoinen on June 09, 2011, 12:31:04 pm
I'm propably being an idiot, but I updated an old version of !bound module to ze newest one, nuked the database clear any bound-stuff and put the new one in /custom/modules and restarted the bot.

Module works well, it shows me new inis and minigames, but when I click "bind" button it says: Bind failed, instance doesn't exist!

when i log to phpmyadmin, i see the two tables <dbname>_bound and <dbname>_bound_instance , and in instance i see the bound table has been created, there is all the raids and minigames and prostate instance and their cooldown timers.

i'm a little bit puzzled. can you give some advice for a noob please :)

Okies, little bit more information; i can bound people to instances with admin command, but people cannot bind themselves from the links that they get from the list !bound, it gives them the error above. What am I missing?
Title: Re: Instance Bound Tracker b2.x.x
Post by: Getrix on June 09, 2011, 03:50:40 pm
Check the commands security..
If you can bound, but not members it could be that you have set it to higher level then Member
Title: Re: Instance Bound Tracker b2.x.x
Post by: Vainamoinen on June 12, 2011, 05:57:08 pm
I am not sure what do you mean with security settings, as in group & user rights? I meant that even i, owner, cannot use !bound add 14 (example), it gives that error message ("Bind failed, instance doesn't exist!").
But when i do "!bound addminadd ..." it works like a charm. then it binds the toon i wanted to bind with adminadd, and i can see him bound with bound list.

I've now given it a couple of tries, wiping the database and/or removing bound tables from DB and booting the bot, but it is not working and the problem persists.
I reverted back to old bound module, and it works like a charm. But I'd absolutely love to have this new version working :|
Title: Re: Instance Bound Tracker b2.x.x
Post by: Drizzurdeen on June 12, 2011, 06:07:41 pm
ok try this .... delete the bound db ... restart the bot ... so the db will be created new ;) ... type !commands klick the link in the chat ... select all ... look where bound is ... gife the access to M = member of the bot ... restart the bot ...

should be work than

greetz drizz
Title: Re: Instance Bound Tracker b2.x.x
Post by: Vainamoinen on June 12, 2011, 08:11:44 pm
Thanks for that Drizzurdeen.

I looked into !commands -> all -> page 2 for bound and it was set to M (member). I set it to Anonymous, and then back to M. After that I did !bind and got the bind list for instances, clicked a link and got the old too familiar "instance does not exist" notification. But then it gets weird.. i typed in manually /tell Bot !bound add <instance number> and it worked! Then when i summon the list, i see my self bound like i should ;)

Just a little something from my /tell channel:


[20:52] To [Qbot]: !bound add
16
[20:52] [Qbot]: Bind failed, instance doesn't exist!
[20:52] To [Qbot]: !bound add 16
[20:52] [Qbot]: Varma is now bound to
Refuge Of Apostate! Bound info
for Varma

so the first "!bound add 16" = im clicking from the list = error
2nd "!bound add 16" i typed manually to bot = im bound to the instance, and see myself bound on the list when doing "!bound"

seems there is maybe something wrong with the list and links there?
Title: Re: Instance Bound Tracker b2.x.x
Post by: Getrix on June 13, 2011, 10:35:39 am
There is non other having same problem. So its nothing wrong with script itself, but must be something wrong on your "installation"

Have you deleted the two tables this script use in your database and then restart your bot to make sure they are created correctly?
Title: Re: Instance Bound Tracker b2.x.x
Post by: Kentarii on June 14, 2011, 11:16:20 am
[20:52] To [Qbot]: !bound add
16
[20:52] [Qbot]: Bind failed, instance doesn't exist!
[20:52] To [Qbot]: !bound add 16
[20:52] [Qbot]: Varma is now bound to
Refuge Of Apostate! Bound info
for Varma
Look at the bot console when you click on the links. Does the tell come as:
Code: [Select]
!bound add 16or
Code: [Select]
!bound addand
Code: [Select]
16on another line?

Have you introduced some linebreaks somewhere you shouldn't when you downloaded/edited the script?
Try grabbing the attached file and replace it with the one you have.
Title: Re: Instance Bound Tracker b2.0.1
Post by: Getrix on August 16, 2011, 01:24:58 pm
Quote
b2.0.2  - 2010-08-16 Getrix - Fixed bounding raids bug when bot runs on Windows machine.

Fixed (i hope:P) the problem in this topic: http://bebot.link/aoc-0-6-support/!bound-module-not-working-correctly-after-tonight%27s-raid-reset/msg17618/?topicseen#new
Title: Re: Instance Bound Tracker b2.x.x
Post by: Kyr on November 08, 2011, 05:16:09 am
Does anyone have a version that has Isle of Iron Statues in it?
Title: Re: Instance Bound Tracker b2.x.x
Post by: BoA-Gert on November 09, 2011, 03:51:14 am
Can't you just add it into the db table?  That's what I've done for the new instances...

This is my current bound_instance table:

Code: [Select]
INSERT INTO `boabot_bound_instance` (`instance_id`, `instance_shortname`, `instance_fullname`, `instance_type`, `instance_cd`) VALUES
(1, 'Vistrix', 'Tier 1 - The Dragons Lair', 'Raid', 0),
(2, 'Yakhmar', 'Tier 1 - Yakhmars Cave', 'Raid', 0),
(3, 'Kyllikki', 'Tier 1 - Kyllikkis Crypt', 'Raid', 0),
(4, 'BRC-W1', 'Tier 2 - Black Ring Citadel: Wing 1', 'Raid', 0),
(5, 'BRC-W2', 'Tier 2 - Black Ring Citadel: Wing 2', 'Raid', 0),
(6, 'BRC-W3', 'Tier 2 - Black Ring Citadel: Wing 3', 'Raid', 0),
(7, 'T3', 'Tier 3 - Thoth-Amons Stronghold', 'Raid', 0),
(8, 'T3.5', 'Tier 3.5 - Temple of Elrik', 'Raid', 0),
(9, 'T4', 'Tier 4 - The Jade Citadel', 'Raid', 0),
(10, 'BR', 'The Battle for Blood Ravine', 'PvP', 360),
(11, 'HV', 'The Battle for Hallowed Vaults', 'PvP', 360),
(12, 'LT', 'The Battle for Lost Temple', 'PvP', 360),
(13, 'TT', 'Totem Destruction', 'PvP', 360),
(14, 'CoJS', 'Blessings of an Ancient God', 'PvP', 360),
(15, 'CoJS', 'Blessings of Jhebbal Sag', 'PvP', 360),
(16, 'CoJS', 'Divine Calling', 'PvP', 360),
(17, 'RoA', 'Refuge Of Apostate', 'Solo', 1200),
(18, 'TFC', 'The Forgotten City', 'Solo', 1200),
(19, 'Breach', 'The Breach', 'Solo', 1200),
(20, 'DMH', 'Dead Mans Hands', 'Solo', 1200),
(21, 'IIS', 'Isle of Iron Statues', 'Solo', 1200);
Title: Re: Instance Bound Tracker b2.x.x
Post by: dragonjr on December 24, 2011, 08:11:29 pm
so to get rid of the old bound php file i just delete it restart bot and then add the new one and restart the bot ?
im  just trying to understand how to do this correctly so i dont screw things up.

i have no idea on how to do this part

"To get this new version work, altering of mysql table is needed. Best is to just remove them and let script create them again.
Old data isnt much usable as the rewritten is completed different."

thanks for any help that you can give me
Title: Re: Instance Bound Tracker b2.x.x
Post by: Getrix on December 24, 2011, 08:18:20 pm
You need to remove the table in MySQL..
Table is then created on botstartup again.

* Stop bot
* Remove botname_bound + botname_bound_instances
* Replace old bound.php with new
* Start bot

Title: Re: Instance Bound Tracker b2.x.x
Post by: dragonjr on December 24, 2011, 08:23:00 pm
i figures it out thanks for all the help
Title: Re: Instance Bound Tracker b2.x.x
Post by: Kepha on May 02, 2013, 02:25:51 pm
Anyone can link their Bound file? Links here are all dead to me.
Title: Re: Instance Bound Tracker b2.x.x
Post by: Ruskebusk on March 01, 2019, 05:11:10 pm
Its not much needed anymore since there is a lockout window in age of conan. Still I have updated this module to work with all raids up to Tier 6 and I also added the Raid Finder main quest cooldown.

If your bot already runs this module you need to reset the "bound_instance" and "bound" tables.

Link: https://www.dropbox.com/s/on5ggjmn2uat54m/bound.php?dl=0
SimplePortal 2.3.7 © 2008-2024, SimplePortal