Blanco 0 Posted August 30, 2004 Codepad1.0Beta by Blanco Codepad1.0 demomission (editorupgrade required) Used programs. - Dialogmaker (great tool!) - Soundforge 5.0 - Photoshop 7.0 & illustrator 10 - Textview - Chris OFP script editor Features - Dialog with a numeric pad. - paper with code - Display and 2 leds (red & green). - Custom sounds For the demo mission (not really a part of the codepad script) - Scripted gates with custom sounds Parameters : - name of the object that represents the codepad (could be a laptop, a vehicle... whatever) - The code between quotes. Use "-1" when you want a random code at the start of your mission. Example : You already know the code from the beginning via the briefing or whatever : [laptop,â€123456â€] exec “pad\numpad.sqs†You have to find the code, a random code is generated from the beginning. [button,â€-1â€] exec “pad\numpad.sqs†Codekeeper You can give the code to the enemy with the randomassign script. When this script is running on an enemygroup, somebody randomly carries the code with him. When you kill him and search his body the code will be yours. You will see the code on a little piece of paper when you have to enter the code. The guy with the code is named codekeeper in the script, so you don't have to name him manually. You need one trigger for the "search his body" action <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ACTIVATION : none, repeatedly CONDITION : !codefound && alive player && !alive codekeeper && player distance codekeeper < 1.5 ONACTIVATION : Codeaction = codekeeper addaction ["Search his body","pad\code.sqs"] ONDEACTIVATION : codekeeper removeaction Codeaction Run the script on an enemygroup like this [name of the group] exec "pad\randomassign.sqs" example : [enemygrp1] exec "pad\randomassign.sqs" Codefound = true When somebody told you the code during the mission via an informant or whatever, use the bolean Codefound = true in a trigger or script. The code (the paper) will be shown aswell when you try to enter the code. MAXnr A code can only have numbers (0 to 9) and two special characters * and # A code has 6 digits default, but you can make the code longer if you want. Just open the codepad.init.sqs in the pad directory and change the MAXNR variable into an other value. 12 digits is the maximum! Applications : The codepad can be used in lots of scenario's (stealth missions I guess), just use your imagination... A code to open a door. A code for you car A code to launch a scud... ... So this script is a bit a do-it-yourself script. Doors In the demomission you need a code to open the gates of a garagebox and steal an ammotruck. (very easy) The doors are nothing more than 2 fences that slide in a certain direction via scripting (setpossing) (*) I've used code from another script that's not mine No author was mentioned in the script,  thanks to the guy/girl The parameters for that script are : [Name of the object that represent the codepad, name of the leftdoor, name of the rightdoor,direction the leftdoor should slide, direction the rightdoor should slide, slidedistance in Meters] exec "doors\open.sqs"  Example : Your doors are facing north : (azimuth 0) [button,GateL,GateR,275,85,2.3] exec "doors\open.sqs" The left door should slide to the WEST, so azimuth is 275 The right door should slide to the EAST, azimuth is 85 The slide over 2.3 meter, that depends on the fence you are using in the editor Use the "doors\open.sqs" to open the gates, and... "doors\close.sqs" to close them again. btw : This script is activated at the end of the codepadcrack script in the pad directory.  Should work in MP, but not recommended,, because this script uses a very fast loop when the gates open and close. Bugs : - You can use your numeric keypad on your keyboard to enter the code, but the script won't react then, you have to use the dialog buttons! - There can only be one codepad and code per mission. - When the codekeeper enters a vehicle and you shot him, the "search his body" action won't show up for some reason. - Not tested in MP Last minutes notes : - Some code from the ECLsafe addon was used. - The zip includes a Dutch readme, check this post for the euh... English instructions. I will update the file later with an English readme. - In the demomission the randomassign script is running on every member in the enemygroup, One unit in the group is enough tho.. I made a mistake there... I can't update the file now, I have to contact my host first. Share this post Link to post Share on other sites
Parker Hale 0 Posted August 31, 2004 Hi Blanco, Now this script sounds interesting to me because i was only thinking the other day about how it could be possible to give an object a proper security lock and then this turns up. Blanco, you must be reading my mind or something like that. I shall try it out on a couple of ideas i have and post up my opinion here soon. Parker Hale Share this post Link to post Share on other sites
BoweryBaker 0 Posted August 31, 2004 i hope this works in multiplayer. keypad...hmm.... Share this post Link to post Share on other sites
redface 1 Posted August 31, 2004 some truly innovative scripting indeed Share this post Link to post Share on other sites
Blanco 0 Posted August 31, 2004 It's not that innovating... LCD did it before with the ECLsafe from the Everon Cartel. DL : http://www.everoncartel.com/safe.zip I've used some code from that addon... without asking him permission (didn't read the disclamer, my fault) I mentioned it in the readme above... Anyway, I already spoke with LCD, I apolagise and he gave me permission. But it won't happen again... I just wanted to make a notepad without having any addons... Share this post Link to post Share on other sites
shinRaiden 0 Posted August 31, 2004 Argh... I just wrote one too for a dialog tut package I'm building, but yours looks nicer. One feature I added in mine is a keypad scrambler, for all those who think they're l33t and check for prints and wear. Share this post Link to post Share on other sites
theavonlady 2 Posted August 31, 2004 Is someone gonna make a Blackberry? Share this post Link to post Share on other sites
Blanco 0 Posted August 31, 2004 I dunno what a Blackberry is... When I freely translate it into Dutch it's a... zwarte bes... Hmmm... that's fruit.... Must be something else. Anyway, it would be nice if some addonmaker could make a codepad that looks like my dialog, so we don't have to use other objects that look like one (I've used a radio in my demomission... Â ) Just a little box with a texture of a numeric keypad, he can use my pics in the script... **edit** I've found someone Share this post Link to post Share on other sites
theavonlady 2 Posted August 31, 2004 I dunno what a Blackberry is... BlackBerry 7780 Wireless Handheld Share this post Link to post Share on other sites