Hmm... unique raw code?

geniuscb

New Member
Reaction score
1
JASS:
call UnitAddAbility(VYI,1093687350)

(picked from DotA Allstars)

The native for UnitAddAbility:
JASS:
takes unit whichUnit, integer abilityId returns boolean


VYI (a variable) is the unit which will be added the ability, while 1093687350 is the ability which will be added to the unit.

While 1093687350 is not a variable, it is a raw code. I thought that raw code is form with 4 characters only.

If 1093687350 is really a raw code, please tell me how to convert it to the 4 character formed raw code. If it is not a raw code, then tell me how it works. Thank you very much.

(delete this post if wrong section/illegal)
 

Trollvottel

never aging title
Reaction score
262
yes it is a raw code.
a raw code is just an integer
JASS:
'A000' // ascii
0x1000000000000 // Hexadecimal
145349557897098 // decimal


these are just integers from different systems.

ascii works like

ValueOfLetter1 * 256^n + ValueOfLetter2 * 256^(n-1) .... + ValueOfLetterN * 256^0

n = digit position

hexadecimal

same but 16^n....0

decimal

same but 10^n....0


Ascii table:

http://www.asciitable.com/

And maybe you should read this:

http://www.thehelper.net/forums/showthread.php?t=85771
 

geniuscb

New Member
Reaction score
1
So... how do I convert an decimal rawcode to an ASCII rawcode? (Sorry, but my math is out :p)
 

geniuscb

New Member
Reaction score
1
Now I have the Rawcode2String, when i put it in the map, it gives me errors when saving. :(

[LJASS]Undeclared variable StringHash[/LJASS]
 

Azlier

Old World Ghost
Reaction score
461
You have Patch 1.24b, correct?
 

geniuscb

New Member
Reaction score
1
Is there anyway I can use NewGen without the Warcraft CD?i m not using the original warcraft

EDIT : Any other easier ways? Like a math formula?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Yes, you can. But, you need a fresh copy. Pirated wc works too.
DON'T use version changer, it is retarded. It does not patch your world editor.
Download the patches from ftp.blizzard.com then you can play with it!
 

geniuscb

New Member
Reaction score
1
An instance of WE seem to be running.

This message shows when i start newgen with 1.24b patch (from blizzard's ftp patcher).
(This is not the actual message, i forgot the actual one)
 

geniuscb

New Member
Reaction score
1
ascii works like

ValueOfLetter1 * 256^n + ValueOfLetter2 * 256^(n-1) .... + ValueOfLetterN * 256^0

n = digit position

hexadecimal

same but 16^n....0

decimal

same but 10^n....0

How does these work?
 

saw792

Is known to say things. That is all.
Reaction score
280
>Newgen never runs on 1.24b
Yes it does, it just uses the 1.21 world editor version which is perfectly compatible with 1.24b.
 

Trollvottel

never aging title
Reaction score
262
How does these work?

If you have for example

'A001'

the decimal number would be:

Ascii(A) * 256^3 + Ascii(0) * 256^2 + Ascii(0) * 256^1 + Ascii(1) * 256^0


Ascii(A) is 65
Ascii(0) is 48
Ascii(1) is 49
->

65 * 16777216 + 48 * 65536 + 48 * 256 + 49 * 1

= 1093677105
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top