midas bot on smaug

Posted by Teeto on Wed 28 Dec 2005 03:14 PM — 11 posts, 34,405 views.

#0
I am a complete moron when i comes to this i need a trigger/alias/macros or script to allow me to midas items when told to and then give 90% of the gold back and keep 10% of it for the order. can someone please help me in an idiots style ie put t so it's easy to copy or paste or email the saves to teeto_69@hotmail.com so i can give them a try thanks
Australia Forum Administrator #1
This is so general it is impossible to answer. What do you see (MUD output). What do you want to do exactly?

I doubt if anyone will actually write a script from scratch, but if you try to write one and run into problems, people here will be pleased to help.
#2
here's the basics someone gives you something
say want me to midas it
if answered yes c midas something give 90% coins someone
if no give something someone
USA #3
You didn't didn't answer what Nick had asked.
Quote:
What do you see (MUD output). What do you want to do exactly?

We're looking for the exact output.
#4
k copying and pasting the text

You have 691,476 copper, 4 silver, 9,921 gold and 0 platinum pieces. it makes gold so it's the only one that matters

OK. is the succesful midas spell

Teeto gives you A wizards hat. is the give text
Teeto says in common 'yes' is the say text


so the trigger is * gives you *
then response is say are you sure you want me to midas %2 %1?

then * says in common 'yes' response is cast midas "the item"

ok. gold is the response here and that's as far as i can get

i just can't figure how to set it to remeber what item to cast midas on or what player gives you the gold and how to only give them back 90% of the gold
Amended on Fri 30 Dec 2005 07:36 AM by Teeto
Australia Forum Administrator #5
You seem to have made some progress. Can you copy the actual trigger rather than describing it? See this post for how to do that:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4776

#6
<triggers>
<trigger
enabled="y"
ignore_case="y"
match="* says in common 'midas *'"
sequence="100"
>
<send>c midas %2
med
med
say I am Ready for the next item now.
gold</send>
</trigger>
</triggers>

this is the trigger i'm using as a donation bot i can't get it to remember the item the person who gave it or how much gold to return ideally i want to be to say do you want me to midas this if yes midas give 90% gold back if no give item back so it would look like this only i have no clue where to go from this point

<triggers>
<trigger
enabled="y"
ignore_case="y"
match="*gives you *"
sequence="100"
>
<send>say are you sure you want me to midas %2 %1?
</send>
</trigger>
</triggers>



<triggers>
<trigger
enabled="y"
ignore_case="y"
match="* says in common 'yes'"
sequence="100"
>
<send>c midas *
med
med
say I am Ready for the next item now.
gold</send>
</trigger>
</triggers>

<triggers>
<trigger
enabled="y"
ignore_case="y"
match="#0000 gold'"
sequence="100"
>
<send>give 90% gold %1
</send>
</trigger>
</triggers>

the last to are hypothetical because they don't work :(
how would i set it up with say a variable to remember the person and item like setvar %1 @character %2 @item in the original trigger?


Australia Forum Administrator #7
It isn't totally clear to me how this midas stuff works, but this should get you a bit closer to your goal. I have made a trigger with a bit of a script attached to it. I am using Lua scripting language (set in scripting preferences) as that lets me put up a dialog box.


<triggers>
  <trigger
   custom_colour="2"
   enabled="y"
   ignore_case="y"
   match="* says in common 'midas *'"
   send_to="12"
   sequence="100"
  >
  <send>
who = "%1"
item = "%2"

SetVariable ("who", "%1") -- remember who
SetVariable ("item", "%2") -- remember what item

if utils.msgbox ("Are you sure you want me to midas %2 %1",
   "Midas", "yesno", "?") == "yes" then
  Send ("c midas %2")
  Send ("gold")
  Send ("give 90%% gold %1")
end -- if</send>
  </trigger>
</triggers>



This uses the new feature, introduced recently, that lets you display a dialog box, thus you can ask a question and get a yes/no answer in the middle of a script.

I have also remembered the name of the person and the item name in MUSHclient variables, although I haven't used them in this script.
#8
alright i copyed that and pasted it to triggers but it's sayin scripts aren't enabled?


this is what pops up when it is enabled


[string "Trigger: "]:8: attempt to call field `msgbox' (a nil value)
stack traceback:
[string "Trigger: "]:8: in main chunk


and thank you btw i didn't want to seem ungrateful
Amended on Sat 31 Dec 2005 08:44 PM by Teeto
Australia Forum Administrator #9
Quote:

This uses the new feature, introduced recently ...


It was released in version 3.70, which I presume you are not using. See:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=6124
#10
ok this is fairly close but i want it to send say do you want me to midas this and if the other character says yes then midas if he\she says no give item who the box is awesome and i've used it to set up attack programs btw it is to awesome for that purpose and i designed an auto heal script on what i've learned i just can't seem to get it to finish the script on last problem give 90% gold isn't a command it just sez i don't have that item