Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Need help to make simple script


  • Please log in to reply
7 replies to this topic

#1
CAN

CAN

    Advanced Member

  • Members
  • 199 posts

I make script to move automatically random position.

 

It works but, too fast random click on map so i want to put delay.

 

However, idk how to put delay in script.

 

if u guys have time them.. plz help me!

 

message or skype


  • 0

#2
Cloud

Cloud

    KAPPA

  • Ex-Staff
  • PipPipPip
  • 1,498 posts

Moved to developer talk

Also DelayAction would work im pretty sure you could even use ticks but this is some sample code

DelayAction(function() MoveToXYZ(x,y,z) end, 1000) --1000 is the delay before we movetoxyz try messing with the delays 
you could also randomize it so that it would delay moving randomly

  • 0

#3
CAN

CAN

    Advanced Member

  • Members
  • 199 posts

 

Moved to developer talk

Also DelayAction would work im pretty sure you could even use ticks but this is some sample code

DelayAction(function() MoveToXYZ(x,y,z) end, 1000) --1000 is the delay before we movetoxyz try messing with the delays 
you could also randomize it so that it would delay moving randomly

it only delayed befor start the script

 

my script is 

 

---------------------------------------------------------------------------------------

require("Inspired")
 
local AutodeathMenu = MenuConfig("AutoDeath", "AutoDeath")
AutodeathMenu:Boolean("OnOff", "ON / OFF", false)
OnTick(function(myHero)
if AutodeathMenu.OnOff:Value() then
local x = math.random( 0, 15000 )
local y = math.random( 0, 15000 )
local z = math.random( 0, 15000 )
DelayAction(function() MoveToXYZ(x,y,z) end, 5000)
end
end)

  • 0

#4
Cloud

Cloud

    KAPPA

  • Ex-Staff
  • PipPipPip
  • 1,498 posts

 

it only delayed befor start the script

 

my script is 

 

---------------------------------------------------------------------------------------

require("Inspired")
 
local AutodeathMenu = MenuConfig("AutoDeath", "AutoDeath")
AutodeathMenu:Boolean("OnOff", "ON / OFF", false)
OnTick(function(myHero)
if AutodeathMenu.OnOff:Value() then
local x = math.random( 0, 15000 )
local y = math.random( 0, 15000 )
local z = math.random( 0, 15000 )
DelayAction(function() MoveToXYZ(x,y,z) end, 5000)
end
end)

 

Well if you can
local currtickz = GetTickCount()

local tickz = 0

if (tickz + 1000) < currtickz and AutodeathMenu.OnOff:Value() then -- 1000 == 1 second

MoveToXYZ(x,y,z)

end

  • 0

#5
CAN

CAN

    Advanced Member

  • Members
  • 199 posts

 

Well if you can
local currtickz = GetTickCount()

local tickz = 0

if (tickz + 1000) < currtickz and AutodeathMenu.OnOff:Value() then -- 1000 == 1 second

MoveToXYZ(x,y,z)

end

 

require("Inspired")
 
local AutodeathMenu = MenuConfig("AutoDeath", "AutoDeath")
AutodeathMenu:Boolean("OnOff", "ON / OFF", false)
OnTick(function(myHero)
if AutodeathMenu.OnOff:Value() then
local x = math.random( 0, 15000 )
local y = math.random( 0, 15000 )
local z = math.random( 0, 15000 )
local currtickz = GetTickCount()
local tickz = 0
if (tickz + 3000) < currtickz and AutodeathMenu.OnOff:Value() then -- 1000 == 1 second
MoveToXYZ(x,y,z)
end
end
end)
 
 
 
 
 
nothing changed with my script

  • 0

#6
ButterSmooth

ButterSmooth

    Advanced Member

  • Members
  • 710 posts

 

require("Inspired")
 
local AutodeathMenu = MenuConfig("AutoDeath", "AutoDeath")
AutodeathMenu:Boolean("OnOff", "ON / OFF", false)
OnTick(function(myHero)
if AutodeathMenu.OnOff:Value() then
local x = math.random( 0, 15000 )
local y = math.random( 0, 15000 )
local z = math.random( 0, 15000 )
local currtickz = GetTickCount()
local tickz = 0
if (tickz + 3000) < currtickz and AutodeathMenu.OnOff:Value() then -- 1000 == 1 second
MoveToXYZ(x,y,z)
end
end
end)
 
 
 
 
 
nothing changed with my script

 

Do you understand what cloud did ._. I recommend to look into timer. Because i don't understand timer Kappa


  • 0

#7
CAN

CAN

    Advanced Member

  • Members
  • 199 posts

Do you understand what cloud did ._. I recommend to look into timer. Because i don't understand timer Kappa

what is the problem of this script?


  • 0

#8
Lelouch

Lelouch

    ?

  • Members
  • 464 posts
Spams move commands too fast
  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users