StealthBot.net: ghl script problem. - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ghl script problem. ghl script problem

#1 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 26, 2009 - 05:13 PM

Hello guys. i got a problem whit ghl script.

my script looks like this:

Quote

'ghl
'1.0

script("Name") = "ghl"
script("Author") = "Tuck"
script("Major") = 3
script("Minor") = 0
script("Revision") = 4
script("Description") = "Keeps track of your ghost bot(s) and display the new game(s) it/they hosted."

'// Game [%game : %username : %used/%size : %minutes] is in the lobby and there are %used2/%size2 other games in progress.

private const update_int = 45 'Update list every interval
private const ghosts = "B2K-ClanBot" 'Ghost Bot(s) username seperated with "|"
private const ghost_cmds = "!getgames" 'Ghost Bot(s) command(s) seperate with "|" (cmd_format must be 1 with multiple)
private const cmd_format = 1 '0 = FriendList - 1 = Wisper
private const format = 2 '1 = Normal - 2 = Emote
private const str_each = "%game(%used/%size)" 'Each game string when list is available
private const str_false = "No games available." 'No list available
private const list_new = 1 'announce new games
private const list_int = 0 'Auto spam list in channel, 0 = disabled
private const cmd_list = 1 'Use command to list games
private const cmd = "games" 'Command to list available games
private const cmd_access = -1 'Access required to list games with command
private const anti_spam = 5 'Anti-spam secure list games command, 0 = disabled
private const que_int = 2 'Anti-flood secure flooding with que, 0 = disabled
private list, temp_list, bool(1), qint

sub ghl_event_load()
call createobj("longtimer", "update")
if int(update_int) > 0 then update.interval = int(update_int) else update.interval = 45
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 = que_int
list = str_false
temp_list = ""
bool(0) = false
bool(1) = false
end sub

sub update_timer()
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
elseif cmd_format = 1 then
qint = 0
update.enabled = false
call que_timer()
end if
end sub

sub que_timer()
dim temp_str
if qint <= ubound(split(ghost_cmds, "|")) then temp_str = split(ghost_cmds, "|")(int(qint)) else temp_str = ghost_cmds
dsp 3, temp_str, split(ghosts, "|")(qint), vbgreen
qint = qint + 1
if qint > ubound(split(ghosts, "|")) then
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 ghl_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
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)
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)
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 ghl_event_usertalk(username, flags, message, ping)
if bool(0) or int(cmd_list) = 0 or not lcase(message) = lcase(botvars.trigger & cmd) then exit sub
getdbentry username, access, flags
if access < vcommandaccess then exit sub
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
dsp format, games, botvars.username, vbgreen
if int(anti_spam) > 0 then
bool(0) = true
antispam.enabled = true
end if
end sub


and this error come:

[06:06:19 PM] Scripting runtime error '501' in Rotation: (line 502; column 0)
[06:06:19 PM] Ugyldig tilordning: 'cmd'
[06:06:20 PM] Offending line: >>
[06:06:20 PM] Scripting runtime error '501' in Rotation: (line 502; column 0)
[06:06:20 PM] Ugyldig tilordning: 'cmd'
[06:06:20 PM] Offending line: >>

this is in norwegian, but there stay there is error whit "cmd"
im not sure.

plz help.

-Gulf80-

This post has been edited by Gulf80: December 26, 2009 - 05:14 PM


#2 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 26, 2009 - 10:33 PM

Nobody know? :(

plz

-Gulf80-

#3 User is offline   7thAce Icon

  • Find me elsewhere (Inactive)
  • Icon
  • Group: Tech Support Moderators
  • Posts: 1,292
  • Joined: August-18 09

Posted December 26, 2009 - 10:44 PM

Don't bump your topics. It's against the board rules. It's only 5 hours old, give us some time...
Anyway, why is this a plugin? You were supposed to put this in your scripts folder. Remove the 'ghl and '1.0 from the top and move the file to your scripts folder.
@Neco - Nice catch - Didn't see that.
Posted Image
7thAce.no-ip.org: Posted Image
Official SB Tech @ Clan SBs USEast
Just a note to all you people who want to give Tech Support: Post with correct info (only - no info is better than wrong info), contribute to the topic, and be clear (the more explanation, the better).

#4 User is online   Novynn Icon

  • Silver Member
  • PipPipPipPipPip
  • Group: Senior Members
  • Posts: 873
  • Joined: October-07 09

Posted December 26, 2009 - 10:59 PM

Are you sure GHL is causing the problem?

It says "Rotation" in the error message and anyway, the plugin script you supplied cannot possible have an error because it does not have 502 lines of code.

#5 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 27, 2009 - 12:16 AM

okay, im sorry, was not really for bumb, but but, i will not do agen.

and, i have remove the ration etc. but like u guys say i need add the script in script folder, but then nothing happend? what i need do to active it then?

Thx for anyhelp.

-Gulf80-

#6 User is offline   7thAce Icon

  • Find me elsewhere (Inactive)
  • Icon
  • Group: Tech Support Moderators
  • Posts: 1,292
  • Joined: August-18 09

Posted December 27, 2009 - 12:40 AM

By "ration" do you mean "Rotation"? There's nothing you have to do to "activate" a script.
Posted Image
7thAce.no-ip.org: Posted Image
Official SB Tech @ Clan SBs USEast
Just a note to all you people who want to give Tech Support: Post with correct info (only - no info is better than wrong info), contribute to the topic, and be clear (the more explanation, the better).

#7 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 27, 2009 - 12:43 AM

View Post7thAce, on 27 December 2009 - 12:40 AM, said:

By "ration" do you mean "Rotation"? There's nothing you have to do to "activate" a script.


yes, sorry spell mistake.

ehm... nothing to do active a script??? beocuse i have add it to the script map, and get online bot, and try do .games and all nothing work....

any idea?

-Gulf80-

#8 User is offline   7thAce Icon

  • Find me elsewhere (Inactive)
  • Icon
  • Group: Tech Support Moderators
  • Posts: 1,292
  • Joined: August-18 09

Posted December 27, 2009 - 12:52 AM

Have you reloaded scripts? (Scripting > Reload scripts)
Posted Image
7thAce.no-ip.org: Posted Image
Official SB Tech @ Clan SBs USEast
Just a note to all you people who want to give Tech Support: Post with correct info (only - no info is better than wrong info), contribute to the topic, and be clear (the more explanation, the better).

#9 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 27, 2009 - 12:56 AM

yes.. and still dont work....

#10 User is online   Ribose Icon

  • Fire wants to be free.
  • Icon
  • Group: Global Moderators
  • Posts: 282
  • Joined: July-31 09

Posted December 27, 2009 - 01:44 AM

Error 501 is "Illegal assignment". Since the error message you give is not in the script you pasted, I don't know much more than what MSDN tells me about error 501:

Quote

You attempted to use a read-only identifier in the left-hand side of an assignment operation. You cannot assign a value to a read-only identifier.

To correct this error:
  • Use read-only identifiers in the right-hand side of an assignment operation only.


Also, stop sounding extremely angry in your posts and do not ever PM me about posts (I'll eventually read the forum...), it doesn't help us understand any better...
~Ribose
[ Download ] [ Wiki ] [ Support ] [ Scripting ]
[ Chrome ] [ Notepad++ ] [ fedora ]
[ Homepage ] [ BNLS ♯ ]

#11 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted December 27, 2009 - 05:45 AM

That's exactly why I didn't respond to your PMs or this post; you PM'd me twice and you kept bumping your topic. I don't like being hounded and I most definitely won't reply any faster.

What did you edit in this script?

#12 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 27, 2009 - 11:31 AM

okay buys and girls :) i not will do agen.
Sorry.

but, now i finaly got my script to work abit and it looks like this:

Quote

script("Name") = "ghl"
script("Author") = "Tuck"
script("Major") = 3
script("Minor") = 0
script("Revision") = 4
script("Description") = "Keeps track of your ghost bot(s) and display the new game(s) it/they hosted."

'// Game [%game : %username : %used/%size : %minutes] is in the lobby and there are %used2/%size2 other games in progress.

private const update_int = 20 'Update list every interval
private const ghosts = "B2k-ClanBot" 'Ghost Bot(s) username seperated with "|"
private const ghost_cmds = "!getgames" 'Ghost Bot(s) command(s) seperate with "|" (cmd_format must be 1 with multiple)
private const cmd_format = 0 '0 = FriendList - 1 = Wisper
private const format = 1 '1 = Normal - 2 = Emote
private const str_each = "%game(%used/%size)" 'Each game string when list is available
private const str_false = "No games available." 'No list available
private const list_new = 1 'announce new games
private const list_int = 0 'Auto spam list in channel, 0 = disabled
private const cmd_list = 1 'Use command to list games
private const cmd = "games" 'Command to list available games
private const cmd_access = -1 'Access required to list games with command
private const anti_spam = 5 'Anti-spam secure list games command, 0 = disabled
private const que_int = 2 'Anti-flood secure flooding with que, 0 = disabled
private list, temp_list, bool(1), qint

sub event_load()
call createobj("longtimer", "update")
if int(update_int) > 0 then update.interval = int(update_int) else update.interval = 45
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 = que_int
list = str_false
temp_list = ""
bool(0) = false
bool(1) = false
end sub

sub update_timer()
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
elseif cmd_format = 1 then
qint = 0
update.enabled = false
call que_timer()
end if
end sub

sub que_timer()
dim temp_str
if qint <= ubound(split(ghost_cmds, "|")) then temp_str = split(ghost_cmds, "|")(int(qint)) else temp_str = ghost_cmds
dsp 3, temp_str, split(ghosts, "|")(qint), vbgreen
qint = qint + 1
if qint > ubound(split(ghosts, "|")) then
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
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)
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)
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_usertalk(username, flags, message, ping)
if bool(0) or int(cmd_list) = 0 or not lcase(message) = lcase(botvars.trigger & cmd) then exit sub
getdbentry username, access, flags
if access < vcommandaccess then exit sub
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
dsp format, games, botvars.username, vbgreen
if int(anti_spam) > 0 then
bool(0) = true
antispam.enabled = true
end if
end sub


