Ecstacy
Mothafuckaaa
Hey,
I made this script while testing out some string functions,
I guess this can be used for some sort of secret language or something.
The script basically turns up to 8 characters into bytes.
words must be seperated by a ",".
The script will also convert bytes to characters.
bytes must be seperated by ",".
fixed by Jano
Example.
will be
and
will be
Yours,
unknown666
#Edit
Added "!reverse" command.
E.g.
I made this script while testing out some string functions,
I guess this can be used for some sort of secret language or something.
The script basically turns up to 8 characters into bytes.
words must be seperated by a ",".
The script will also convert bytes to characters.
bytes must be seperated by ",".
Lua:
<talkaction words="!tobytes;!frombytes;!reverse" event="script" value="SCRIPT_NAME.lua"/>
Lua:
function onSay(cid, words, param, channel)
if(param == '') then
return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
end
if words == "!tobytes" then
local ret = ''
for str = 1, param:len() do
ret = ret .. param:sub(str, str):byte() .. ", "
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ret)
elseif words == "!frombytes" then
local ret = ''
for _, s in ipairs(string.explode(param, ",")) do
ret = ret .. string.char(tonumber(s))
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, ret)
elseif words == "!reverse" then
doPlayerSendTextMessage(cid,20,'REVERSAL\nNormal: \''..param..'\' \nReversal: '..string.reverse(param))
end
return true
end
Example.
Code:
!tobytes whats up
will be
Code:
119,104,97,116,115,32,117,112
and
Code:
!frombytes 119,104,97,116,115,32,117,112
will be
Code:
whats up
Yours,
unknown666
#Edit
Added "!reverse" command.
E.g.
Code:
!reverse hello otland[code]
will be this
[code][COLOR="black"]REVERSAL
Normal: 'hello otland'
Reversal: 'dnalto olleh'[/COLOR]
Last edited: