Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BuildVersion = "2.0.0.1"
- Desc = "t3d scriptpatch maker"
- StatusDlg.SetTitle("T3d additive script patch builder...");
- StatusDlg.SetStatusText("proccessing t3d");
- function plugininit()
- ListBox.AddItem("ListBox1", "t3d scriptpatch maker -bugfix on pathnames!");
- end
- function plugindoshit()
- StatusDlg.SetTitle("T3d additive script patch builder...");
- StatusDlg.SetStatusText("proccessing t3d");
- filea = Dialog.FileBrowse(true, "Locate t3d File", _DesktopFolder, "All Files (*.t3d)|*.t3d|", "", "t3d", false, false);
- vresult = Dialog.Input("string", "patch actor:", "Begin Actor Class=MyPathNode Name=MyPathNode", MB_ICONQUESTION);
- xresult = Dialog.Input("class", "actor to patch with:", "pnpack.mypathnode", MB_ICONQUESTION);
- cacheini_contents = TextFile.ReadToTable(filea[1]);
- cache_entry_cnt = Table.Count(cacheini_contents);
- a = 1
- StatusDlg.Show(MB_ICONNONE, false);
- StatusDlg.SetMeterRange(0, cache_entry_cnt);
- StatusDlg.SetTitle("T3d additive script patch builder...");
- for cnt = a ,cache_entry_cnt do
- testa = String.Find(cacheini_contents[cnt], "Title=", 1, false);
- if testa ~= -1 then
- titty = cacheini_contents[cnt]
- titty = String.Replace(titty, "\"", "", false);
- titty = String.Replace(titty, " ", "", false); --fault
- titty = String.Replace(titty, "Title=", "", false);
- TextFile.WriteFromString(resultapppath.."out.txt", "if(Level.Title ==\""..titty.."\")".."\r\n", true);
- ListBox.AddItem("ListBox1", "if(Level.Title ==\""..titty.."\")", "");
- TextFile.WriteFromString(resultapppath.."out.txt", "{".."\r\n", true);
- TextFile.WriteFromString(resultapppath.."out.txt", "actNewClass = class<actor>( DynamicLoadObject(\""..xresult.."\", class'Class' ) );".."\r\n", true);
- ListBox.AddItem("ListBox1", "actNewClass = class<actor>( DynamicLoadObject(\""..xresult.."\", class'Class' ) );", "");
- cnt =cache_entry_cnt;
- end
- end
- for cnt = a ,cache_entry_cnt do
- StatusDlg.SetMeterPos(cnt);
- --"Title=Csejte1 Cachtice Route"
- test = String.Find(cacheini_contents[cnt], vresult, 1, false);
- if test ~= -1 then
- StatusDlg.SetStatusText("proccessing t3d");
- temploc = cnt + 6
- -- 12345678910111213
- -- Location= ( X = 6803.550293,Y=-13222.853516,Z=-9255.950195)
- --ListBox.AddItem("ListBox1", cacheini_contents[cnt], "");
- -- ListBox.AddItem("ListBox1", cacheini_contents[temploc], "");
- xxx= cacheini_contents[temploc];
- start1 = String.Find(xxx, "x=", 1, false);
- end1 = String.Find(xxx, ",y", start1, false);
- out1 = String.Mid(xxx, start1+2, (end1 -2) - start1);
- Input.SetText("Input2", out1);
- vert1 = out1
- start1 = String.Find(xxx, "y=", 1, false);
- end1 = String.Find(xxx, ",z", start1, false);
- out2 = String.Mid(xxx, start1+2, (end1 -2) - start1);
- vert2 = out2
- start1 = String.Find(xxx, "z=", 1, false);
- end1 = String.Find(xxx, ")", start1, false);
- --out3 = String.Mid(input, start1+2, end1 - (start1 - 1));
- out3 = String.Mid(xxx, start1+2, (end1 -2) - start1);
- vert3 = out3
- TextFile.WriteFromString(resultapppath.."out.txt", "actthing=Spawn(actNewClass,,,vect("..vert1.."\,"..vert2.."\,"..vert3.."));".."\r\n", true);
- ListBox.AddItem("ListBox1", "actthing=Spawn(actNewClass,,,vect("..vert1.."\,"..vert2.."\,"..vert3.."));", "");
- end
- end
- TextFile.WriteFromString(resultapppath.."out.txt", "};".."\r\n", true);
- StatusDlg.Hide();
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement