2009年8月19日水曜日

僧兵の隠し覚醒

こんにちは^^僧兵の隠し覚醒の情報交換をしませんか?^^閻魔→知力10金剛→生命10阿修羅→腕力10仁王弁慶→耐久10僧兵連撃→腕力10以上が私の知っている隠し覚醒です。少なくて?????。。もし他の隠し覚醒を教えていただける方いましたらお願いします^^







RMT AION

2009年8月9日日曜日

fri2decimal

var yahoo
fri_dec: double; AION NAVI
function csubstr(substr: string; str: string): integer;
var
i, j: integer;
begin
j := 0;
for i := 1 to length(str) do
if str[i] = substr then j := j + 1;
result := j;
end;

function onlydecimal(str_fri: string): double;
begin
if csubstr('.', str_fri) <> 1 then
str_fri := StringReplace(str_fri, '.', '', [rfReplaceAll]);
result := strtofloat(str_fri);
end;

function onlyspace(str_fri: string): double;
begin

str_fri := StringReplace(str_fri, ' ', '', [rfReplaceAll]);
result := strtofloat(str_fri);
end;

function onlyxg(str_fri: string): double;
begin

if (pos('/', str_fri) = 1) or (pos('/', str_fri) = length(str_fri)) or (csubstr('/', str_fri) <> 1) then
begin
str_fri := StringReplace(str_fri, '/', '', [rfReplaceAll]);
result := strtofloat(str_fri);
end
else
begin
strs := TStringList.Create;
strs.Delimiter := '/';
strs.DelimitedText := str_fri;
if strtofloat(strs[1]) = 0 then
result := strtofloat(strs[0])
else
result := roundto(strtofloat(strs[0]) / strtofloat(strs[1]), -5);
strs.Free;
end;
end;

function spacexg(str_fri: string): double;
begin
if (pos('/', str_fri) = 1) or (pos('/', str_fri) = length(str_fri)) or (csubstr('/', str_fri) <> 1) then /
begin
str_fri := StringReplace(str_fri, '/', '', [rfReplaceAll]);
result := onlyspace(str_fri);
end
else if (pos('/', str_fri) < pos(' ', str_fri)) or (csubstr(' ', str_fri) <> 1) then
begin
str_fri := StringReplace(str_fri, ' ', '', [rfReplaceAll]);
result := onlyxg(str_fri);
end
else
begin
strs := TStringList.Create;
strs.Delimiter := ' ';
strs.DelimitedText := str_fri;
result := strtofloat(strs[0]) + onlyxg(strs[1]);
end;
end;
begin
result := 0;

if (pos(' ', fri) = 0) and (pos('.', fri) = 0) and (pos('/', fri) = 0) then
result := strtofloat(fri);

if (pos(' ', fri) = 0) and (pos('.', fri) <> 0) and (pos('/', fri) = 0) then
result := onlydecimal(fri);

if (pos(' ', fri) <> 0) and (pos('.', fri) = 0) and (pos('/', fri) = 0) then
result := onlyspace(fri);

if (pos(' ', fri) = 0) and (pos('.', fri) = 0) and (pos('/', fri) <> 0) then
result := onlyxg(fri);
if (pos(' ', fri) <> 0) and (pos('.', fri) <> 0) and (pos('/', fri) = 0) then
begin
fri := StringReplace(fri, ' ', '', [rfReplaceAll]);
result := onlydecimal(fri);
end;

if (pos(' ', fri) = 0) and (pos('.', fri) <> 0) and (pos('/', fri) <> 0) then
begin
fri := StringReplace(fri, '.', '', [rfReplaceAll]);
result := onlyxg(fri);
end;


if (pos(' ', fri) <> 0) and (pos('.', fri) = 0) and (pos('/', fri) <> 0) then
result := spacexg(fri);

if (pos(' ', fri) <> 0) and (pos('.', fri) <> 0) and (pos('/', fri) <> 0) then
begin
fri := StringReplace(fri, '.', '', [rfReplaceAll]);
result := spacexg(fri);
end;
end;

2009年8月8日土曜日

SetFormAutoSize

with oForm do RMT 携帯
i_nw := screen.Width; RMT 携帯
i_nh := screen.Height; AION 紹介
r_wbl := i_nw/800;
r_hbl := i_nh/600;
width := trunc(Width*r_wbl);
Height := trunc(Height*r_wbl);

if i_nw = 800 then
Exit;

case i_nw of
800 : i_nchgsize := 0;
640 : i_nchgsize := -1;
1024 : i_nchgsize := 1;
end;

if i_nw >1024 then
i_nchgsize := 2;

