| View previous topic :: View next topic |
| Author |
Message |
lee8oi Halfop
Joined: 04 Jun 2011 Posts: 63 Location: Michigan,United States.
|
Posted: Wed Jun 29, 2011 1:00 pm Post subject: Bankd "Just one of those ideas" New release v0.4.4 |
|
|
The second graduate of the Dukescript Volatile Experiment. Bankd script is one of those 'wouldn't it be kinda cool if' ideas I came up with mainly to entertain myself. The idea was to come up with a banking system that could be used for role playing purposes in selected channels allowing users to transfer funds to other users and collect interest.
The public command allows users to check thier balance or transfer funds to another user (provided both have accounts). Bot owners have access to the dcc/partyline command '.bankd' which allows them to add, remove, list, check, and edit the 'bank accounts'. An automatic timer periodically adds an 'interest' to all existing bank accounts.
Latest version available from github: https://github.com/lee8oi/bankd/blob/master/bankd.tcl _________________ https://github.com/lee8oi
https://code.google.com/u/lee8oi/
Last edited by lee8oi on Tue Sep 27, 2011 12:11 pm; edited 3 times in total |
|
| Back to top |
|
 |
wbk Voice
Joined: 07 Sep 2011 Posts: 3
|
Posted: Wed Sep 07, 2011 8:13 pm Post subject: please help cant get it to work |
|
|
hi lee8oi i have seen this working els where and thought i would try it out ( loving your work btw )
but i am having some problem with it
i am a bit of a noob and i do everything trial and error (self taught ) coz i lern better that was and dont like bothering people for help but i just cant get this to work
i managed to get it loaded
| Quote: |
[01:14] Bankd 0.3beta Loaded
|
and managed to telnet into the bot and add 3 users to try it out first b4 i add every1 els in the room to the list
i know its running coz when i .banked list the 3 users showed up and thay are actual gaining points slowly i added 100 to start with and we are showing 107 108 and 109 now BUT
when i put .bank balance or any of the commands into my irc room nothing comes up at all
i have added my irc room where it says too but i cant see what im doing wrong
i am use in [01:14] --- Loading eggdrop v1.6.19+ctcpfix (Thu Sep 8 2011)
ANY HELP WOULD BE GREATLY APPRECIATED MY FRIEND THANKYOU <3
| Code: |
################################################################################
#
# Copyright ©2011 lee8oi@gmail.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# http://www.gnu.org/licenses/
#
################################################################################
#
# Bankd script v0.3beta (6-28-11)
# by: <lee8oi@github><lee8oiOnfreenode>
# github link: https://github.com/lee8oi/eggdrop/blob/master/bankd.tcl
#
# The second graduate of the Dukescript Volatile Experiment. Bankd script is
# one of those 'wouldn't it be kinda cool if' ideas I came up with mainly
# to entertain myself. The idea was to come up with a banking system that
# could be used for role playing purposes in selected channels allowing users
# to transfer funds to other users and collect interest.
#
# The public command is '.bank' which allows users to check thier balance or
# transfer funds to another user (provided both have accounts). Bot owners
# have access to the dcc/partyline command '.bankd' which allows them to add,
# remove, list, check, and edit the 'bank accounts'. An automatic timer
# periodically adds an 'interest' to all existing bank accounts.
#
# ------------------------------------------------------------------------
#
# Updates for v0.3:
# 1.
#
# ------------------------------------------------------------------------
#
# Initial channel setup:
# (enables use of public info command in specified channel)
# .chanset #scene-inspired +bankd
#
# Public command syntax:
# .bank ?balance|transfer? ?args?
#
# DCC (partyline) command syntax:
# .bankd ?add|remove|check|list|edit? ?args?
#
# Example Usage:
# (public)
# <lee8oi> .bank balance
# <dukelovett> lee8oi, your balance is: 1000
# <lee8oi> .bank transfer 100 dukelovett
# <dukelovett> transfer successful.
# <lee8oi> .bank
# <dukelovett> usage: .bank ?balance|transfer? ?args?
#
# (DCC/Partyline)
# <lee8oi> .bankd add jimmy
# <dukelovett> account created.
# <lee8oi> .bankd remove jimmy
# <dukelovett> account removed.
# <lee8oi> .bankd
# <dukelovett> usage: .bankd ?add|remove|check|list|edit? ?args?
# <lee8oi> .bankd add
# <dukelovett> usage: .bankd add <name>
#
################################################################################
#
# CONFIGURATION
# ------------------------------------------------------------------------
# INTEREST PERCENTAGE RATE
# Bank balances are multiplied by this number to calculate amount of
# interest to be added to bank accounts at interest timer interval.
# +--+
variable intrate .01
# +--+
# INTEREST TIMER INTERVAL
# Number of minutes between timer intervals.
# +--+
variable intinterval 10
# +--+
#
################################################################################
# Experts only below.
################################################################################
|
|
|
| Back to top |
|
 |
