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 

A Link To The Past Script By me :)

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts
View previous topic :: View next topic  

Did you Like my Script
Yes
75%
 75%  [ 3 ]
No
25%
 25%  [ 1 ]
Total Votes : 4

Author Message
oobis



Joined: 20 Feb 2007
Posts: 3

Digg It
PostPosted: Tue Feb 20, 2007 11:23 pm    Post subject: A Link To The Past Script By me :)

This is my first Script so it may not be that good Confused

well Here Razz


Code:
// This WiiMote Script is for A Link to the Past
// By: oobis
// Pleas do not take my work. DO NOT POST FOR YOUR SELF
// Version 1.0
// set your Snes Emu controls to:

// Up = Up
// Down = Down
// Left = Left
// Right = Right
// Start = S
// Select = T
// A = A
// B = B
// X = X
// Y = Y
// L = L
// R = R

// Controls:
// A Button (Pick Up Pots/Open chests/lift up bushes)
// D-Pad (hold it like you would with Excite Truck)
// Home Button (Start Button)
// - (is select)
// B Button (Is Main Item)
// 2 Button (is to swing your sword you can also flick the wiimote)
// 1 Button (is for the Map)
//
//
// Moving Around
up = Wiimote.Right
left = Wiimote.Up
Down = Wiimote.Left
Right = Wiimote.down

// Other Buttons
S = WiiMote.home
t = WiiMote.Minus
a = WiiMote.A
y = WiiMote.B
x = WiiMote.1
B = Wiimote.2

if (wiimote.RelAccX > 25) or (wiimote.RelAccY > 25) or (wiimote.RelAccZ > 15) then
B = true
wiimote.Rumble = true
wait 60 ms
B = false
wait 100 ms
wiimote.Rumble = false
End If

// Battery Bar
var.Batt = wiimote.Battery / 48

if true then
wait 5 seconds
end if

var.Blink = 500ms

debug = "Battery Bar  " + 100*48*var.Batt/192 + "%"

if 0<=var.Batt<=0.25 then
Wiimote.Leds = 1
wait var.Blink
Wiimote.Leds = 0
wait var.Blink
elseif 0.25 < var.Batt<=1 then
Wiimote.Leds = 1
elseif 1 < var.Batt<=1.25 then
Wiimote.Leds = 3
wait var.Blink
Wiimote.Leds = 1
wait var.Blink
elseif 1.25 < var.Batt<=2 then
Wiimote.Leds = 3
elseif 2 < var.Batt<=2.25 then
Wiimote.Leds = 7
wait var.Blink
Wiimote.Leds = 3
wait var.Blink
elseif 2.25 < var.Batt<=3 then
Wiimote.Leds = 7
elseif 3 < var.Batt<=3.25 then
Wiimote.Leds = 15
wait var.Blink
Wiimote.Leds = 7
wait var.Blink
elseif 3.25 < var.Batt<=4 then
Wiimote.Leds = 15
else
Wiimote.Leds = 0
End If



// set your Snes Emu controls to:

Up = Up
Down = Down
Left = Left
Right = Right
Start = S
Select = T
A = A
B = B
X = X
Y = Y
L = L
R = R

// Controls:
A Button (Pick Up Pots/Open chests/lift up bushes)
D-Pad (hold it like you would with Excite Truck)
Home Button (Start Button)
- (is select)
B Button (Is Main Item)
2 Button (is to swing your sword you can also flick the wiimote)
1 Button (is for the Map)


Last edited by oobis on Sun May 06, 2007 3:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
SwedishFrog
Site Admin


Joined: 25 Jan 2007
Posts: 273
Location: New York

Digg It
PostPosted: Wed Feb 21, 2007 8:52 pm    Post subject:

Pretty cool script, man. Welcome aboard Very Happy

but what's up with this part:
if true then
wait 5 seconds
endif

I don't understand the purpose of this code. It seems to do nothing.
Back to top
View user's profile Send private message Visit poster's website AIM Address
oobis



Joined: 20 Feb 2007
Posts: 3

Digg It
PostPosted: Wed Feb 21, 2007 9:03 pm    Post subject: I forget

LoL i forget why i put that there lol ;p
Back to top
View user's profile Send private message
the-white_knight3



Joined: 27 Jan 2007
Posts: 31

Digg It
PostPosted: Wed Mar 14, 2007 7:24 pm    Post subject:

Your working with the battery bar there. You need the wait 5 seconds to give the remote time to communicate. That's why you have it in there.
Back to top
View user's profile Send private message
Vattu



Joined: 11 Jan 2007
Posts: 96

Digg It
PostPosted: Wed Mar 14, 2007 7:34 pm    Post subject:

I thought that glovepie only holds everything inside the if-statement, while everything else get executed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Wii Scripts 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