Jump to content

Detecting different scripts


Noddy Absent
 Share

You are about to reply to a thread that has been inactive for 2234 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I've been trying to find a way so that it would be clear if someone was using a different dice hud rather than the simple hud I've created. Ideally, I would like it to state something in local chat saying "that's not the sim hud" or whatever I come up with.

EX ::. Sam and Tia are going to roll. Sam uses the hud I made. Tia has made a simple dice script with a higher chance of a high roll and uses that instead of the hud. I want Sam's hud to say in chat that it was not from the right hud.

 

Thanks for any and all suggestions. Very much appreciated :)

Link to comment
Share on other sites

More information needed, I think.   What do these HUDs do, exactly?   How does Sam know what Tia has scored and how does Tia know what Sam has scored?   The HUDs must communicating with each other or with a score board or something, so assuming the scripts are no mod, I'm not understanding how Tia is able to cheat unless she's a friend of yours and you've told her what channel the HUDs use.     I'm probably missing something obvious here..

Link to comment
Share on other sites

In state entry,

llListen (PUBLIC_CHANNEL, llGetObjectName (), "", "");

then in the listen event,

llShout (PUBLIC_CHANNEL, "That wasn't me!, That was a device owned by " + llKey2Name (llGetOwnerKey (id)) + "!");

The listener is created to listen only to objects with the same name as the "official" device, but as it can't hear itself anything it does hear will be from a different object that has the same name.

Edit: Uh oh... a second look at the question shows that this won't work because everyone has their own dice HUD. Back to the drawing board. Sorry.

I guess one way to go would be to have individual HUDs communicate with a central dice server which sends the result back to the HUDs.

Edited by KT Kingsley
Link to comment
Share on other sites

Sorry for any confusion. They're a simple dice hud. High score wins. I've already written the dice and I've gotten around the issue identifying the roller because I've made them individually so it will actually say player's name in chat. My thought is that this is pretty simple scripting and as the RP has expanded to others that I don't actually know (or their ability to script or cheat LOL) So my thinking is that the first few times they'll see what's being "spoken" in local when they use the hud. It will be easy enough to duplicate the information and make it look like its the same hud when in fact the dice are designed to give them an unfair advantage.

 

I've been wondering if there was a way to write a line that would listen on a particular channel for info and if script doesn't hear it, it will speak the warning in local chat?

Edited by Noddy Absent
I think I just double posted :S Too long a day I'm thinking :P sorry for the goof.
Link to comment
Share on other sites

Sorry for any confusion. They're a simple dice hud. High score wins. I've already written the dice and I've gotten around the issue identifying the roller because I've made them individually so it will actually say player's name in chat. My thought is that this is pretty simple scripting and as the RP has expanded to others that I don't actually know (or their ability to script or cheat LOL) So my thinking is that the first few times they'll see what's being "spoken" in local when they use the hud. It will be easy enough to duplicate the information and make it look like its the same hud when in fact the dice are designed to give them an unfair advantage.

 

I've been wondering if there was a way to write a line that would listen on a particular channel for info and if script doesn't hear it, it will speak the warning in local chat?

 

EDIT ::. I'm thinking KT's idea would be ideal. Don't know if I could get that to work where everyone has their own channel so not to animate the whole sim at once :P but is it possible to have one line dedicated to a shared line with all the huds?

Link to comment
Share on other sites

I'm with Innula on this one.  I don't understand what the issue is. If your HUD and the dice are communicating on a channel that you have assigned (like -28447109, for example), then there's no way that a cheater HUD can get into the game unless you tell other people what the channel is.  Just keep your scripts no mod so nobody else can read them and see your channel number.

Link to comment
Share on other sites

The more I look at KT's idea, the more I'm thinking that it will work. I'm going to play with it tonight and see what happens.

Thanks so much for the help!!! At least I don't feel like I'm staring a blank piece of paper and not having a clue where to begin :P 

Link to comment
Share on other sites

No, I have each on their own channel so when one is animating their toon a certain way, it doesn't trigger everyone around them to do the same action. The hud does different things. Rolls dice, has a separate button with a lot of animations for RP, ect. But couldn't get around everyone suddenly taking a drink when one hit their hud, so I just assigned each their own channel. This was ok on a small scale but will have to reconsider for a larger group.

Link to comment
Share on other sites

That was a design decision that you could change.  You don't need to use a different channel for each person.  In fact, doing it that way is wasteful of region resources because you are having to keep a whole stack of listeners open all the time. There are plenty of other ways to keep HUDs from interfering with each other -- whitelisting, giving HUDs unique ID numbers, ....

Link to comment
Share on other sites

1 minute ago, Noddy Absent said:

That's an interesting idea, Ruthven but I'm thinking that would be more proactive than I want to be.

It's also very simple.  It will add no more than 4 or 5 lines of code at most to your script -- fewer if you inline commands.

Link to comment
Share on other sites

4 minutes ago, Noddy Absent said:

That's an interesting idea, Ruthven but I'm thinking that would be more proactive than I want to be.  Thank you though.

When Sam's hud hear's Tia's, it would then check the creator using the method i mentioned. If it doesn't match then it can respond with "that's not the sim hud"

of course, that's only one way of detecting. if Tia got a hold of a mod prim of yours, say from some other object, and then dropped in her cheat script, my method wouldn't work

Edited by Ruthven Willenov
Link to comment
Share on other sites

Oh, sorry Ruthven, I read that wrong. I understand what you mean. And I can see your point regarding sim resources for the script clutter. I'll have to figure out a way to get the animations to trigger just the person hitting the button rather than everyone with the hud that has the animations.

Link to comment
Share on other sites

HUD says: "This is HUD #1 speaking. Roll the dice."

DICE says: "I hear you, HUD #1 and am rolling.  Now animate your owner."

All HUDs hear the message, but only one of them says to itself, "The Dice are sending HUD #1 a message.  That's me!  I will animate my owner."

 

Link to comment
Share on other sites

Really good point, Rolig. I'm thinking that I could work on something with (llGetOwnerKey(id)= .....

Thanks for giving me so really good ideas for making this easier and better. Really appreciate all of your time and thoughts. Will have to try to fool around with this tomorrow after work. Thanks so much! Wishing you all a good night :)

Link to comment
Share on other sites

1 hour ago, Noddy Absent said:

Really good point, Rolig. I'm thinking that I could work on something with (llGetOwnerKey(id)= ..

If you want to send a message to the HUD you've just heard from, then either llRegionSayTo(id, channel, message) or llRegionSayTo(llGetOwnerKey(id), channel, message) will work.

Worn attachments can hear any message sent to their owner by llRegionSayTo() (provided they are listening, of course).   However, in this example, you know the uuid of the object your script has just heard from, since it's given you in the listen event.

listen(integer channel, string name, key id, string message){
	llRegionSayTo(id, channel, "message received!");// reply to the object that sent the message, using the same channel the object used to speak to you
}

 

Edited by Innula Zenovka
Link to comment
Share on other sites

TYSVM for all your help. It really helped seeing where I was going wrong. Ended up using texture uuid as the parameters for the listen on dice button. Worked perfectly.

Wouldn't have thought it without all of your inputs. Much appreciated!!! :D

Edited by Noddy Absent
because I can't spell :P
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2234 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...