ThirdPerson Script

Started by ArdTheSheep, June 04, 2016, 06:35:14 AM

Previous topic - Next topic

ArdTheSheep

This script will add a zoom-in/zoom-out effect when toggling thirdperson.

You can adjust side movements too!

Type /atp to open the interface to edit how it zooms!

Quote
// Script by Ardelico
// main
setatp = [bind 9 "";thirdperson 1; setdistance; sleep 150 [setside; sleep 50 [bind 9 removeatp]]]
removeatp = [bind 9 "";removedistance; removeside; sleep 300 [thirdperson 0; sleep 50 [bind 9 setatp]]]

setdistance = [loop i $atpdistance [sleep (* $i 15) [thirdpersondistance @i]]]
setside = [loop i $atpside [sleep (* $i 15) [thirdpersonside @i]]]

removedistance = [loop i (- $atpdistance 1) [sleep (* $i 15) [thirdpersondistance (- $thirdpersondistance 1)]]]
removeside = [loop i $atpside [sleep (* $i 15) [thirdpersonside (- $thirdpersonside 1)]]]

// bind and restore bind
setatpbind = [bind 9 setatp]
removeatpbind = [bind 9 [thirdperson (= $thirdperson 0); if (= $thirdperson 0) [echo thirdperson OFF] [ echo thirdperson ON]]]

// gui
atp = [showgui atp]
newgui atp [
   guistayopen [
   guititle "^f6Ard's Third Person"
   guibar
   guibutton "Bind ATP" [setatpbind; echo "^f6ATP bound to 9."]
   guibutton "Remove ATP Bind" [removeatpbind; thirdpersonside 0; thirdpersondistance 20; echo "^f6ATP bind removed."]
   guibar
   guititle "^f6Distance"
   guislider atpdistance 10 30
   guibar
   guititle "^f6Side"
   guislider atpside 5 15
   guibar
   guibutton close cleargui
   ]
]
Signature