h1

Script 1.0

Wiimote Age of Conan Script 1

// Type your program here, or click the GUI tab to autogenerate it!

 

// Code for playing Age of Conan with the 2 Wii-Remotes and DDR pad!

 

// Code pieced together with other code from several people, put together by Thules, Version 1.1

 

// Voice Control Starts Here

M = said(“Map”) //Map

J = said(“Journal”) //Quest Journal

I = said(“Inventory”) //Inventory

N = said(“Skills”) //Feat Tree

P = said(“Character”) //Character Info

// Voice Control Ends Here

// Dancepad Starts Here

If Joystick2.x > 0.05 Then Key.D = True

If Joystick2.x < 0.05 Then Key.D = False

If Joystick2.x < -0.05 Then Key.A = True

If Joystick2.x > -0.05 Then Key.A = False

If Joystick2.y > 0.05 Then Key.S = True

If Joystick2.y < 0.05 Then Key.S = False

If Joystick2.y < -0.05 Then Key.W = True

// Add Dancepad button support here

Joystick2.Button1 = Keyboard.Q

Joystick2.Button2 = Keyboard.E

Joystick2.Button3 = Keyboard.Q

Joystick2.Button4 = Keyboard.E

Joystick2.Button5 = Keyboard.Console

Joystick2.Button6 = (Keyboard.Alt + Keyboard.0)

// Dancepad Ends Here

 

 

 

// Wiimote1 Starts Here

// Remote Controls for Combo and Action keys

Wiimote1.Up = Keyboard.two //Action key 2

Wiimote1.Down = Keyboard.three //Action key 3

Wiimote1.Left = Keyboard.one //Action key 1

Wiimote1.Right = Keyboard.four //Action key 4

 

// Other Wiimote Controls

Wiimote1.A = Keyboard.BackSlash //Sheath or Unsheath

Wiimote1.B = Keyboard.Alt //Alt

Wiimote1.Minus = (Keyboard.Tab + Keyboard.Ctrl) //Previous Target

Wiimote1.Plus = (Keyboard.Tab + Keyboard.Shift) //Next Target

Wiimote1.Home = Keyboard.Tab //Targetting

Wiimote1.One = Keyboard.Ctrl //Sprint

Wiimote1.Two = Keyboard.Space //Jump

 

// Sheath or Unsheath detection mechanism

If Var.Sheath = False

If (SingleClicked(Wiimote1.A) = True) Then Var.Sheath = True

Endif

If Var.Sheath = True //Checks to see if weapon is sheathed or not (1 if)

If (SingleClicked(Wiimote1.A) = True) Then Var.Sheath = False

// Swing script Sept 4

//Amount of time allowed between sequence actions

PIE.SeqReadGap = 50ms

// Sets up Options

var.AT = 2

var.ActionGap = 150ms

// Swinging?

If (Wiimote1.gy < -var.AT) then var.Wiimote1Swing = true

If var.Wiimote1Swing = true // (2 if)

// Pitch and Roll variable values

If (-45 > Wiimote1.pitch > -90) then var.pf = 1

If (60 < Wiimote1.roll < 90) then var.rl = 3

If (-60 > Wiimote1.roll > -90) then var.rr = 5

If (135 < Wiimote1.roll < 180) then var.rul = 7

If (-180 < Wiimote1.roll < -135) then var.rur = 11

If var.Wiimote1Direction = false // (3 if)

// Down?

If (var.pf + var.rl + var.rr+ var.rul + var.rur) = 1

var.Wiimote1Direction = true

say “Wiimote down”

Press(keyboard.numpad8)

wait var.HoldKey

Release(keyboard.numpad8)

wait var.ActionGap

var.pf = 0

var.rl = 0

var.rr = 0

var.rul = 0

var.rur = 0

var.Wiimote1Swing = false

var.Wiimote1Direction = false

Endif

// Left?

If (var.pf + var.rl + var.rr + var.rul + var.rur) = 4

var.Wiimote1Direction = true

say “Wiimote left”

Press(keyboard.numpad4)

wait var.HoldKey

Release(keyboard.numpad4)

wait var.ActionGap

var.pf = 0

var.rl = 0

var.rr = 0

var.rul = 0

var.rur = 0

var.Wiimote1Swing = false

var.Wiimote1Direction = false

Endif

// Right?

If (var.pf + var.rl + var.rr + var.rul + var.rur) = 6

var.Wiimote1Direction = true

say “Wiimote right”

Press(keyboard.numpad6)

wait var.HoldKey

Release(keyboard.numpad6)

wait var.ActionGap

var.pf = 0

var.rl = 0

var.rr = 0

var.rul = 0

var.rur = 0

var.Wiimote1Swing = false

var.Wiimote1Direction = false

Endif

 

// UpLeft? Total could be 8

If (var.pf + var.rl + var.rr + var.rul + var.rur) = 7

var.Wiimote1Direction = true

say “Wiimote Up and left”

Press(keyboard.numpad7)

wait var.HoldKey

Release(keyboard.numpad7)

wait var.ActionGap

var.pf = 0

var.rl = 0

var.rr = 0

var.rul = 0

var.rur = 0

var.Wiimote1Swing = false

var.Wiimote1Direction = false

Endif

 

// UpLeft? Total could be 12

If (var.pf + var.rl + var.rr + var.rul + var.rur) = 11

var.Wiimote1Direction = true

say “Wiimote Up and Right”

Press(keyboard.numpad9)

wait var.HoldKey

Release(keyboard.numpad9)

wait var.ActionGap

var.pf = 0

var.rl = 0

var.rr = 0

var.rul = 0

var.rur = 0

var.Wiimote1Swing = false

var.Wiimote1Direction = false

Endif

Endif

Endif

Endif

// Wiimote1 Ends Here

 

// Wiimote2 control Starts Here

// Turns Wiimote2 into a IR Mouse

If Wiimote2.PointerVisible

Mouse.cursorposx = smooth(1920-round((((Wiimote2.dot1x+Wiimote2.dot2x)/2)/1012)*1920),3)

Mouse.cursorposy = smooth(round((((Wiimote2.dot1y+Wiimote2.dot2y)/2)/800)*1080),3)

Endif

 

// Mouselook

If Pressed(Wiimote2.A) Then Wiimote2.gz = ((Mouse.DirectInputZ)/180)

 

// Wiimote2 Action Keys

Wiimote2.Up = Keyboard.six //Action key 6

Wiimote2.Down = Keyboard.eight //Action key 8

Wiimote2.Left = Keyboard.five //Action key 5

Wiimote2.Right = Keyboard.seven //Action key 7

// Other Wiimote2 Keys

Wiimote2.A = Mouse.RightButton //Mouse right button, Mouselook

Wiimote2.B = Keyboard.shift //Shift

Wiimote2.minus = Keyboard.nine //Health Potion

Wiimote2.Home = Mouse.LeftButton //Mouse left button

Wiimote2.plus = Keyboard.Zero //Stamina Potion

Wiimote2.one = Mouse.MiddleButton //Vent button

Wiimote2.two = Keyboard.Z //Change Weapons

Endif

One comment

  1. […]  https://wiimoteaoc.wordpress.com/script-10/ […]



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: