Hi
I have this barbot called Sonja.
To order something you have to type: Bartender can i have a sprite please or Bartender give john and charles a beer.
On the second command the bot responds like: hey john and charles here a beer from Bullseye.
Now i would like to change "Bartender" into "Sonja" and that is where my problem is.
When ordering drinks for people from the nicklist it uses this code to check for the given nicks:
var %nicknum = $nick($chan,0)
var %nick1 = 1
while (%nicknum >= %nick1) {
if ($nick($chan,%nick1) isin $strip($1-)) {
var %nicklijst = $+(%nicklijst,$chr(32),$nick($chan,%nick1))
}
inc %nick1
}
When adding "Sonja" as a trigger it also gives Sonja a drink.
I would like it to skip Sonja as Sonja is the one who gives the drinks.
Here is the full code with sonja as the trigger:
On 1:text:*beer*:#:{
if (sonja == $strip($1)) {
var %nicknum = $nick($chan,0)
var %nick1 = 1
while (%nicknum >= %nick1) {
if ($nick($chan,%nick1) isin $strip($1-)) {
var %nicklijst = $+(%nicklijst,$chr(32),$nick($chan,%nick1))
}
inc %nick1
}
if (%nicklijst) {
if ($regex($1-,/(?<= |^)(?:i|me)(?= |$)/Si)) {
timer 1 2 $read($scriptdir\drinks\beerme.txt,t)
}
else {
timer 1 2 $read($scriptdir\drinks\beerlist.txt,t)
}
}
else {
timer 1 1 $read($scriptdir\drinks\beer.txt,t)
}
}
}
Thanks upfront for helping
Greetzz