Hello. I have created script. I tested it, but I'm still know what give a error.
Please help me solving problem.
This is encrypting script.
Data Encryption works, but MapEncryption does not work. Please help me solve this.
Project (If you see CBA logo, please click right mouse, and select save file to...): http://www.mediafire.com/?dvedf5299kbcicr
"Data.zip
Still not downloading? Repair your download."
"There was a problem with your download
We apologize, but we are having difficulties processing your download request. Please be patient while we try to repair your download request.
Restarting download in: 2 seconds."
Rinse and repeat........
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
############################################################
#**NRGSS (Narzew RGSS Module)
#**Narzew
#**narzewcreations.rox.pl
#**Projekt zaczęty w kwietniu 2012 roku.
#**Wersja 1.1
############################################################
#**Zeiling Engine and NRGSS Engine
#**Narzew
############################################################
#??.04.12 - Script Start Date
#11.05.12 - Script Completed Date V 1.0
#V 1.0
############################################################
#**Instructions:
#**NRGSS.register
#**Description: Register a product
#**In: Product
#**Out: Operation (Nil)
#**NRGSS.registered?(product)
#**Description: Is the product registered?
#**In: Product
#**Out: Boolean
#**NRGSS.in_range?
#**Description: Is the integer in range?
#**In: Max
#**In: Min
#**In: Value
#**Out: Boolean
#**NRGSS.round_range
#**Description: Round integer range
#**In: Max
#**In: Min
#**In: Value
#**Out: Operation (Nil)
#**NRGSS.unpack_byte
#**Description: Unpacks byte to text
#**In: Byte
#**Out: Unpacked Byte
#**NRGSS.unpack_text
#**Description: Unpack bytes to text
#**In: Text
#**Out: Unpacked Text
#**NRGSS.encrypt_int
#**Description: Encrypts an int.
#**In: Int
#**In: Key
#**Out: Encrypted Int
#**Description: Decrypts encrypted int.
#**NRGSS.decrypt_int
#**In: Int
#**In: Key
#**Out: Decrypted Int
############################################################
def self.activate(product)
NRGSS.register(product)
unless NRGSS.registered?(product)
raise 'Error with activating #{product}. Game will now close.'
end
end
def self.in_range?( x, y, value)
value = self if value == nil
return true if value.to_i > x.to_i and value < y.to_i
end
def self.round_range(x, y, value)
value = self if value == nil
if value > x
value = x
elsif value < y
value = y
end
end
def self.unpack_byte(byte)
result = []
case byte
when 0 then result << '$NULL$'
when 1 then result << '$SOH$'
when 2 then result << '$STX$'
when 3 then result << '$ETX$'
when 4 then result << '$EOT$'
when 5 then result << '$ENQ$'
when 6 then result << '$ACK$'
when 7 then result << '$BEL$'
when 8 then result << '$BS$'
when 9 then result << '$TAB$'
when 10 then result << '$LF$'
when 11 then result << '$VT$'
when 12 then result << '$FF$'
when 13 then result << '$CR$'
when 14 then result << '$SO$'
when 15 then result << '$SI$'
when 16 then result << '$DLE$'
when 17 then result << '$DC1$'
when 18 then result << '$DC2$'
when 19 then result << '$DC3$'
when 20 then result << '$DC4$'
when 21 then result << '$NAK$'
when 22 then result << '$SYN$'
when 23 then result << '$ETB$'
when 24 then result << '$CAN$'
when 25 then result << '$EN$'
when 26 then result << '$SUB$'
when 27 then result << '$ESC$'
when 28 then result << '$FS$'
when 29 then result << '$GS$'
when 30 then result << '$RS$'
when 31 then result << '$US$'
when 32 then result << ' '
when 33 then result << '!'
when 34 then result << '\"'
when 35 then result << '#'
when 36 then result << '$'
when 37 then result << '%'
when 38 then result << '&'
when 39 then result << '\''
when 40 then result << '('
when 41 then result << ')'
when 42 then result << '*'
when 43 then result << '+'
when 44 then result << ','
when 45 then result << '-'
when 46 then result << '.'
when 47 then result << '/'
when 48 then result << '0'
when 49 then result << '1'
when 50 then result << '2'
when 51 then result << '3'
when 52 then result << '4'
when 53 then result << '5'
when 54 then result << '6'
when 55 then result << '7'
when 56 then result << '8'
when 57 then result << '9'
when 58 then result << ':'
when 59 then result << ';'
when 60 then result << '<'
when 61 then result << '='
when 62 then result << '>'
when 63 then result << '?'
when 64 then result << '@'
when 65 then result << 'A'
when 66 then result << 'B'
when 67 then result << 'C'
when 68 then result << 'D'
when 69 then result << 'E'
when 70 then result << 'F'
when 71 then result << 'G'
when 72 then result << 'H'
when 73 then result << 'I'
when 74 then result << 'J'
when 75 then result << 'K'
when 76 then result << 'L'
when 77 then result << 'M'
when 78 then result << 'N'
when 79 then result << 'O'
when 80 then result << 'P'
when 81 then result << 'Q'
when 82 then result << 'R'
when 83 then result << 'S'
when 84 then result << 'T'
when 85 then result << 'U'
when 86 then result << 'V'
when 87 then result << 'W'
when 88 then result << 'X'
when 89 then result << 'Y'
when 90 then result << 'Z'
when 91 then result << '['
when 92 then result << '\\'
when 93 then result << ']'
when 94 then result << '^'
when 95 then result << '_'
when 96 then result << '`'
when 97 then result << 'a'
when 98 then result << 'b'
when 99 then result << 'c'
when 100 then result << 'd'
when 101 then result << 'e'
when 102 then result << 'f'
when 103 then result << 'g'
when 104 then result << 'h'
when 105 then result << 'i'
when 106 then result << 'j'
when 107 then result << 'k'
when 108 then result << 'l'
when 109 then result << 'm'
when 110 then ersult << 'n'
when 111 then result << 'o'
when 112 then result << 'p'
when 113 then result << 'q'
when 114 then result << 'r'
when 115 then result << 's'
when 116 then result << 't'
when 117 then result << 'u'
when 118 then result << 'v'
when 119 then result << 'w'
when 120 then result << 'x'
when 121 then result << 'y'
when 122 then result << 'z'
when 123 then result << '{'
when 124 then result << '|'
when 125 then result << '}'
when 126 then result << '~'
when 127 then result << '$DEL$'
else
result << '$NOT$'
end
end
def self.unpack_text(text)
result = []
text.each{|byte|
result << NRGSS.unpack_byte(byte)
}
return result.to_s
end
def self.pack_bytes(text)
result = []
text.each_byte{|byte| result << byte }
return result
end
def self.pack_byte(letter)
result = []
count = 0
letter.each_byte{|byte| result << letter }
return result.at(0)
end
def self.encrypt_int(int, val=12)
srand(val*2)
val.times{
int = int + val
int = int - 2
int = int + rand(val * 4)
int = int - rand(val * 3)
}
return int
end
def self.decrypt_int(int, val=12)
srand(val*2)
val.times{
int = int - val
int = int + 2
int = int - rand(val * 4)
int = int + rand(val * 3)
}
return int
end
def self.require_rbl(file)
raise("Rbl #{file} is required. Please install or download it.") if !File.exist?(file)
end
def self.rbl_read(data)
file = File.open(data, 'rb')
data = file.read
file.close
end
def _d(int, key=12)
return NRGSS.decrypt_int(int, key)
end
def _e(int, key=12)
return NRGSS.encrypt_int(int, key)
end
def _td(int, key=12)
dec = NRGSS.decrypt_int(int, key)
enc = NRGSS.encrypt_int(dec, key)
return enc == int
end
def byte(byte)
return NRGSS.pack_byte(byte)
end
def ubyte(byte)
return NRGSS.unpack_byte(byte)
end
Script two: NCEA (Working good)
Content Hidden
Code:
############################################################
#**Narzew Creations Encryption Algorithm (NCEA)
#**Narzew
#**narzewcreations.rox.pl
#**Projekt zaczęty 10 listopada 2011 roku.
#**Wersja 0.2 Optimal
############################################################
#**NCEA jest produktem, kodującym grę.
#**Produkt jest chroniony licencją NC z argumentami: brak
#**Produkt wymaga oprogramowania NRGSS w wersji 0.2 lub większej
#**Narzew
############################################################
#10.11.11 - Script Start Date
#10.11.11 - Script Completed Date - V 0.1
#20.11.11 - Script Completed Date - V 0.2
#12.05.12 - Script Completed Date - V 0.2 Optimal
############################################################
raise 'NRGSS is not installed. Please install NRGSS or download it.\nYou can get latest NRGSS from: http://ncr.rox.pl' if !defined?(NRGSS)
NRGSS.activate('NCEA')
$administrable = true # Edit if you want.
$admin = true if $DEBUG == true and $administrable == true # Don't edit
module NCEA
module CONFIG
#Wszędzie false by zdeaktywować skrypt
#Kodować dane?
ENCRYPT_DATA = true
#Wczytać zakodowane dane?
LOAD_DATA = true
#Wczytać skrypty?
LOAD_SCRIPTS = false
#Plik danych
DATA_FILE = 'Data.ncp'
end