WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Final Fantasy XI Online Script by Wreyth

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
Wreyth



Joined: 03 Nov 2007
Posts: 75

Digg It
PostPosted: Sat Jun 21, 2008 7:05 am    Post subject: Final Fantasy XI Online Script by Wreyth

Below is the current finished version of my Final Fantasy Online Script Including the target party members finished.

there are a few small drawbacks with using the thumbstick and control at the same time but i can't fix those without rebinding the keys in ffxi so they are small and easily overcome with some practice with the script

in order for the mouse pointer to work properly you do need the sensor bar or some other form of 2 dot IR

here it is i hope this helps some people out and please let me know what you think guys.

Code:

//Final Fantasy XI Online Script
// Version 2.4

//Script made By Wreyth

//Here are the Button Controls and Assignments
//------------------------------------------------------------
//Mouse Left Button        - C + A
//Mouse Right Button       - C + B
//Enter                    - A
//Escape                   - B
//Up/Down/Left/Right Keys  - Wiimote DPad
//Character Movement       - Thumbstick
//Autorun                  - C + Thumbstick Forward
//Control Key Held         - C + Z
//Macro Ctrl               - C
//Macro Alt                - Z
//Weaponskill Menu         - C + Z + Wiimote Flicked Up
//Job Abilities Menu       - C + Z + Nunchuk Flicked Up
//Magic Menu               - C + Z + Nunchuk Flicked Left/Right
//Attack                   - C + Z + Wiimote Flicked Left/Right
//Menu                     - C + Z + Wiimote Home
//Inventory Menu           - C + Wiimote Home
//Equipment Menu           - Z + Wiimote Home
//Map                      - Wiimote Button 1
//Heal/Lockon              - Wiimote Button 2
//Autosort Inventory       - C + Wiimote Plus
//Tab                      - Wiimote Plus
//Shift Tab                - Wiimote Minus
//1st/3rd Person View      - C + Wiimote Minus
//Target Self              - Wiimote Home
//Target Party Members     - Z + Wiimote Plus/Minus
//Toggle Screen Select     - Z + A
// -----------------------------------------------------------
//
//
//Numeric Macro Keys
//(with C or Z Held, Alt/Ctrl)
// -----------------------------------------------------------
//          1           - Wiimote Flicked Right/Left
//          2           - Wiimote Flicked Up
//          3           - Nunchuk Flicked Left/Right
//          4           - Nunchuk Flicked Up
//          5           - Wiimote Button 1
//          6           - Wiimote Button 2
//          7           - Wiimote DPad Up
//          8           - Wiimote DPad Right
//          9           - Wiimote DPad Down
//          0           - Wiimote DPad Left
//------------------------------------------------------------




// Wiimote Mouse Script
// Requires a Sensor Bar
//----------------------------------------------
var.ButtonFreezeTime = 500ms
var.PointerBump = KeepDown(Pressed(wiimote.A),var.ButtonFreezeTime) or KeepDown(Pressed(wiimote.B),var.ButtonFreezeTime)

// Mouse Movement
if wiimote.PointerVisible but not var.PointerBump then
  mouse.x = wiimote.PointerX
  mouse.y = wiimote.PointerY
end if

// Mouse Buttons
if Wiimote.Nunchuk.ZButton then
key.f = Wiimote.A and KeepDown(Wiimote.PointerVisible,0.5s)
Escape = Wiimote.B and KeepDown(Wiimote.PointerVisible,0.5s)
elseif Wiimote.Nunchuk.CButton then
mouse.LeftButton = Wiimote.A and KeepDown(Wiimote.PointerVisible,0.5s)
mouse.RightButton = Wiimote.B and KeepDown(Wiimote.PointerVisible,0.5s)
else
Enter = Wiimote.A and KeepDown(Wiimote.PointerVisible,0.5s)
Escape = Wiimote.B and KeepDown(Wiimote.PointerVisible,0.5s)
end if
//Thumbstick Movement
//-------------------------------------------------
d = Wiimote1.Nunchuk.JoyX > 0.50
a = Wiimote1.Nunchuk.JoyX < -0.50
s = Wiimote1.Nunchuk.JoyY > 0.50
w = Wiimote1.Nunchuk.JoyY < -0.50




//Various Button Settings             d
//-------------------------------------------------
//Z + C Buttons
if Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton and Wiimote1.Nunchuk.JoyY < -0.50 then
Control = Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton
//Autorun
else
Control = Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton
key.r = Wiimote.Nunchuk.CButton and Wiimote1.Nunchuk.JoyY < -0.50

end if

//Wiimote DPad Up
//--------------------------------------------
//C + Z Buttons
if Wiimote.Up and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
press(key.up)
wait 100ms
release(key.up)
wait 100ms
//Z button
elseif wiimote.Up and Wiimote.Nunchuk.ZButton then
press(alt)
press(key.7)
wait 500ms
release(key.7)
release(alt)
//C Button
elseif wiimote.Up and Wiimote.Nunchuk.CButton then
press(control)
press(key.7)
wait 500ms
release(key.7)
release(control)
//No Buttons
elseif wiimote.Up then
press(key.up)
wait 100ms
release(key.up)
wait 100ms
end if

