User Control Panel
Advertisements

HELP US, HELP YOU!

callback

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands
View unanswered posts
Author Message
85thday
Senior Member
Senior Member


Joined: 20 Jan 2004
Posts: 260

Reputation: 33.3Reputation: 33.3Reputation: 33.3

PostPosted: Fri Mar 05, 2004 9:48 pm    Post subject: Reply with quote

i know this will be easy but i have made a .bar as in a bar where you buy dtinks and 3 commands a .barmenu however the command are going to .menu some 1 said something about a call back command so can some 1 help and befor *lazy* start heres a bar chatroom command and better pet commands

sub bar
{
my ($bot, $self, $user, $msg) = @_;

my $user_settings = $bot->{users}->{$user};
my $msn = $bot->{msn};
my $settings = $bot->{settings};

# command body here.
if ($msg eq '')
{
$user_settings->{callback} = "bar";
return "(*) 4Type 'accept'to accept to These Rules (*).

4*all the chat rooms rules apply how ever yuo can use .barmenu dont flood it though thanks";
}
elsif ($msg eq 'accept')
{
$user_settings->{callback} = "";
if (!exists $bot->{chatroom} or !exists $bot->{msn}->{Socks}->{$bot->{bar}->{fn}} ) {
$bot->{bar} = $self;
$self->{settings}->{Silent} = 1;
return "4This Is Now The Bar.";
}
elsif ($self eq $bot->{bar})
{
return "(B) 4Your In the bar. (B)";
}
else
{
$bot->{bar}->invite($user);
return "(*) 4Your Being Transfered To The bar Now (*)";
}
}
else
{
$user_settings->{callback} = "";
return "4Sorry You MUST Agree The Rules Type 'accept' To Accept The Above Rules";
}

}

{
Category => 'chat rooms',
Description => 'enjoy a few drinks',
};
this makes *lazy* a barchat room and pets will b ziped
Back to top
Porto
Senior Member
Senior Member


Joined: 07 Jan 2004
Posts: 152

Reputation: 31.4Reputation: 31.4Reputation: 31.4

PostPosted: Fri Mar 05, 2004 10:14 pm    Post subject: Reply with quote

very nice Razz lol Please Putt It In the Code Tag when you submit a code Wink
Back to top
jonphamta
Senior Member
Senior Member


Joined: 20 Jan 2004
Posts: 247

Reputation: 32.9Reputation: 32.9Reputation: 32.9

PostPosted: Sat Mar 06, 2004 2:55 am    Post subject: Reply with quote

For those of you who find it hard to read Razz
Quote:
sub bar
{
my ($bot, $self, $user, $msg) = @_;

my $user_settings = $bot->{users}->{$user};
my $msn = $bot->{msn};
my $settings = $bot->{settings};

# command body here.
if ($msg eq '')
{
$user_settings->{callback} = "bar";
return "(*) 4Type 'accept'to accept to These Rules (*).

4*all the chat rooms rules apply how ever yuo can use .barmenu dont flood it though thanks";
}
elsif ($msg eq 'accept')
{
$user_settings->{callback} = "";
if (!exists $bot->{chatroom} or !exists $bot->{msn}->{Socks}->{$bot->{bar}->{fn}} ) {
$bot->{bar} = $self;
$self->{settings}->{Silent} = 1;
return "4This Is Now The Bar.";
}
elsif ($self eq $bot->{bar})
{
return "( 4Your In the bar. (";
}
else
{
$bot->{bar}->invite($user);
return "(*) 4Your Being Transfered To The bar Now (*)";
}
}
else
{
$user_settings->{callback} = "";
return "4Sorry You MUST Agree The Rules Type 'accept' To Accept The Above Rules";
}

}

{
Category => 'chat rooms',
Description => 'enjoy a few drinks',
};
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Sat Mar 06, 2004 3:27 am    Post subject: Reply with quote

or for those that like indented code

Code:
<br />sub bar { <br />    my ($bot, $self, $user, $msg) = @_;<br /><br />    my $user_settings = $bot->{users}->{$user};<br />    my $msn = $bot->{msn};<br />    my $settings = $bot->{settings};<br /><br />    # command body here.<br />    if ($msg eq '') {<br />        $user_settings->{callback} = "bar";<br />        return "(*) 4Type 'accept'to accept to These Rules (*).\n\n" .<br />                  "4*all the chat rooms rules apply how ever yuo can " .<br />                  "use .barmenu dont flood it though thanks";<br />    } elsif ($msg eq 'accept') { <br />        $user_settings->{callback} = "";<br />        if (!exists $bot->{chatroom} or<br />            !exists $bot->{msn}->{Socks}->{$bot->{bar}->{fn}} )<br />        {<br />            $bot->{bar} = $self;<br />            $self->{settings}->{Silent} = 1;<br />            return "4This Is Now The Bar.";<br />        } <br />        elsif ($self eq $bot->{bar})<br />        {<br />            return "( 4Your In the bar. (";<br />        }<br />        else<br />        {<br />            $bot->{bar}->invite($user);<br />            return "(*) 4Your Being Transfered To The bar Now (*)";<br />        }<br />    }<br />    else<br />    {<br />        $user_settings->{callback} = "";<br />        return "4Sorry You MUST Agree The Rules Type 'accept' To Accept The Above Rules";<br />    }<br />} <br /><br />{<br />    Category => 'chat rooms', <br />    Description => 'enjoy a few drinks', <br />};<br />

_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
JoeX
Agent
Agent


Joined: 02 Jan 2004
Posts: 2153

Reputation: 72.7

PostPosted: Sat Mar 06, 2004 10:56 am    Post subject: Reply with quote

i like erics bestest
_________________
Heroes NBC
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Commands All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group