Mob Script Encryption Algorithm
#1
Today we have published the MOB script encryption algorithm.

You can get C++ and Delphi source codes from downloads section.
-> Downloads -> Tools -> Mod -> Mob Crypt
Ответ
#2
can you explain to us don't understanding anything ofit what it is/do(/mean?)
Ответ
#3
It is Mob Script Encryption Algorithm. And first you must write a programm and use this Algorithm. If you can do it, you also can read scripts in *.mob files.
Sorry if i something wrong, my english is bad...
Что есть то есть, того что было не вернуть, не изменить ни дня.
Черный Обелиск "Дом желтого сна (часть 2)"
Ответ
#4
so you need to be able to program to make this, whatever it is work? Smile



i hope someone makes one Tongue
Ответ
#5
maybe I can convince someone to do that for me (if I can you shouldnt socks up to me because I hate that). I have my friends Big Grin
Ответ
#6
Visual Basic code:
Translated by CAHEK7
Код:
Public Sub ScriptCrypt(ByRef Script() As Byte, ByVal Key As Long)

Dim Tmp As Double
Dim i As Long
Dim TmpLng As Long
Tmp = Key

For i = 0 To UBound(Script)

  Tmp = Tmp * 214013 + 2531011
'-------------------------------------------------
     Do While Tmp > 2199023255552#
       Tmp = Tmp - 2199023255552#
     Loop
     Do While Tmp > 274877906944#
       Tmp = Tmp - 274877906944#
     Loop
     Do While Tmp > 34359738368#
       Tmp = Tmp - 34359738368#
     Loop
     Do While Tmp > 4294967296#
       Tmp = Tmp - 4294967296#
     Loop
' Especially to convert Double to DWORD
' you can change number of cycles
' to change up execution speed
'-------------------------------------------------

  TmpLng = CLng(Int(Tmp / 65536))
  TmpLng = TmpLng Mod 256
 
  Script(i) = Script(i) Xor CByte(TmpLng)

Next

End Sub

C# Code:
Код:
public string ReadCodedString()
{
byte[] coded = new byte[DataSize - 4];     // sizeof(coded string) - sizeof(key)
char[] decoded = new char[coded.Length];
uint uKey;

// Read
uKey   = orStream.ReadUInt32();           // KEY
coded = orStream.ReadBytes(coded.Length); // Coded string

// Decode string
for(int i = 0; i < coded.Length; i++)
{
  uKey = uKey * 214013 + 2531011;
  decoded[i] = Convert.ToChar(coded[i] ^ Convert.ToByte(uKey / 65536 % 256));
}
return new string(decoded, 0, decoded.Length );
}
Rolleyes
Ответ
#7
I understand something in Visual Basic, but I want to see examples of scripst used in a quest.
I'm not afraid of anything
I just need to know that I can breathe
Ответ
#8
MortalMachine,Пятница, 28 Октября 2005, 07:53 Написал:I understand something in Visual Basic, but I want to see examples of scripst used in a quest.
[right][snapback]35976[/snapback][/right]
You can use MRT to check one.
Open an .mob then expand filed ID_OBJECT_FILE.
ID_SS_TEXT <- Here is a script used by .mob
Type of this filed is SCRIPT_ENC mean tats script kept in enconded format.
CAHEK7 post algorithm how to to decode encoded script using VB.

Here is script example for zone7chest.mob.
Код:
GlobalVars (
 NULL : object,
 VSS#i#val : object,
 i : object,
 AChest : object
)

DeclareScript VCheck#3#1 (  this : object )
DeclareScript VTriger#3#2 (  this : object )

Script VCheck#3#1
(
 if
 (
   Not( IsEqual( GSGetVar( 0, "q.gz7g.q9g" ) , 2 )  )
   IsEqual( GetLeverState( AChest ) , 1 )
 )
 then
 (
   KillScript(  )
   VTriger#3#2( this )
 )
)

Script VTriger#3#2
(
 if
 (
 )
 then
 (
   KillScript(  )
   GSSetVarMax( 0, "q.gz7g.q9g.2", 2 )
   GSSetVarMax( 0, "q.gz7g.q9g", 2 )
   GiveQuestItem( 0, "OrcLicense00" )
 )
)

WorldScript
(
 Sleep( 2 )
 AChest = GetObjectByID( "1000252" )
 VCheck#3#1( NULL )
)
Ответ
#9
And where did you get this code. If you wrote it by yourself you would write your own program. If you didn`t write it then how did you translated it into basic.
Ответ
#10
The problem about creating your own program is to have the Visual Basic, I have Microsoft Visual Basic 2005 Express Edition Beta 2, but I can't compile into a .exe program, to do that you need to buy it, and it cost toons of money Sad
btw, I've made lots of programs B) , I make them for fun, but I'm not a master in Visual Basic.
I'm not afraid of anything
I just need to know that I can breathe
Ответ
#11
There are 1 very interesting fact - zone20 and zonemainmenu uses script format with another signature. Anybody can read that script with simple text editor. And, if i understood this moment clean... This script is read faster, because it does not need to be decrypted by the game.exe until zone loads.
Ответ


Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)