?? game.pas
字號:
end else if (Copy(str, 1, 7) = 'ccolor ') and ((DebugCMD and $0040) <> 0) and (tid.ChangeColorStyle = 1) then begin //暈偺怓曄峏 Val(Copy(str, 8, 256), i, k); if (k = 0) and (i >= 0) and (i <= 77) then begin tc.ClothesColor := i; WFIFOW(0, $00c3); WFIFOL(2, tc.ID); WFIFOB(6, 7); WFIFOB(7, i); SendBCmd(tm, tc.Point, 8); end;{敮怓曄峏捛壛} end else if (Copy(str, 1, 7) = 'hcolor ') and (tid.ChangeColorStyle = 1) then begin //敮偺怓曄峏 Val(Copy(str, 8, 256), i, k); if (k = 0) and (i >= 0) and (i <= 8) then begin tc.HairColor := i; WFIFOW(0, $00c3); WFIFOL(2, tc.ID); WFIFOB(6, 6); WFIFOB(7, i); SendBCmd(tm, tc.Point, 8); end; end else if (Copy(str, 1, 7) = 'hstyle ') and (tid.ChangeColorStyle = 1) then begin //敮偺怓曄峏 Val(Copy(str, 8, 256), i, k); if (k = 0) and (i >= 0) and (i <= 19) then begin tc.Hair := i; WFIFOW(0, $00c3); WFIFOL(2, tc.ID); WFIFOB(6, 1); WFIFOB(7, i); SendBCmd(tm, tc.Point, 8); end;{敮怓曄峏捛壛僐僐傑偱} end else if (Copy(str, 1, 3) = 'die') and ((DebugCMD and $0080) <> 0) and (tid.KillDieAlive = 1) then begin //帺嶦 tc.HP := 0; tc.Sit := 1; SendCStat1(tc, 0, 5, tc.HP); WFIFOW(0, $0080); WFIFOL(2, tc.ID); WFIFOB(6, 1); Socket.SendBuf(buf, 7); WFIFOW( 0, $0080); WFIFOL( 2, tc.ID); WFIFOB( 6, 1); SendBCmd(tm, tc.Point, 7); end else if (Copy(str, 1, 5) = 'alive') and ((DebugCMD and $0100) <> 0) and (tid.KillDieAlive =1 ) then begin //惗偒曉傝 tc.HP := tc.MAXHP; tc.SP := tc.MAXSP; tc.Sit := 3; SendCStat1(tc, 0, 5, tc.HP); SendCStat1(tc, 0, 7, tc.SP); WFIFOW( 0, $0148); WFIFOL( 2, tc.ID); WFIFOW( 6, 100); SendBCmd(tm, tc.Point, 8); end else if (Copy(str, 1, 5) = 'item ') and ((DebugCMD and $0200) <> 0) and (tid.ItemSummon = 1) then begin //傾僀僥儉嶌惉 sl := TStringList.Create; sl.DelimitedText := Copy(str, 6, 256); if sl.Count = 2 then begin Val(sl.Strings[0], i, k); if k <> 0 then continue; if ItemDB.IndexOf(i) = -1 then continue; Val(sl.Strings[1], j, k); if k <> 0 then continue; if (j <= 0) or (j > 30000) then continue; td := ItemDB.IndexOfObject(i) as TItemDB; if tc.MaxWeight >= tc.Weight + cardinal(td.Weight) * cardinal(j) then begin k := SearchCInventory(tc, i, td.IEquip); if k <> 0 then begin if tc.Item[k].Amount + j > 30000 then continue; if td.IEquip then j := 1; //傾僀僥儉捛壛 tc.Item[k].ID := i; tc.Item[k].Amount := tc.Item[k].Amount + j; tc.Item[k].Equip := 0; tc.Item[k].Identify := 1; tc.Item[k].Refine := 0; tc.Item[k].Attr := 0; tc.Item[k].Card[0] := 0; tc.Item[k].Card[1] := 0; tc.Item[k].Card[2] := 0; tc.Item[k].Card[3] := 0; tc.Item[k].Data := td; //廳検捛壛 tc.Weight := tc.Weight + cardinal(td.Weight) * cardinal(j); WFIFOW( 0, $00b0); WFIFOW( 2, $0018); WFIFOL( 4, tc.Weight); Socket.SendBuf(buf, 8); //傾僀僥儉僎僢僩捠抦 SendCGetItem(tc, k, j); end; end else begin //廳検僆乕僶乕 WFIFOW( 0, $00a0); WFIFOB(22, 2); Socket.SendBuf(buf, 23); end; end; sl.Free(); end else if (Copy(str, 1, 7) = 'option ') and ((DebugCMD and $0400) <> 0) and (tid.ChangeOption = 1) then begin if Copy(str, 8, 5) = 'sight' then begin tc.Option := tc.Option or 1; end else if ((tc.JID = 5) or (tc.JID = 10)) and (Copy(str, 8, 4) = 'cart') then begin tc.Option := tc.Option or 8; //僇乕僩僨乕僞憲怣{捛壛} SendCart(tc); end else if (tc.JID = 11) and (Copy(str, 8, 6) = 'falcon') then begin tc.Option := tc.Option or $10; end else if ((tc.JID = 7) or (tc.JID = 14)) and (Copy(str, 8, 4) = 'peko') then begin tc.Option := tc.Option or $20; end else if Copy(str, 8, 3) = 'off' then begin tc.Option := 0; end; WFIFOW(0, $0119); WFIFOL(2, tc.ID); WFIFOW(6, 0); WFIFOW(8, 0); WFIFOW(10, tc.Option); WFIFOB(12, 0); SendBCmd(tm, tc.Point, 13); end else if (Copy(str, 1, 7) = 'refine ') and ((DebugCMD and $0800) <> 0) and (tid.Refine = 1) then begin //憰旛拞偺晲婍杊嬶傪惛楤 Val(Copy(str, 8, 256), j, k); if (k <> 0) or (j < 0) or (j > 10) then continue; for i := 1 to 100 do begin if (tc.Item[i].ID <> 0) and (tc.Item[i].Amount <> 0) and tc.Item[i].Data.IEquip and (tc.Item[i].Equip <> 0) then begin tc.Item[i].Refine := byte(j); WFIFOW(0, $0188); WFIFOW(2, 0); WFIFOW(4, i); WFIFOW(6, word(j)); Socket.SendBuf(buf, 8); end; end; WFIFOW(0, $019b); WFIFOL(2, tc.ID); WFIFOL(6, 3); SendBCmd(tm, tc.Point, 10, tc); CalcStat(tc); SendCStat(tc); end else if (Copy(str, 1, 5) = 'unit ') and ((DebugCMD and $1000) <> 0) and (tid.AutoRawUnit = 1) then begin //僗僉儖岠擻抧昞帵僥僗僩 Val(Copy(str, 6, 256), j, k); if (k <> 0) or (j < 0) or (j > 999) then continue; SetSkillUnit(tm, tc.ID, Point(tc.Point.X + 1, tc.Point.Y - 1), timeGetTime(), j, 1, 10000); end else if (Copy(str, 1, 5) = 'stat ') and ((DebugCMD and $2000) <> 0) and (tid.ChangeOption = 1) then begin //0x0119僷働僥僗僩 sl := TStringList.Create; sl.DelimitedText := Copy(str, 6, 256); try if sl.Count <> 4 then continue; Val(sl.Strings[0], i, ii); if ii <> 0 then continue; Val(sl.Strings[1], j, ii); if ii <> 0 then continue; Val(sl.Strings[2], k, ii); if ii <> 0 then continue; Val(sl.Strings[3], l, ii); if ii <> 0 then continue; WFIFOW(0, $0119); WFIFOL(2, tc.ID); WFIFOW(6, i); WFIFOW(8, j); WFIFOW(10, k); WFIFOB(12, l); SendBCmd(tm, tc.Point, 13); finally sl.Free(); end; end else if (Copy(str, 1, 4) = 'raw ') and ((DebugCMD and $2000) <> 0) and (tid.AutoRawUnit = 1) then begin //擟堄僷働僥僗僩 sl := TStringList.Create; sl.DelimitedText := Copy(str, 5, 256); try if (sl.Count = 0) then continue; for i := 0 to sl.Count - 1 do begin WFIFOB(i, StrToInt('$' + sl.Strings[i])); end; Socket.SendBuf(buf, i); finally sl.Free(); end; end else if (Copy(str, 1, 6) = 'server') then begin str2 := 'darkWeiss Version 2.9.0.1 -- http://dweiss.sigh.org/forum/';
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, 7) = 'statall') and ((DebugCMD and $4000) <> 0) and (tid.ChangeStatSkill = 1) then begin for i := 0 to 5 do begin tc.ParamBase[i] := 99; end; tc.StatusPoint := 1000; CalcStat(tc); SendCStat(tc); SendCStat1(tc, 0, $0009, tc.StatusPoint); DebugOut.Lines.Add('DEBUG* Added all stats to ' + tc.Name); end else if (Copy(str, 1, 12) = 'changeskill ') and ((DebugCMD and $4000) <> 0) and (tid.ChangeStatSkill = 1) then begin sl := TStringList.Create; sl.DelimitedText := Copy(str, 13, 256); if sl.Count = 2 then begin Val(sl.Strings[0], i, k); if k <> 0 then continue; Val(sl.Strings[1], j, k); if k <> 0 then continue; if ((i >= 0) and (i <= 157)) or ((i >= 210) and (i <= 330)) then begin if (j > tc.Skill[i].Data.MasterLV) then j := tc.Skill[i].Data.MasterLV; tc.Plag := i; tc.PLv := j;
tc.Skill[i].Plag := true;
SendCSkillList(tc); end; sl.Free; end; end else if (Copy(str, 1, 8) = 'skillall') and ((DebugCMD and $4000) <> 0) and (tid.ChangeStatSkill = 1) then begin //慡僗僉儖廗摼{廋惓} for i := 1 to 157 do begin if (tc.Skill[i].Data.Job[tc.JID]) then begin tc.Skill[i].Lv := tc.Skill[i].Data.MasterLV; end; end; for i := 210 to 330 do begin //娯崙嶗堜愱梡 if (tc.Skill[i].Data.Job[tc.JID]) then begin tc.Skill[i].Lv := tc.Skill[i].Data.MasterLV; end; end;{廋惓僐僐傑偱} tc.SkillPoint := 1000; DebugOut.Lines.Add('DEBUG* Added all skills to ' + tc.Name); SendCSKillList(tc);{捛壛} CalcStat(tc); SendCStat(tc); end else if (Copy(str, 1, 4) = 'auto') and ((DebugCMD and $8000) <> 0) and (tid.AutoRawUnit = 1) then begin //帺摦峴摦僥僗僩 sl := TStringList.Create; sl.DelimitedText := Copy(str, 5, 256); try if sl.Count = 0 then Continue; Val(sl.Strings[0], j, k); if (k <> 0) or (j < 0) then continue; tc.Auto := j; if sl.Count = 3 then begin Val(sl.Strings[1], tc.A_Skill, k); Val(sl.Strings[2], tc.A_Lv, k); end; finally sl.Free(); end;{捛壛僐僐傑偱} end; end else if (h = -1) and (Pos(' : ', str) <> 0) and (Copy(str, Pos(' : ', str) + 3, 1) = '#') then begin str := Copy(str, Pos(' : ', str) + 4, 256); if (Copy(str, 1, 6) = 'server') then begin str2 := 'darkWeiss Version 2.9.0.1 -- http://dweiss.sigh.org/forum/';
DebugOut.Lines.Add(str2);
w := 200; WFIFOW(0, $009a); WFIFOW(2, w); WFIFOS(4, str2, w - 4); tc.Socket.SendBuf(buf, w); end; end else begin tm := tc.MData; WFIFOW(0, $008e); WFIFOW(2, w); WFIFOS(4, str, w - 4); Socket.SendBuf(buf, w); WFIFOW(0, $008d); WFIFOW(2, w + 4); WFIFOL(4, tc.ID); WFIFOS(8, str, w - 4); //僽儘僢僋張棟{僠儍僢僩儖乕儉婡擻捛壛} if (tc.ChatRoomID <> 0) then begin SendCrCmd(tc, w + 4, true); end else begin SendNCrCmd(tm, tc.Point, w + 4, tc, true, true); end; {僠儍僢僩儖乕儉婡擻捛壛僐僐傑偱} end; end; //-------------------------------------------------------------------------- $0090: begin if tc.AMode <> 0 then continue; tm := tc.MData; RFIFOL(2, l); if tm.NPC.IndexOf(l) <> -1 then begin tn := tm.NPC.IndexOfObject(l) as TNPC; //嫍棧僠僃僢僋 if (tc.Map <> tn.Map) or (abs(tc.Point.X - tn.Point.X) > 15) or (abs(tc.Point.Y - tn.Point.Y) > 15) then begin continue; end; case tn.CType of 1: //shop begin WFIFOW(0, $00c4); WFIFOL(2, l); Socket.SendBuf(buf, 6); end; 2: //script begin tc.TalkNPCID := tn.ID; tc.ScriptStep := 0; tc.AMode := 3; tc.AData := tn; NPCScript(tc); end; end; end; end; //-------------------------------------------------------------------------- $0094: //巜掕ID偺僉儍儔丄NPC偺柤慜傪梫媮 begin tm := tc.MData; RFIFOL(2, l); //accountid := IntToStr(l); if CharaPID.IndexOf(l) <> -1 then begin tc := CharaPID.IndexOfObject(l) as TChara;{僊儖僪婡擻捛壛} if (tc.GuildID = 0) then begin WFIFOW(0, $0095); WFIFOL( 2, l); WFIFOS( 6, tc.Name, 24); Socket.SendBuf(buf, 30); end else begin WFIFOW(0, $0195); WFIFOL( 2, l); WFIFOS( 6, tc.Name, 24); WFIFOS(30, tc.PartyName, 24); WFIFOS(54, tc.GuildName, 24); WFIFOS(78, tc.ClassName, 24); Socket.SendBuf(buf, 102); end;{僊儖僪婡擻捛壛僐僐傑偱} end else if tm.Mob.IndexOf(l) <> -1 then begin ts := tm.Mob.IndexOfObject(l) as TMob; WFIFOW(0, $0095); WFIFOL( 2, l); WFIFOS( 6, ts.Name, 24); Socket.SendBuf(buf, 30); end else if tm.NPC.IndexOf(l) <> -1 then begin tn := tm.NPC.IndexOfObject(l) as TNPC; WFIFOW( 0, $0095); WFIFOL( 2, l); WFIFOS( 6, tn.Name, 24); Socket.SendBuf(buf, 30); end; end; //-------------------------------------------------------------------------- $0096: //wis憲怣 begin RFIFOW(2, w); //DebugOut.Lines.Add(IntToStr(w)); str := RFIFOS(4, 24); i := CharaName.IndexOf(str); if i = -1 then begin //巜掕偝傟偨柤慜偺僉儍儔偑嫃側偄 WFIFOW( 0, $0098); WFIFOB( 2, 1); Socket.SendBuf(buf, 3); continue; end; tc1 := CharaName.Objects[i] as TChara; if tc1.Login <> 2 then begin //憡庤偑儘僌僀儞偟偰偄側偄 WFIFOW( 0, $0098); WFIFOB( 2, 1); Socket.SendBuf(buf, 3); continue; end;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -