mIRC Home    About    Download    Register    News    Help

Print Thread
#115536 27/03/05 05:37 AM
Joined: Feb 2005
Posts: 27
O
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Feb 2005
Posts: 27
Hello again.
Sorry not sure how to ask this as i have no clue lol.
I need a way for ppl to add money to ppl %money-accounts.
In Variables it say this - %moneyomen_253 3011- .
I just need a way for anyone to add money to any account.

IE-
/notice <botnic> !Credit <nic> 500 money.

Then have the bot msg them back with

IE-

msg - You have Successfully help <the nic that got the money> in there #Battle with 500 money!

You can have as many ppl as possable - /notice <botnic> !Credit <nic> 500 money.- But they cant do it again for 24 hours.

IE-
msg - <nic> Sorry you have aready help <nic> today you must wait 24 hours!

I'm not sure if any of this can be done.
Sorry to be a pain..
Thx for your time and help here..

smile

#115537 27/03/05 10:54 AM
Joined: Feb 2005
Posts: 27
O
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Feb 2005
Posts: 27
Heya all ..
It would sort of look like this

on *:NOTICE:!Credit *:?: {
msg $nick You Have Successfully Helped $2 In Their Battle With 500 Money!
return
}
if ( %credit [ $2 ] ) {
inc ( %money [ $2 ] 500 )
}
if ( %credit [ $2] == on ) {
msg $nick Sorry but you have to wait 24 hours To help credit $2 's account agian!
set -u86400 %credit [ $2 ] on
}

LOL - sorry but i have no clue on what I'm doing here..
The only thing that works is the notice bit.
As for the rest lol no i had no luck lol..
Any idea's ??
Thx for your time and help..

#115538 27/03/05 02:17 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
place these using alt-r/file/new

I wasnt sure if u wanted the person to be able to enter a money amount or if its hard coded to 500

This one lets the nick type /NOTICE BOTNICK !CREDIT BOB 789
* The nick must also be in a channel of the bot, if this is not needed then remove from line 2 "$comchan($2,0) && "
Code:
on *:NOTICE:!Credit &amp; &amp;:{
  tokenize 32 $strip($1-)
  if $comchan($2,0) &amp;&amp; ($3 isnum 1-) {
    if ($($+(%,money.given.by.,$nick,.to.,$2),2)) {
      msg $nick Sorry but you have to wait a 24 hour period before helping credit $2 $+ 's account again!
    }
    else {
      inc $+(%,money,$2) $int($3)
      set -u86400 $+(%,money.given.by.,$nick,.to.,$2) $int($3)
      msg $nick - You have Successfully helped $2 in their #Battle with $int($3) money!
    }
  }
  else {
    msg $nick Sorry but either $2 is not in a channel or your money value is below 1!
  }
}


This one lets the nick type /NOTICE BOTNICK !CREDIT BOB
* The nick must also be in a channel of the bot, if this is not needed then remove from line 2 "$comchan($2,0) && "
Code:
on *:NOTICE:!Credit &amp;:{
  tokenize 32 $strip($1-)
  if $comchan($2,0) &amp;&amp; (1) {
    if ($($+(%,money.given.by.,$nick,.to.,$2),2)) {
      msg $nick Sorry but you have to wait a 24 hour period before helping credit $2 $+ 's account again!
    }
    else {
      inc $+(%,money,$2) 500
      set -u86400 $+(%,money.given.by.,$nick,.to.,$2) 500
      msg $nick - You have Successfully helped $2 in their #Battle with 500 money!
    }
  }
  else {
    msg $nick Sorry but $2 is not in a channel
  }
}

#115539 28/03/05 03:47 AM
Joined: Feb 2005
Posts: 27
O
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Feb 2005
Posts: 27
Just testing them now ..
They not working..
Trying to fix them up with what I have ...
Not sure what the hell I'm doing lol..
Thx for your time and help here..
cool

#115540 28/03/05 04:27 AM
Joined: Feb 2005
Posts: 27
O
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Feb 2005
Posts: 27
Thx so much for your time and help here...
I got it going with this --

on *:NOTICE:!Credit *:?: {
if ($($+(%,money.given.by.,$nick,.to.,$2),2)) {
msg $nick Sorry but you have to wait a 24 hour period before helping credit $2 $+ 's account again!
}
else {
inc $+(%,money,$2) 500
set -u86400 $+(%,money.given.by.,$nick,.to.,$2) 500
msg $nick - You have Successfully helped $2 in their #Battle with 500 money!
}
}


Thx again for your help here....
wink

#115541 28/03/05 04:38 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
ooops
mine >>> on *:NOTICE:!Credit &:{
yours >>> on *:NOTICE:!Credit *:?:{

I missed the ?: to make it see its Pm

I typed mine in here straight into the forum so neverchecked it sorry, & in mine means one word while * in yours means any number of words, either well do, but yours is slightly better i guess as it allows other rubbish to be on the line as well. (me personal i dont like allowing extra rubbisg, the command should be entered correctly or i reject it, but thats just me)

Happy I could help.

#115542 28/03/05 05:04 AM
Joined: Feb 2005
Posts: 27
O
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Feb 2005
Posts: 27
Hey thats cool thx for your help ..
thx alot smile

whats the max set -u86400 i can have??
it works but it not for 24 hours
can i set it to 1day ???

Last edited by omen_253; 28/03/05 06:21 AM.
#115543 28/03/05 07:31 AM
Joined: Feb 2005
Posts: 27
O
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Feb 2005
Posts: 27
hey m8 , is there a max to set -u86400 ??
because its not doing it for 24 hours ??
can i set it to 1 day ??

crazy

#115544 28/03/05 12:51 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Thats is 24 hours 24x60x60 to get to seconds.

Are you closing mirc down within this time? Becuase any number issued with a -u is saved only in memory, so it erased if you shut mirc down.


Link Copied to Clipboard