?? game.pas
字號:
end else if (Copy(str, 1, 11) = 'skillpoint ') and ((DebugCMD and $0008) <> 0) and (tid.ChangeStatSkill = 1) then begin Val(Copy(str, 12, 256), i, k); if (k = 0) and (i >= 0) and (i <= 1001) then begin tc.SkillPoint := i; SendCStat1(tc, 0, $000c, tc.SkillPoint); end; end else if (Copy(str, 1, 11) = 'changestat ') and ((DebugCMD and $0004) <> 0) and (tid.ChangeStatSkill = 1) then begin sl := TStringList.Create; sl.DelimitedText := Copy(str, 12, 256); try if sl.Count = 2 then begin Val(sl.Strings[0], i, k); if(i >= 0) and (i <= 5) then begin Val(sl.Strings[1], j, k); if(j >= 1) and (j <= 99) then begin //if (i = 2) and (j >= 111) and (tc.BaseLV >= 100) then begin //j := 110 - tc.Bonus[2]; //end; tc.ParamBase[i] := j; CalcStat(tc); SendCStat(tc); SendCStat1(tc, 0, $0009, tc.StatusPoint); end; end; end; finally sl.Free(); end; end else if (Copy(str, 1, 6) = 'speed ') and ((DebugCMD and $0008) <> 0) and (tid.ChangeStatSkill = 1) then begin //僗僺乕僪曄峏 Val(Copy(str, 6, 256), i, k); if (k = 0) and (i >= 25) and (i <= 1000) then begin tc.DefaultSpeed := i; CalcStat(tc); WFIFOW(0, $00b0); WFIFOW(2, $0000); WFIFOL(4, tc.Speed); Socket.SendBuf(buf, 8); end; end else if (Copy(str, 1, 5) = 'whois') and ((DebugCMD and $0002) <> 0) and (tid.Whois = 1) then begin str2 := 'Users Currently Logged in:';
for i := 0 to CharaName.Count - 1 do begin
tc1 := CharaName.Objects[i] as TChara;
if tc1.Login = 2 then begin
if str2 = 'Users Currently Logged in:' Then begin
str2 := str2 + tc1.Name;
end else begin
str2 := str2 + ',' + tc1.Name;
end;
end;
end;
DebugOut.Lines.Add(str2);
w := 200; WFIFOW(0, $009a); WFIFOW(2, w); WFIFOS(4, str2, w - 4); tc.Socket.SendBuf(buf, w); end else if (Copy(str, 1, 8) = 'monster ') and ((DebugCMD and $0004) <> 0) and (tid.MonsterSummon = 1) then begin sl := TStringList.Create; sl.DelimitedText := Copy(str, 9, 256); if sl.Count = 2 then begin if (MobDBName.IndexOf(sl.Strings[0]) <> -1) then begin Val(sl.Strings[1], j, k); if(j >= 1) and (j <= 20) then begin for l := 1 to j do begin tm := tc.MData; ts := TMob.Create; ts.Data := MobDBName.Objects[MobDBName.IndexOf(sl.Strings[0])] as TMobDB;
ts.ID := NowMobID;
Inc(NowMobID);
ts.Name := ts.Data.JName;
ts.JID := ts.Data.ID;
ts.Map := tc.Map;
ts.Data.isLink :=false;
//ts.Data.isLoot :=false;
//僾儗僀儎乕偺廃埻9儅僗偺偳偙偐偵彚娨
ts.Point.X := tc.Point.X + Random(2) - 1;
ts.Point.Y := tc.Point.Y + Random(2) - 1;
ts.Dir := Random(8);
ts.HP := ts.Data.HP;
ts.Speed := ts.Data.Speed;
//暒偒娫妘傪嬌戝偵愝掕
//偙偙偼偪傚偭偲張棟偑揔摉偐側丠
ts.SpawnDelay1 := $7FFFFFFF;
ts.SpawnDelay2 := 0;
ts.SpawnType := 0;
ts.SpawnTick := 0;
if ts.Data.isDontMove then
ts.MoveWait := $FFFFFFFF
else
ts.MoveWait := timeGetTime();
ts.ATarget := 0;
ts.ATKPer := 100;
ts.DEFPer := 100;
ts.DmgTick := 0;
ts.Element := ts.Data.Element;
if (SummonMonsterName = true) then begin
ts.Name := ts.Data.JName;
end else begin
ts.Name := 'Summon Monster';
end;
if (SummonMonsterExp = false) then begin
ts.Data.MEXP := 0;
ts.Data.EXP := 0;
ts.Data.JEXP := 0;
end;
if (SummonMonsterAgo = true) then begin
ts.isActive := true;
end else begin
ts.isActive := ts.Data.isActive;
end;
ts.MoveWait := timeGetTime();
for j := 0 to 31 do begin
ts.EXPDist[j].CData := nil;
ts.EXPDist[j].Dmg := 0;
end;
if ts.Data.MEXP <> 0 then begin
for j := 0 to 31 do begin
ts.MVPDist[j].CData := nil;
ts.MVPDist[j].Dmg := 0;
end;
ts.MVPDist[0].Dmg := ts.Data.HP * 30 div 100; //FA偵30%壛嶼
end;
ts.isSummon := True;
ts.EmperiumID := 0;
tm.Mob.AddObject(ts.ID, ts);
tm.Block[ts.Point.X div 8][ts.Point.Y div 8].Mob.AddObject(ts.ID, ts);
SendMData(tc.Socket, ts);
//廃埻偵憲怣
SendBCmd(tm,ts.Point,41,tc,False);
if (SummonMonsterMob = true) then begin
k := SlaveDBName.IndexOf(sl.Strings[0]);
if (k <> -1) then begin
ts.isLeader := true;
tss := SlaveDBName.Objects[k] as TSlaveDB;
if sl.Strings[0] = tss.Name then begin
h := tss.TotalSlaves;
ts.SlaveCount := h;
repeat
for i := 0 to 4 do begin
if (tss.Slaves[i] <> -1) and (h <> 0) then begin
ts1 := TMob.Create;
ts1.Data := MobDBName.Objects[tss.Slaves[i]] as TMobDB;
ts1.ID := NowMobID;
ts.Slaves[h] := ts1.ID;
Inc(NowMobID);
ts1.Name := ts1.Data.JName;
ts1.JID := ts1.Data.ID;
ts1.LeaderID := ts.ID;
ts1.Data.isLink := false;
ts1.Map := ts.Map;
ts1.Point.X := ts.Point.X;
ts1.Point.Y := ts.Point.Y;
ts1.Dir := ts.Dir;
ts1.HP := ts1.Data.HP;
if ts.Data.Speed < ts1.Data.Speed then begin
ts1.Speed := ts.Data.Speed;
end else begin
ts1.Speed := ts1.Data.Speed;
end;
ts1.SpawnDelay1 := $7FFFFFFF;
ts1.SpawnDelay2 := 0;
ts1.SpawnType := 0;
ts1.SpawnTick := 0;
if ts1.Data.isDontMove then
ts1.MoveWait := $FFFFFFFF
else
ts1.MoveWait := ts.MoveWait;
ts1.ATarget := 0;
ts1.ATKPer := 100;
ts1.DEFPer := 100;
ts1.DmgTick := 0;
ts1.Element := ts1.Data.Element;
ts1.isActive := false;
for j := 0 to 31 do begin
ts1.EXPDist[j].CData := nil;
ts1.EXPDist[j].Dmg := 0;
end;
if ts1.Data.MEXP <> 0 then begin
for j := 0 to 31 do begin
ts1.MVPDist[j].CData := nil;
ts1.MVPDist[j].Dmg := 0;
end;
ts1.MVPDist[0].Dmg := ts1.Data.HP * 30 div 100; //FA偵30%壛嶼
end;
tm.Mob.AddObject(ts1.ID, ts1);
tm.Block[ts1.Point.X div 8][ts1.Point.Y div 8].Mob.AddObject(ts1.ID, ts1);
ts1.isSummon := true;
ts1.isSlave := true;
ts1.EmperiumID := 0;
SendMData(tc.Socket, ts1);
//廃埻偵憲怣
SendBCmd(tm,ts1.Point,41,tc,False);
h := h - 1;
end;
end;
until (h <= 0);
end;
end;
end;end;end;end;end; end else if (Copy(str, 1, 5) = 'zeny ') and ((DebugCMD and $0008) <> 0) and (tid.ChangeStatSkill = 1) then begin Val(Copy(str, 6, 256), i, k); if (k = 0) and (i >= 0) and (i <= 9999999999) and (tc.Zeny + i <= 9999999999) then begin tc.Zeny := tc.Zeny + i; WFIFOW(0, $00b1); WFIFOW(2, $0014); WFIFOL(4, tc.Zeny); Socket.SendBuf(buf, 8); end; end else if (Copy(str, 1, 4) = 'ban ') and ((DebugCMD and $0008) <> 0) and (tid.GotoSummonBanish = 1) then begin s := Copy(str, 5, 256); if CharaName.Indexof(s) <> -1 then begin tc1 := CharaName.Objects[CharaName.Indexof(s)] as TChara; if BannedDB.IndexOf(tc1.IP) = -1 then begin tbn := TBan.Create; tbn.BIP := tc1.IP; BannedDB.AddObject(tbn.BIP, tbn); if (tc1.Login <> 0) then begin WFIFOW( 0, $0081); WFIFOB( 2, 08);
tc1.Socket.SendBuf(buf, 3); end; if (UseDatabase = true) then begin AssignFile(txt, AppPath + 'addban.txt');
if not FileExists(AppPath + 'addban.txt') then begin
Rewrite(txt);
end else begin
Append(txt);
end;
Writeln(txt, tc1.IP);
DebugOut.Lines.Add('Ban Added: ' + tc1.IP);
Flush(txt);
CloseFile(txt);
end;
end; end; end else if (Copy(str, 1, 5) = 'goto ') and ((DebugCMD and $0008) <> 0) and (tid.GotoSummonBanish = 1) then begin s := Copy(str, 6, 256);
try
if CharaName.Indexof(s) <> -1 then begin
tc1 := CharaName.Objects[CharaName.Indexof(s)] as TChara;
if (tc.Hidden = false) then SendCLeave(tc, 2);
tc.tmpMap := tc1.Map;
tc.Point := tc1.Point;
MapMove(Socket, tc1.Map, tc1.Point);
end;
finally
end;
end else if (Copy(str, 1, 5) = 'kick ') and ((DebugCMD and $0008) <> 0) and (tid.GotoSummonBanish = 1) then begin s := Copy(str, 6, 256); if CharaName.Indexof(s) <> -1 then begin tc1 := CharaName.Objects[CharaName.Indexof(s)] as TChara; if (tc1.Login <> 0) then begin WFIFOW( 0, $0081); WFIFOB( 2, 08);
tc1.Socket.SendBuf(buf, 3); end; end; end else if (Copy(str, 1, 7) = 'kickall') and ((DebugCMD and $0008) <> 0) and (tid.GotoSummonBanish = 1) then begin for i := 0 to CharaName.Count -1 do begin tc1 := CharaName.Objects[i] as TChara; if (tc1.Login <> 0) then begin WFIFOW( 0, $0081); WFIFOB( 2, 08);
tc1.Socket.SendBuf(buf, 3); end; end; end else if (Copy(str, 1, 5) = 'kill ') and ((DebugCMD and $0008) <> 0) and (tid.KillDieAlive = 1) then begin s := Copy(str, 6, 256); try if CharaName.Indexof(s) <> -1 then begin tc1 := CharaName.Objects[CharaName.Indexof(s)] as TChara; tc1.HP := 0; tc1.Sit := 1; SendCStat1(tc1, 0, 5, tc1.HP); WFIFOW(0, $0080); WFIFOL(2, tc1.ID); WFIFOB(6, 1); Socket.SendBuf(buf, 7); WFIFOW( 0, $0080); WFIFOL( 2, tc1.ID); WFIFOB( 6, 1); SendBCmd(tm, tc1.Point, 7); end; finally end; end else if (Copy(str, 1, 7) = 'summon ') and ((DebugCMD and $0008) <> 0) and (tid.GotoSummonBanish = 1) then begin s := Copy(str, 8, 256); try if CharaName.Indexof(s) <> -1 then begin tc1 := CharaName.Objects[CharaName.Indexof(s)] as TChara; if tc1.Login = 2 then begin SendCLeave(tc1, 2); tc1.tmpMap := tc.Map; tc1.Point := tc.Point; MapMove(tc1.Socket, tc.Map, tc.Point); end; end; finally end; end else if (Copy(str, 1, 7) = 'banish ') and ((DebugCMD and $0008) <> 0) and (tid.GotoSummonBanish = 1) then begin sl := TStringList.Create; sl.DelimitedText := Copy(str, 8, 256); try Val(sl.Strings[sl.Count - 2], i, k); if k <> 0 then continue; Val(sl.Strings[sl.Count - 1], j, k); if k <> 0 then continue; if MapList.IndexOf(sl.Strings[sl.Count - 3]) <> -1 then begin ta := MapList.Objects[MapList.IndexOf(sl.Strings[sl.Count - 3])] as TMapList; if (i < 0) or (i >= ta.Size.X) or (j < 0) or (j >= ta.Size.Y) then continue; for k := 0 to sl.Count - 4 do begin s := s + ' ' + sl.Strings[k]; s := Trim(s); end; if CharaName.Indexof(s) <> -1 then begin tc1 := CharaName.Objects[CharaName.Indexof(s)] as TChara; if tc1.Login = 2 then begin SendCLeave(tc1, 2); tc1.tmpMap := sl.Strings[sl.Count - 3]; xy.X := i; xy.Y := j; tc1.Point := xy; MapMove(tc1.Socket, tc1.tmpMap, tc1.Point); end; end; end; finally sl.Free(); end; end else if (Copy(str, 1, 4) = 'job ') and ((DebugCMD and $0010) <> 0) and (tid.ChangeJob = 1) then begin{廋惓} if (tc.JID <> 0) or ((DebugCMD and $0020) <> 0) then //僲乕價僗偐傜偼弌棃側偄 begin //怑嬈曄峏 Val(Copy(str, 5, 256), i, k); if (k = 0) and (i >= 0) and (i <= 23) and (i <> 13) and (i <> 21) then begin tc.JID := i; //僗僥乕僞僗嵞寁嶼 tc.ClothesColor := 0; //嫮惂揑偵弶婜抣 CalcStat(tc); SendCStat(tc); SendCSkillList(tc); WFIFOW(0, $00c3); WFIFOL(2, tc.ID); WFIFOB(6, 0); WFIFOB(7, i); SendBCmd(tm, tc.Point, 8); end; end;{廋惓僐僐傑偱}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -