collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Help on Ginfo  (Read 3818 times)

0 Members and 1 Guest are viewing this topic.

Offline Defallen

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Help on Ginfo
« on: June 04, 2010, 08:26:53 am »
Just got a guildbot running for my guild, but I am stuck at !ginfo part. Been using the search function in the forum and found some reference but still failed to apply it in my bot as I know too little about PHP. So any kind of help will be appreciated.  :D

What I would like to make is a !ginfo to look like this :

Quote
Leader:
Leadername

Officers:
Officers1, Officers2, Officers3, Officers4,
Officers5, Officers6, Officers7, Officers8

Website:
http://myguildname.com/

Guild City:
T3 city
Renown Level Five
(average 5 to 10 mill points a week)


Guild Activities:
What we are doing now

Guild Info:
Some guild info here

Please message the officer who posted the recruitment link or click on one of the names below to PM, Requesting Information.

Or
Officers1, Officers2, Officers3, Officers4,
Officers5, Officers6, Officers7, Officers8



 

We look forward to talking to you about our AoC family and hope you choose to make this your new home.

Thanks!

And the red fonts will be able to check the online status of the recruiting officers.

 ;)


Offline freakyfreak

  • BeBot User
  • **
  • Posts: 21
  • Karma: +0/-0
Re: Help on Ginfo
« Reply #1 on: June 04, 2010, 10:20:52 am »
HI

Look at this. Maybe this can help you.

The Officer Check lines is that what u need

http://bebot.link/aoc-modules/guild-recruitment/msg13861/#msg13861

Offline Defallen

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Help on Ginfo
« Reply #2 on: June 04, 2010, 01:44:40 pm »
Ok. Thanks for the link.

At least now I can have it show the on/offline status on top. But how do I make the red text in quote part have the "click to send message" command?  :) 


Ok, got most part figured out.  :D 
But I am wondering if this is working if it's on a trial account? Or do I need to switch it back to a paid account?

And is it possible to make it on center alignment?
« Last Edit: June 04, 2010, 03:09:11 pm by Defallen »

Offline GaRoN

  • BeBot User
  • **
  • Posts: 31
  • Karma: +0/-0
Re: Help on Ginfo
« Reply #3 on: June 30, 2010, 03:34:18 pm »
I know your Ginfo.php and I think its the old version of that what I gave someone on Asgard some weeks ago. My last version have fix the Problem with the officers-status & to tell to the right Twink..
in Line XX

$online = $this -> officercheck("Chepra");
$online_state = $online[0];
$txt.= "##GI_highlight##".$online_state['content'] . $online[1];
$txt.= "##end##";
$txt.= "<FONT face='DEFAULT' color='#FFFF00'><a href='chatcmd:///tell ".substr($online[1],3)." Ich möchte was melden*> ansprechen</a></FONT>\n";

The command: ".substr($online[1],3)." is the aliasfunction for your Officers & his Alts
changing the Name: "Chepra" to your Officers-name etc.

my problem is in Line:
99 to 111 want to change the $txt to a Funktion from this Modul: http://bebot.link/aoc-0-6-x-customunofficial-modules/guild-recruit/msg15995/#msg15995

119 to 127 the autoblob doesn't work by command

check it out

btw, thy to the guys from this thread: http://bebot.link/aoc-0-6-support/help-request-ginfo-officer-online-status/

and http://bebot.link/aoc-modules/guild-recruitment/msg13861/#msg13861
there is the original PHP-Project
« Last Edit: June 30, 2010, 03:55:03 pm by GaRoN »

Offline Miron

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Help on Ginfo
« Reply #4 on: July 04, 2010, 10:09:54 am »
Thats the code I am using for our guild recruit script. It something I modified long ago so I don't remember which one was the original script and who was the original author of it.

It basically sends to anyone who makes the !recruit requests, the the the recruit.txt inside the txt folder (/txt/recruit.txt).

Inside the recruit txt you can use a tag like <PLAYER_STATUS_Miron>. That tag will get translated everytime to the current status of that player (Miron in ths case). Remember that <PLAYER_STATUS_ keyword needs to be uppercase.

Hope it helps, not sure if its what you are looking for.

Code: [Select]
<?php

$recruit 
= new Recruit($bot);

class 
Recruit extends BaseActiveModule
{
function __construct(&$bot)
{
parent::__construct(&$botget_class($this));

$this -> register_command('all''recruit''ANONYMOUS');
}

function command_handler($name$msg$origin)
{
return $this -> make_recruit();
}

function make_recruit()
{
$content implode(""file("./txt/recruit.txt"));
$content $this -> replace_player_status_tags($content);

return "<guildname> :: " $this -> bot -> core("tools") -> make_blob("Current Recruitment"$content);
}

function replace_player_status_tags($msg)
{
while (strpos($msg,"<PLAYER_STATUS_")!==false){
$spos strpos($msg,"<PLAYER_STATUS_");
$epos strpos($msg,">",$spos+15);
$pname substr($msg,$spos+15,$epos-($spos+15));
$pstatus $this -> bot -> core("online") -> get_online_state($pname);
$msg str_replace("<PLAYER_STATUS_".$pname.">"$pstatus['content'] , $msg);
}
return $msg;
}

}
?>

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 486
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal