Author Topic: Need help making a simple script.  (Read 8218 times)

0 Members and 1 Guest are viewing this topic.

Newbie

  • Spam Specialist
  • Centurian Lord
  • Posts: 2,531
  • Reputation: +1/-0
    • http://imchaos.com/newl.asp?x=M0ckious&y=900627
Need help making a simple script.
« on: May 18, 2004 08:38 pm CDT »
Ok.. I need a script that makes me swing my weapon every ten seconds.. (aka backstab training. It's a differnt mod from tRPG so please don't say "AWW why don't you just use auto swing?!?!?")

I need a script that I can run through console on server. All I need it to do is to simply swing every ten seconds.. anyone help me? Please?
« Last Edit: December 31, 1969 06:00 pm CST by Newbie »

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #1 on: May 18, 2004 09:55 pm CDT »
Try this for starters..

Code: [Select]
function fire()
{
postAction(2048, IDACTION_FIRE1);
schedule("postAction(2048, IDACTION_BREAK1);", 0.2);

schedule("fire()", 10);
}
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

-eViL-

  • Minotaur Rager
  • ******
  • Posts: 880
  • Reputation: +0/-0
(No subject)
« Reply #2 on: May 18, 2004 10:10 pm CDT »
actually oz.. it is simpler to just do

function BST()
{
postAction(2048, IDACTION_BREAK1, 0);
schedule("BST();", 10);
}

because sometimes if you do fire and then break, the break will actually cause you to swing... and therefore offsets whatever it is trying to do, or in some cases, the break just won't do anything at all and fire will be left on.  so what i have above is by far more efficient and safer.
« Last Edit: December 31, 1969 06:00 pm CST by -eViL- »
There's nothing ever wrong but nothing's ever right
Such a cruel contradiction

Newbie

  • Spam Specialist
  • Centurian Lord
  • Posts: 2,531
  • Reputation: +1/-0
    • http://imchaos.com/newl.asp?x=M0ckious&y=900627
(No subject)
« Reply #3 on: May 19, 2004 02:54 pm CDT »
Thanks guys. :D
« Last Edit: December 31, 1969 06:00 pm CST by Newbie »

Newbie

  • Spam Specialist
  • Centurian Lord
  • Posts: 2,531
  • Reputation: +1/-0
    • http://imchaos.com/newl.asp?x=M0ckious&y=900627
(No subject)
« Reply #4 on: May 19, 2004 04:01 pm CDT »
Uhh.. actually neither of them work..

I saved it in notepad as "Backstab.cs" and ran it in console and neither of them do anything.. it just says it's executing backstab.cs and then nothing happens. :/
« Last Edit: December 31, 1969 06:00 pm CST by Newbie »

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #5 on: May 19, 2004 04:59 pm CDT »
You need to call the function once to start the loop.

so type fire(); in my case BST(); in eViL's.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

Newbie

  • Spam Specialist
  • Centurian Lord
  • Posts: 2,531
  • Reputation: +1/-0
    • http://imchaos.com/newl.asp?x=M0ckious&y=900627
(No subject)
« Reply #6 on: May 19, 2004 08:23 pm CDT »
Kickass, thanks guys. :)
« Last Edit: December 31, 1969 06:00 pm CST by Newbie »

Xanth

  • Minotaur Rager
  • ******
  • Posts: 760
  • Reputation: +0/-0
(No subject)
« Reply #7 on: May 20, 2004 09:54 am CDT »
put the first one on a keybind so you dont have to type it in every time you want to instaciate it.
Just a thought.
« Last Edit: December 31, 1969 06:00 pm CST by Xanth »


Currently playing BF2
(Name: Xanth-911 ) BooYa!!

Sinister

  • Uber Menace
  • *******
  • Posts: 1,125
  • Reputation: +0/-0
    • http://www.stormpages.com/snowmann69
(No subject)
« Reply #8 on: May 20, 2004 11:54 pm CDT »
Let us know if you got it to work.
« Last Edit: December 31, 1969 06:00 pm CST by Sinister »

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #9 on: May 21, 2004 09:22 am CDT »
Quote from: "Newbie"
Kickass, thanks guys. :)


Yes he did.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

Newbie

  • Spam Specialist
  • Centurian Lord
  • Posts: 2,531
  • Reputation: +1/-0
    • http://imchaos.com/newl.asp?x=M0ckious&y=900627
(No subject)
« Reply #10 on: May 31, 2004 06:20 pm CDT »
Also.. anyone know how to make a script to #meditate every 15 seconds or so?

Any help would be appreciated, thanks.
« Last Edit: December 31, 1969 06:00 pm CST by Newbie »

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #11 on: May 31, 2004 07:44 pm CDT »
Quote from: "Newbie"
Also.. anyone know how to make a script to #meditate every 15 seconds or so?

Any help would be appreciated, thanks.


You'd need it to #wake too, and you'd need to determine when to do those things.

Some more scheduling......
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

Sinister

  • Uber Menace
  • *******
  • Posts: 1,125
  • Reputation: +0/-0
    • http://www.stormpages.com/snowmann69
(No subject)
« Reply #12 on: May 31, 2004 07:47 pm CDT »
Well, i will work on it when i get home....seems pretty simple, but probably by the time i get to it, someone else will have already answered it.  Btw why do you want a script that does that?  I may have some stuff you might like instead.  Just let me know what it's for.
« Last Edit: December 31, 1969 06:00 pm CST by Sinister »

Newbie

  • Spam Specialist
  • Centurian Lord
  • Posts: 2,531
  • Reputation: +1/-0
    • http://imchaos.com/newl.asp?x=M0ckious&y=900627
(No subject)
« Reply #13 on: May 31, 2004 08:32 pm CDT »
Well it's for TVT and you can't use deuspack because energy involes stamina and walking.. so it doesn't work for some reason..

I just need a script to #meditate to full energy/stamina then #wake and wait about 15 seconds before repeating the process over again.
« Last Edit: December 31, 1969 06:00 pm CST by Newbie »

Newbie

  • Spam Specialist
  • Centurian Lord
  • Posts: 2,531
  • Reputation: +1/-0
    • http://imchaos.com/newl.asp?x=M0ckious&y=900627
(No subject)
« Reply #14 on: June 3, 2004 05:49 pm CDT »
*Bump*   :wink:
« Last Edit: December 31, 1969 06:00 pm CST by Newbie »