//Wiimote DPad Down
//----------------------------------------------
//C + Z Buttons
if Wiimote.Down and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
press(key.down)
wait 100ms
release(key.down)
wait 100ms
//Z Button
elseif wiimote.Down and Wiimote.Nunchuk.ZButton then
press(alt)
press(key.9)
wait 500ms
release(key.9)
release(alt)
//C Button
elseif wiimote.Down and Wiimote.Nunchuk.CButton then
press(control)
press(key.9)
wait 500ms
release(key.9)
release(control)
//No Buttons
elseif wiimote.Down then
press(key.down)
wait 100ms
release(key.down)
wait 100ms
end if

//Wiimote DPad Right
//-----------------------------------------------
//C + Z Buttons
if Wiimote.Right and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
press(key.right)
wait 100ms
release(key.right)
wait 100ms
//Z Button
elseif wiimote.Right and Wiimote.Nunchuk.ZButton then
press(alt)
press(key.8)
wait 50ms
release(key.8)
release(alt)
//C Buuton
elseif wiimote.Right and Wiimote.Nunchuk.CButton then
press(control)
press(key.8)
wait 50ms
release(key.8)
release(control)
//No Buttons
else if wiimote.Right then
press(key.right)
wait 100ms
release(key.right)
wait 100ms
end if

//Wiimote DPad Left
//----------------------------------------------
//C + Z Buttons
if Wiimote.Left and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
press(key.left)
wait 100ms
release(key.left)
wait 100ms
//Z Button
elseif Wiimote.Left and Wiimote.Nunchuk.ZButton then
press(alt)
press(key.0)
wait 50ms
release(key.0)
release(alt)
//C Button
elseif wiimote.Left and Wiimote.Nunchuk.CButton then
press(control)
press(key.0)
wait 50ms
release(key.0)
release(control)
//No Buttons
elseif wiimote.Left then
press(key.left)
wait 100ms
release(key.left)
end if

//Wiimote Home
//-------------------------------------------------
//C + Z Buttons
if Wiimote.Home and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
press(key.minus)
wait 500 ms
release(key.minus)
//Z Button
elseif Wiimote.Home and Wiimote.Nunchuk.ZButton then
press(control)
press(key.e)
wait 500ms
release(key.e)
release(control)
//C Button
else if Wiimote.Home and Wiimote.Nunchuk.CButton then
press(control)
press(key.i)
wait 500 ms
release(key.i)
release(control)
//No Buttons
elseif Wiimote.Home then
press(key.f1)
wait 500ms
release(key.f1)
endif

//Wiimote Plus Button
//-------------------------------------------------
//Z Button
if Wiimote.Plus and Wiimote.Nunchuk.ZButton then

//C Button
elseif Wiimote.Plus and Wiimote.Nunchuk.CButton then
press(control)
press(key.i)
wait 50ms
release(control)
release(key.i)
wait 50ms
press(Key.Numpadplus)
wait 50ms
release(Key.numpadplus)
wait 50ms
press(enter)
wait 50ms
release(enter)
wait 50ms
press(up)
wait 50ms
release(up)
wait 50ms
press(enter)
wait 50ms
release(enter)
wait 50ms
press(escape)
wait 50ms
release(escape)
wait 500ms
//No Buttons
elseif Wiimote.Plus then
press(tab)
wait 50 ms
release(tab)
endif

//Wiimote Minus Button
//-------------------------------------------------
//Z Button
if Wiimote.Minus and Wiimote.Nunchuk.ZButton then

//C Button
elseif Wiimote.Minus and Wiimote.Nunchuk.CButton then
wait 500ms
press(key.v)
wait 50ms
release(key.v)
//No Buttons
elseif Wiimote.Minus then
press(Shift)
press(Tab)
wait 50 ms
release(Tab)
release(Shift)
endif

//Wiimote Button 1
//-------------------------------------------------
//Z Button
if Wiimote.One and Wiimote.Nunchuk.ZButton then
press(alt)
press(key.5)
wait 500 ms
release(key.5)
release(alt)
//C Button
elseif Wiimote.One and Wiimote.Nunchuk.CButton then
press(control)
press(key.5)
wait 500 ms
release(key.5)
release(control)
//No Buttons
elseif Wiimote.One then
wait 100ms
Type('/map')
wait 50ms
press(Enter)
Release(Enter)
wait 500ms
endif

//Wiimote Button 2
//-------------------------------------------------
//Z Button
if Wiimote.Two and Wiimote.Nunchuk.ZButton then
press(alt)
press(key.6)
wait 500 ms
release(key.6)
release(alt)
//C Button
elseif Wiimote.Two and Wiimote.Nunchuk.CButton then
press(control)
press(key.6)
wait 500 ms
release(key.6)
release(control)
//No Buttons
elseif Wiimote.Two then
wait 500ms
press(key.h)
release(key.h)
endif


