Simple Vending

By JOBNED1 on Feb 16, 2008

Ok I made this simple vending for my bot. You use it threw Private Message so it looks nicer in the rooms. /msg Nick !vend #Room Person Item - Vends the Item to the Person in the #Room. lol simple. Also if you want to add colors you can just highlight the Person or Item with your mouse before adding the colors so they don't run on.

Edit: I added a help file. !vend help - calls it up.

;###########################
; JOBNED1's Simple Vending
;###########################

on *:text:!vend*:?:{
  if ( $2 != help ) { 
    set %chan $2
    set %person $3
    set %item $4-
    /msg %chan %person $nick has bought you a(n) %item
    /describe %chan gives %person a(n) %item for $nick
    /msg $nick %item vended to %person in %chan successfully
  }
  else {
    /msg $nick !vend #Room Person Item
    /msg $nick #Room - A room where that I am in
    /msg $nick Person - the perosn you want to give an item
    /msg $nick Item - Item you want to give
    /msg $nick !vend help
    /msg $nick this calls up the help file
  }
}

Comments

Sign in to comment.
Noutrious   -  Feb 20, 2008

mountaindew, thanks - something new.

 Respond  
guest598594   -  Feb 19, 2008

($mid($2,1,1) != $chr(35)

i would do

if ($left($2,1) !isin $chantypes)) {
 Respond  
napa182   -  Feb 18, 2008

what i mean by be there is if $2 $3 $4 are there or not

 Respond  
JOBNED1   -  Feb 18, 2008

1 - simple you choose items that don\'t have to be there.
2 - I find Vars simpler to work with that is the reason I use them.

 Respond  
napa182   -  Feb 18, 2008

i would have to agree with Noutrious on the checking if those thing are there or not. and also why set var\'s at all on this?? just do..

on *:text:!vend*:?:{
  if ($2 != help) {
    if (!$4-) || ($mid($2,1,1) != $chr(35)) { .msg $nick !Vend #chan nick item | return }
    if ($3 !ison $2) { .msg $nick Sorry But $3 is not on Channel $2 | return }
    else { .msg $2 $3 $nick has bought you a(n) $4- | .describe $2 gives $3 a(n) $4- for $nick | .msg $nick $4- vended to $3 in $2 successfully }
  }
  elseif ($2 == help) { .msg $nick !vend #Room Person Item | .msg $nick #Room - A room where that I am in | .msg $nick Person - the perosn you want to give an item | .msg $nick Item - Item you want to give | .msg $nick !vend help | .msg $nick this calls up the help file }
}
 Respond  
pokemaster23   -  Feb 16, 2008

LOL

 Respond  
JOBNED1   -  Feb 16, 2008

I already use it in a bot of my own so I don\'t need the alias form but thanks for the tid bit it might help someone else when they look at this.

 Respond  
Noutrious   -  Feb 16, 2008

If you use it for yourself, use alias vend { instead on on text!
Note: $2 will be $1 then!

 Respond  
JOBNED1   -  Feb 16, 2008

Well more or less it is simple so any item can be used but it is also short my total characters above was like 311 characters while the actual script was only 225 characters. as for extras really you should be putting this in a bot if you want to use it yourself. Plus people won\'t know it is there unless you tell them anyway. so checking for if your in said room shouldn\'t be needed.

 Respond  
Noutrious   -  Feb 16, 2008

|| ($me !ison $chan) could be added aswell..

 Respond  
Noutrious   -  Feb 16, 2008

Wheres the checking if those things exists?

on *:text:!vend*:?: {
if (!$4-) || ($mid($2,1,1) != $chr(35)) { msg $nick !Vend #chan nick item | halt }
... other stuff here ...
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.