• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
Arhowk
Reaction score
25

Profile posts Latest activity Postings Experience Resources About

  • Reputation (+2):
    (Post) The reply you got to this post was just.. What the hell, how is that even relevant right :p?
    Make sure that bribe's life has the right value, or the entire system will blow up (units will die or have full health, etc). If it doesn't have the exact same life bonus, it will die (and I'm sure that it doesn't).

    Also
    http://www.hiveworkshop.com/forums/jass-resources-412/system-damage-queue-213752/

    edit
    yup, if you don't edit the damage event ability from Bribe, it will not work as your units are going to die : p.

    edit
    nvm, it should still work, but I still recommend you change the value to 2,000,000
    Arhowk, Bribe's damage engine does have the add life ability, which means that you likely didn't put it in your map correctly. It will conflict with spellbooks.
    whenever an ability is added/removed, the spellbook is automatically closed

    AdvancedDamageEvent adds life to the unit to prevent death
    Bribe's doesn't

    This is the reason why Bribe's doesn't conflict with the spellbook. However, at the same time, this is the reason why Bribe's has poor behavior.
    Try dealing 1000 damage to a unit with 100 hp and then reducing that damage to 0 and see what happens.
    just plain DamageEvent :\.

    There is no way to do something like AdvancedDamageEvent w/o conflicting with spellbooks.
    oh doh, it was kStiyl

    right now Timer Tools is bugged, according to kStiyl =o.

    AuraStruct is fixed, but not Timer Tools : (.
    Could be an aura that effects corpses and when they decay they spawn a demon ; p.

    Anyways, I thought you said that you were still having problems with AuraStruct due to TimerTools? Or is it working fine now? Please let me know, if it's working fine, that means that I don't need to recode it :\.
    That's the UnitIndexer defend ability

    If it does not have that ability, then decay events will not work correctly
    Oh yea, here is the data written to the file


    000311208968%:6%?8'S#_'##'8?_:S:36WU:T:pT3#8U%'PTW:p:3W6PE?8#?:W(%%(EW%(_#W6U%_8?3'8WU%UWP3%3(#U6E_:T#:S_3EW'#8?E#_'W_#3?E8#'#:W_:EE3#U'E?'8U?:_3U8?#3_?(##(%EU8TU'S6P?_PT#U%P38PP%P'SU:TW#?%8(##3S?66#6PEE
    ?_(36%''WPTWU8_PTU8S:(W8'SW3UPEPU'?P?UEU(PEWPWUUE('PE:((UW#8%P'6S#PT(#6SSE86__WWE%ETW:S'(3P_3(W_(T(':'%3''('(38%'%%(T8E:#:EUE:EW::#WE_36(##6E8WU?'#%(8_?(S?'6TES6T%EE3(S?:#6''T(T:)(?6SU3W:6(_TUUW'%E'WE'%%P%3
    #U(S3_US_:%6?T#U:#S%W(3W%S8?P'8WS6:US(8:_PWU#3#SUTU'3#'(S_TS88(?(_'?3SU?P???SSSW?(SW8:?TPU''E(8UPUSU3WT#(SEE3(3P#?#U8SS''S3#(E#'E3PEW(W8_U_6E(3'U%S36%#T:S#PE3S8'_UT:pE:)SP6:TT:_3??S?%:(P:'(P'6(__#:U%T_:%%%U
    #3U''?%S?W8'3#(_U%SU?6?TTEP%3W:SS:_S?W#8'%#PU#TP?TU'#3::(3TT3ET%6P%3#8%S:3:?6%?%P'6?:)T(%'W_:pPS3?83P68E6'_8'%S?UU:U%#?S8(U6T(U(%'UW'8E(SU#T6?#?(_W88?P6##3#'UTWP_%U:S'T?'TSSW:#:SU#%E3:'(U8E#86(36W'_?#(%#S38SSU
    S#S?'3T::T_#3T%S:'6?:?_:_886_(6U6WT?(6S8'TUWST'E?#'':8_38%68?(S6S36#3_3
    edit
    the lib is done, I'm just waiting on magtheridon96 for MD5, which is like checksum : ).
    Arhowk >.<


    private static method init2 takes nothing returns nothing
    local Encoder encoder = Encoder.create("2b28ab097eaef7cf15d2154f16a6883c")
    local Code data = Code.create()
    local AES_Data loaded
    local integer playerId = 0

    //for testing purposes so that all 12 players have different codes
    call SetRandomSeed(GetRandomInt(-2147483647, 2147483647) + GetPlayerId(GetLocalPlayer()))

    call WaitForGameToStart()

    //loads 100 random integers
    call loadData(data)

    //call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,BitInt(data).toString())

    call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,"Saved")
    call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,"Bit Count: "+I2S(BitInt(data).bitCount))
    call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,BitInt(data).toString())
    call data.encrypt(encoder)

    call data.save("myFirstMap", "myFirstFile")
    call data.destroy()

    call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,"Loaded")
    set loaded = Code.load("myFirstMap", "myFirstFile")
    loop
    if (0 != loaded[playerId]) then
    set data = loaded[playerId]

    call data.decrypt(encoder)
    call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,BitInt(data).toString())

    //call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,60000,I2S(data.read()))

    call data.destroy()
    endif

    set playerId = playerId + 1
    exitwhen playerId == 12
    endloop

    call loaded.destroy()
    endmethod
    Just wait until I finish the easy save/load stuff -.-


    local Code data = Code.create()

    call data.write(25)
    call data.write(-1)
    call data.write(36)

    call data.save("myMap", "myFile")

    //this actually returns an array of Codes, but oh well
    set data = Code.load("myMap", "myFile") //read + synchronize

    call data.read() //25
    call data.read() //-1
    call data.read() //36


    There is also

    data.applyTamperProtection()
    data.encrypt(encoder)
    data.decrypt(encoder)

    Encoder encoder = Encoder.create("password")
    lol.. you really need to read the documentation

    synchronize can only be run in an executed thread, otherwise it will crash. If you aren't running it in an executed thread, it's going to crash : p.

    Read clearly states bitCount

    * method read takes integer bitCount returns integer
    * - read bitCount bits from sequence (from position 0)
    * - removes read bits


    from position 0 means that it already reads from the front of the set, it just reads next x bits, where x is the num you pass in.
    nooo.. for convert string, it's always 6, not 32, it's always 6***

    -> read(0,0)

    you're reading 0 bits there...
    how many bits you want the num to take up, just like big int max sizes, except that you're dealing with bit counts instead.

    integers are 32 bit, so if you want to store anything, you store it as a 32 bit, but this'll bloat your code.
    return bitint.read(bitcount of num) in getNextBroadcast

    I would personally set bitInt.group to 32 and then synchronize each full digit and then from there store the information back into a bit int and read it out. This'll increase the sync speed as you won't have to synchronize as much : ).
    er..

    A BitInt can be like... 2^48000...

    you asked what the max an *integer* could be, not a *BitInt*
    Why would you want it? Unless you were storing a string.

    If you want to store strings, you can use the Ascii lib and then write the integers that it gives you to a BitInt. You can then convert those integers back into a string by reading out of the BitInt and passing those integers back into the Ascii lib.
    Because BitInt doesn't treat the strings as Ascii, it uses a whole separate base.

    Test is 9 11 4 9
    T = 9
    e = 11
    s = 4
    t = T = 9

    You made each char take up 26 bits, so it would have actually printed
    9
    11 4 9

    not
    9
    11 4 16

    read(26) returns 9 because you gave each char 26 bits and you read the first 26 bits, which contains T, which is 9.

    edit
    char max would be 2^26, as you gave each char 26 bits, which is way over the limit. The limit for storage in a char is 6 bits as there are only 64 chars in the BitInt alphabet. 2^6 = 64.
  • Loading…
  • Loading…
  • Loading…
  • Loading…
  • Loading…
Top