egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bar script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
l.kleijn
Voice


Joined: 18 May 2014
Posts: 18

PostPosted: Sun Jan 06, 2019 1:30 pm    Post subject: Bar script Reply with quote

I'm searching for a script that if you say --> .pay cola <-- and the price is 1,50
and you have more money that it give cola so i need a script for this and then if you have 1,50 equal or higher that you can get it
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3577
Location: Mint Factory

PostPosted: Mon Jan 07, 2019 3:53 am    Post subject: Reply with quote

You will have to provide more info if want to see any results. For example how do you get the money in the fist place? What other stuff you want to "sell" ?
_________________
There are some that are wise and others that are otherwise! Wink
Back to top
View user's profile Send private message
l.kleijn
Voice


Joined: 18 May 2014
Posts: 18

PostPosted: Mon Jan 07, 2019 8:20 am    Post subject: Reply with quote

Code:

proc pub:pay {nick host hand chan arg} {
  global botnick
  set searchstring $arg
  set fname "bar.txt"
  set fp [open $fname "r"]
  set data [read -nonewline $fp]
  close $fp
  if {[string match *topic* [join $line]]} {
     lappend searchresult $line
  }
  if {[topic == "[lindex [split [join $searchresult] "|"] 0]"} {
  putserv "PRIVMSG Fujin :De prijs van de topic verandering is [lindex [split [join $searchresult] "|"] 1]"
  }
  set product [lindex $arg 0 end]
  set topic [lrange $arg 1 end]
  if {$product == "topic"} {
     if {[string tolower [lindex [split [join $$searchresult] "|"] 1]} {
        putserv "NOTICE $nick :You don't have enough money"
        return 0
  }
  set topicpay [lindex [split [join $searchresult] "|"] 1]
  set searchresult2 $arg
  set fname2 "money.txt"
  set fp2 [open $fname2 "r"]
  set data2 [read -nonewline $fp2]
  close $fp2
  if {[string match *$topicpay* [join $line2]]} {
     lappend searchresult2 $line2
  }
  putserv "PRIVMSG $nick :Calc $topicpay - [lindex [split [join $searchresult2] "|"] 1]"
}


The people get money when they join. in a txt file
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber