StealthBot.net: Ghost-Forwarding - StealthBot.net

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Ghost-Forwarding forward ghost commands through stealth

#1 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted April 28, 2010 - 05:39 PM

Ghost-Forwarding (Please read entirely before posting that something is broke)

Author:
AwaKening

Version: 2.1.3

Description:
Ghost++ channel commands can be forwarded from your bot to your ghost. The purpose is to eliminate the need to add ghost access to multiple users and instead let Stealth handle all the access reqs. Also eliminates the need to specify a gamename unless you want to. The script will auto-assign a gamename (EG RnR195)

Commands: All the channel commands that ghost++ allows (with the addition of host command)
Command .host will autocreate a game with your prefix and a 3 digit random number
Any of the gamestarting commands will work the same as above

The below listed commands were renamed due to conflicts with internal and other scripted commands
' enable   = enbalehost
' disable  = disablehost
' say      = hostsay
' announce = hostannounce


Access levels can be changed in your command manager

Additional New Commands:

suspend <username> <days>
Suspend a user for specified number of days from using ghost commands

unsuspend <username>
Lift suspension from a user

suspended
List all suspended users and the expiration of their suspensions

Settings:

Settings will be taken the first time you load this script

ghostName
(your ghost bnet name)

ghostTrig
(your ghost trigger) EG !

gamePrefix
(game prefix to use when no name is specified)
EG: RnR
A random 3 digit number will also be assigned to the game name

useEmote
(Emote all your responses) yes/no

hostPublic
Make games public when using the /host command
Default = No

suspendDays
Default number of days to suspend if none is specified
Default = 1

suspended
List of suspended users and the date it will expire
Use the ghost internal commands to add to this list, or you could break it

lobbyMax
Maximum number of minutes a game can be in the lobby before Stealth will unhost it
Default = 20

Important Notes: (Please Read)

- If you use my SharedQ Script, then you will need to load this script on every bot
- If you use SharedQ, then all your other bots need ghost access as well
- Your stealthbot MUST have admin access to your ghost (see above also)
- Currently this script supports only 1 ghost at a time
- Any game creation command used without a specified game name will be given a random game number preceeded by your gamePrefix setting if any (The names of the last 20 will never be re-used to avoid conflict)
- Don't ask for commands to be added. Do it yourself in the command manager using aliases
- Once a game is in the lobby, you will need to run commands via your ghost's trigger (not stealth). You'd think this is obvious, but I've had a lot of people ask me why ingame and inlobby commands aren't built in to this script.

CHANGELOGS:
' 2.1.3 | December 27, 2010
'     - Fixed runtime error 500 line 99 undefined variable (introduced in v2.1.2)
' 2.1.2 | December 26, 2010
'     - Fixed runtime error 500 line 85 undefined variable (ghost)
'     - Removed some unnecessary locals where ghostName could be used instead
' 2.1.1 | December 13, 2010
'     - Fixed expired suspensions that weren't dropping
' 2.1.0 | December 12, 2010
'     - Added feature to suspend users from using ghost commands
'     - Added feature to unhost games stuck in the lobby after a users attempts to host
'     - Added commands (suspend, unsuspend, suspended)
'     - Added settings (lobbyMax, suspendDays, suspended)
' 2.0.5 | May 16, 2010
'     - Added an auto-whisper to host (getclan) when a new member joins
' 2.0.4 | May 9, 2010
'     - Added a host offline message (only works if your host is in clan)
' 2.0.3 | May 4, 2010
'     - Stopped duplicate messages in channel from displaying (game over msg)
'     - Added a setting to make games pub or priv when using the host command
'     - Fixed stats and statsdota when specifying another username
' 2.0.2 | May 3, 2010
'     - Fixed stats and statsdota
'     - Fixed type mismatch line 128 when reloading script
' 2.0.1 | April 30, 2010
'     - Added command statsdota
'     - added command stats
'     - Added command addfriend
'     - Added command delfriend
'     - Added command countadmins
'     - Added command checkban
'     - Added command reloadcfg
'     - Added command rb (refreshbanlist)
'     - Added command rload
'     - Added command rmap
'     - Fixed checkadmin command
'     - Removed popup on command creation (was interfering with other scripts)

