This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Bankd "Just one of those ideas" New release v0.4.4

Support & discussion of released scripts, and announcements of new releases.
Post Reply
l
lee8oi
Halfop
Posts: 63
Joined: Sat Jun 04, 2011 2:05 pm
Location: Michigan,United States.
Contact:

Bankd "Just one of those ideas" New release v0.4.4

Post by lee8oi »

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
Last edited by lee8oi on Tue Sep 27, 2011 12:11 pm, edited 3 times in total.
w
wbk
Voice
Posts: 3
Joined: Wed Sep 07, 2011 7:42 pm

please help cant get it to work

Post by wbk »

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

Code: Select all

################################################################################
#
# 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.
################################################################################
l
lee8oi
Halfop
Posts: 63
Joined: Sat Jun 04, 2011 2:05 pm
Location: Michigan,United States.
Contact:

Re: please help cant get it to work

Post by lee8oi »

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
w
wbk
Voice
Posts: 3
Joined: Wed Sep 07, 2011 7:42 pm

Re: please help cant get it to work

Post by wbk »

[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
l
lee8oi
Halfop
Posts: 63
Joined: Sat Jun 04, 2011 2:05 pm
Location: Michigan,United States.
Contact:

Post by lee8oi »

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
w
wbk
Voice
Posts: 3
Joined: Wed Sep 07, 2011 7:42 pm

Post by wbk »

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 :D
l
lee8oi
Halfop
Posts: 63
Joined: Sat Jun 04, 2011 2:05 pm
Location: Michigan,United States.
Contact:

New release 0.4.4

Post by lee8oi »

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.
l
lee8oi
Halfop
Posts: 63
Joined: Sat Jun 04, 2011 2:05 pm
Location: Michigan,United States.
Contact:

New release 0.4.6

Post by lee8oi »

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.
w
weirdthall
Voice
Posts: 1
Joined: Fri Sep 20, 2013 9:29 am

Post by weirdthall »

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.
s
seeN
Voice
Posts: 2
Joined: Wed Nov 16, 2011 10:04 pm
Location: Interwebz

Post by seeN »

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

Code: Select all

"transfer" {
you have to change:

Code: Select all

set payee [lindex $textarr 3]
set amount [lindex $textarr 2]
if {$amount == ""} {
to:

Code: Select all

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.
Post Reply