Back Reply to topic
Goto page 1, 2, 3  Next
kelmino 
(started thread)
Blue-Ribbon Chicken 
Topics: 1
Posts: 2
 
 
Years registered: * * * * * * * * * * * * * * * * *
Requests Posted: Post 03:56 Mon - Jun 23, 2008

I have tried a few of the bots out there so far. this one looks the most promising thus far as it is php based, and seems to be more user customizable in the end.

User permissions
One of the other bots that are out allow user permissions to be set up, so I would be able to set up who can do what with the bot. I would like to see that as well, perhaps a cfg or even .php file that I can edit to add permissions in there.

Linking of scripts
the guild advertising scripts like [you see here
http://forums-eu.ageofconan.com/showthread.php?t=28629
something I have yet to see in a bot, but something that I really would like to be able to see. Our guild uses these scripts to show what crafting resources are needed, who is in our kos/allied list, and of course what they are usually used for... Guild advertising. Even allow it to be customized where it can triggered by various keywords that the user can decide. Ideally I would like it to link the script in guild chat is anyone types !diplo or !crafting. Another nice feature would be this scenario. Say bob is looking for a guild. anyone who happens to see that in the guild could type /tell bot recruit bob. That would allow the bot to send a tell to bob with the guild application script. It should have some sort of permissions and flood control where it can't do it more then a few seconds apart in case someone gets pissed at the guild and tries to get the account banned by getting it to spam people all day

here are some examples of what this addon could possibly do

/tell bot scriptname - would run the script with that name.
some examples of what could be done with this plugin.
diplomacy - would run the script called diplomacy.txt. where it would show the enemy/neutral/friendly guilds
craft - could list who is currently which crafting profession at what tier
guildneeds - could list what is currently needed for certain guild goals
events - could list what events are coming up in the future
recruit "playername"- it would send a tell explaining how to join the guild.

Unfortunately I know nothing about php code, I could modify it if need be, but I wouldn't know where to start really to try and write these codes.

/stick, Chaly
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Re: Something I would like this to do. Posted: Post 07:36 Mon - Jun 23, 2008

kelmino wrote:
I have tried a few of the bots out there so far. this one looks the most promising thus far as it is php based, and seems to be more user customizable in the end.

thanks eek

User permissions
The bot has 3 permission "levels" at the moment:
Level1: in the config.php is an adminlist, 2 'default' functions are reserved for 'admins'. it isn't that nice that ingame-editing (!addadmin / !removeadmin) isn't possible yet. i didn't have to change them more than once (only my => all officers) with our guildbot yet. You're right: if our officers create alt characters and play them regularly i've to edit our adminlist.
Level 2: you can do this to check if the sender is on the guildlist. Again: all 3rd generation anarchy-online bots had a textfile oder mysql database containing permission levels and users.
Code:
global $guildmates; if ($guildmates[$sender]) { /*for guildmates only*/ }

Level 3: anyone else
the permission levels are configurable, but hard coded for each plugin. dynamic permissions are a good idea, but i won't add this as a next feature. maybe this is a good one for a raid-plugin release

Linking of scripts
Let me split it into two ideas:
1) a plugin called !info, !about, !news called by a parameter would open a pseudo (aoc understands 3-5 html tags) html-file in the info-plugin directory and parse it using a clickable popup window. adding "scripts" should be easy with 2 examples and a small readme file. calling !info without an argument pops a list with all "scripts". maybe the bot could send this list on a login of a guildmate..
2) !advertise / !recruit
same as above, but only with one "script" file. the second parameter would be a target instead. nice idea, but a few lines to code for some name-lookup and flood-control (two people of your guild writes "!recruit bob" at the same time)

besides diplomacy and kos i think !events could be extended: !addevent , !delevent / !remevent and a counter to announce events in 7,3,2,1 days and 12,6,2,1,0.5,0.25 hours (timing should be easy to find and edit)

kelmino wrote:

Unfortunately I know nothing about php code, I could modify it if need be, but I wouldn't know where to start really to try and write these codes.

i released the bot on the last weekend, maybe ragebot will get one or two helpers that want to release their plugins here
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Guest 
 
Topics: 404
 
 
 
Posted: Post 12:30 Tue - Jun 24, 2008

Hmm,

so what happend, with !recrut BOB?

did he get the advertising scroll?
Reply with quote


Guest 
 
Topics: 404
 
 
 
Posted: Post 04:14 Tue - Jun 24, 2008

Change the Time:

Hi there, i want to change the time, because the server on witch the scripts run shows the GMT+1 ( BST ) but i need the GMT +2 ( Euro West )

This is the Bot code:

Code:


<?php
if ($pluginwords[1]=="!time") {
   global $myguild;
   $msg=":: ".date("d.m.Y H:i:s")." ::";
   #$msg=":: ".date("m/d/Y H:i:s")." ::"; #us format
   send_public_channel_message($myguild,colortext($msg));
}
?>



And i found something like this:

but i dont get it work

Code:
PHP code like so:

<?
echo "Original Time: ". date("h:i:s")."\n";
putenv("TZ=US/Eastern");
echo "New Time: ". date("h:i:s")."\n";
?>

