[QUOTE=WalkDinosaur;34336057][img]http://puu.sh/ebtt[/img]
Hello, quotes![/QUOTE]
Now it just needs ratings so we can see how many zings that guy got.
My god for the past few hour of trying to implement Lua in a game, (i run a test every hour or so and im just making the basic helper library now), its been working on first try!
[QUOTE=WalkDinosaur;34336057][img]http://puu.sh/ebtt[/img]
Hello, quotes![/QUOTE] Sorry if I disturb you but, when do you expect this to be released?
[QUOTE=ryan1271;34335111]My numbers-whos-roots-contain-themselves-program gives 763,932,023 as the largest number up to one billion that works.
The square root of [b]763,932,023[/b] is 2[b]7639.32023[/b]
One problem I'm running into is time. It takes over 16 minutes to go through all the numbers to 1,000,000,000. I feel the problem is converting integers to Strings to find the length. Is there any way to do this faster?
[code]private static boolean similarity(int i) {
String num = Integer.toString(i);
String root = Double.toString(Math.sqrt(i));
int length = num.length() + root.substring(0, root.indexOf('.')).length();
root = root.replace(".", "") + "00000000";
root = root.substring(0, length);
return root.contains(num);
}[/code][/QUOTE]
Agreement and clarification with the other quoted post: If you're just looking for square roots, take your double, divide it by 10, see if the new double times itself is the old number.
[editline]22nd January 2012[/editline]
Actually wait I think I misunderstood the question. It just has to contain itself, not be the square root? Ignore me
[QUOTE=Bitl;34336396]Sorry if I disturb you but, when do you expect this to be released?[/QUOTE]
A few days.
[QUOTE=DuCT;34331388]Shit man, I remember playing in beta. This is awesome work![/QUOTE]
Hah, Thanks. It's really cool that people are interested in my project besides my small team of 4. We are planning to open a server after Nexon has decided to chill their tits and stop suing everyone because they are "losing profits", Between us I think it's because they hate the idea someone can run their game better then them.
Something you might also find interesting. When im bored I enjoy working on a side project. I had spent extensive time in IDA naming various things using their goof up in KMST(Korean Maple Story Tespia), (They accidentally released their client unpacked with a PDB and since Nexon has not rewritten really anything in the game I can get function names by comparing the ASM) I have been experimenting with EasyHook. With it and the .NetFramework's ability to get a delegate from a pointer I wrote a simple program that allows me to watch the packets coming and going from localhost and for the fun of it I added a little something that allows me to inject messages into the chat log.
I think I might make use of it later on to extend the client with custom UI's, Packets, and a simple AntiHack.
ScreenShot
[url]http://farm7.staticflickr.com/6019/6342114682_099941da07_b.jpg[/url]
[img]http://i.imgur.com/zqX3l.png[/img]
The game automatically handles corners and edges, by the way.
[img]http://puu.sh/ec5R[/img]
Beautiful images.
Finally we got Vector:ToScreen() working!
[img]http://img.luastoned.com/luacraft_esp_v1.png[/img]
[lua]local pos = LocalPlayer():GetPos()
local font = surface.GetFont()
hook.Add("render.gameoverlay", "LuaCraft ESP", function()
surface.SetDrawColor(255, 0, 0, 255)
font:DrawTextShadow("ESP", 5, 5)
for k, ent in pairs(ents.GetAll()) do
local entPos = ent:EyePos()
local class = ent:GetClass()
local x, y, visible = entPos:ToScreen()
if (pos:Distance(entPos) < 64 and visible and class ~= "dS") then
if (ent:IsMob()) then
surface.SetDrawColor(255, 0, 0, 255)
elseif (ent:IsAnimal()) then
surface.SetDrawColor(0, 255, 0, 255)
else
surface.SetDrawColor(0, 0, 255, 255)
end
font:DrawTextShadow(class, x, y - 8)
surface.SetDrawColor(255, 255, 255, 255)
surface.DrawRect(x, y, 1, 1)
end
end
end)[/lua]
Fully MAC (Mojang Anti Cheat) proof! :v:
[sp]Mojang Anti Cheat does not exist.[/sp]
"Diamond"
[QUOTE=ryan1271;34335111]I feel the problem is converting integers to Strings to find the length. Is there any way to do this faster?[/QUOTE]
log10
[QUOTE=Icedshot;34332326]Couldn't you have a set distance where after that, you stop raytracing and use normal shadowing instead? It'd give you a large performance increase, and you wouldn't really notice the difference for far away objects[/QUOTE]
That's what we do. If we didn't, the ray would march in a infinite loop when pointed to the sky.
Was looking for a function to convert a string into a 64 bit unsigned integer. Couldn't find any truly portable functions - then I found this bit of code.
Thought it was clever enough to share with the forums :)
[cpp]unsigned long long val = 0;
char *p = (char*)str.c_str();
while (*p)
{
val *= 10ULL;
val += *p - '0';
p++;
}[/cpp]
Inadvertently that creates a signed-digit numeral system
E.g. the strings "9900" and "10/00" are equivalent because the characer "/" is interpreted as a negative 1.
[QUOTE=Matte;34338942]That's what we do. If we didn't, the ray would march in a infinite loop when pointed to the sky.[/QUOTE]
You mentioned it already, but an octree would [i]really[/i] help.
For inner nodes, you mark them as fully empty if all eight children are empty and mark them as potentially full if any are full.
Then you do simple box-ray intersection (instead of ray marching, as any choice of fixed step size would be problematic) on each node, skipping any that are fully empty and descending further whenever you find one that is potentially full. This should enable you to skip a ton of testing at the courser resolutions.
[QUOTE=garry;34339030]Was looking for a function to convert a string into a 64 bit unsigned integer. Couldn't find any truly portable functions - then I found this bit of code.[/QUOTE]
Why not STL?
[cpp]unsigned long long res;
std::istringstream ss("12345678901234567890");
ss >> res;[/cpp]
[QUOTE=garry;34339030]Was looking for a function to convert a string into a 64 bit unsigned integer. Couldn't find any truly portable functions - then I found this bit of code.
Thought it was clever enough to share with the forums :)
[cpp]unsigned long long val = 0;
char *p = (char*)str.c_str();
while (*p)
{
val *= 10ULL;
val += *p - '0';
p++;
}[/cpp][/QUOTE]
use the stl or this:
[cpp]
unsigned long long val;
sscanf(str.c_str(), "%llu", &val);
[/cpp]
both are truly portable
[editline]22nd January 2012[/editline]
...actually why do I get the feeling that garry is trying to piss us off intentionally
Or, maybe he was just trying to help someone out. Not everything has a hidden purpose to it.
[QUOTE=Dj-J3;34339375]Or, maybe he was just trying to help someone out. Not everything has a hidden purpose to it.[/QUOTE]
nope, there's no way garry is serious
[editline]22nd January 2012[/editline]
at least I hope so
[QUOTE=garry;34339030]Was looking for a function to convert a string into a 64 bit unsigned integer. Couldn't find any truly portable functions - then I found this bit of code.
Thought it was clever enough to share with the forums :)
[cpp]unsigned long long val = 0;
char *p = (char*)str.c_str();
while (*p)
{
val *= 10ULL;
val += *p - '0';
p++;
}[/cpp][/QUOTE]
Also known as the oldest trick in the book.
Reversing the number is also very similar.
That function should at least have an "assert(*p >= '0' && *p <= '9');", if not more proper error handling. :S
[QUOTE=Dotmister;34327016]It's not very efficient but it saves dealing with the win32 API, which is pretty dire..[/QUOTE]
You mean the User/GDI component, the rest of WinAPI is very good and robust.
[img]http://i.imgur.com/FGwCL.png[/img]
Really pissed off, 'cause I had a brilliant gif to show you but virtualdub saved it somewhere and now I can't find it. [img]http://forums.deletionquality.net/images/smilies/saddowns.gif[/img]
[QUOTE=LuaStoned;34338107]Finally we got Vector:ToScreen() working!
[IMG]http://img.luastoned.com/luacraft_esp_v1.png[/IMG]
Fully MAC (Mojang Anti Cheat) proof! :v:
[sp]Mojang Anti Cheat does not exist.[/sp][/QUOTE]
Is this clientside, or serverside with some code being sent to the client?
[b]Edit:[/b]
Wtf just happened?
[thumb]http://dl.dropbox.com/u/5270951/wtf.png[/thumb]
Shit, I didn't see that 'view advanced details' bit...
I can use my Animation framework for characters for cast animations as well and it works perfectly together.
Demo:
[video=youtube;rErGjuraj7M]http://www.youtube.com/watch?v=rErGjuraj7M[/video]
Development:
[video=youtube;aqWdWQey9J0]http://www.youtube.com/watch?v=aqWdWQey9J0[/video]
next up projectile weapons
[QUOTE=Nigey Nige;34339808][img]http://i.imgur.com/FGwCL.png[/img]
Really pissed off, 'cause I had a brilliant gif to show you but virtualdub saved it somewhere and now I can't find it. [img]http://forums.deletionquality.net/images/smilies/saddowns.gif[/img][/QUOTE]
This happens to me a lot, so I:
[URL="http://www.voidtools.com/"]Search Everything[/URL] for *.gif
[QUOTE=BlkDucky;34340262]This happens to me a lot, so I:
[URL="http://www.voidtools.com/"]Search Everything[/URL] for *.gif[/QUOTE]
Awesome. Thanks!
[editline]22nd January 2012[/editline]
Fuck year
[IMG]http://i.imgur.com/N0U1N.gif[/IMG]
[QUOTE=bobthe2lol;34340053]Is this clientside, or serverside with some code being sent to the client[/QUOTE]
This is the LuaCraft Client, you can join any 1.1 server with it.
If you join LuaCraft servers you will have the option to receive net messages and other stuff.
[QUOTE=LuaStoned;34340430]This is the LuaCraft Client, you can join any 1.1 server with it.
If you join LuaCraft servers you will have the option to receive net messages and other stuff.[/QUOTE]
Where can I get it?
[QUOTE=bobthe2lol;34340843]Where can I get it?[/QUOTE]
Heh, I still have to create the official LuaCraft thread over at the MC subforum.
You can get the server already (check [url]http://wiki.luacraft.com[/url]) but the client needs a little more work (Gui related things).
I will inform you guys when it's out!
Sorry, you need to Log In to post a reply to this thread.