But... when i get bot online he start like this:

[12:23:55 PM] <To your friends> !getgames
[12:23:55 PM] <From B2K-ClanBot> There is no game in the lobby and there are 0/3 other games in progress.
[12:24:15 PM] <To your friends> !getgames
[12:24:15 PM] <From B2K-ClanBot> There is no game in the lobby and there are 0/3 other games in progress.

and when i make a game this come:

[12:24:36 PM] <To your friends> !getgames
[12:24:44 PM] <From B2K-ClanBot> Game [Just A Test : 4k.BlackraNger : 0/12 : 0m] is in the lobby and there are 0/3 other games in progress.
[12:24:45 PM] <B2K-InfoBot> New Game: Just A Test(0/12)

and the problem is.. when i do .games then the bot only say:

[12:23:47 PM] <4k.BlackraNger> .games
[12:23:47 PM] <B2K-InfoBot> No games available.

but, there is game available and the bot sayd: [12:24:45 PM] <B2K-InfoBot> New Game: Just A Test(0/12) so... the bot know there is one game.

any sugestion?

-Gulf80-

#13 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 29, 2009 - 12:34 AM

nobody know what to do?

#14 User is offline   Gulf80 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 38
  • Joined: October-08 09

Posted December 30, 2009 - 04:21 PM

View PostGulf80, on 29 December 2009 - 12:34 AM, said:

nobody know what to do?



I have fix this.

now all works perfect!

//resloved!!!

-Gulf80-

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users