wc3edit.net

United Warcraft 3 map hacking!
It is currently April 18th, 2024, 9:29 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: April 4th, 2007, 7:38 pm 
Offline
Newcomer
User avatar

Joined: April 3rd, 2007, 8:09 pm
Posts: 7
Once again, I mention I'm not a "inventor" type. I'm going through all this is trying to figure out how those codes interact with each other.

It's more of a "decoding" manner.

I will edit the first post once I upload the war3map.j a bit later.

[EDIT]
Uploaded the file.
The map is called Naruto Wars.
All this problem starts at Line 1337 (not joking) if opened in JASSCraft.
Thanks guys, I feel like I can learn a lot here.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: April 6th, 2007, 2:38 am 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
You picked a quite advanced function to start with if you're just beginning with JASS

function Trig_Secret_Conditions takes nothing returns boolean
if(not(CountUnitsInGroup(GetUnitsOfPlayerAndTypeId(GetTriggerPlayer(),'hero1'))==1))then
return false
endif
return hashstringa(GetEventPlayerChatString())
endfunction

function hashstringa takes string s returns boolean
local integer istring=0
local integer n=0
local integer len=StringLength(s)
local location oHash=MakePair_II(0,0)
loop
exitwhen n>=len
set istring=Char2Int(SubString(s,n,n+1))
call hashblock(oHash,istring)
set n=n+1
endloop
if(First_I(oHash)==-955425320)then
if(Rest_I(oHash)==-451731975)then
call DeletePair(oHash)
set oHash=null
return true
endif
endif
call DeletePair(oHash)
set oHash=null
return false
endfunction

I can tell you what this does but I need a few more functions

function MakePair_II
function Char2Int
function hashblock
function First_I
function Rest_I
function DeletePair

I've played Naruto Wars before, this sounds like to me the code you enter to unlock your "secret" form


Top
 Profile  
 
 Post subject:
PostPosted: April 10th, 2007, 12:09 am 
Offline
Newcomer
User avatar

Joined: April 3rd, 2007, 8:09 pm
Posts: 7
What I'm guessing is that everything comes down to
Code:
if(First_I(oHash)==-955425320)then
if(Rest_I(oHash)==-451731975)then


Those number meant something.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: April 13th, 2007, 4:39 pm 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
Yes, they are an integer comparison...except you need to know what the functions do to get those numbers


Top
 Profile  
 
 Post subject:
PostPosted: April 16th, 2007, 10:06 pm 
Offline
Newcomer
User avatar

Joined: April 3rd, 2007, 8:09 pm
Posts: 7
Well
MakePair_II
Code:
function MakePair_II takes integer x,integer y returns location
return Location(ItoR(x),ItoR(y))
endfunction


DeletePair
Code:
function DeletePair takes location oPair returns nothing
call RemoveLocation(oPair)
endfunction


Char2int
Code:
function Char2Int takes string c returns integer
local string cset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
local integer i=0
local integer len=StringLength(cset)
loop
exitwhen(c==SubString(cset,i,i+1))or(i>=len)
set i=i+1
endloop
return i
endfunction


First_I, Rest_I
Code:
function First_I takes location oPair returns integer
return RtoI(GetLocationX(oPair))
endfunction
function Rest_I takes location oPair returns integer
return RtoI(GetLocationY(oPair))
endfunction


Hashblock
Code:
function hashblock takes location oHash,integer c returns nothing
local integer n=1
local integer delta=11742
local integer sum=0
local integer k1=5168478+c
local integer k2=2763741+c
local integer h1=First_I(oHash)
local integer h2=Rest_I(oHash)
loop
exitwhen n>32
set h1=h1+((h2*16)+(h2/32))+h2+sum+k1
set sum=sum+delta
set h2=h2+((h1*16)+(h1/32))+h1+sum+k2
set n=n+1
endloop
call SetPair_II(oHash,h1,h2)
endfunction


I have no idea what the function for MakePair, DeletePair, and the First_I End_I do. The Char2int function displayed all the alphabets and numbers which at the end will go through various convertions.

But for 1 reference.
Code:
function hashstring takes string s returns boolean
local integer istring=0
local integer n=0
local integer len=StringLength(s)
local location oHash=MakePair_II(0,0)
loop
exitwhen n>=len
set istring=Char2Int(SubString(s,n,n+1))
call hashblock(oHash,istring)
set n=n+1
endloop
if(First_I(oHash)==0x51D3AA57)then
if(Rest_I(oHash)==-683500700)then
call DeletePair(oHash)
set oHash=null
return true
endif
endif
call DeletePair(oHash)
set oHash=null
return false
endfunction


The convertion for that code turns out to be "-secret past". Which I have no idea how it get to that number/unit wise.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)