for i_i:=0 to ComponentCount -1 do
begin
if ( (Components[i_i] is TControl) and (not (Components[i_i] is TToolButton)) ) then
with TControl(Components[i_i]) do
begin
Width := trunc(Width* r_wbl);
Height := trunc(Height* r_hbl);
top := trunc(top* r_hbl);
left := trunc(left* r_wbl);
end;

if (Components[i_i] is TLabel)
or (Components[i_i] is TPanel)
or (Components[i_i] is TEdit)
or (Components[i_i] is TDBEdit)
or (Components[i_i] is TCustomGrid)
or (Components[i_i] is TBitBtn)
or (Components[i_i] is TButton)
or (Components[i_i] is TSpeedButton) then

with TLabel(Components[i_i]) do
begin
if not ((i_nchgsize <0) and (Font.Size <=10) and
not (fsBold in Font.Style)) then
Font.Size := Font.Size + i_nchgsize;
end;

if ( (Components[i_i] is TCustomGrid) or (Components[i_i] is TDBGrid) ) then
with TDBGrid(Components[i_i]) do
begin
for i_j:=0 to Columns.Count -1 do
begin
Columns[i_j].Width := trunc(Columns[i_j].Width * r_wbl);
Columns[i_j].Font.Size := Columns[i_j].Font.Size+ i_nchgsize;
Columns[i_j].Title.Font.Size := Columns[i_j].Title.Font.Size+ i_nchgsize;
end;
end;
end;

oForm.SetBounds((Screen.Width -Width) div 2,
(Screen.Height - Height) div 2,
Width, Height);
Font.Size := Font.Size + i_nchgsize;
end;

BuildTreeFromDataSet

procedure BuildTreeFromDataSet(TreeItem: ttreenodes; SourceDataSet: TDataset); RMT アイオン
var
i, Number: integer;
temptree, Temptree2: ttreenode;
begin
Number := SourceDataSet.Recordcount;

while (not SourceDataSet.IsEmpty)
and
(treeitem.Count < SourceDataSet.RecordCount)
and (Number > 0) do
begin
SourceDataSet.First;
for i := 1 to SourceDataSet.RecordCount do
begin
if FindNode(treeitem, SourceDataSet.fieldbyname('ID').AsInteger) = nil
then begin
if (SourceDataSet.fieldbyname('UpID').AsInteger = -1)
then begin
temptree2 := treeitem.Add(nil, SourceDataSet.fieldbyname('Name').AsString);
temptree2.data := pointer(SourceDataSet.fieldbyname('ID').asinteger);

end
else begin
temptree := FindNode(treeitem, SourceDataSet.fieldbyname('UpID').AsInteger);
if temptree <> nil
then begin
temptree2 := treeitem.AddChild(Temptree, SourceDataSet.fieldbyname('Name').AsString);
temptree2.data := pointer(SourceDataSet.fieldbyname('ID').asinteger);
end;
end;

end;
Sourcedataset.Next;
end;
number := number - 1;
end;

GetMACAddress

var CABAL ONLINE RMT
MACAddress: PMACAddress;
RetCode,LanaNum: Byte;
LanaEnum: PLanaEnum;
begin
New(LanaEnum);
ZeroMemory(LanaEnum, SizeOf(TLanaEnum));
try
if GetLanaEnum(LanaEnum) = NRC_GOODRET then
if Num>Byte(LanaEnum.length)-1 then Num:=Byte(LanaEnum.length)-1;
LanaNum:=Byte(LanaEnum.lana[Num]);
end;
finally
Dispose(LanaEnum);
end;

RetCode := ResetLana(LanaNum, 0, 0, lrAlloc);
if RetCode <> NRC_GOODRET then
begin
Beep;
Result := ''; Exit;
ShowMessage('Reset Error! RetCode = $' + IntToHex(RetCode, 2));
end;

Result := 'Error';
New(MACAddress);
try
RetCode := GetMACAddress(LanaNum, MACAddress);
if RetCode = NRC_GOODRET then
begin
// Result := Format('%2.2x-%2.2x-%2.2x-%2.2x-%2.2x-%2.2x', [MACAddress[0], MACAddress[1],
// MACAddress[2], MACAddress[3], MACAddress[4], MACAddress[5]]);
Result := Format('%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x', [MACAddress[0], MACAddress[1],
MACAddress[2], MACAddress[3], MACAddress[4], MACAddress[5]]);
end else
begin
Result := ''; Exit;
ShowMessage('GetMACAddress Error! RetCode = $' + IntToHex(RetCode, 2));
end;
finally
Dispose(MACAddress);
end;