L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 11:05:06 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: faction checking
Pages: [1]   Go Down
« previous next »
Print
Author Topic: faction checking  (Read 646 times)
0 Members and 1 Guest are viewing this topic.
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
faction checking
« on: July 09, 2007, 11:29:29 AM »

Code:
    function faction_check($name, $mode, $faction)
{
$this -> bot -> aoc -> get_uid($name)
if ($mode == exclude){
line 69>>> if ($who["faction"] !== $faction { return 0; }}
else if ($who["faction"] == $faction { return 1; }
else return false;

Quote
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/Bots/Testbot/modules/AutoMember.php on line 69
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: faction checking
« Reply #1 on: July 09, 2007, 11:30:25 AM »

basicly i wana add Faction checking and min level checking
to a module
useing wat is set with flexible security
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: faction checking
« Reply #2 on: July 09, 2007, 12:19:00 PM »

You're missing ) each time after the comparison.
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: faction checking
« Reply #3 on: July 09, 2007, 03:59:16 PM »

oops
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: faction checking
« Reply #4 on: July 09, 2007, 04:04:03 PM »

done that but error stiff coming up
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: faction checking
« Reply #5 on: July 09, 2007, 04:11:09 PM »

maybe its somit to do with the $who["faction"]
im not sure if that correct
because its from an old module
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: faction checking
« Reply #6 on: July 09, 2007, 07:07:01 PM »

That entire codeblock is non functional.

Code:
<?php
    
// Ok, your passing $name, $mode and $faction
    
function faction_check($name, $mode, $faction)
{
                
// This makes no sense, your asking the bot to just lookup the UID, but you dont store it anywhere.
$this -> bot -> aoc -> get_uid($name)

                
// Wont work, you'll likely be looking for 'exclude'
if ($mode == exclude){

                
// $who doesnt exsist. Maybe your looking to do a whois lookup? You are also missing a closing )
if ($who["faction"] !== $faction { return 0; }}
                
// Should read:
                
if ($who["faction"] !== $faction) { return 0; }}

                
// Same as both above
else if ($who["faction"] == $faction { return 1; } 
else return false;
?>

Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: faction checking
« Reply #7 on: July 09, 2007, 09:01:10 PM »

some 1 wana write me a new 1 then :p
basicly want somthing to check faction and minlevel
which i will set useing with normal bot settings
didnt wana use flexible security as some might not be useing it so dont want it to req it

the use will be when some 1 joins a private group if it check there faction and min level and if they meet the req it will do somit
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: faction checking
« Reply #8 on: July 10, 2007, 02:36:27 PM »

Quote from: Chris96 on July 09, 2007, 09:01:10 PM
some 1 wana write me a new 1 then :p
basicly want somthing to check faction and minlevel
which i will set useing with normal bot settings
didnt wana use flexible security as some might not be useing it so dont want it to req it

the use will be when some 1 joins a private group if it check there faction and min level and if they meet the req it will do somit

With all due respect, this is pretty much why Flexible security was added, to do just what your asking.
Except it wont actually grant them access in the first place if they do not meet the requirements.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: faction checking
« Reply #9 on: July 10, 2007, 04:09:52 PM »

i wasnt sure if having the need to setup flexible security was nessesary
the module im make if to add people who join pgroup and are not on member list but need to meet a few req like being clan
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: faction checking
« Reply #10 on: July 10, 2007, 05:39:21 PM »

One of the ideas behind flexible security is the ability to define user groups without keeping an explicit listing of them. This is archieved by matching them to some characteristics defined by level, faction, profession, org membership and org rank.
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: faction checking
« previous next »
 
Jump to:  

Recent
!items database
by Zeephonz
[Today at 08:05:21 PM]

Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11146
Total Topics: 1505
Online Today: 25
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 15
Total: 17
Elesar1
Vain

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.41 seconds with 28 queries. (Pretty URLs adds 0.034s, 4q)
Loading...