Originally Posted by dlnqt
Here are the source codes for Warning of Wisdom and Love Match ripped from dumpersta's quiz helper bot, I won't include the BOI Quiz source code though..
Love Match:
Code:
public class LoveMatchCompanion : Form
{
// Fields
private Thread AnswerThread;
private QuizHelper.QuizHelper.ProcData bot;
private IContainer components;
private IniFile IniFile = new IniFile(Application.StartupPath + @"\Love Match.ini");
private Label label2;
private Label label4;
public string LastQuestion;
private QuizHelper.QuizHelper masterWindow;
private Label output_PartnerAnswer;
private Label output_Question;
private Label output_YourAnswer;
public static int pQuiz_Question = 0x13d7b78;
private Label txt_Question;
// Methods
public LoveMatchCompanion(QuizHelper.QuizHelper frm1)
{
this.InitializeComponent();
this.masterWindow = frm1;
if (this.masterWindow.lstbx_CharNames.SelectedItems.Count > 0)
{
foreach (QuizHelper.QuizHelper.ProcData data in this.masterWindow.botSessions)
{
if (data.Name == this.masterWindow.lstbx_CharNames.SelectedItem.ToString())
{
this.bot = data;
}
}
}
else
{
return;
}
this.AnswerThread = new Thread(new ThreadStart(this.Thread_Answers));
this.AnswerThread.Start();
}
protected override void Dispose(bool disposing)
{
this.AnswerThread.Abort();
this.masterWindow.LoveMatchWindow = null;
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
ComponentResourceManager manager = new ComponentResourceManager(typeof(LoveMatchCompanion));
this.txt_Question = new Label();
this.output_Question = new Label();
this.label2 = new Label();
this.output_YourAnswer = new Label();
this.label4 = new Label();
this.output_PartnerAnswer = new Label();
base.SuspendLayout();
this.txt_Question.AutoSize = true;
this.txt_Question.Location = new Point(12, 9);
this.txt_Question.Name = "txt_Question";
this.txt_Question.Size = new Size(0x34, 13);
this.txt_Question.TabIndex = 0;
this.txt_Question.Text = "Question:";
this.output_Question.AutoSize = true;
this.output_Question.Font = new Font("Microsoft Sans Serif", 15f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.output_Question.Location = new Point(0x1c, 0x16);
this.output_Question.Name = "output_Question";
this.output_Question.Size = new Size(180, 0x19);
this.output_Question.TabIndex = 1;
this.output_Question.Text = "No Question Active";
this.label2.AutoSize = true;
this.label2.Location = new Point(12, 0x2f);
this.label2.Name = "label2";
this.label2.Size = new Size(0x43, 13);
this.label2.TabIndex = 2;
this.label2.Text = "You Answer:";
this.output_YourAnswer.AutoSize = true;
this.output_YourAnswer.Font = new Font("Microsoft Sans Serif", 15f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.output_YourAnswer.Location = new Point(0x1c, 60);
this.output_YourAnswer.Name = "output_YourAnswer";
this.output_YourAnswer.Size = new Size(180, 0x19);
this.output_YourAnswer.TabIndex = 3;
this.output_YourAnswer.Text = "No Question Active";
this.label4.AutoSize = true;
this.label4.Location = new Point(11, 0x55);
this.label4.Name = "label4";
this.label4.Size = new Size(0x57, 13);
this.label4.TabIndex = 4;
this.label4.Text = "Partner Answers:";
this.output_PartnerAnswer.AutoSize = true;
this.output_PartnerAnswer.Font = new Font("Microsoft Sans Serif", 15f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.output_PartnerAnswer.Location = new Point(0x1c, 0x62);
this.output_PartnerAnswer.Name = "output_PartnerAnswer";
this.output_PartnerAnswer.Size = new Size(180, 0x19);
this.output_PartnerAnswer.TabIndex = 5;
this.output_PartnerAnswer.Text = "No Question Active";
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(0x25a, 130);
base.Controls.Add(this.output_PartnerAnswer);
base.Controls.Add(this.label4);
base.Controls.Add(this.output_YourAnswer);
base.Controls.Add(this.label2);
base.Controls.Add(this.output_Question);
base.Controls.Add(this.txt_Question);
base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
base.Icon = (Icon) manager.GetObject("$this.Icon");
base.MaximizeBox = false;
this.MaximumSize = new Size(0x260, 0x9a);
base.MinimizeBox = false;
this.MinimumSize = new Size(0x260, 0x9a);
base.Name = "LoveMatchCompanion";
base.ShowInTaskbar = false;
this.Text = "Love Match Companion";
base.TopMost = true;
base.ResumeLayout(false);
base.PerformLayout();
}
public void Thread_Answers()
{
while (true)
{
int baseAddress = BitConverter.ToInt32(Hacking.Process_ReadMemory(this.bot.Handle, pQuiz_Question, 4), 0);
if (baseAddress != 0)
{
string section = Hacking.Process_ReadStringFromMemory(this.bot.Handle, baseAddress, false);
if (section != this.LastQuestion)
{
this.IniFile.IniWriteValue(section, "Question Type", "Love Match");
this.output_Question.Text = section;
this.LastQuestion = section;
this.output_YourAnswer.Text = this.IniFile.IniReadValue(section, "Your Answer");
this.output_PartnerAnswer.Text = this.IniFile.IniReadValue(section, "Partner Answer");
}
Thread.Sleep(100);
}
}
}
}
Warning of Wisdom:
Code:
public class Warning : Form
{
// Fields
private Thread AnswerThread;
private QuizHelper.QuizHelper.ProcData bot;
private IContainer components;
private IniFile IniFile = new IniFile(Application.StartupPath + @"\Warning of Wisdom.ini");
private Label label_Answer;
private Label label_Question;
public string LastQuestion;
private QuizHelper.QuizHelper masterWindow;
private Label output_Answer;
private Label output_Question;
public static int pQuiz_Question = 0x13c1a1c;
// Methods
public Warning(QuizHelper.QuizHelper frm1)
{
this.InitializeComponent();
this.masterWindow = frm1;
if (this.masterWindow.lstbx_CharNames.SelectedItems.Count > 0)
{
foreach (QuizHelper.QuizHelper.ProcData data in this.masterWindow.botSessions)
{
if (data.Name == this.masterWindow.lstbx_CharNames.SelectedItem.ToString())
{
this.bot = data;
}
}
}
else
{
return;
}
this.AnswerThread = new Thread(new ThreadStart(this.Thread_Answers));
this.AnswerThread.Start();
}
protected override void Dispose(bool disposing)
{
this.AnswerThread.Abort();
this.masterWindow.WarningWindow = null;
if (disposing && (this.components != null))
{
this.components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
ComponentResourceManager manager = new ComponentResourceManager(typeof(Warning));
this.label_Question = new Label();
this.output_Question = new Label();
this.label_Answer = new Label();
this.output_Answer = new Label();
base.SuspendLayout();
this.label_Question.AutoSize = true;
this.label_Question.Location = new Point(13, 13);
this.label_Question.Name = "label_Question";
this.label_Question.Size = new Size(0x31, 13);
this.label_Question.TabIndex = 0;
this.label_Question.Text = "Question";
this.output_Question.AutoSize = true;
this.output_Question.Font = new Font("Microsoft Sans Serif", 16f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.output_Question.Location = new Point(0x1a, 30);
this.output_Question.Name = "output_Question";
this.output_Question.Size = new Size(0xb1, 0x1a);
this.output_Question.TabIndex = 1;
this.output_Question.Text = "Current Question";
this.label_Answer.AutoSize = true;
this.label_Answer.Location = new Point(0x10, 60);
this.label_Answer.Name = "label_Answer";
this.label_Answer.Size = new Size(0x2d, 13);
this.label_Answer.TabIndex = 2;
this.label_Answer.Text = "Answer:";
this.output_Answer.AutoSize = true;
this.output_Answer.Font = new Font("Microsoft Sans Serif", 16f, FontStyle.Regular, GraphicsUnit.Point, 0);
this.output_Answer.Location = new Point(0x1f, 0x4d);
this.output_Answer.Name = "output_Answer";
this.output_Answer.Size = new Size(0xa3, 0x1a);
this.output_Answer.TabIndex = 3;
this.output_Answer.Text = "Current Answer";
base.AutoScaleDimensions = new SizeF(6f, 13f);
base.AutoScaleMode = AutoScaleMode.Font;
base.ClientSize = new Size(0x203, 0x73);
base.Controls.Add(this.output_Answer);
base.Controls.Add(this.label_Answer);
base.Controls.Add(this.output_Question);
base.Controls.Add(this.label_Question);
base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
base.Icon = (Icon) manager.GetObject("$this.Icon");
base.MaximizeBox = false;
this.MaximumSize = new Size(0x209, 0x8b);
base.MinimizeBox = false;
this.MinimumSize = new Size(0x209, 0x8b);
base.Name = "Warning";
base.ShowInTaskbar = false;
base.SizeGripStyle = SizeGripStyle.Hide;
this.Text = "Warning of Wisdom Guide";
base.TopMost = true;
base.ResumeLayout(false);
base.PerformLayout();
}
public void Thread_Answers()
{
while (true)
{
int baseAddress = BitConverter.ToInt32(Hacking.Process_ReadMemory(this.bot.Handle, pQuiz_Question, 4), 0);
if (baseAddress != 0)
{
string section = Hacking.Process_ReadStringFromMemory(this.bot.Handle, baseAddress, false);
if (section.Contains("Which incorrectly describes Starword [Silence]?"))
{
this.output_Question.Text = section;
this.LastQuestion = section;
this.output_Answer.Text = "Silence Resistance +2%";
}
else if (section.Contains("Which is the league name in [Ancient Ruins]?"))
{
this.output_Question.Text = section;
this.LastQuestion = section;
this.output_Answer.Text = "Gramr (or Chaosflame)";
}
else if (section.Contains("How many sources are there in [Ancient Ruins]?"))
{
this.output_Question.Text = section;
this.LastQuestion = section;
this.output_Answer.Text = "3";
}
else if (section.Contains("The level requirement for [Ancient Ruins] is ( )?"))
{
this.output_Question.Text = section;
this.LastQuestion = section;
this.output_Answer.Text = "45";
}
else if (section != this.LastQuestion)
{
this.output_Question.Text = section;
this.LastQuestion = section;
this.output_Answer.Text = this.IniFile.IniReadValue(section, "Answer");
this.IniFile.IniWriteValue(section, "Answer", this.output_Answer.Text);
}
Thread.Sleep(100);
}
}
}
}
|