Guest User

Untitled

a guest
May 20th, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.62 KB | None | 0 0
  1. //CSharp
  2. //Note: All scripts must start with //CSharp or 'VB to determine thier compile language.
  3. // This is needed for auto scripts when using other feature of the bot. Finally, all
  4. // scripts must contain a Main function in which returning a string of -1 represents failed
  5. // execution and 1 represents successful execution.
  6.  
  7. //---------------------------------------------------
  8. // FFXiClipper - XiClaim Script Edition
  9. // - Coded By: Wiccaan [wiccaan@live.com]
  10. // - Coded On: August 11, 2008
  11. //---------------------------------------------------
  12. // FFXiClipper sets your player status to a specific
  13. // number that the game recognizes to give a model
  14. // no collision detection with the environment of
  15. // the game. This allows you to walk through walls,
  16. // objects, other players, etc.
  17. //
  18. // This tool can get you banned! Be warned!
  19. //
  20. // I am not responsible to what happens while you
  21. // use this script. Use at your own risk!
  22. //---------------------------------------------------
  23. // FFXiClipper was originally created by Wiccaan on
  24. // December 19, 2007. Be kind, give credit!
  25. //---------------------------------------------------
  26.  
  27. //======================================================================================
  28. // DO NOT EDIT BELOW THIS DIVIDER UNLESS YOU KNOW WHAT YOU ARE DOING!
  29. //======================================================================================
  30.  
  31. public Form frmClipForm;
  32. public CheckBox chkClipEnabled;
  33. public System.Threading.Thread ClipThread;
  34. public System.Threading.ThreadStart ClipThreadStart;
  35.  
  36. /*
  37. * Main()
  38. *
  39. * Purpose : Main script entry point. (First called function.)
  40. * Params : N/A
  41. * Returns : "1" on completion.
  42. *
  43. * Builds the GUI for the clipper form
  44. * and sets the thread start event.
  45. *
  46. */
  47. private string Main()
  48. {
  49. frmClipForm = new Form();
  50. this.chkClipEnabled = new System.Windows.Forms.CheckBox();
  51. this.chkClipEnabled.AutoSize = true;
  52. this.chkClipEnabled.Location = new System.Drawing.Point( 5, 5 );
  53. this.chkClipEnabled.Name = "chkClipEnabled";
  54. this.chkClipEnabled.Size = new System.Drawing.Size( 65, 20 );
  55. this.chkClipEnabled.Text = "Enable Clipping";
  56. this.chkClipEnabled.UseVisualStyleBackColor = true;
  57. this.chkClipEnabled.CheckedChanged += new System.EventHandler( this.chkClipEnabled_CheckedChanged );
  58. frmClipForm.Controls.Add( this.chkClipEnabled );
  59. frmClipForm.Name = "frmClipForm";
  60. frmClipForm.Size = new System.Drawing.Size( 175, 65 );
  61. frmClipForm.FormBorderStyle = FormBorderStyle.FixedDialog;
  62. frmClipForm.MaximizeBox = false;
  63. frmClipForm.Text = "FFXiClipper";
  64. frmClipForm.FormClosed += new System.Windows.Forms.FormClosedEventHandler( this.frmClipForm_FormClosed );
  65. frmClipForm.ResumeLayout( false );
  66. frmClipForm.PerformLayout();
  67.  
  68. this.ClipThreadStart = new System.Threading.ThreadStart( Clip );
  69.  
  70. frmClipForm.ShowDialog();
  71.  
  72. return "1";
  73. }
  74.  
  75. /*
  76. * Clip()
  77. *
  78. * Purpose : Clipping thread callback. Used to set player status while clipping is enabled.
  79. * Params : N/A
  80. * Returns : N/A
  81. *
  82. * While active, sets the player status to
  83. * the clipping status id.
  84. *
  85. */
  86. public void Clip()
  87. {
  88. while( this.ClipThread.IsAlive )
  89. {
  90. $P.PlayerStatus = 31;
  91. $F.Sleep(.1);
  92. }
  93. }
  94.  
  95. /*
  96. * chkClipEnabled_CheckedChange()
  97. *
  98. * Purpose : Checkbox event handler for chkClipEnabled checkbox.
  99. * Params : object, EventArgs
  100. * Returns : N/A
  101. *
  102. * Called when a check changed event is raised
  103. * on the chkClipEnabled object. Determines the
  104. * check value and starts / stops the Clip thread
  105. * based on the check status.
  106. *
  107. */
  108. private void chkClipEnabled_CheckedChanged(object sender, EventArgs e)
  109. {
  110. if( chkClipEnabled.Checked )
  111. {
  112. try{
  113. this.ClipThread = new System.Threading.Thread( this.ClipThreadStart );
  114. this.ClipThread.IsBackground = true;
  115. this.ClipThread.Start();
  116. }catch(Exception x){
  117. MessageBox.Show( "Exception: " + x.ToString() );
  118. }
  119. }
  120. else
  121. {
  122. try{
  123. this.ClipThread.Abort();
  124. $P.PlayerStatus = 0;
  125. }catch(Exception x){
  126. MessageBox.Show( "Exception: " + x.ToString() );
  127. }
  128. }
  129. }
  130.  
  131. /*
  132. * frmClipForm_FormClosed
  133. *
  134. * Purpose : Form event handler for close event.
  135. * Params : object, FormClosedEventArgs
  136. * Returns : N/A
  137. *
  138. * Called when the form close event is raised. Attempts
  139. * to kill the Clip thread and exit peacefully.
  140. *
  141. */
  142. private void frmClipForm_FormClosed(object sender, FormClosedEventArgs e)
  143. {
  144. try {
  145. if( this.ClipThread != null )
  146. {
  147. this.ClipThread.Abort();
  148. this.ClipThread.Join();
  149. $P.PlayerStatus = 0;
  150. }
  151. } catch(Exception x) {
  152. MessageBox.Show( "Exception: " + x.ToString() );
  153. }
  154. }
Add Comment
Please, Sign In to add comment