generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Scripting Challenge requests

Previous Thread :: Next Thread 
mathgeek008 is not online. mathgeek008
Joined: 26 Jun 2009
Total Posts: 88
13 Sep 2015 05:46 PM
I've been scripting for quite a while, and I would like a scripting challenge. Make them medium/hard, and no GUI control please.

>print(9+10)
21
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 05:47 PM
Make it so when I do:

x = 5
y = 10
print(x + y)

I get 100, without replacing the print function.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
13 Sep 2015 05:48 PM
nope = print
print = nope(21)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 05:49 PM
That wouldn't work, and I said 'without replacing the print function'
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
13 Sep 2015 05:51 PM
Why wouldn't it work?
And nothing said about that in the original post, but maybe there is.
I seem to turn blind at 0:51 AM
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
13 Sep 2015 05:53 PM
x = 99
y = 1
print(x + y)


You never said we cant replace the values :P
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 05:53 PM
Oh wait, you're talking about the original post, not my challenge.
I think that's just his signature (playing a dumb joke).

Also it wouldn't work because you would print(21) once and the print function would now be nil
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
13 Sep 2015 06:02 PM
k.

But I copied the print function
nope = print
print = 123

nope(print)

Pretty sure that's gonna return a function.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
13 Sep 2015 06:02 PM
I mean 123 T_T
Report Abuse
MightyDantheman is not online. MightyDantheman
Joined: 06 May 2011
Total Posts: 5108
13 Sep 2015 06:02 PM
How about making a mount that you could ride while the tool is selected (also changing the player's speed)?

I do need the script x.x :

http://www.roblox.com/Forum/ShowPost.aspx?PostID=173994118

~MightyDantheman
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 06:03 PM
You didn't 'copy' it but regardless, you still are missing the point.
'without replacing the print function'
I meant you can't replace the global print variable, it's impossible to literally replace the print function from Lua anyways.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
13 Sep 2015 06:05 PM
k.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 06:08 PM
I'll just reword my challenge:

x = 5
y = 10
print(x + y)

Must print 100. You can not alter any of those 3 lines or add anything in between them. You also can not replace the global print variable or declare a local print variable. The output of '100' must result from the print on line 3 of the unalterable block.
Report Abuse
MightyDantheman is not online. MightyDantheman
Joined: 06 May 2011
Total Posts: 5108
13 Sep 2015 06:12 PM
"x+y" = 100

Is that cheating? x.x
I can't think of any other way to do that without editing.

~MightyDantheman
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 06:15 PM
You can add lines above the variable declarations, you just can't edit those 3 lines and they all have to be in that order (no adding stuff in between)
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
13 Sep 2015 08:34 PM
@cntkillme

x = 5
y = 10
print(x + y + 85)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 08:35 PM
"can't edit those 3 lines"
Do you know what edit means?
Report Abuse
Reprediction is not online. Reprediction
Joined: 30 Sep 2012
Total Posts: 111
13 Sep 2015 08:41 PM

x = 5
y = 10

y = y + 85

print(x + y)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 08:42 PM
"You can not alter any of those 3 lines or add anything in between them."
Do you people read?
Report Abuse
TexasOreo is not online. TexasOreo
Joined: 08 Apr 2014
Total Posts: 25
13 Sep 2015 08:53 PM
local mt = {
__newindex = function(t, k, v)
rawset(t, k, 50)
end
}
setfenv(1, setmetatable({print = print}, mt))

x = 5
y = 10
print(x + y)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 08:53 PM
The challenge was for OP but you win.
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
13 Sep 2015 08:59 PM
I'm sure the OP would have been able to figure that out.
Report Abuse
Voidacity is not online. Voidacity
Joined: 05 Nov 2009
Total Posts: 15759
13 Sep 2015 09:24 PM
Let's make it more challenging. Exactly same rules as cntkillme stated but now the variables are local. Should work on both rbx.lua and Lua 5.1.

local x = 5
local y = 10
print(x + y)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
13 Sep 2015 09:30 PM
Oh yes :)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image