lee8oi Halfop
Joined: 04 Jun 2011 Posts: 63 Location: Michigan,United States.
|
Posted: Wed Sep 07, 2011 9:37 pm Post subject: Re: please help cant get it to work |
|
|
Did you try setting the channel flag for the channel? IE: .chanset #channel +bankd
Then the commands should start working in channel.
| wbk wrote: | hi lee8oi i have seen this working els where and thought i would try it out ( loving your work btw )
but i am having some problem with it
i am a bit of a noob and i do everything trial and error (self taught ) coz i lern better that was and dont like bothering people for help but i just cant get this to work
i managed to get it loaded
[01:14] Bankd 0.3beta Loaded
and managed to telnet into the bot and add 3 users to try it out first b4 i add every1 els in the room to the list
i know its running coz when i .banked list the 3 users showed up and thay are actual gaining points slowly i added 100 to start with and we are showing 107 108 and 109 now BUT
when i put .bank balance or any of the commands into my irc room nothing comes up at all
i have added my irc room where it says too but i cant see what im doing wrong
i am use in [01:14] --- Loading eggdrop v1.6.19+ctcpfix (Thu Sep 8 2011)
ANY HELP WOULD BE GREATLY APPRECIATED MY FRIEND THANKYOU <3
|
_________________ https://github.com/lee8oi
https://code.google.com/u/lee8oi/ |
|
| Back to top |
|
 |
wbk Voice
Joined: 07 Sep 2011 Posts: 3
|
Posted: Thu Sep 08, 2011 12:42 am Post subject: Re: please help cant get it to work |
|
|
[quote="lee8oi"]Did you try setting the channel flag for the channel? IE: .chanset #channel +bankd
Then the commands should start working in channel.
yes i did that as you can see by the scripy
--------------------------------------------------------------------
#
# Initial channel setup:
# (enables use of public info command in specified channel)
# .chanset #scene-inspired +bankd
#
# Public command syntax:
# .bank ?balance|transfer? ?args?
#
# DCC (partyline) command syntax:
# .bankd ?add|remove|check|list|edit? ?args?
--------------------------------------------------------------------
i also thought its because its hashed out with a # so i removed this and tried to load the bot again but i get an error saying
[06:24] Tcl error in file 'NewBot.conf':
[06:24] invalid command name ".chanset"
while executing
".chanset #scene-inspired +bankd"
(in namespace eval "::bankd" script line 44)
invoked from within
"namespace eval bankd {
################################################################################
#
# Copyright ©2011 lee8oi@gmail.com
#
# Th..."
(file "scripts/bankd.tcl" line 1)
invoked from within
"source scripts/bankd.tcl"
(file "NewBot.conf" line 47)
[06:24] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
so i thought by reading that the bot duz not recognize the format it adds the channel so looking on another script i got that asks to add a channel it was in this format
set +bankd {#scene-inspired}
it loaded fine with this and entered the irc room but still not working in when im entering the commands .bank
im shur its something stupid im missing thankyou for your time and help |
|
| Back to top |
|
 |
lee8oi Halfop
Joined: 04 Jun 2011 Posts: 63 Location: Michigan,United States.
|
|
| Back to top |
|
 |
wbk Voice
Joined: 07 Sep 2011 Posts: 3
|
Posted: Thu Sep 08, 2011 6:13 am Post subject: |
|
|
| lee8oi wrote: | | the .chanset command is run in the partyline. Its not run from the script. You have to connect to bot & login then enter: .chanset #channel +bankd |
:facepalm: told you i was a nob ummm noob
nice 1 lee8oi working perfect thankyou  |
|
| Back to top |
|
 |
lee8oi Halfop
Joined: 04 Jun 2011 Posts: 63 Location: Michigan,United States.
|
Posted: Tue Sep 27, 2011 11:24 am Post subject: New release 0.4.4 |
|
|
New release available on github. https://github.com/lee8oi/bankd/blob/master/bankd.tcl
Changes include:
1.Added configurable backupfile location/name.
2.Fixed nick case issue. User can now access account even if they change the case of their nick.
3.Added public command trigger configuration. Fixed public command help to show command syntax using current trigger instead of default trigger.
4.Added configurable public command trigger. _________________ https://github.com/lee8oi
https://code.google.com/u/lee8oi/ |
|
| Back to top |
|
 |
lee8oi Halfop
Joined: 04 Jun 2011 Posts: 63 Location: Michigan,United States.
|
Posted: Thu Sep 29, 2011 3:16 pm Post subject: New release 0.4.6 |
|
|
Switched pub_handler proc to use proper command bind instead of checking all channel msgs for command trigger.
Minor code cleanup/commenting. Added 'log interest payouts' config for enabling/disabling logging the interest payments paid on intervals. _________________ https://github.com/lee8oi
https://code.google.com/u/lee8oi/ |
|
| Back to top |
|
 |
weirdthall Voice
Joined: 20 Sep 2013 Posts: 1
|
Posted: Fri Sep 20, 2013 9:33 am Post subject: |
|
|
Sorry to necro this thread but I am having the exact same problem.
I have .chanset the bot correctly, it is working as I see the balances increase but no user commands work correctly in the channels.
Anyone able to offer any assistance?
Using eggdrop 1.6.21, bot version 0.4.6 (latest) on geekshed servers. |
|
| Back to top |
|
 |
seeN Voice
Joined: 16 Nov 2011 Posts: 2 Location: Interwebz
|
Posted: Sat Oct 12, 2013 10:56 pm Post subject: |
|
|
hi
i had the same bug. balance cmd was working but transfer not. to fix this and additionally ban hacking via enabling negative transfer amounts edit the following:
in
you have to change:
| Code: | set payee [lindex $textarr 3]
set amount [lindex $textarr 2]
if {$amount == ""} { |
to:
| Code: | set payee [string tolower [lindex $textarr 2]]
set amount [lindex $textarr 1]
if {$amount <= 0} { |
i have sent the author a pull request on github. |
|
| Back to top |
|
 |
|