ryono Posted February 15, 2009 Author Share Posted February 15, 2009 hey guys, I decided to make a dance script. however, I have come to the foul conclusion, that it does not work. and there is no error message. heres how u install it.put this at bottom of main.txt:```sub dance(index, speed) dim dir dim playerx dim playery dim dancephase dim dancecount dim num1 dim num2 dir = getplayerdir(index) playerx = getplayerx(index) playery = getplayery(index) num1 = cint(getvar("DanceCount.ini", "TIMES", getplayername(index))) num2 = cint(getvar("DanceCount.ini", "COMPLETE", getplayername(index))) call putvar("DanceCount.ini", "TIMES", getplayername(index), "0") call putvar("DanceCount.ini", "LOOP", getplayername(index), "0") call putvar("DanceCount.ini", "PHASE", getplayername(index), "1") call putvar("DanceCount.ini", "COMPLETE", getplayername(index), "0") call playermsg(index, "You begin dancing!", white) do while getvar("DanceCount.ini", "COMPLETE", getplayername(index)) <= 10 do while getvar("DanceCount.ini", "PHASE", getplayername(index)) = 1 do while getvar("DanceCount.ini", "TIMES", getplayername(index)) <= 10 select case dir case 0 call setplayerdir(index, 1) case 1 call setplayerdir(index, 2) case 2 call setplayerdir(index, 3) case 3 call setplayerdir(index, 0) end select if getvar("DanceCount.ini", "LOOP", getplayername(index)) = 0 then call settimer("DanceDelay " & index, speed) call putvar("DanceCount.ini", "LOOP", getplayername(index), "1") end if call putvar("DanceCount.ini", "TIMES", getplayername(index), cstr(num1 + 1)) loop call putvar("DanceCount.ini", "LOOP", getplayername(index), "0") call putvar("DanceCount.ini", "TIMES", getplayername(index), "0") call putvar("DanceCount.ini", "PHASE", getplayername(index), "2") loop do while getvar("DanceCount.ini", "PHASE", getplayername(index)) = 2 do while getvar("DanceCount.ini", "TIMES", getplayername(index)) < 1 select case dir case 0 call setplayerdir(index, 1) case 1 call setplayerdir(index, 2) case 2 call setplayerdir(index, 3) case 3 call setplayerdir(index, 0) end select if getvar("DanceCount.ini", "LOOP", getplayername(index)) = 0 then call settimer("DanceDelay " & index, speed) call putvar("DanceCount.ini", "LOOP", getplayername(index), "1") end if call putvar("DanceCount.ini", "TIMES", getplayername(index), cstr(num1 + 1)) loop call putvar("DanceCount.ini", "LOOP", getplayername(index), "0") call putvar("DanceCount.ini", "TIMES", getplayername(index), "0") do while getvar("DanceCount.ini", "TIMES", getplayername(index)) < 1 select case dir case 0 call setplayery(index, playery - 1) case 1 call setplayery(index, playery + 1) case 2 call setplayerx(index, playerx - 1) case 3 call setplayerx(index, playerx + 1) end select if getvar("DanceCount.ini", "LOOP", getplayername(index)) = 0 then call settimer("DanceDelay " & index, speed) call putvar("DanceCount.ini", "LOOP", getplayername(index), "1") end if call putvar("DanceCount.ini", "TIMES", getplayername(index), cstr(num1 + 1)) loop call putvar("DanceCount.ini", "LOOP", getplayername(index), "0") call putvar("DanceCount.ini", "TIMES", getplayername(index), "0") do while getvar("DanceCount.ini", "TIMES", getplayername(index)) < 1 select case dir case 0 call setplayery(index, playery + 1) case 1 call setplayery(index, playery - 1) case 2 call setplayerx(index, playerx + 1) case 3 call setplayerx(index, playerx - 1) end select if getvar("DanceCount.ini", "LOOP", getplayername(index)) = 0 then call settimer("DanceDelay " & index, speed) call putvar("DanceCount.ini", "LOOP", getplayername(index), "1") end if call putvar("DanceCount.ini", "TIMES", getplayername(index), cstr(num1 + 1)) loop call putvar("DanceCount.ini", "LOOP", getplayername(index), "0") call putvar("DanceCount.ini", "TIMES", getplayername(index), "0") call putvar("DanceCount.ini", "PHASE", getplayername(index), "1") loop call putvar("DanceCount.ini", "COMPLETE", getplayername(index), cstr(num2 + 1)) loopend sub```edit: I forgot the timer sub so also add this in your main.txt:```sub dancedelay(index) call putvar("DanceCount.ini", "TIMES", getplayername(index), cstr(num1 + 1)) call putvar("DanceCount.ini", "LOOP", getplayername(index), "0")end sub```then make a .ini called "DanceCount.ini" and put this in it:```[TIMES][LOOP][PHASE][COMPLETE]```then u can call it like this:```call dance(index, speed)```index - the index number of playerspeed - the speed at which the player dances. The lower the faster.In miliseconds. Link to comment Share on other sites More sharing options...
Khachaturian Posted February 15, 2009 Share Posted February 15, 2009 No end sub? Link to comment Share on other sites More sharing options...
ryono Posted February 15, 2009 Author Share Posted February 15, 2009 look at the bottom, its right there Link to comment Share on other sites More sharing options...
Khachaturian Posted February 15, 2009 Share Posted February 15, 2009 Oh lol, I didn't realized it scrolled won.new fangled technology…My bad. Link to comment Share on other sites More sharing options...
ryono Posted February 15, 2009 Author Share Posted February 15, 2009 lolz it ok Link to comment Share on other sites More sharing options...
balliztik1 Posted February 15, 2009 Share Posted February 15, 2009 Is there a DanceDelay sub? You reference it in the script, but it's not included. Link to comment Share on other sites More sharing options...
ryono Posted February 15, 2009 Author Share Posted February 15, 2009 holy shit dude ur right… I forgot about the timer....edit: it still does not work with the timer.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now