|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
alias sepnum {
var %n = ^(\d*)(\d{3})$, %r = $1
while ($regex(%r,%n)) {
var %w = $regml(2), %r = $regml(1)
var %k = $+(%w,$chr(44),%k)
dec %x 3
}
return $left($iif(%r,$+(%r,$chr(44),%k),%k),-1)
}
on *:exit:{
.hsave -o Auction Auction.hsh
}
on *:disconnect:{
.hsave -o Auction Auction.hsh
}
on *:start:{
.strip +burc
if !$hget(Auction) { .hmake Auction 100 }
if $exists(Auction.hsh) { .hload Auction Auction.hsh }
}
on *:load:{
.strip +burc
if !$hget(Auction) { .hmake Auction 100 }
if $exists(Auction.hsh) { .hload Auction Auction.hsh }
}
on *:text:!help:*:{
.play $nick AB_help.txt
}
on *:text:!rules:*:{
.play $nick AB_help.txt
}
on !*:join:#:{
.hinc -m Auction $+(Visit.,$address)
describe # 5,0Welcomes4 $nick 5to $chan for the $ord($sepnum($hget(Auction,$+(Visit.,$address)))) time
}
on *:text:!sellme:#:{
if ($right($nick,3) == -pm) {
.msg $nick Remove the -pm from the end of your nick before putting yourself up for sale
}
elseif ($nick isvoice $chan) {
.msg $nick You're already up on the auction block
}
elseif (!$hget(qvars,$address)) {
hadd -m qvars $+(checkq,.,$nick) $chan
checkq $address $nick $chan
}
}
on *:text:*:#:{
if ($remove($1,$chr(44)) isnum) && ($nick($chan,1,v)) {
if ($nick isvoice $chan) {
describe # laughs as $nick tries to bid on themselves
}
elseif (!%bid) || ($remove($1,$chr(44) > %bid) {
set %bid $remove($1,$chr(44))
set %bidnick $nick
describe # I now have $sepnum($1) for a bid on $nick($chan,1,v)
describe # Do I hear a bid of $sepnum($calc($remove(%bid,$chr(44)) + 10)) $+ ?
}
else { describe # Sorry $nick $+ $chr(44) but your bid must be greater than $sepnum(%bid) }
}
}
on *:text:*:?: {
if ( $hget(qvars,$address) ) {
if ($v1 == $lines(questions.txt)) && ($remove($1,$chr(44)) !isnum) {
.msg $nick Sorry, but the answer to this question must be a number
}
else {
.hadd -m Auction $+($v1,$address) $1-
checkq $address $nick $hget(qvars,$+(checkq,.,$nick))
}
}
}
alias checkq {
while ($hget(qvars,$1) <= $lines(questions.txt)) && $hget(Auction,$+($hget(qvars,$1),$address)) {
hinc -m qvars $1
}
if ( $read(questions.txt,$hget(qvars,$1)) ) {
if (!$hget(Auction,$+($hget(qvars,$1),$address))) .msg $nick $read(questions.txt,$hget(qvars,$1))
}
else {
hdel qvars $1
mode $3 +v $2
describe $3 leads $2 up to the auction block, ensuring that A/all have a good view
describe $3 smiles as He reads off $2 $+ 's description as $hget(Auction,$+(1,$1))
describe $3 states that $2 has indicated their likes as being $hget(Auction,$+(2,$1))
describe $3 notes that $2 has the following limits: $hget(Auction,$+(3,$1))
describe $3 looks at the clock, and says that the auction for $2 will end in 2 minutes
hdel qvars $+(checkq,.,$2)
$+(.timer,$2) 1 120 { end_auction $1 $2 $3 }
}
}
alias end_auction {
.mode $3 -v $2
if !%bid {
describe $3 apologizes to $2 $+ . I'm sorry, but there weren't any bids. Please try again later.
}
elseif %bid < $hget(Auction,$+(4,$1)) {
describe $3 Sorry $2 $+ . The highest recorded bid was less than you requested. Please try again later.
}
else {
describe $3 escorts $2 to %bidnick $+ . Congratulations...You have won
.msg $2 Please add -pm to the end of your nick if you're going to stay in the room
.msg %bidnick Please add -pm to the end of your nick if you're going to stay in the room
}
unset %bid*
}
|
|
|
|
Joined: Nov 2005
Posts: 10
Pikka bird
|
Pikka bird
Joined: Nov 2005
Posts: 10 |
that is what i am looking for, for my room, i want something like that to auction off my Dj's and other people too, can you tell me how to set this up, step by step, please and thank you
Owner TOTALLY XTREME Radio Station #TOTALLY-XTREME is on irc.p2p-irc.net
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Auction off your DJs and other people? How much for that person in the back? Auctioning on IRC isn't a great choice if you're talking real money. People could just bid really high amounts with no intent on paying because there is no consequence for doing so. You also have no way to know if someone who bids a real amount will also not pay you. You would be better off using a real auction site.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Nov 2005
Posts: 10
Pikka bird
|
Pikka bird
Joined: Nov 2005
Posts: 10 |
i am designing chatroom on mirc for people to come and relax and have fun thats all i want to make this room fun and great place to come, i have been looking for that script for sometime and now its here, i dont know how to set it up and all Auction off your DJs and other people? How much for that person in the back? Auctioning on IRC isn't a great choice if you're talking real money. People could just bid really high amounts with no intent on paying because there is no consequence for doing so. You also have no way to know if someone who bids a real amount will also not pay you. You would be better off using a real auction site.
Owner TOTALLY XTREME Radio Station #TOTALLY-XTREME is on irc.p2p-irc.net
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Heh... I just looked that script over more closely and realized that it really is for auctioning people. Ignore my comments regarding real money (unless you want to pay real money for people). As for setting it up, I'll leave that for RusselB to explain since he probably has an updated version by now.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Nov 2005
Posts: 10
Pikka bird
|
Pikka bird
Joined: Nov 2005
Posts: 10 |
dont worry i am not mad at all, i been looking for that for couple of weeks! i am new to this and all, i am trying to make bot that is cool, funny and put the foot down and force the law thats all and also have fun Heh... I just looked that script over more closely and realized that it really is for auctioning people. Ignore my comments regarding real money (unless you want to pay real money for people). As for setting it up, I'll leave that for RusselB to explain since he probably has an updated version by now.
Owner TOTALLY XTREME Radio Station #TOTALLY-XTREME is on irc.p2p-irc.net
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
This script was written for a sub/slave auction room. While I've been told that there are some small problems with it (ie: the person leaving the room before the auction ends, the bot timing out, etc.) here's the code that I'm currently using. #Auction on
alias sepnum {
var %n = ^(\d*)(\d{3})$, %r = $int($1)
var %frac = $iif($1 != %r,$right($calc($1 - %r),-1),0)
while ($regex(%r,%n)) {
var %w = $regml(2), %r = $regml(1)
var %k = $+(%w,$chr(44),%k)
dec %x 3
}
return $iif(%frac,$left($iif(%r,$+(%r,$chr(44),%k),%k),-1) $+ %frac,$left($iif(%r,$+(%r,$chr(44),%k),%k),-1))
}
on *:exit:{
.hsave -o Auction Auction.hsh
}
on *:disconnect:{
.hsave -o Auction Auction.hsh
}
on *:start:{
.strip +burc
if !$hget(Auction) { .hmake Auction 100 }
if $exists(Auction.hsh) { .hload Auction Auction.hsh }
}
on me:*:join:#:{
set %topic $chan($chan).topic
}
on !*:join:#:{
.hinc -m Auction $+(Visit.,$address)
describe # 5,0Welcomes4 $nick 5to $chan for the $ord($sepnum($hget(Auction,$+(Visit.,$address)))) time
.hadd -m Auction $+(Name.,$address) $addtok($hget(Auction,$+(Name.,$address)),$nick,32)
}
on *:nick:{
.hadd -m Auction $+(Name.,$address) $addtok($hget(Auction,$+(Name.,$address)),$newnick,32)
}
on @*:text:*:#:{
if ($1 == !help) || ($1 == !rules) { .play $nick AB_help.txt }
elseif ($1 == !clear) {
.hdel -w Auction $+(?,.,$address)
if ($timer($nick)) { $+(.timer,$nick) off }
describe # sighs as $nick removes themselves from the Auction Block
end_auction $address $nick $chan $1
}
elseif ($1 == !end) && ($nick isvoice $chan) && (!%bid) {
$+(.timer,$nick) off
describe # sighs as $nick removes themselves from the Auction Block
end_auction $address $nick $chan $1
}
elseif ($1 == !sellme) {
if ($right($nick,3) == -pm) { msg $nick Remove the $right($nick,3) from the end of your nick before putting yourself up for sale }
elseif ($nick isvoice $chan) { msg $nick You're already up on the auction block }
else {
set %chan $chan
set %question 1
checkq $address $nick $chan
}
}
elseif ($remove($1,$chr(44)) isnum) && ($nick($chan,1,v)) {
if ($nick isvoice $chan) { describe # laughs as $nick tries to bid on themselves }
elseif (!%bid) || ($remove($1,$chr(44) > %bid) {
set %bid $remove($1,$chr(44))
set %bidnick $nick
describe # I now have $sepnum($1) for a bid on $nick($chan,1,v)
describe # Do I hear a bid of $sepnum($calc($remove(%bid,$chr(44)) + 10)) $+ ?
}
else { describe # Sorry $nick $+ $chr(44) but your bid must be greater than $sepnum(%bid) }
}
}
on *:text:*:?: {
if ($1 == !help) || ($1 == !rules) { .play $nick AB_help.txt }
elseif (%question == 4) && ($remove($1,$chr(44)) !isnum) { .msg $nick Sorry, but the answer to this question must be a number }
else {
.hadd -m Auction $+(%question,.,$address) $1-
.inc %question
checkq $address $nick %chan
}
}
alias checkq {
:start
if (%question <= $lines(questions.txt)) && (!$hget(Auction,$+(%question,.,$address))) {
msg $nick $read(questions.txt,%question)
}
elseif (%question <= $lines(questions.txt)) && ($hget(Auction,$+(%question,.,$address))) {
inc %question
goto start
}
else {
set %topic $chan($3).topic
.topic $3 Currently on the Auction Block is $2
mode $3 +v $2
describe $3 leads 5 $2 up to the auction block, ensuring that A/all have a good view
describe $3 smiles as He reads off $2 $+ 's description as 5 $hget(Auction,$+(1.,$1))
describe $3 states that $2 has indicated their likes as being 5 $hget(Auction,$+(2.,$1))
describe $3 notes that $2 has the following limits: 5 $hget(Auction,$+(3.,$1))
describe $3 looks at the clock, and says that the auction for $2 will end in 2 minutes
$+(.timer,$2) 1 120 { end_auction $1 $2 $3 }
}
}
alias end_auction {
.mode $3 -v $2
if (!$4) {
if !%bid { describe $3 apologizes to $2 $+ . I'm sorry, but there weren't any bids. Please try again later. }
elseif %bid < $hget(Auction,$+(4.,$1)) { describe $3 Sorry $2 $+ . The highest recorded bid was less than you requested. Please try again later. }
else {
describe $3 escorts $2 to %bidnick $+ . Congratulations %bidnick ... You have won $2
.msg $2 Please add -pm to the end of your nick if you're going to stay in the room
.msg %bidnick Please add -pm to the end of your nick if you're going to stay in the room
}
}
.hdel Auction $+(4.,$1)
unset %bid*
}
on *:quit:{
if ($timer($nick)) { $+(.timer,$nick) off }
}
on *:part:#:{
if ($timer($nick)) { $+(.timer,$nick) off }
}
on *:kick:#:{
if ($timer($knick)) { $+(.timer,$knick) off }
}
#auction end
I haven't worried about the problems, as mentioned above, since they don't happen very often. You'll have to make the questions.txt file and please note that this code is set up for a questions.txt file that has 4 entries, with the last entry requiring a numeric entry.
|
|
|
|
Joined: Nov 2005
Posts: 10
Pikka bird
|
Pikka bird
Joined: Nov 2005
Posts: 10 |
ty is there way you can help me set this up, if you dont mind me asking? This script was written for a sub/slave auction room. While I've been told that there are some small problems with it (ie: the person leaving the room before the auction ends, the bot timing out, etc.) here's the code that I'm currently using. #Auction on
alias sepnum {
var %n = ^(\d*)(\d{3})$, %r = $int($1)
var %frac = $iif($1 != %r,$right($calc($1 - %r),-1),0)
while ($regex(%r,%n)) {
var %w = $regml(2), %r = $regml(1)
var %k = $+(%w,$chr(44),%k)
dec %x 3
}
return $iif(%frac,$left($iif(%r,$+(%r,$chr(44),%k),%k),-1) $+ %frac,$left($iif(%r,$+(%r,$chr(44),%k),%k),-1))
}
on *:exit:{
.hsave -o Auction Auction.hsh
}
on *:disconnect:{
.hsave -o Auction Auction.hsh
}
on *:start:{
.strip +burc
if !$hget(Auction) { .hmake Auction 100 }
if $exists(Auction.hsh) { .hload Auction Auction.hsh }
}
on me:*:join:#:{
set %topic $chan($chan).topic
}
on !*:join:#:{
.hinc -m Auction $+(Visit.,$address)
describe # 5,0Welcomes4 $nick 5to $chan for the $ord($sepnum($hget(Auction,$+(Visit.,$address)))) time
.hadd -m Auction $+(Name.,$address) $addtok($hget(Auction,$+(Name.,$address)),$nick,32)
}
on *:nick:{
.hadd -m Auction $+(Name.,$address) $addtok($hget(Auction,$+(Name.,$address)),$newnick,32)
}
on @*:text:*:#:{
if ($1 == !help) || ($1 == !rules) { .play $nick AB_help.txt }
elseif ($1 == !clear) {
.hdel -w Auction $+(?,.,$address)
if ($timer($nick)) { $+(.timer,$nick) off }
describe # sighs as $nick removes themselves from the Auction Block
end_auction $address $nick $chan $1
}
elseif ($1 == !end) && ($nick isvoice $chan) && (!%bid) {
$+(.timer,$nick) off
describe # sighs as $nick removes themselves from the Auction Block
end_auction $address $nick $chan $1
}
elseif ($1 == !sellme) {
if ($right($nick,3) == -pm) { msg $nick Remove the $right($nick,3) from the end of your nick before putting yourself up for sale }
elseif ($nick isvoice $chan) { msg $nick You're already up on the auction block }
else {
set %chan $chan
set %question 1
checkq $address $nick $chan
}
}
elseif ($remove($1,$chr(44)) isnum) && ($nick($chan,1,v)) {
if ($nick isvoice $chan) { describe # laughs as $nick tries to bid on themselves }
elseif (!%bid) || ($remove($1,$chr(44) > %bid) {
set %bid $remove($1,$chr(44))
set %bidnick $nick
describe # I now have $sepnum($1) for a bid on $nick($chan,1,v)
describe # Do I hear a bid of $sepnum($calc($remove(%bid,$chr(44)) + 10)) $+ ?
}
else { describe # Sorry $nick $+ $chr(44) but your bid must be greater than $sepnum(%bid) }
}
}
on *:text:*:?: {
if ($1 == !help) || ($1 == !rules) { .play $nick AB_help.txt }
elseif (%question == 4) && ($remove($1,$chr(44)) !isnum) { .msg $nick Sorry, but the answer to this question must be a number }
else {
.hadd -m Auction $+(%question,.,$address) $1-
.inc %question
checkq $address $nick %chan
}
}
alias checkq {
:start
if (%question <= $lines(questions.txt)) && (!$hget(Auction,$+(%question,.,$address))) {
msg $nick $read(questions.txt,%question)
}
elseif (%question <= $lines(questions.txt)) && ($hget(Auction,$+(%question,.,$address))) {
inc %question
goto start
}
else {
set %topic $chan($3).topic
.topic $3 Currently on the Auction Block is $2
mode $3 +v $2
describe $3 leads 5 $2 up to the auction block, ensuring that A/all have a good view
describe $3 smiles as He reads off $2 $+ 's description as 5 $hget(Auction,$+(1.,$1))
describe $3 states that $2 has indicated their likes as being 5 $hget(Auction,$+(2.,$1))
describe $3 notes that $2 has the following limits: 5 $hget(Auction,$+(3.,$1))
describe $3 looks at the clock, and says that the auction for $2 will end in 2 minutes
$+(.timer,$2) 1 120 { end_auction $1 $2 $3 }
}
}
alias end_auction {
.mode $3 -v $2
if (!$4) {
if !%bid { describe $3 apologizes to $2 $+ . I'm sorry, but there weren't any bids. Please try again later. }
elseif %bid < $hget(Auction,$+(4.,$1)) { describe $3 Sorry $2 $+ . The highest recorded bid was less than you requested. Please try again later. }
else {
describe $3 escorts $2 to %bidnick $+ . Congratulations %bidnick ... You have won $2
.msg $2 Please add -pm to the end of your nick if you're going to stay in the room
.msg %bidnick Please add -pm to the end of your nick if you're going to stay in the room
}
}
.hdel Auction $+(4.,$1)
unset %bid*
}
on *:quit:{
if ($timer($nick)) { $+(.timer,$nick) off }
}
on *:part:#:{
if ($timer($nick)) { $+(.timer,$nick) off }
}
on *:kick:#:{
if ($timer($knick)) { $+(.timer,$knick) off }
}
#auction end
I haven't worried about the problems, as mentioned above, since they don't happen very often. You'll have to make the questions.txt file and please note that this code is set up for a questions.txt file that has 4 entries, with the last entry requiring a numeric entry.
Owner TOTALLY XTREME Radio Station #TOTALLY-XTREME is on irc.p2p-irc.net
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
First, you don't need to Quote everything... just hit reply. Second, to set it up, just press Alt-R on your bot, go to File > New. Then, paste his code into there and press OK. FYI: Code from this forum can sometimes paste incorrectly. To avoid that, click Quote and then copy the text between the [[b][/b]code] tags and paste that part into Remotes as mentioned above. That way it will be formatted just as you see it displayed here. The same method can be used for any script that you don't have a file for (i.e. anything you get here).
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|