//Wiimote Flicked up
//-------------------------------------------------
//C + Z Buttons
if var.yRot >= 100 and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
press(key.w)
wait 50ms
release(key.w)
wait 500ms
// Z Button
elseif var.yRot >= 100 and Wiimote.Nunchuk.ZButton then
press(Alt)
press(key.2)
wait 50 ms
release(key.2)
release(Alt)
// C Button
elseif var.yRot >= 100 and Wiimote.Nunchuk.CButton then
press(control)
press(key.2)
wait 50 ms
release(key.2)
release(control)
//No Buttons
elseif var.yRot >= 100 then
endif

//Wiimote Flicked Left/Right
//-------------------------------------------------
// C + Z Buttons
if var.xRot >= 100 and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
Press(key.a)
wait 50ms
Release(key.a)
wait 500ms
// Z Button
else if var.xRot >= 100 and Wiimote.Nunchuk.ZButton then
press(Alt)
press(key.1)
wait 50 ms
release(key.1)
release(Alt)
// C Button
elseif var.xRot >= 100 and Wiimote.Nunchuk.CButton then
press(control)
press(key.1)
wait 50 ms
release(key.1)
release(control)
//No Buttons
elseif var.xRot >= 100  then
endif

//Nunchuk Flicked Up
//--------------------------------------------------
//C + Z Buttons
if var.nyRot >= 120 and Wiimote.Nunchuk.ZButton and Wiimote.Nunchuk.CButton then
press(key.j)
wait 50ms
Release(key.j)
//Z Button
elseif var.nyRot >= 120 and Wiimote.Nunchuk.ZButton then
press(Alt)
press(key.4)
wait 50 ms
release(key.4)
release(Alt)
//C Button
elseif var.nyRot >= 120 and Wiimote.Nunchuk.CButton then
press(control)
press(key.4)
wait 50 ms
release(key.4)
release(control)
//No Buttons
elseif var.nyRot >= 120  then
endif

//Nunchuk Flicked Left/Right
//--------------------------------------------------
//C + Z Button
if var.nxRot >= 70 and Wiimote.Nunchuk.CButton and Wiimote.Nunchuk.ZButton then
press(control)
press(key.m)
wait 50 ms
release(key.m)
release(control)
//Z Button
elseif var.nxRot >= 70 and Wiimote.Nunchuk.ZButton then
press(alt)
press(key.3)
wait 50 ms
release(key.3)
release(alt)
//C Button
elseif var.nxRot >= 70 and Wiimote.Nunchuk.CButton then
press(control)
press(key.3)
wait 50 ms
release(key.3)
release(control)
//No Buttons
elseif var.nxRot >= 70  then
endif

//Variables
//--------------------------------------------------
Inc(var.numbercycle) = pressed(Wiimote.Plus and Wiimote.Nunchuk.ZButton)
Dec(var.numbercycle) = pressed(Wiimote.Minus and Wiimote.Nunchuk.ZButton)
if var.numbercycle > 5 then var.numbercycle = 1
if var.numbercycle < 0 then var.numbercycle = 5
Key.F2 = KeepDown(Pressed(var.numbercycle=1), 100ms)
Key.F3 = KeepDown(Pressed(var.numbercycle=2), 100ms)
Key.F4 = KeepDown(Pressed(var.numbercycle=3), 100ms)
Key.F5 = KeepDown(Pressed(var.numbercycle=4), 100ms)
Key.F6 = KeepDown(Pressed(var.numbercycle=5), 100ms)

var.xRot = Wiimote.RawForceX
var.yRot = Wiimote.RawForceY
var.nxRot = Wiimote.Nunchuk.RawForceX
var.nyRot = Wiimote.Nunchuk.RawForceY

// L.E.D's
var.LEDspeed = 150 ms
if 0 = 0 then
  if var.led = 0 then
    wiimote.Leds = 0
  endif
  if var.led = 1 then
    wiimote.Leds = 1
  endif
  if var.led = 2 then
    wiimote.Leds = 3
  endif
  if var.led = 3 then
    wiimote.Leds = 6
  endif
  if var.led = 4 then
    wiimote.Leds = 12
  endif
  if var.led = 5 then
    wiimote.Leds = 6
  endif
  if var.led = 6 then
    wiimote.Leds = 3
  endif
  if var.led = 7 then
    wiimote.Leds = 1
  endif
  if var.led = 8 then
    wiimote.Leds = 0
  endif
  if var.led = 9 then
    wiimote.Leds = 0
  endif

  wait var.LEDspeed
  var.led = (var.led + 1) % 15
endif



Back to top
View user's profile Send private message
sert-man



Joined: 21 Jul 2008
Posts: 12

Digg It
PostPosted: Wed Jul 23, 2008 7:37 pm    Post subject:

its excelent i like it
ur a pro man
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group