If you put the line putenv("TZ=US/Eastern"); in a file that is
include()'ed by all your other PHP scripts, then all your PHP scripts will use that timezone.

A list of timezones to choose from, other than "US/Eastern" for your putenv() is here:

http://www.theprojects.org/dev/zone.txt

Be sure to use the "underscore" (_) character in the syntax when needed,
such as putenv("TZ=America/Los_Angeles")
Reply with quote


Guest 
 
Topics: 404
 
 
 
Posted: Post 04:08 Tue - Jun 24, 2008

nobody a idee? Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 04:56 Tue - Jun 24, 2008

i'm at work .. never played with multiple timezones, here's a function i would try:
Code:
date_default_timezone_get()
date_default_timezone_set()
functions are documented here: http://de2.php.net/manual/de/function.date-default-timezone-set.php
and here is a list of timezones: http://de2.php.net/manual/de/timezones.america.php
this may work...:
Code:
$oldtimezone=date_default_timezone_get();
date_default_timezone_set("America/New_York");
/*..code..*/
date_default_timezone_get($oldtimezone);

maybe in the config.php (to have the timezone set all the time):
Code:
date_default_timezone_set("America/New_York");

or in the php.ini zwinkern
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Guest 
 
Topics: 404
 
 
 
Posted: Post 06:04 Tue - Jun 24, 2008

<?php
if ($pluginwords[1]=="!time") {
global $myguild;
$oldtimezone=date_default_timezone_get();
date_default_timezone_set("Europe/Berlin");
$msg=":: ".date("d.m.Y H:i:s")." ::";
date_default_timezone_get($oldtimezone);
send_public_channel_message($myguild,colortext($msg));
}
?>


like this?
i need the time for Germany, not for NY strichauge
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 06:42 Tue - Jun 24, 2008

looks good. i've had no use for changing timezones inside a php-script now.
our bot uses the local time of this webserver (GMT+1).
if i would host a bot for a friend somewhere, i would add a timezone-command to my config.php because all of my functions should use the same timezones
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Guest 
 
Topics: 404
 
 
 
Posted: Post 09:13 Tue - Jun 24, 2008

Code:
<?php
if ($pluginwords[1]=="!time") {
global $myguild;
$oldtimezone=date_default_timezone_get();
date_default_timezone_set("Europe/Berlin");
$msg=":: ".date("d.m.Y H:i:s")." ::";
date_default_timezone_get($oldtimezone);
send_public_channel_message($myguild,colortext($msg));
}
?>


This is the correct code to change the time only for this ( time saying script )
Reply with quote


Guest 
 
Topics: 404
 
 
 
Posted: Post 09:23 Tue - Jun 24, 2008

A guild member have another idee,
every 1 hour should the bot say the time.

nice idee but atm i am not sure how to come on with it
Reply with quote


Chaly 
Offizier · Webmaster 
Topics: 404
Posts: 2107
Location: Bad Honnef
Playing:  Guildwars2 (Drakkar See)
Ingame:  Chaly Flavour
Years registered: * * * * * * * * * * * * * * * * * * * * * *
Posted: Post 06:38 Wed - Jun 25, 2008

5000ms/saytime/index.php
Code:
<?php
global $TimeTimer;
if (!$TimeTimer) {
   $TimeTimer=time();
} elseif (time()-$TimeTimer>=60*60) {
   $TimeTimer=time();
   $msg=":: ".date("d.m.Y H:i:s")." ::";
   send_guild_channel_message(colortext($msg));
}

untested lachen
this one remembers the time in a global variable. 60*60 seconds later (1hour) it will remember the time again and post a $msg to the guildchannel.
maybe you only want to announce the time every full hour?
Code:
<?php
global $TimerHour;
if (unset($TimerHour)) {
   $TimerHour=date("H");
} elseif (date("i")==0 && date("H")!=$TimerHour) {
   $TimerHour=date("H");
   $msg=":: ".date("d.m.Y H:i:s")." ::";
   send_guild_channel_message(colortext($msg));
}

this one remembers the last time a full hour was announced. with the next full hour that isn't already announced it would make a guildmessage
Reply with quote



_________________

Chalys Gimpnesstheory (2003) Die Theorie der expotentiellen Bullshits den Gimps bei gleichbleibendem Anteil produzieren.
Guest 
 
Topics: 404
 
 
 
Posted: Post 04:31 Thu - Jun 26, 2008

jeah i just want announce the time every full hour.

like

12 13 14 etc...

i try the first one, it sounds good to me:

Code:
<?php
global $TimeTimer;
if (!$TimeTimer) {
   $TimeTimer=time();
} elseif (time()-$TimeTimer>=60*60) {
   $TimeTimer=time();
   $oldtimezone=date_default_timezone_get();
   date_default_timezone_set("Europe/Berlin");
   $msg=":: ".date("d.m.Y H:i:s")." ::";
   date_default_timezone_get($oldtimezone);
   send_guild_channel_message(colortext($msg));
}


im on the way to find the mistake, did you see one?
Reply with quote


Goto page 1, 2, 3  Next
Back Reply to topic