Attached File(s)

  • Attached File  host.txt (12.38K)
    Number of downloads: 563


#2 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted April 30, 2010 - 08:15 AM

could u add .statsdota command?

#3 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted April 30, 2010 - 09:50 PM

cant type well, will fix when my arm is better.

ant other channel commands that i missed?

#4 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted April 30, 2010 - 10:28 PM

well now if u could add this
-exile (ban from hostbot and from channel)
-timeban <x> <name>( Stealthbot will ban User at channel and at hostbot(/W bot !ban name for <x> minutes,days,hours and when ban pass he would do /W bot !unban name

#5 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 01, 2010 - 06:37 AM

View PostD3aTh_KnIgHt, on 30 April 2010 - 04:28 PM, said:

well now if u could add this
-exile (ban from hostbot and from channel)


Add it as an alias to the addban command, then set the access level to match that of your bots exile command. Like I stated in the instructions, most of this stuff you can do on your own if you think about it.

Quote

-timeban <x> <name>( Stealthbot will ban User at channel and at hostbot(/W bot !ban name for <x> minutes,days,hours and when ban pass he would do /W bot !unban name


Not gonna do this, sorry. This script was never intended for anything other than forwarding normal ghost commands. (aside from the random gamename capability)


Script updated to 2.0.1
Added lots of missing commands
Read the changelog

#6 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted May 03, 2010 - 11:27 AM

.statsdota bug found when i type .statsdota <someones else name> it shows my stats :P

Scripting runtime error '13' in Ghost-Forwarding: (line 128; column 1)
[01:26:11 PM] Type mismatch: 'cInt'
[01:26:11 PM] Offending line: >>
[01:26:11 PM] Scripting runtime error '13' in Ghost-Forwarding: (line 128; column 1)
[01:26:11 PM] Type mismatch: 'cInt'
[01:26:11 PM] Offending line: >>
wtf is this

#7 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 03, 2010 - 03:54 PM

Damnit, I fixed statsdota and forgot to update it.

Redownload 2.0.2

Also fixed the type mismatch error on line 128

#8 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted May 04, 2010 - 12:10 PM

dude i don't get how to ban from channel and hostbot at same time..

#9 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted May 04, 2010 - 05:20 PM

u removed game prefix?

cuz it don't work

#10 User is offline   SierraKomodo Icon

  • Warn Status: 99.9%
  • PipPipPip
  • Group: Members
  • Posts: 192
  • Joined: January-01 10

Posted May 04, 2010 - 06:06 PM

Can you explain what your trying to do, what its supposed to be doing as compared to what its actually doing, and any errors its giving?

#11 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted May 04, 2010 - 06:58 PM

no erros just awaeking knows what im talking about game prefix don't work when someone type .host ap22 etc it host gn with name dgc.ap22 not its gone..

.statsdota <some other user> still shows my stats .S

#12 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 04, 2010 - 09:30 PM

The game prefix is only used when no gamename is specified. (Please read through the entire first post). I'm not making the script to tailor your needs only. Most people wouldn't want a prefix added to every game, so I'm not making it that way.

What don't you get about how to ban from the channel and the host? Open your command manager and go to the Ghost-Forwarding commands. Find the addban command. Add an alias called ban. Set the access level to the same access as your stealthbot's ban command. Make sure your users have enough access. Pretty simple.

#13 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 05, 2010 - 02:03 AM

My bad, just figured out what you meant with stats.

Update 2.0.3

No more duplicate messages when games are over
Fixed stats and statsdota when specifying another username
Added a setting (hostPublic)

#14 User is offline   Xerxes Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: October-18 09

Posted May 05, 2010 - 07:44 PM

I can't find a start command in the Command Manager for this script. Could someone explain how to start a game in lobby without one?? (using the channel bot ofc)

#15 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 05, 2010 - 09:07 PM

The idea is to use the host to start the game once it's in the lobby. Whoever the game was created by would have access to the hostbot at that point to start their own game. I suppose I could add commands to start the game from the channel, just seems odd.

#16 User is offline   Xerxes Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: October-18 09

Posted May 06, 2010 - 02:59 AM

View PostAwaKening, on 05 May 2010 - 04:07 PM, said:

The idea is to use the host to start the game once it's in the lobby. Whoever the game was created by would have access to the hostbot at that point to start their own game. I suppose I could add commands to start the game from the channel, just seems odd.

oh because then that user is an admin for that game. I see, would that user then have full admin access (for example banning people) for the duration of that game?

Thank you by the way.

#17 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted May 06, 2010 - 01:15 PM

ok could you tell me how to make it myself (too add prefix for gn-s) or make some plugin just for me :P

#18 User is offline   D3aTh_KnIgHt Icon

  • Http://www.Clan-DGC.Com
  • PipPipPip
  • Group: Members
  • Posts: 167
  • Joined: December-13 09

Posted May 08, 2010 - 07:07 PM

and yes could u add this,since in my channel host command reqiures 0 acces and unhost also so some ppl are unhosting each other's games.so i wanna u to make that only the user which hosted game and user with more then 0 acces can unhost game.thx

#19 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 09, 2010 - 12:10 AM

It would be a whole lot easier to do that yourself in the ghost programming itself. Too hard to track when the games start and who hosted it using the stealth. My suggestion would be to make the unhost command unusable by changing the access in the command manager; because any user can unhost their own games using the ghost trigger (which would be what you're asking for)

#20 User is offline   riffruff Icon

  • Newbie
  • PipPip
  • Group: Beta Testers
  • Posts: 19
  • Joined: August-15 09

Posted June 05, 2010 - 05:30 PM

What is the point of these lines of code?

	If IsNumeric(version) Then
		If cInt(version) >= 202 Then Exit Sub
	End If


If the current version of the script is 203, which it is, this script will never work.

#21 User is offline   Fallen-God Icon

  • Full Member
  • PipPipPip
  • Group: Members
  • Posts: 364
  • Joined: September-11 09

Posted June 05, 2010 - 06:17 PM

View Postriffruff, on 05 June 2010 - 06:30 PM, said:

What is the point of these lines of code?

	If IsNumeric(version) Then
 		If cInt(version) >= 202 Then Exit Sub
 	End If


If the current version of the script is 203, which it is, this script will never work.

It checks if the script, or a later version of the script, has been run before.
If it has been run before it does not attempt to create the commands, since the commands will already have been created.
Choose Functional.

#22 User is offline   riffruff Icon

  • Newbie
  • PipPip
  • Group: Beta Testers
  • Posts: 19
  • Joined: August-15 09

Posted June 05, 2010 - 07:08 PM

View PostFallen-God, on 05 June 2010 - 02:17 PM, said:

It checks if the script, or a later version of the script, has been run before.
If it has been run before it does not attempt to create the commands, since the commands will already have been created.

I had to delete that code in order for it to create the commands on my bot... It wouldn't create them with that code in there (although it did update the ini file)

#23 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted June 06, 2010 - 01:37 AM

If you notice in the changelog, I haven't added any commands since 2.0.1. I put that line of code in there so that it doesn't check for the commands everytime you reload your scripts. There's so many of them, that it slows down your initial load quite a bit. Even if you're installing for the first time (v2.0.3), the version setting isn't written until after the commands are created, so I have no idea where your problem stemmed from.

#24 User is offline   SCHoschY Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: December-29 09

Posted July 18, 2010 - 08:50 PM

i didnt find the option to change the trigger/account of hostbot,...
can you give me a hint or i have to make a new bot with script?
thx

#25 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted July 18, 2010 - 10:21 PM

All the settings including what you're looking for are in scripts.ini (located in your scripts folder)

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • 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