Есть предложения,что бы стелс взаимодействовал с гхостом,вот несколько предложений
1)Какая игра в данный момент Я часто вдалбливаю своим сокланам,что чтобы узнать какая щас игра набирает игроков на боте достаточно написать /whois + ник бота,но они всё равно не могут делать так(Типа долго вводить и т.д.)
Можно сделать комманду .g,которая пишет баттлу комманду /whois + [ник,забитый в прогу] и выводит полученное сообщение на канал
2)Проверить все игры Немного похожая комманда,только она позволяет узнать все игры,которые в данный момент онлайн Стелс пишет боту !ggs(Триггер нужно отдельно выбирать,надеюсь знаешь) и выводит полученное сообщение в чат
Больше пока не придумал,но забыл ещё одну идею,потом постараюсь вспомнить)
Сообщение отредактировал LordOrion - Вторник, 06.09.2011, 00:23
Больше пока не придумал,но забыл ещё одну идею,потом постараюсь вспомнить)
а что именно ты здесь придумал? что ты предложил это малая часть большой игровой машины которая работает на /j allstars где все буржуйские боты спамять в режими онлаин (или по команде ) созданные приватные игры ... это я описал твою "придуманную" идею ,а дальше ты вспомнишь только какую нибудь уже реализованную буржуями фичу которая будет крутиться на пхп и мискуеле =Р
а вообще если по делу можно не только написать /whois но и можно вприват боту написать !getgames(Триггер нужно отдельно выбирать,надеюсь знаешь) где он тебе в отличий от /whois скажет также гн приватной игры а если с помощью стеалсбота реализоват эту идею то я думаю это можно сделать как нибудь с помощью CustomCommands чтото наподобий .игры| послать команду !getgames в приват боту и написать её в чате |-1|False
В общем из всей этой беседы я сделал вывод: возможно стоит добавить функцию записи ответа сообщения от пользователя в модуле "Редактор Пользовательских Команд" (CCE) _ Правда в практической ценности данной функции пока не уверен, т.к. это будут довольно специфичные (редко используемые) команды. _ Но если сделаю, то сделаю нечто вроде:
Code
переменная %r_username в РПК(CCE) - получить ответ от игрока и вывести его в качестве этой переменной.
Пример использования будет:
Code
replay|/me %r_sa[i]res|-1|False Когда напишут боту .replay он дождется ответа от игрока sa[i]res и напишет через команду /me этот ответ.
на самом деле полезная вещь , используется на данный момент только на буржуиских ботах ,кланах и тптд и реализовать её с помощью costom comands неполучится , тут отдельный скрипт нужен
я видел как реализован такой скрипт, сидят на канале два бота - один стелс другой гхост, пишешь !list в общий чат, а стелс бот отвечат - такаято игра создана, столько то человек зашло в игру и столько то минут она висит в лобби. Хотелось бы тоже такой скрипт
'ghl '0.6 '&Ghost Host List:Call:Keeps track of your ghost bot and display the new games it hosted. '&games - dispaly current games(can be changed and disabled) '&40691 '&Please read the configurations comments and configure the plugin for your needs.:Please report all bugs/errors found.:Please suggest all you think would be great for the plugin on the plugin home topic. 'Assisted by: None
'// ======================================================================================================= '// Ghost Host List vinterval = 20 'Timer interval(seconds) vghost = "asppiter" 'Ghost's username vghostcommand = "!getgames" 'Command to whisper vdisplay = "New Game: %game(%used/%size)" 'New game display vdisplay2 = "No games available." 'No new games vcheck = 1 'Checks if bot is in channel and cancel whisp vinterval2 = 10 'Time ghost get to respond(seconds) vtimerdisplay = 0 'Use timer to display new games vtimerinterval = 20 'Time btw new game lists vcommanddisplay = 1 'Use command to display new games vcommandaccess = 0 'Access required to use display command vcommand = "games" 'Command to display new games vcommandspam = 5 'Anti-Spam seconds before command can be used again '// ======================================================================================================= '// There is no game in the lobby and there are %used2/%size2 other games in progress. '// Game [%game : %username : %used/%size : %minutes] is in the lobby and there are %used2/%size2 other games in progress. '// ======================================================================================================= Public ghlW, ghlL, ghlA ghlL = vdisplay2 ghlW = false ghlA = false
sub ghl_event_load() TimerInterval "ghl", "ghost", int(vinterval) TimerInterval "ghl", "respond", int(vinterval2) TimerInterval "ghl", "list", int(vtimerinterval) TimerInterval "ghl", "spam", int(vcommandspam) TimerEnabled "ghl", "ghost", true TimerEnabled "ghl", "respond", false TimerEnabled "ghl", "spam", false if int(vtimerdisplay) = 1 then TimerEnabled "ghl", "list", true else TimerEnabled "ghl", "list", false end sub
sub ghl_ghost_timer() if vcheck = 1 then if GetPositionByName(vghost) > 0 then exit sub AddQ "/w " & psD2 & vghost & " " & vghostcommand ghlW = true TimerEnabled "ghl", "respond", true TimerEnabled "ghl", "ghost", false end sub
sub ghl_respond_timer() ghlW = false TimerEnabled "ghl", "respond", false TimerEnabled "ghl", "ghost", true end sub
sub ghl_list_timer() if vcheck = 1 then if GetPositionByName(vghost) > 0 then ghlL = vdisplay2 ghlL = Replace(ghlL, "%used2", "0") ghlL = Replace(ghlL, "%size2", "5") end if end if dsp 1, ghlL, botvars.username, vbgreen end sub
sub ghl_spam_timer() ghlA = false TimerEnabled "ghl", "spam", false end sub
sub ghl_event_whisperfromuser(username, flags, message) if not ghlW then exit sub if not lcase(username) = lcase(vghost) then exit sub if instr(lcase(message), "there is no game in the lobby") then TimerEnabled "display", "list", false TimerEnabled "no", "respond", false TempSplit1 = split(message, " in the lobby and there are ")(1) TempSplit = split(TempSplit1, " other games in progress.")(0) Used2 = Split(TempSplit, "/")(0) Size2 = Split(TempSplit, "/")(1) ghlL = vdisplay2 ghlL = replace(ghlL, "%used2", Used2) ghlL = replace(ghlL, "%size2", Size2) if int(vtimerdisplay) = 1 then dsp 1, ghlL, botvars.username, vbgreen elseif instr(lcase(message), "is in the lobby") then TempSplit1 = Replace(message, "Game [", "") TempSplit = Split(TempSplit1, "] is")(0) Game = Split(TempSplit, " : ")(0) Username = Split(TempSplit, " : ")(1) Minutes = Split(TempSplit, " : ")(3) TempSplit = Split(TempSplit, " : ")(2) Used = Split(TempSplit, "/")(0) Size = Split(TempSplit, "/")(1) TempSplit1 = split(message, " in the lobby and there are ")(1) TempSplit = split(TempSplit1, " other games in progress.")(0) Used2 = Split(TempSplit, "/")(0) Size2 = Split(TempSplit, "/")(1) ghlL = vdisplay ghlL = replace(ghlL, "%game", Game) ghlL = replace(ghlL, "%username", Username) ghlL = replace(ghlL, "%used2", Used2) ghlL = replace(ghlL, "%size2", Size2) ghlL = replace(ghlL, "%used", Used) ghlL = replace(ghlL, "%size", Size) ghlL = replace(ghlL, "%minutes", Minutes) if int(vtimerdisplay) = 1 then dsp 1, ghlL, botvars.username, vbgreen end if TimerEnabled "ghl", "respond", false ghlW = false TimerEnabled "ghl", "ghost", true end sub
sub ghl_event_servererror(message) if not ghlW then exit sub if instr(lcase(message), " is not logged on.") then ghlW = false TimerEnabled "ghl", "ghost", true TimerEnabled "ghl", "respond", false end if end sub
sub ghl_event_usertalk(username, flags, message, ping) if ghlA then exit sub if int(vcommanddisplay) = 0 then exit sub getdbentry username, access, flags if access < vcommandaccess then exit sub if lcase(message) = lcase(BotVars.Trigger & vcommand) then ghlA = true if vcheck = 1 then if GetPositionByName(vghost) > 0 then ghlL = vdisplay2 ghlL = Replace(ghlL, "%used2", "0") ghlL = Replace(ghlL, "%size2", "5") end if end if dsp 1, ghlL, username, vbRed TimerEnabled "ghl", "spam", true end if end sub
'ghl '3.0 '&Ghost Host List:Call:Keeps track of your ghost bots and display the new games they hosted. '&games - dispaly current games(can be changed and disabled) '&40691 '&Please read the configurations comments and configure the plugin for your needs.:Please report all bugs/errors found.:Please suggest all you think would be great for the plugin on the plugin home topic.:All ghost bots must be on the stealthbot's friend list or else this will not work.:Multiple commands only works with whisper format. 'Assisted by: None
'// '// Ghost Host List 3 . 0 private const vinterval = 90 'Timer interval(seconds) for whispers to be sent private const vghost = "" 'Ghost's username seperate with | private const vghostcommand = "!getgames" 'Command to whisper seperate with | private const vghostformat = 1 '0 = FriendList - 1 = Wisper private const vdisplayformat = 1 '1 = Normal - 2 = Emote private const vdisplay = "%game(%used/%size)" 'New game display private const vdisplay2 = "No games available." 'No new games private const vtimerdisplay = 0 'Use timer to display new games private const vtimerinterval = 0 'Time btw new game lists private const vcommanddisplay = 1 'Use command to display new games private const vcommandaccess = -1 'Access required to use display command private const vcommand = "games" 'Command to display new games private const vcommandspam = 5 'Anti-Spam seconds before command can be used again private const vdistance = 10 '// '// Game [%game : %username : %used/%size : %minutes] is in the lobby and there are %used2/%size2 other games in progress. '// %spots - Gives you the number of spots that is open in the game can be used in vdisplay. '// %rb - How many registered bots in the plugin. '// %rc - How many registered commands in the plugin. '// public ghlL, ghlA, ghlO, ghlB ghlL = vdisplay2 ghlO = "" ghlA = false ghlB = false
sub ghl_distance_timer() TimerEnabled "ghl", "list", true TimerEnabled "ghl", "distance", false end sub
sub ghl_ghost_timer() dim TempCount : TempCount = 0 for x = 0 to UBound(Split(vghost, "|")) if GetPositionByName(Split(vghost, "|")(x)) > 0 then TempCount = TempCount + 1 end if next ghlO = ghlL ghlL = vdisplay2 ghlB = true 'if Int(UBound(Split(vghost, "|")) + 1) = Int(TempCount) then exit sub if vghostformat = 0 then AddQ "/f m " & vghostcommand else for x = 0 to UBound(Split(vghost, "|")) dim TempStr if x <= UBound(Split(vghostcommand, "|")) then TempStr = Split(vghostcommand, "|")(x) else TempStr = vghostcommand end if dsp 3, TempStr, Split(vghost, "|")(x), vbGreen next end if end sub
sub ghl_list_timer() dim Games if not ghlL = vdisplay2 then Games = "Games: " & left(ghlL, len(ghlL) - 2) else Games = vdisplay2 end if If ghlB and Not ghlO = vdisplay2 Then Games = "Games: " & left(ghlO, len(ghlO) - 2) dsp vdisplayformat, Games, username, vbRed end sub
sub ghl_spam_timer() ghlA = false TimerEnabled "ghl", "spam", false end sub
sub ghl_event_whisperfromuser(username, flags, Message, Ping) dim TempBoolean : TempBoolean = false For x = LBound(Split(vghost, "|")) to UBound(Split(vghost, "|")) if LCase(Username) = LCase(Split(vghost, "|")(x)) then TempBoolean = true exit for end if next if not TempBoolean then exit sub ghlB = false if instr(lcase(message), "is in the lobby") then dim TempString TempSplit1 = Replace(message, "Game [", "") TempSplit = Split(TempSplit1, "] is")(0) Game = Split(TempSplit, " : ")(0) Username = Split(TempSplit, " : ")(1) Minutes = Split(TempSplit, " : ")(3) TempSplit = Split(TempSplit, " : ")(2) Used = Split(TempSplit, "/")(0) Size = Split(TempSplit, "/")(1) Spots = Int(Int(Size) - Int(Used)) TempSplit1 = split(message, " in the lobby and there are ")(1) TempSplit = split(TempSplit1, " other games in progress.")(0) Used2 = Split(TempSplit, "/")(0) Size2 = Split(TempSplit, "/")(1) TempString = vdisplay TempString = replace(TempString, "%rb", UBound(Split(vghost, "|"))) TempString = replace(TempString, "%rc", UBound(Split(vghostcommand, "|"))) TempString = replace(TempString, "%game", Game) TempString = replace(TempString, "%username", Username) TempString = replace(TempString, "%used2", Used2) TempString = replace(TempString, "%size2", Size2) TempString = replace(TempString, "%used", Used) TempString = replace(TempString, "%size", Size) TempString = replace(TempString, "%minutes", Minutes) TempString = replace(TempString, "%spots", Spots) 'if InStr(ghlO, Game) <= 0 then dsp vdisplayformat, "New Game: " & TempString, botvars.username, vbgreen if ghlL = vdisplay2 then ghlL = TempString & ", " else ghlL = ghlL & TempString & ", " end if end sub
sub ghl_event_usertalk(username, flags, message, ping) if ghlA then exit sub if int(vcommanddisplay) = 0 then exit sub getdbentry username, access, flags if access < vcommandaccess then exit sub if lcase(message) = lcase(BotVars.Trigger & vcommand) then if vcommandspam > 0 then ghlA = true TimerEnabled "ghl", "spam", true end if dim Games if not ghlL = vdisplay2 then Games = "Games: " & left(ghlL, len(ghlL) - 2) else Games = vdisplay2 end if If ghlB and Not ghlO = vdisplay2 Then Games = "Games: " & left(ghlO, len(ghlO) - 2) dsp vdisplayformat, Games, username, vbRed end if end sub
Сообщение отредактировал r000t - Среда, 15.02.2012, 15:48
sub event_load() if (lenb(getsettingsentry("update_int")) = 0) then call writesettingsentry("update_int", 15) update_int = getsettingsentry("update_int") if (lenb(getsettingsentry("ghosts")) = 0) then call writesettingsentry("ghosts", "asppiter") ghosts = getsettingsentry("ghosts") if (lenb(getsettingsentry("ghost_cmds")) = 0) then call writesettingsentry("ghost_cmds", "!getgames") ghost_cmds = getsettingsentry("ghost_cmds") if (lenb(getsettingsentry("cmd_format")) = 0) then call writesettingsentry("cmd_format", 0) cmd_format = getsettingsentry("cmd_format") if (lenb(getsettingsentry("format")) = 0) then call writesettingsentry("format", 1) format = getsettingsentry("format") if (lenb(getsettingsentry("str_each")) = 0) then call writesettingsentry("str_each", "%game(%used/%size)") str_each = getsettingsentry("str_each") if (lenb(getsettingsentry("str_false")) = 0) then call writesettingsentry("str_false", "No games available.") str_false = getsettingsentry("str_false") if (lenb(getsettingsentry("list_new")) = 0) then call writesettingsentry("list_new", 1) list_new = getsettingsentry("list_new") if (lenb(getsettingsentry("list_int")) = 0) then call writesettingsentry("list_int", 0) list_int = getsettingsentry("list_int") if (lenb(getsettingsentry("cmd")) = 0) then call writesettingsentry("cmd", "games") cmd = getsettingsentry("cmd") if (lenb(getsettingsentry("anti_spam")) = 0) then call writesettingsentry("anti_spam", 5) anti_spam = getsettingsentry("anti_spam") if (lenb(getsettingsentry("que_int")) = 0) then call writesettingsentry("que_int", 2) que_int = getsettingsentry("que_int") if (lenb(getsettingsentry("mod_list")) = 0) then call writesettingsentry("mod_list", "-ar|-ap") mod_list = getsettingsentry("mod_list") if (lenb(getsettingsentry("ghost_left")) = 0) then call writesettingsentry("ghost_left", 0) ghost_left = getsettingsentry("ghost_left") call createobj("longtimer", "update") if int(update_int) > 0 then update.interval = int(update_int) else update.interval = 15 update.enabled = true if int(list_int) > 0 then call createobj("longtimer", "gamelist") gamelist.interval = int(list_int) gamelist.enabled = true end if if int(anti_spam) > 0 then call createobj("longtimer", "antispam") antispam.interval = int(anti_spam) end if call createobj("longtimer", "que") if int(que_int) > 0 then que.interval = int(que_int) que.enabled = false list = str_false temp_list = "" bool(0) = false bool(1) = false bool(2) = false dim command set command = opencommand(lcase(cmd)) if ((command is nothing)) then set command = createcommand(lcase(cmd)) with command .requiredrank = 0 .description = "Command to list available games" .save end with end if end sub
sub update_timer() bool(2) = true dim temp_int temp_int = 0 for x = 0 to ubound(split(ghosts, "|")) if lenb(channel.getuser(split(ghosts, "|")(x)).name) > 0 then temp_int = temp_int + 1 end if next temp_list = list list = str_false bool(1) = true if int(ubound(split(ghosts, "|")) + 1) = int(temp_int) then exit sub if cmd_format = 0 then addq "/f m " & ghost_cmds bool(2) = false elseif cmd_format = 1 then qint = 0 update.enabled = false call que_timer() end if end sub
sub que_timer() dim temp_str, temp_ghost if qint <= ubound(split(ghost_cmds, "|")) then temp_str = split(ghost_cmds, "|")(qint) temp_ghost = split(ghosts, "|")(qint) else temp_str = ghost_cmds temp_ghost = ghosts end if if lenb(channel.getuser(temp_ghost).name) <= 0 then dsp 3, temp_str, temp_ghost, vbgreen qint = qint + 1 if qint > ubound(split(ghosts, "|")) then bool(2) = false update.enabled = true que.enabled = false else if que_int <= 0 then call que_timer() else que.enabled = true end if end sub
sub gamelist_timer() dim games if not list = str_false then games = "Games: " & left(list, len(list) - 2) else games = str_false if bool(1) and not temp_list = str_false then games = "Games: " & left(temp_list, len(temp_list) - 2) dsp format, games, botvars.username, vbgreen end sub
sub antispam_timer() bool(0) = false antispam.enabled = false end sub
sub event_whisperfromuser(username, flags, message, ping) for x = 0 to ubound(split(ghosts, "|")) if lcase(username) = lcase(split(ghosts, "|")(x)) then bool(1) = false if instr(lcase(message), "is in the lobby") then dim temp_str, game, minutes, used, size, spots, used2, size2, mods temp_str = Split(replace(message, "Game [", ""), "] is")(0) game = split(temp_str, " : ")(0) username = split(temp_str, " : ")(1) minutes = split(temp_str, " : ")(3) temp_str = split(temp_str, " : ")(2) used = split(temp_str, "/")(0) size = split(temp_str, "/")(1) spots = int(Int(size) - int(used)) temp_str = split(split(message, " in the lobby and there are ")(1), " other games in progress.")(0) used2 = split(temp_str, "/")(0) size2 = split(temp_str, "/")(1) mods = vbnullstring if instr(mod_list, "|") > 0 then for y = 0 to ubound(split(mod_list, "|")) if instr(lcase(game), lcase(split(mod_list, "|")(y))) > 0 then mods = mods & split(mod_list, "|")(y) end if next elseif len(mod_list) > 0 then if instr(lcase(game), lcase(split(mod_list, "|")(y))) > 0 then mods = mods & split(mod_list, "|")(y) end if end if temp_str = str_each temp_str = replace(temp_str, "%rb", ubound(split(ghosts, "|"))) temp_str = replace(temp_str, "%rc", ubound(split(ghost_cmds, "|"))) temp_str = replace(temp_str, "%game", game) temp_str = replace(temp_str, "%username", username) temp_str = replace(temp_str, "%used2", used2) temp_str = replace(temp_str, "%size2", size2) temp_str = replace(temp_str, "%used", used) temp_str = replace(temp_str, "%size", size) temp_str = replace(temp_str, "%minutes", minutes) temp_str = replace(temp_str, "%spots", spots) temp_str = replace(temp_str, "%mod", mods) if instr(temp_list, game) <= 0 and instr(list, game) <= 0 and int(list_new) = 1 then dsp format, "New Game: " & temp_str, botvars.username, vbgreen if list = str_false and instr(list, game) <= 0 then list = temp_str & ", " elseif instr(list, game) <= 0 then list = list & temp_str & ", " end if end if exit for end if next end sub
sub event_userleaves(username, flags) if int(ghost_left) = 0 or instr(lcase(ghosts), lcase(username)) <= 0 or bool(2) then exit sub if instr(ghosts, "|") > 0 then for x = 0 to ubound(split(ghosts, "|")) if lcase(split(ghosts, "|")(x)) = lcase(username) then qint = 0 end if next else qint = 0 end if dim temp_str, temp_ghost if qint <= ubound(split(ghost_cmds, "|")) then temp_str = split(ghost_cmds, "|")(qint) temp_ghost = split(ghosts, "|")(qint) else temp_str = ghost_cmds temp_ghost = ghosts end if dsp 3, temp_str, temp_ghost, vbgreen update.enabled = false update.enabled = true end sub
sub event_command(command) if lcase(command.name) = lcase(cmd) then if command.isvalid and command.hasaccess and not bool(0) then dim games if bool(1) then if temp_list = str_false or len(temp_list) <= 0 then games = str_false else games = "Games: " & left(temp_list, len(temp_list) - 2) else if list = str_false then games = str_false else games = "Games: " & left(list, len(list) - 2) end if if command.username = botvars.username then dsp 4, games, botvars.username, vbgreen else dsp format, games, botvars.username, vbgreen if int(anti_spam) > 0 then bool(0) = true antispam.enabled = true end if end if end if end sub
нужно только изменить в начале кода ник гхост бота на своего и триггер для getgames
не на чистый, стояли еще скрипты и плагины до этого if (lenb(getsettingsentry("ghosts")) = 0) then call writesettingsentry("ghosts", "asppiter") ghosts = getsettingsentry("ghosts") - в этой строке вместо asppiter ник своего гхоста if (lenb(getsettingsentry("ghost_cmds")) = 0) then call writesettingsentry("ghost_cmds", "!getgames") - в этой строке свой триггер с getgames и не забудь добавить стелсбота в админы гхоста, т.к. команду !getgames гхост слушает тока от админов