Randomizing Replies

McNukkah

Member
Joined
Oct 30, 2007
Messages
209
Reaction score
23
Points
18
Location
The Forest
I've been fooling around trying to set up a huge ini file with a bunch of replies and have them selected randomly as replies to /tells being received.

For example:

Someone sends a tell to one of my characters and my character replies with one of the ini entries 1-200

I swear I've seen it done, but I can't find it, or I was dreaming.

Thanks for any help / guidance.
 
  • Like
Reactions: EQDAB
I've been fooling around trying to set up a huge ini file with a bunch of replies and have them selected randomly as replies to /tells being received.

For example:

Someone sends a tell to one of my characters and my character replies with one of the ini entries 1-200

I swear I've seen it done, but I can't find it, or I was dreaming.

Thanks for any help / guidance.

Shouldn't be that difficult to toss your 200 odd replies into an ini file, build a numbered array from that ini file, then use ${Math.Rand[1-${TotalReplies}]} to pick the reply from the list, and then use an event to trigger the reply.

Haven't tested it, but something like this would probably work.

#event tells ""#*# tells you, #*#"

Sub Main

/declare ReplyArray string outer ${Ini[${IniFileName},Replies]}
/declare nReply int outer 0
/declare nTotalReplies int outer 1

:loop

/if (${ArrayBuilt1}==FALSE) {
/for nReply 1 to ${nTotalReplies}
/varset RandomReplies[${nReply}] ${Ini[${IniFileName},Replies,Reply${nReply}]}
/echo Set RandomReplies${nReply} to '${RandomReplies[${nReply}]}'
/next nReply
/varset ArrayBuilt1 True
}
/doevents
/delay ${Math.Rand[1-5]}s
/goto :loop
/end

Sub event_tells

/echo ${RandomReplies[${Math.Rand[1-${TotalReplies}]}

/return
 
  • Like
Reactions: EQDAB and McNukkah
GMs don't use tells. They always use /say. For this reason.
 
  • Wow
Reactions: EQDAB
GMs don't use tells. They always use /say. For this reason.

I'm honestly not concerned with GM's---although I have had one send me a tell, long ago, and the only thing that saved me was I had set up a panic response to receiving a tell from anyone that would basically just answer "sorry we are all about to camp for the night" or something and then anchor out.

What I do this routine for is for the randos who will send me a tell every now and again while I am grinding. I think getting reported is what gets most of "our kind" banned.

Using /say is....just mean.


Edit: Also, setting up a similar routine for /say events wouldn't be any more difficult than it is for tells...so I'm not sure how GM's would think this is a huge "gotcha" move....
 
  • Like
Reactions: EQDAB