A cool script idea, help?

Rakaesa

Member
Reaction score
5
Okay, as i'm sure, some of you have played twilight's eve. It's an ORPG on wc3 b.net. Anyways, as you know, the newer versions have included a few proffessions. One of these professions interests me the most: Fishing. Not because of the fishing itself, but how it's done. It asks you to press certain arrow keys, and if you press it imediately after the message shows up, you get "Perfect". The slower you are, the worse of a mark you get.

Now, what I want to use this for is my idea i've come up with. I want to make a map in the modern times sort of like an orpg with a storyline. Where this system of arrow keys would come in is hacking. Yes, hacking.

Along the journey of this map you would encounter many computers. Some you would have to hack to progress in a mission, such as to unlock a locked electronic door, or hack into a database. I contemplated it and the first system was merely you somehow magically being able to hack in without any effort in the least, and it just gave you a list of commands you could use inside of the computer. Such as checking system messages, or checking the database for imortant information. But like I said, this required 0% effort. You just walked up to the computer, said "yes" when it asked you if you wanted to hack, and voila.

So I want to incorporate this arrow key system into the computer hacking. Kind of like a mass effect decryption thing. You have to press the buttons almost immediately, or you're kicked out of the system. Not permanently, obviously, I want them to be able to retry as many times as it takes.

So I want to know how to make this arrow system, and with only one grade. No perfect and good, but you just know you did good if it lets you advance to the next button at all. Otherwise I want them to be kicked out. So in total, the arrow system, with only one chance and it has to be pressed ALMOST imediately after it tells you what arrow to press, otherwise you're kicked out of the system and have to retry. And I want the order of the arrows to be completely random for every try on any terminal, so they never know what's coming.

Not sure if it's possible, but if it's only possible in vJASS, please give me a demo map or something I can easily copy paste, because I'm only good in GUI. I'm not completely sure how i'll add in the computer's commands and database and stuff afterwards, as I don't know how you would have the trigger sense if they get into the system or not, so let me know that too please :)
 
Arrow key detection is really slow for some reason, even with a delay reducer < 50.

If you do decide to do this, it would probably be a good idea to adjust the timer length (interval a player gets to press the arrow key) to delay (in seconds) + Interval.

TL;DR:
JASS:

local real r = INTERVAL + DELAY
 
Actually it might be better to not use a arrow key system
Abilities are a better choice
You can make dummy abilities, change everything to zero and the hotkeys to W, A , S, D
W=Forward
A=Backward
S=Left
D=Right
Now the actual trigger. its pretty basic
Code:
kl
    Events
        Unit - A unit Finishes casting an ability
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Ability being cast) Equal to W 
                (Ability being cast) Equal to A 
                (Ability being cast) Equal to S 
                (Ability being cast) Equal to D 
    Actions
        Set KeyCount[(Player number of (Owner of (Triggering unit)))] = (KeyCount[(Player number of (Owner of (Triggering unit)))] + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                KeyCount[(Player number of (Owner of (Triggering unit)))] Greater than or equal to 4
            Then - Actions
                Game - Display to (All players) the text: You hacked the system!
            Else - Actions
        Wait 1.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                KeyCount[(Player number of (Owner of (Triggering unit)))] Less than 4
            Then - Actions
                Game - Display to (All players) the text: You have failed!
            Else - Actions
Its MUI, tell me if it works...
I hope you know what it means...
 
That would work but there's a few problems, evilwolf.
1. The hacking is not based on an ability, but it's based on when the hero actually aproaches the computer or terminal.
2. I don't see anything that detects how fast the player has pushed the button? As I said, i'd like it to end up having to be almost immediately. Your system just checks if they've actually pressed the button.

So is there any way to improve this and make it the way I wanted? I don't mean to seem rude but the system has to be very precise in the way it's used.
 
That's what we're telling you, if you use arrow key detection (E.G: TriggerRegisterArrowKeyEvent) there's an unknown delay in the code itself, so it's impossible for a system like such to detect an immediate keypress.

The reason he suggested an ability is because it's faster than using arrow keys.
 
That would work but there's a few problems, evilwolf.
1. The hacking is not based on an ability, but it's based on when the hero actually aproaches the computer or terminal.
2. I don't see anything that detects how fast the player has pushed the button? As I said, i'd like it to end up having to be almost immediately. Your system just checks if they've actually pressed the button.

So is there any way to improve this and make it the way I wanted? I don't mean to seem rude but the system has to be very precise in the way it's used.

Hmmm....
I don't think you're too good with triggers
The variable key count is the detection
Every time someone uses an ability it sets it to keycount +1
If keycount=4 after 1 second then you hacked the system, you decide what to do when that happens.
If keycount=3 or less after 1 second then you failed, you decide what to do when that happens.
You could add a condition to check if a Hero is in region when he/she is casts the ability.
*Note can I please see the trigger you've created? I could help you, I just want to see the trigger.
 
I'll provide you with my own arrow key system, which is currently used as an admin activator. I'll take the irrelevant code out, but you'll need to modify the actions trigger. You can use a part of the admin system, which supports using a simple string to determine the key sequence. For example..
JASS:
set AdminKeyPressString<i> = &quot;15263748&quot; // = press up, down, left right.
</i>


Do you want it?
 
Lol risen that looks like complete gibberish to me so I don't think i'll use it.

Evilwolf, I see what you mean, but you don't see what I mean xD. I don't want the keycount to be 4 over 1 second, then they'd have to randomly press WASD in 1 second. I want it to actually tell them WHICH button they have to press, and then they have to press said button in less than say 2 seconds. Then it gives them a second random button of WASD, doing the same thing. After maybe 5 buttons are sucessfully pressed they would get in. If they mess up a button, they get kicked out.
 
So use Evilwolf's method, just change it, its not that hard. Just make a boolean, if its true after 2 seconds, then set it to false and redo everything. Create an integer value to keep track too.
 
I suppose that could work, i'll give it a try when I get time. Thanks for the help guys, + rep to all of you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top