Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 18/11/21 in all areas

  1. So yeah, made a little script demonstration which could be very useful for the innovative server creators. If you're a Diablo (Dungeon Siege in my case) fan, you'll definitely love this. Know what? Give this post some feedback and I'll post it to the community with exports and custom events
    2 points
  2. genereaza un float intre lower si greater function randomFloat(lower, greater) return lower+math.random()*(greater-lower) end returneaza offset ul unui element in object space function getPositionFromElementOffset(element, offX, offY, offZ) local m = getElementMatrix(element) local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z end self-made: returneaza secundele+ms gametime-ului local secondChange = 0 local secondStart = getTickCount() function convertTimeToSeconds() local hour, minute = getTime() if minute ~= secondChange then secondChange = minute secondStart = getTickCount() end return hour*60+minute+((getTickCount()-secondStart)/getMinuteDuration()) end sterge value dintr-un table function removeValueFromTable(table, value) if type(table) == "table" then for k,v in ipairs(table) then if v == value then table.remove(table, k) return true end end end return false end limiteaza value intr-un interval function clamp(value, min, max) return math.max(min, math.min(value, max)) end returneaza offset-ul unui punct bazat pe rotatie si distanta 2D function getPointFromDistanceRotation(x, y, dist, angle) return x+math.cos(math.rad(90-angle))*dist, y+math.sin(math.rad(90-angle))*dist end self-made: genereaza un cubic bezier curve in 3D -- x, y, z - start -- x2, y2, z2 - end -- bx, by, bz - start handle -- b2x, b2y, b2z - end handle -- t - time float function cubicBezier3D(x, y, z, x2, y2, z2, bx, by, bz, b2x, b2y, b2z, t) local p1 = {lerp(x, bx, t), lerp(y, by, t), lerp(z, bz, t)} local p2 = {lerp(bx, b2x, t), lerp(by, b2y, t), lerp(bz, b2z, t)} local p3 = {lerp(b2x, x2, t), lerp(b2y, y2, t), lerp(b2z, z2, t)} local l1 = {lerp(p1[1], p2[1], t), lerp(p1[2], p2[2], t), lerp(p1[3], p2[3], t)} local l2 = {lerp(p2[1], p3[1], t), lerp(p2[2], p3[2], t), lerp(p2[3], p3[3], t)} return lerp(l1[1], l2[1], t), lerp(l1[2], l2[2], t), lerp(l1[3], l2[3], t) end function lerp(a, b, c) return a + (b - a) * c end
    1 point
  3. Today I have made significant progress in programming model maintainability and freedom in the Eir lexer. The great new feature inside the SDK is selector-based steps. This is a very important feature to split CFG syntax parsing away from associativity rules as well as language rule simplifications that result from using selectors. I dare to say that the implementation quality of my lexer is above industry standard. Not only can you use the scientific notations that you know from various books and lectures, but you are provided with a meaningful set of optimizing deterministic production templates. I have created and used the Eir SDK which is filled with performant, robust and powerful algorithms/data-structures. That is why I can recommend the Eir lexer for professional compilation software from the bottom of my heart. Lexing CFG rules does suffer from the P != NP problem. Not only does it have implications on performance but on the complexity of programming models. In my lexer I have decided to stay inside the deterministic space of CFG rules for various reasons: guarantee halting and maximum performance for CFG syntaxes that are both deterministic (strong requirement) and progressive-only (weak requirement) building upon the strong and intuitive foundation of no-progress-termination inside CFG syntaxes which paves the way for good CFG language diagnostics non-determinism is hard to understand for developers Now, to explain to you the difference between non-determinism and determinism I want to give you an example of the binary operator +. Non-deterministic CFG syntax for operator +: S -> S '+' S S -> A | empty This CFG syntax resembles all associative possibilities to create brackets around the + operator. But it does also resemble concatenations of the + token without any A productions. While it does contain the essence of binary nodes, it is very ambiguous in nature and is not supported by the Eir lexer. Deterministic CFG syntax for operator +: S -> A S -> A '+' S This CFG syntax creates productions of type A+A+...+A which is internally creating a list of A data nodes with the implication that each is separated by a + operator. While this by default is not a binary-tree representation, it can be easily converted into one by the use of selector-based steps. This grammar is fully supported by the Eir lexer. The above example of the + operator should explain to you why it is a good idea to stick to deterministic rules in general. I promise you that the Eir lexer is the best toolkit to work with the deterministic space of CFG syntaxes. Selectors are a simple scientific concept. Imagine that each data node that is lexed from a CFG sequence is a tuple of child data nodes. The job of the selector is to pick one possible tree arrangement from this list that is best suited for your program. It is being fed with each attributed token or data node in sequence. Instead of storing the + operator node as a list, it can easily create a left- or right-associative tree. This tree can then be transformed into a direct representation by CPU instructions (they are often working on two operands to keep things simple).
    1 point
  4. Em todos os Dayz que já joguei sempre existiram o mesmo número de armas, o que eles fazem é apenas substituir o modelo da arma por outro para dar a impressão de uma nova arma. Por exemplo, eles substituíam a Katana ( ID 8 ) por um machado. Eles não criam armas novas, apenas substituem as que já existem por novos modelos, pois não tem como criar uma nova arma com um ID novo. Mas se mesmo assim você tem certeza absoluta que eles criam novas armas, deixando o jogo com mais armas do que o jogo original. Dai não sei como fizeram, com certeza o cara foi mestre na gambiarra.
    1 point
  5. Thank you for sharing. I didn't know that in Diablo and League of Legends exist the ARPG camera modes exist. I played a lot of both games, including the first versions of Diablo and Diablo mobile. Thank you for writing a good script. I will use it soon in both games as well. If the RIOT can ban you from using this script for any reason? I got banned before because of using the mouse macro, so before using it, I want to be sure that I'm safe from the ban, last time I got banned, I found a good service where you can buy cheap lol accounts.
    0 points
×
×
  • Create New...