Author Topic: Resbot - Looking for input  (Read 8321 times)

0 Members and 1 Guest are viewing this topic.

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Resbot - Looking for input
« on: November 03, 2008, 11:15:00 AM »
0
I'm just having trouble thinking about how to code this logic, looking for insight from someone else.

I would like to have a character hide in a spot and wait for some type of key activity to initiate a res then hide again. So, for example, the script scans the journal for a passphrase. Once passphrase = #TRUE it loads the speaker as the last target and res's them.

I'm just confused as to how I would parse the appropriate information from the journal so that I can compare it to the name of a character on screen. Or is there a better way to do it?

A kick in the direction of a similar routine would be welcome as well, I remember there being a decent BOT script on UOC at one time, not sure who owned that one.

Thanks much gents!

XII
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Resbot - Looking for input
« Reply #1 on: November 03, 2008, 11:19:28 AM »
0
I've been trying to get Cerveza to post it again... ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Resbot - Looking for input
« Reply #2 on: November 03, 2008, 11:25:10 AM »
0
Ah, a first responder!!

So how would you accomplish such a task as getting from the journal scan to loading a ltarget with the ID of the character Mr. Myx?

I've been trying to get Cerveza to post it again... ;)

Ah right, Global Bot was the name. I thought I had DL'd it but no dice, can't find it anywhere. I just went to try to scrape some stuff up over at web.archive.org but unfortunately there is no file download available from UOC without logging in and web.archive.org doesn't seem to have the login mechanism archived as well (one could wish, right?) although I see there is opportunity to scrape together many a decent conversation that was lost in the general forums including a number of the tutorials, etc.

XII
« Last Edit: November 03, 2008, 12:09:05 PM by 12TimesOver »
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Resbot - Looking for input
« Reply #3 on: November 03, 2008, 12:23:39 PM »
0
Well, there's a couple approaches to it.  With Cerveza's GBOT, it was a client/server kinda thing so really there was only one "client" which the bot would interact with.

From what I see with you, you'd like to "service" any number of people who might show up.  So I'm guessing that you'd want to be scanning guild chat?  Whispers?  Anything journal related should have some safeguards to keep people from setting off your bot and determining that you are a cheating mangy scripter.

Either way, it's pretty easy to determine what the #FINDID is from the incoming text.  Really, you need to:

1) Determine if spamed command is from a valid "''customer"
2) Scan within range for valid people #FINDTYPES, and event property them.  The first part in the #PROPERTY (separated by $) should be the character name.  Compare that to what showed up in the #JOURNAL request.
3) If that matches, then do your stuff, res, heal, cure, moon, whatever.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Resbot - Looking for input
« Reply #4 on: November 03, 2008, 12:26:09 PM »
0
Really shouldnt be that difficult to do.

Could just scan for ghosts. and if they come close rezz em.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Resbot - Looking for input
« Reply #5 on: November 03, 2008, 12:36:06 PM »
0
I had this on my projects list. PartyBot. Would hang out in your house, drink all your ale and eat all your fishsteaks, pollute your bathroom then talk you into going out to Buc's Den bar.

It would have to run on some type of password, OR you would have to get the ID of the chars allowed to use it.

But basically it would perform simple actions.

I'd listed them once and asked for inputs, but that info is long since gone.

Possibilities include:

Heal me
Rez me
Cure me
Bless me
Gate {location}
Rez pet
Heal pet
Cure pet
Protect me
Hide
Avoid

? more ?

Simple syntax. Walk up and say "X129FG heal me" {password, command, target}.

I even had a decent char template setup for it. I'll try to gather up some of my old stuff and see if I can find anything. No scripting had begun on this, but since GBot worked so well, it seemed that this would be the next logical step.

And with TM's Journal scanning, it seemed like a "plug-n-play" script.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Resbot - Looking for input
« Reply #6 on: November 03, 2008, 12:41:56 PM »
0
Scanning for ghosts could work fine as well but could also limit the flexibility in that, as TM pointed out, I may want to limit the use of the "service" to characters meeting some type of criteria. On the other hand, something like a "Res all ghosts" sub would be handy in a number of scenarios but I was having trouble figuring out how to determine if there is a ghost present as I couldn't see that there was a different ItemID as a ghost but I was having some other trouble when I was testing last night and I may have screwed up.

On the journal scan, etc I guess I just need to learn how to parse the value of #jindex to pull out only the character name. I guess that's what stumps me, how to pull out a certain number of characters from the journal and set it as a !var. I assume it would be something like:

