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: Custom modules  (Read 18152 times)

0 Members and 1 Guest are viewing this topic.

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Custom modules
« Reply #30 on: April 07, 2005, 01:57:45 am »
I just completed my new Loot Module! Its the same format as most commercial bots, except a coupe subtle differences. Instead of !roll to finish your rolls, use !result. I did this because bebot comes with a built in !roll command. Also, because this is for org raids, I made a mode to allow people to include themselves into as many rolls as they want. Default is the more standard single roll per person, which can be changed by !mode multi, or !mode single. I hope you enjoy!
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #31 on: April 07, 2005, 02:29:19 pm »
its only unafking when talking in privgroup, not in gc
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Custom modules
« Reply #32 on: April 07, 2005, 06:27:30 pm »
Sorry, thank you, like I said, I can't test any of the guild commands as my bot is raid only. Here's the fix, I'll upload the new version when I get home.

EDIT: Changes made, cleaning house.
http://www.craized.net/junk/bebot/modules/AFK.zip
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Custom modules
« Reply #33 on: April 07, 2005, 06:53:33 pm »
Made some changes based on an old request I forgot about to my teams module, bot admins can now /tell <botname> !showmeteams to get a list the teams in a clickable window.

EDIT: Uploaded the new teams module with these changes, get it here
http://www.craized.net/junk/bebot/modules/Teams.zip
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #34 on: April 07, 2005, 10:22:48 pm »
Parse error: parse error, expecting `')'' in C:\BeBot\modules\AFK.php on line 64

   function gmsg($name, $this -> bot -> guildname, $msg) {


giving an error :S


            $this -> bot -> send_gc($name . "is now AFK.");
has to be:
            $this -> bot -> send_gc($name . " is now AFK.");


HMM LOL :)


and I was wondering why this was different:
. "afk(.*)/i",
. "afk(.)*/i",
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Custom modules
« Reply #35 on: April 08, 2005, 06:16:46 am »
Sorry, I don't really know what I'md oing with this ><. Try changing
Code: [Select]
function gmsg($name, $this -> bot -> guildname, $msg) {
to
Code: [Select]
function gmsg($name, $group, $msg) {

Good luck and please let me know if it works.
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #36 on: April 08, 2005, 02:40:00 pm »
Code: [Select]
 if(strtolower($name) != $this -> bot -> botname) {

caused the chatspam...

changed to

 
Code: [Select]
  if($name != $this -> bot -> botname) {  

BUG: its not going on BACK when using a command.


ok well nothing fixed my guildchat problem, tried the GC command also umm
Code: [Select]

   function gc($name, $msg) {
               $this -> bot -> send_gc($name . " - " . $msg);

$commands["gc"][] = &$afk;
wont even work :S / going to check all { } tags now... [edit] tags are all OK [/edit]
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #37 on: April 08, 2005, 03:14:22 pm »
ok changed some crap and works now:

Code: [Select]

<?php 
/* 
* AFK Module for BE Bot <http://bebot.fieses.net> 
* Module coded by Craized <http://www.craized.net> 

/* 
Add a "_" at the beginning of the file (_AFK.php) if you do not want it to be loaded. 
*/ 

$afk = new AFK($bot); 

$commands["pgmsg"][] = &$afk
$commands["gmsg"][$guild_name][] = &$afk

Class 
AFK 
   var 
$bot
   var 
$afk

   function 
AFK(&$bot) { 
      
$this -> bot = &$bot
      
$this -> afk = array(); 
   } 

   function 
gone($name$msg) { 
      if(!
$msg) { 
         
$msg "Away from keyboard"
      } 
      
$this -> afk[$name] = $msg
   } 

   function 
back($name) { 
      if(
$this -> afk[$name]) { 
         unset(
$this -> afk[$name]); 
      } 
   } 

   function 
acheck($name) { 
      if(
$this -> afk[$name]) { 
         return 
true
         } else { 
         return 
false
      } 
   } 

   function 
pgmsg($name$msg) { 
      if(
$name != $this -> bot -> botname) { 
         if(
preg_match("/^" $this -> bot -> commpre "afk(.*)/i"$msg$afkmsg)) { 
            
$this -> gone($name$afkmsg[1]); 
            
$this -> bot -> send_pgroup($name " is now AFK."); 
            } else if(
$this -> acheck($name)) { 
            
$this -> back($name); 
            
$this -> bot -> send_pgroup($name " is back."); 
            } else { 
            foreach(
$this -> afk as $key=>$value) { 
               if(
preg_match("#$key\b#i"$msg)) { 
                  
$this -> bot -> send_pgroup($key " is AFK (" $value ")"); 
               } 
            } 
         } 
      } 
   } 

   function 
gmsg($name$group$msg) { 
      if(
$name != $this -> bot -> botname) {
         if(
preg_match("/^" $this -> bot -> commpre "afk(.)*/i"$msg$afkmsg)) { 
            
$this -> gone($name$afkmsg[1]); 
            
$this -> bot -> send_gc($name " is now AFK."); 
            } else if(
$this -> acheck($name)) { 
            
$this -> back($name); 
            
$this -> bot -> send_gc($name " is back."); 
            } else { 
            foreach(
$this -> afk as $key=>$value) { 
               if(
preg_match("/$key\b/i"$msg)) { 
                  
$this -> bot -> send_gc($key " is AFK (" $value ")"); 
               } 
            } 
         } 
      } 
   } 


?>



and please explain me...
Code: [Select]

         if(preg_match("/^" . $this -> bot -> commpre . "afk(.)*/i", $msg, $afkmsg)) {

    if(preg_match("#$key\b#i", $msg)) {

what changes?
Code: [Select]

         if(preg_match("/^" . $this -> bot -> commpre . "afk(.*)/i", $msg, $afkmsg)) {

               if(preg_match("/$key\b/i", $msg)) {
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #38 on: April 08, 2005, 03:17:59 pm »
but the !online thingy is bugged and it showed -1 in one of my alts (also the old version)
and when doing !alts ONLY MY NAME, noone else the bot floods this in the log:

Code: [Select]

Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
Read error: EOF
[2005-04-08 13:23:15]   [TELL]  [OUT]   -> Lalsoldier: Lalsoldier's alts: [link]
Alts[/link]
Read error: EOF
[2005-04-08 13:23:15]   [CONN]  [ERROR] Bot has disconnected. Reconnecting in 60
 seconds.


and this is my database showing:
Code: [Select]


      id               main  
      603892205 768689656
      652080875 768689656
      746096756 768689656
      671371013 768689656
      703528182 768689656
      785129281 768689656
      667880473 768689656
      835137222 879931063
      827687062 879931063
      937554214 879931063
      905695286 785139791
      914083315 785139791
      950391956 785139791
      798965241 785139791
      835138323 785139791
      860543142 904899648
      905695310 904899648
      920394703 904899648
      864206261 904899648
      849690694 785139791
      820153541 785139791
      934904522 904899648
      945234846 862199310
(my number is 768689656) with 7 alts added.
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Custom modules
« Reply #39 on: April 08, 2005, 06:46:20 pm »
Code: [Select]
 if(strtolower($name) != $this -> bot -> botname) {
change this to
Code: [Select]
 if($name != ucfirst($this -> bot -> botname)) {
Stupid people like me didn't capitalize their bot name in the bot config, so this should fix that problem for everyone.

Quote

and please explain me...
Code: [Select]
if(preg_match("/^" . $this -> bot -> commpre . "afk(.)*/i", $msg, $afkmsg)) {

    if(preg_match("#$key\b#i", $msg)) {
 

what changes?
Code: [Select]
if(preg_match("/^" . $this -> bot -> commpre . "afk(.*)/i", $msg, $afkmsg)) {

               if(preg_match("/$key\b/i", $msg)) {



afk(.)* will put each character after afk into its own part of an array, where afk(.*) will put everything after afk into into the variable $afkmsg[1]


I hope I didn't miss any of your questions, as for the Alts problem, I would either download a new version of Online.php and I'll add the modifications for you, or ask Blondengy. I don't touch any of the databases either at this point, the existing code for this bot that works fine I don't touch very much.

Good luck.
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #40 on: April 08, 2005, 09:52:19 pm »
hmmm ok thanks so it should be "afk(.*)/i",  for both.

what about these?

if(preg_match("#$key\b#i", $msg)) {
if(preg_match("/$key\b/i", $msg)) {
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Custom modules
« Reply #41 on: April 09, 2005, 08:18:16 am »
Both are exactly the same, I just used two different delimiters. For regex, every expression starts and ends with a specific characters so that PHP knows where it starts and ends. At one point, I wasn't sure if # was screwing it up, so I switched to the more common / and never switched it back. You can either leave it, or make it more uniform, all up to you.
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #42 on: April 09, 2005, 08:52:39 am »
OK Thanks craized,

Fixed a few spaces and stuff and added !afk in tells now.

Code: [Select]
<?php 
/* 
* AFK Module for BE Bot <http://bebot.fieses.net> 
* Module coded by Craized <http://www.craized.net> 

/* 
Add a "_" at the beginning of the file (_AFK.php) if you do not want it to be loaded. 
*/ 

$afk = new AFK($bot); 

$commands["tell"]["afk"] = &$afk;
$commands["privgroup"][] = &$afk
$commands["gmsg"][$guild_name][] = &$afk

Class 
AFK 
   var 
$bot
   var 
$afk

   function 
AFK(&$bot) { 
      
$this -> bot = &$bot
      
$this -> afk = array(); 
   } 

   function 
gone($name$msg) { 
      if(!
$msg) { 
         
$msg "Away from keyboard"
      } 
      
$this -> afk[$name] = $msg
   } 

   function 
back($name) { 
      if(
$this -> afk[$name]) { 
         unset(
$this -> afk[$name]); 
      } 
   } 

   function 
acheck($name) { 
      if(
$this -> afk[$name]) { 
         return 
true
         } else { 
         return 
false
      } 
   } 

   function 
tell($name$msg) { 
       if(
preg_match("/^" $this -> bot -> commpre "afk (.*)/i"$msg$afkmsg)) { 
          
$this -> gone($name$afkmsg[1]); 
          
$this -> bot -> send_gc($name " is now AFK."); 
       } 
   

 
   function 
privgroup($name$msg) { 
      if(
$name != $this -> bot -> botname) { 
         if(
preg_match("/^" $this -> bot -> commpre "afk (.*)/i"$msg$afkmsg)) { 
            
$this -> gone($name$afkmsg[1]); 
            
$this -> bot -> send_pgroup($name " is now AFK."); 
            } else if(
$this -> acheck($name)) { 
            
$this -> back($name); 
            
$this -> bot -> send_pgroup($name " is back."); 
            } else { 
            foreach(
$this -> afk as $key=>$value) { 
               if(
preg_match("/$key\b/i"$msg)) { 
                  
$this -> bot -> send_pgroup($key " is AFK (" $value ")."); 
               } 
            } 
         } 
      } 
   } 

   function 
gmsg($name$group$msg) { 
      if(
$name != $this -> bot -> botname) { 
         if(
preg_match("/^" $this -> bot -> commpre "afk (.*)/i"$msg$afkmsg)) { 
            
$this -> gone($name$afkmsg[1]); 
            
$this -> bot -> send_gc($name " is now AFK."); 
            } else if(
$this -> acheck($name)) { 
            
$this -> back($name); 
            
$this -> bot -> send_gc($name " is back."); 
            } else { 
            foreach(
$this -> afk as $key=>$value) { 
               if(
preg_match("/$key\b/i"$msg)) { 
                  
$this -> bot -> send_gc($key " is AFK (" $value ")."); 
               } 
            } 
         } 
      } 
   }


?>


I also made the teams module easier to read ingame, other style like [Lalsoldier] - [Lal] and fixed some cases where name wouldnt be should be Bebot and was bebot.

I also made it clear from non-LFT when leaving the bot now.

Code: [Select]
<?php 
/* 
* Teams Module for BE Bot <http://bebot.fieses.net> 
* Module coded by Craized <http://www.craized.net> 

/* 
Add a "_" at the beginning of the file (Teams.php) if you do not want it to be loaded. 
*/ 

$teams = new Teams($bot); 
$commands["tell"]["teams"] = &$teams
$commands["pgmsg"]["teams"] = &$teams
$commands["pgjoin"][] = &$teams
$commands["pgleave"][] = &$teams

/* 
The Class itself... 
*/ 
class Teams 
   var 
$bot
   var 
$pgroup

   
/* 
   Constructor: 
   Hands over a referance to the "Bot" class. 
   */ 
   
function Teams (&$bot) { 
      
$this -> bot = &$bot
      
$this -> autonum true
   } 

   function 
tell($name$msg) { 
   
  $color1 "<font color=#FF0000>"
$color2 "<font color=#9999CC>"
      if(
$this -> bot -> commands[pgmsg][leader] -> raidleader == $name || $this -> bot -> admin -> in_group($name"raidleader") || $this -> bot -> admin -> in_group($name"admin")) { 
      if(
$this -> autonum == true) { 
         
$numteams $this -> teams
         } else { 
         
$numteams $this -> numteam
      }             
         for(
$num=1$num<=$numteams$num++) { 
            
$result .= $color1 "Team " $num ": "
            
$count count($this -> team[$num]); 
            
$membnum 1
            for(
$spot=1$spot<=$count$spot++) { 
               if(
$this -> team[$num][$spot] && $this -> team[$num][$spot] != "gone") { 
                  if(
$membnum == 1) { 
                     
$result .= "[" $this -> team[$num][$spot] . "]"
                     }   else { 
                     
$result .= " - [" $this -> team[$num][$spot] . "]"
                  } 
                  
$membnum++; 
               }
            } 
            if (
$membnum == 1) { $result .= "None"; } 
            
$result .= "\n"
         } 
         
$result .= $color1 "Unteamed: "
         unset(
$unteamed); 
         
$players 1;
         foreach(
$this -> pgroup as $player=>$team) { 
            if(
$team == "lft") { 
            
if($players == 1) { 
               
$result .= "[" $player "]"
               
$players++;
              } else {
               
$result .= " - [" $player "]"
              }
               
$unteamed true
            } 
         }
         
if ($players == 1) { $result .= "None"; }
            
$result $this -> bot -> make_blob("Show teams"$result); 
            
$this -> bot -> send_tell($name$result); 
            unset(
$result); 
      } 
   } 

   
/* 
   This gets called on a msg in the privgroup with the command 
   */ 
   
function pgmsg($name$msg)   { 
   
  $color1 "<font color=#FF0000>"
$color2 "<font color=#9999CC>"
      
$msg explode(" "$msg); 
      if(
$this -> autonum == true) { 
         
$numteams $this -> teams
         } else { 
         
$numteams $this -> numteam
      } 
      if (
$msg[1] == "") { 
         for(
$num=1$num<=$numteams$num++) { 
            
$result .= $color1 "Team " $num ": "
            
$count count($this -> team[$num]); 
            
$membnum 1
            for(
$spot=1$spot<=$count$spot++) { 
               if(
$this -> team[$num][$spot] && $this -> team[$num][$spot] != "gone") { 
                  if(
$membnum == 1) { 
                     
$result .= "[" $this -> team[$num][$spot] . "]";
                     } else { 
                     
$result .= " - [" $this -> team[$num][$spot] . "]"
                  } 
                  
$membnum++; 
               } 
            } 
            if (
$membnum == 1) { $result .= "None"; }
            
$this -> bot -> send_pgroup($result); 
            unset(
$result); 
         } 
         
$result .= $color1 "Unteamed: "
         unset(
$unteamed); 
         
$players 1;
         foreach(
$this -> pgroup as $player=>$team) { 
            if(
$team == "lft") { 
              if(
$players == 1) { 
               
$result .= "[" $player "]"
               
$players++;
              } else {
               
$result .= " - [" $player "]"
              }
               
$unteamed true
           

         } 
          
if ($players == 1) { $result .= "None"; }
            
$this -> bot -> send_pgroup($result); 
      } 
      if(
$msg[1] == "clear") { 
         if(
$this -> bot -> commands[pgmsg][leader] -> raidleader == $name || $this -> bot -> admin -> in_group($name"raidleader") || $this -> bot -> admin -> in_group($name"admin")) { 
            foreach(
$this -> pgroup as $player=>$value) { 
         if(
$this -> left[$player]) { 
            unset(
$this -> pgroup[$player]); 
         } else { 
         
$this -> pgroup[$player] = "lft"
      } 
               unset(
$this -> team); 
            } 
            
$this -> bot -> send_pgroup($color2 "Teams are cleared."); 
         } 
      } 
      if(
preg_match("#^[1-9]#"$msg[1])) { 
         if(
$numteams >= $msg[1]) { 
            
$team $msg[1]; 
            
$spot count($this -> team[$team])+1
            
$count 1
            for(
$teamnum=1$teamnum <= $numteams$teamnum++) { 
               foreach(
$this -> team[$teamnum] as $key => $value) { 
                  if(
$value == $teamnum) { 
                     
$count++; 
                  } 
               } 
            } 
            if (
$count <= 6){ 
               if(
$msg[2] == "") { 
                  if(
$this -> pgroup[$name] != $team) { 
                     foreach(
$this -> team as $team1=>$spot1) { 
                        foreach(
$this -> team[$team1] as $spot1=>$spot2) { 
                           if(
$this -> team[$team1][$spot1] == $name){ 
                              
$oldspot $spot1
                              
$oldteam $team1
                           } 
                        } 
                     } 
                     
$this -> team[$oldteam][$oldspot] = "gone"
                     
$this -> team[$team][$spot] = $name
                     
$this -> pgroup[$name] = $team
                     
$this -> bot -> send_pgroup($color2 $name " is added to team " $msg[1] . "."); 
                     } else { 
                     
$this -> bot -> send_pgroup($color2 $name " is already in team " $team "."); 
                  } 
                  } else { 
                  if(
$this -> bot -> commands[pgmsg][leader] -> raidleader == $name || $this -> bot -> admin -> in_group($name"raidleader") || $this -> bot -> admin -> in_group($name"admin")) { 
                     
$user ucfirst($msg[2]); 
                     if(
$numteams >= $msg[1]) { 
                        if(
$this -> pgroup[$user]) { 
                           if(
$this -> pgroup[$user] != $team) { 
                              foreach(
$this -> team as $team1=>$spot1) { 
                                 foreach(
$this -> team[$team1] as $spot1=>$spot2) { 
                                    if(
$this -> team[$team1][$spot1] == $user){ 
                                       
$oldspot $spot1
                                       
$oldteam $team1
                                    } 
                                 } 
                              } 
                              
$this -> team[$oldteam][$oldspot] = "gone"
                              
$this -> team[$team][$spot] = $user
                              
$this -> pgroup[$user] = $team
                              
$this -> bot -> send_pgroup($color2 $user " is added to team " $msg[1] . "."); 
                              } else { 
                              
$this -> bot -> send_pgroup($color2 $user " is already in team " $team "."); 
                           } 
                           } else { 
                           
$this -> bot -> send_pgroup($color2 $user " is not in " $this -> bot -> botname "."); 
                        } 
                     } 
                  } 
               } 
               } else { 
               
$this -> bot -> send_pgroup($color2 "Team " $team " is full."); 
            } 
         } 
         } elseif(
preg_match("#^0#"$msg[1])) { 
         if(!
$msg[2]) { 
            
$user $name
            } else { 
            
$user ucfirst($msg[2]); 
         } 
         foreach(
$this -> team as $team1=>$spot1) { 
            foreach(
$this -> team[$team1] as $spot1=>$spot2) { 
               if(
$this -> team[$team1][$spot1] == $user){ 
                  
$oldspot $spot1
                  
$oldteam $team1
               } 
            } 
         } 
         
$this -> team[$oldteam][$oldspot] = "gone"
         if(
$this -> left[$user]) { 
            unset(
$this -> pgroup[$user]); 
         } else { 
         
$this -> pgroup[$user] = "lft"
      } 
         
$this -> bot -> send_pgroup($color2 $user " is added to Unteamed."); 
      } 
      if(
$msg[1] == num) { 
      if(
$this -> bot -> commands[pgmsg][leader] -> raidleader == $name || $this -> bot -> admin -> in_group($name"raidleader") || $this -> bot -> admin -> in_group($name"admin")) { 
         if(
$msg[2] == auto) { 
               
$this -> autonum true
               foreach(
$this -> pgroup as $player=>$value) { 
                  
$this -> pgroup[$player] = "lft"
                  unset(
$this -> team); 
               } 
               
$this -> bot -> send_pgroup($color2 "Teams are cleared."); 
               
$this -> bot -> send_pgroup($color2 "Maximum number of teams set to automatic."); 
               } elseif(
preg_match("#^[1-90]#"$msg[2])) { 
               
$this -> numteam $msg[2]; 
               
$this -> bot -> send_pgroup($color2 "Maximum number of teams set to " $msg[2] . "."); 
               
$this -> autonum false
            } 
         } 
      } 
   } 


   
/* 
   This gets called if someone joins the privgroup 
   */ 
   
function pgjoin($name) { 
      if(
$this -> left[$name]) { 
         unset(
$this -> left[$name]); 
      } 
      if(!
$this -> pgroup[$name]) { 
         
$this -> pgroup[$name] = "lft"
         
$this -> teams ceil(count($this -> pgroup)/6); 
      } 
   } 



   
/* 
   This gets called if someone leaves the privgroup 
   */ 
   
function pgleave($name) { 
   
foreach($this -> team as $team1=>$spot1) { 
   
foreach($this -> team[$team1] as $spot1=>$spot2) { 
   
if($this -> team[$team1][$spot1] == $name){ 
   
$oldspot $spot1
   
$oldteam $team1
   

   

      } 
      unset(
$this -> pgroup[$name]); 
      if (
$this -> pgroup[$name] != "lft") { 
      
$this -> team[$oldteam][$oldspot] = "gone";  
   

   } 

?>
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

Offline craized

  • Contributor
  • *******
  • Posts: 165
  • Karma: +0/-0
    • http://www.craized.net
Custom modules
« Reply #43 on: April 09, 2005, 10:53:26 am »
Thank you Lal, I'll update the file I uploaded and give you some credit for all your help!
Trailin [213/14][ADVENTURER][RK2]
Bigburtha [216/17][NT][RK2][FROZEN]
Abeham [199/7][TRADER][RK2][FROZEN]


Offline Lal

  • BeBot User
  • **
  • Posts: 53
  • Karma: +0/-0
Custom modules
« Reply #44 on: April 09, 2005, 10:58:19 am »
Quote from: "craized"
Thank you Lal, I'll update the file I uploaded and give you some credit for all your help!

oh lets PvP clammer =)
[205/12][Lalsoldier][RK2]

[190/5][Laldoc][RK2]

[195/10][Lalnt][RK2]

 

* 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: 762
  • 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