Code: [Select]
Journal scan loop waiting for passphrase (or whatever)
Passphrase = #TRUE, gosub FigureOutCharName
set !varLineInJournal #journal
Parse !varLineInJournal to get all text up to the ':'
Set this string to !varCharName
scan for item type of a player character
when found check if !varCharName in !varLineInJournal

Not too far off I'm assuming but it's the parsing of the #journal value to get the name of the character that spoke the phrase that is confusing me.

Good input so far, I appreciate it!

XII

Cerv - I do remember that conversation, seems like a long time ago!

.edit.
you are a cheating mangy scripter

Heh-heh
« Last Edit: November 03, 2008, 12:44:49 PM by 12TimesOver »
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Resbot - Looking for input
« Reply #7 on: November 03, 2008, 01:16:40 PM »
0
I would really shoot for a set criterion for rezzing.  Some of the more zealot anti-scripters out there may notice there is a rezbot at work; you'll get paged on in a heartbeat regardless of your intentions to do good.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Resbot - Looking for input
« Reply #8 on: November 03, 2008, 01:20:46 PM »
0
Another thought for you script is to have an interactive setup where you can target the people you would like the bot to manage.  Then you can database their #FINDIDs for later interaction.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Resbot - Looking for input
« Reply #9 on: November 03, 2008, 01:22:09 PM »
0
Extracting a name...

str pos #Journal :
Str LEft #journal #Strres
display ok this should be the name : #strres

Or something like that.
I have a sub someplace dthat does it all the types party, allaince etc.. variations on the above...
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Resbot - Looking for input
« Reply #10 on: November 03, 2008, 01:27:44 PM »
0
We had discussed this before, and determined it best to use some "private" chat system.

If someone is hidden and sees you type "XR330B Heal Me" they will know it's a bot running. If you use Party, Guild or UOAM chats, it's limits the accessibility to the commands, but also limits the number of users.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Resbot - Looking for input
« Reply #11 on: November 03, 2008, 01:31:07 PM »
0
Could also keep a list of allowed players.. and just compare to that...

Players could be added via the pasword system in general chat as above  .. saying something like
Mr cheese watsup!

Then save thier id to the allowed file that script reads on startup.

Then later they would only have to say
Oi heal me now
or
ooOOooOOoo

And becuase thier name and or id already in the list it does its job.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Resbot - Looking for input
« Reply #12 on: November 03, 2008, 01:53:35 PM »
0
We had discussed this before, and determined it best to use some "private" chat system.

At least this time the discussion isn't in jeopardy of "disappearing".. lol
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Konesky

  • Jr. Member
  • **
  • Posts: 31
  • Activity:
    0%
  • Reputation Power: 0
  • Konesky has no influence.
  • Respect: +3
  • Referrals: 0
    • View Profile
Re: Resbot - Looking for input
« Reply #13 on: November 03, 2008, 02:08:21 PM »
0
The first thing I thought of when I read the part about the pass phrase was the fact your ghost is speaking oOOooOo so unless your healer is a Necro they won't be seeing any passphrase anyway, at least unless its in a guild chat, party etc as mentioned below, perhaps im pointing out the obvious here but keep that in mind... you healer will need to be partied up, guilded up or have SS/Necro (whatever one alows you to see ghosts speak).

I've got a little self rez script snippet in a few scripts, nothing to it... add in some hiding and you're done... I think I'm missing something here because this seems like a pretty simple script... This wouldn't perform a check to make sure you're rezzing the keyword speaker but it would make sure the password was recieved before coming unhidden and rezzing the guy immedately beside him... And if the password was spoke but no ghost was beside, it would ignore it...  Am I missing something here? whipped this up for ya, untested give it a try at your house


Code: [Select]
set %passphrase CHEETOES
set %alwaysrezyesno FALSE ;Set this to "TRUE" to rez anyone without PW
;=======================
Start:
for %z 1 2
{
Scanjournal %z
If %passphrase in #journal
 set #result TRUE
}
Finditem KS G_1
If #findkind <> -1 && #result = TRUE
{
 event macro 15 58
 target 6s
 set #ltargetid #findid
 event macro 22 0
 wait 20
}
set #result FALSE
If H notin #charstatus
 event macro 13 21
wait 10
goto Start

Offline _C2_

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: Resbot - Looking for input
« Reply #14 on: November 04, 2008, 07:39:23 AM »
0
I don't know if this is here or not but how about using a #findrep to only allow guildies to get rezzed and or if guild tag in evvent property of the #findid.  I didn't see it in the initial scan of posts.

so somethign like this idea
event prop #findid
if #findrep = (whatever guild member one is) or guilabrv. in #property
   res #findid

Tags: