Archives des forums MMO/MMORPG > La 4ème Prophétie > T4C - L'asile de Madrigan > Un ptit jeu ? (si ça marche)
Un ptit jeu ? (si ça marche)
Par Barkive Opensky le 1/2/2002 Ã 13:32:31 (#831206)
/*
SNAKE / SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavscript.com
*/
sna_game = false;
sna_larg = 600;
sna_haut = 400;
sna_X = new Array;
sna_Y = new Array;
sna_newX = new Array;
sna_newY = new Array;
function d(texte)
{
document.write(texte);
}
function sna_draw()
{
sna_score --;
if(sna_mode == 1)
{
sna_X_first = sna_X[1]+20;
sna_Y_first = sna_Y[1];
}
if(sna_mode == 2)
{
sna_X_first = sna_X[1]-20;
sna_Y_first = sna_Y[1];
}
if(sna_mode == 3)
{
sna_Y_first = sna_Y[1]+20;
sna_X_first = sna_X[1];
}
if(sna_mode == 4)
{
sna_Y_first = sna_Y[1]-20;
sna_X_first = sna_X[1];
}
if(sna_X_first == sna_bouleX && sna_bouleY == sna_Y_first)
{
sna_win_visibility = 'visible';
setTimeout("sna_win_visibility = 'hidden'",1000);
sna_winX = sna_bouleX-10;
sna_winY = sna_bouleY;
sna_boule();
sna_nbbloc++;
sna_score += 50;
}
if(sna_X_first sna_larg-20 || sna_Y_first sna_haut-20)
{
document.getElementById("sna_cadre").innerHTML = "PERDU, VOUS ETES DANS L'DECOR !!!APPUYEZ SUR \"D\" POUR COMMENCER";
sna_game = false;
return(false)
}
for(a=1;a<=sna_nbbloc;a++)
{
if(a==1)
{
temp = '';
sna_newX[a] = sna_X_first;
sna_newY[a] = sna_Y_first;
}
else
{
temp += '';
sna_newX[a] = sna_X[a-1];
sna_newY[a] = sna_Y[a-1];
if((sna_newX[a] == sna_X_first) && (sna_newY[a] == sna_Y_first))
{
document.getElementById("sna_cadre").innerHTML = "PERDU, VOUS VOUS ETES TOUCHE !!APPUYEZ SUR \"D\" POUR COMMENCER";
sna_game = false;
return(false)
}
}
}
for(a=1;a<=sna_nbbloc;a++)
{
sna_Y[a] = sna_newY[a]
sna_X[a] = sna_newX[a]
}
temp += '+50';
document.getElementById("sna_cadre").innerHTML = temp;
document.getElementById("sna_afficheur").innerHTML = "Votre score : "+sna_score;
setTimeout("sna_draw(10)",200);
}
d('APPUYEZ SUR "D" POUR COMMENCER');
d('');
function getKey(keyStroke) {
isNetscape=(document.getElementById && !document.all);
eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
touche = String.fromCharCode(eventChooser).toLowerCase();
if(sna_game)
{
if(touche==4 && sna_mode != 1)
sna_mode = 2;
if(touche==6 && sna_mode!=2)
sna_mode = 1;
if(touche==8 && sna_mode!=3)
sna_mode = 4;
if(touche==2 && sna_mode!=4)
sna_mode = 3;
}
if(touche=="d")
{
sna_score = 0;
sna_winX = 0;
sna_winY = 0;
sna_game = true;
sna_win_visibility = 'hidden'
sna_bouleX = 100;
sna_bouleY = 80;
sna_nbbloc = 10;
sna_Y[1] = 240
sna_Y[2] = 240
sna_Y[3] = 240
sna_Y[4] = 240
sna_Y[5] = 240
sna_Y[6] = 240
sna_Y[7] = 240
sna_Y[8] = 240
sna_Y[9] = 240
sna_Y[10] = 240
sna_X[1] = 240
sna_X[2] = 220
sna_X[3] = 200
sna_X[4] = 180
sna_X[5] = 160
sna_X[6] = 140
sna_X[7] = 120
sna_X[8] = 100
sna_X[9] = 80
sna_X[10] = 60
sna_mode = 1;
sna_draw();
}
}
function sna_boule()
{
sna_error = false;
sna_bouleX = Math.round(Math.random()*(sna_larg-20)/20)*20;
sna_bouleY = Math.round(Math.random()*(sna_haut-20)/20)*20;
for(a=1;a<=sna_nbbloc;a++)
{
if(sna_bouleX == sna_X[a] && sna_bouleY == sna_Y[a])
sna_error = true;
}
if(sna_error)
sna_boule();
else
{
document.getElementById("sna_boule").style.top = sna_bouleY;
document.getElementById("sna_boule").style.left = sna_bouleX;
}
}
document.onkeypress = getKey;
Votre score : -
Par Ceb le 1/2/2002 Ã 13:34:16 (#831218)
COPIEUR :p
Par Naos Etkhir le 1/2/2002 Ã 13:34:40 (#831223)
Par Dr Magus le 1/2/2002 Ã 13:35:17 (#831229)
Par Barkive Opensky le 1/2/2002 Ã 14:01:48 (#831239)
Par Kleny Senkarst le 1/2/2002 Ã 14:05:41 (#831258)
il pouvait pas savoir
pi ben , au moins il essayait de faire keke chose
pi il etait tout content de nous montrer son petit jeu
ouinnn, c est trop triste
*va pleurer dans sa chambre*
Par Sherya le 1/2/2002 Ã 14:09:03 (#831272)
#supertext {
position:absolute;
left:0;
top:0;
visibility:hide;
visibility:hidden;
}
/*
Bouncy message script- By Dynamicdrive.com
Code based on Lloyd Hassell's, at http://www.dynamicdrive.com/dynamicindex4/bounceimage.htm
For full source, TOS, and 100s DTHML scripts, visit http://dynamicdrive.com
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
var thecontent=' Le gagnant Gagne Une nuit Avec Naos ce coup ci ;) '
var hidetimer='';
var BallSpeed = 7;
var contentWidth;
var contentHeight;
var maxBallSpeed = 50;
var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth
contentHeight=supertext.offsetHeight
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
contentWidth=document.supertext.document.width
contentHeight=document.supertext.document.height
document.layers["supertext"].visibility = "show";
}
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("supertext").style.left = xPos + document.body.scrollLeft;
document.all("supertext").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["supertext"].left = xPos + pageXOffset;
document.layers["supertext"].top = yPos + pageYOffset;
}
animatetext=setTimeout('moveBall()',20);
}
}
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
} else if (xDir == "left") {
if (xPos (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}
if (document.all||document.layers){
document.write(''+thecontent+'')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}
Par Ceb le 1/2/2002 Ã 14:10:13 (#831276)
Pfffff je suis nul à ce jeu :p
Par Naos Etkhir le 1/2/2002 Ã 14:10:50 (#831280)
Par Ceb le 1/2/2002 Ã 14:12:25 (#831290)
:ange:
#supertext {
position:absolute;
left:0;
top:0;
visibility:hide;
visibility:hidden;
}
/*
Bouncy message script- By Dynamicdrive.com
Code based on Lloyd Hassell's, at http://www.dynamicdrive.com/dynamicindex4/bounceimage.htm
For full source, TOS, and 100s DTHML scripts, visit http://dynamicdrive.com
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
var thecontent=' Le gagnant Gagne Une nuit Avec Naos ce coup ci ;) '
var hidetimer='';
var BallSpeed = 7;
var contentWidth;
var contentHeight;
var maxBallSpeed = 50;
var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth
contentHeight=supertext.offsetHeight
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
contentWidth=document.supertext.document.width
contentHeight=document.supertext.document.height
document.layers["supertext"].visibility = "show";
}
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("supertext").style.left = xPos + document.body.scrollLeft;
document.all("supertext").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["supertext"].left = xPos + pageXOffset;
document.layers["supertext"].top = yPos + pageYOffset;
}
animatetext=setTimeout('moveBall()',20);
}
}
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
} else if (xDir == "left") {
if (xPos (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}
if (document.all||document.layers){
document.write(''+thecontent+'')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}
:oNaos tu m'dois 100 bénés :p
Par Caolie le 1/2/2002 Ã 14:17:21 (#831319)
Par Topblaireau le 1/2/2002 Ã 14:20:27 (#831338)
var snowsrc="http://perso.club-internet.fr/loicr/ani18.gif"
var no = 5;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx = 0;
xp = Math.random()*(doc_width-50);
yp = Math.random()*doc_height;
am = Math.random()*20;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
if (ns4up) {
if (i == 0) {
document.write(");
} else {
document.write(");
}
} else if (ie4up) {
if (i == 0) { document.write(");
} else {
document.write(");
}
}
}
function snowNS() {
for (i = 0; i doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx += stx;
document.layers["dot"+i].top = yp;
document.layers["dot"+i].left = xp + am*Math.sin(dx);
}
setTimeout("snowNS()", 10);
}
function snowIE() {
for (i = 0; i doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx += stx;
document.all["dot"+i].style.pixelTop = yp;
document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
}
setTimeout("snowIE()", 10);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
Par ZarderF le 1/2/2002 Ã 14:23:13 (#831360)
Par Ceb le 1/2/2002 Ã 14:30:37 (#831421)
Par Topblaireau le 1/2/2002 Ã 14:34:27 (#831445)
Par Ceb le 1/2/2002 Ã 14:36:53 (#831462)
var snowsrc="http://forums.jeuxonline.info/custom_avatars/avatar347_0.gif"
var no = 5;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
dx = 0;
xp = Math.random()*(doc_width-50);
yp = Math.random()*doc_height;
am = Math.random()*20;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
if (ns4up) {
if (i == 0) {
document.write(");
} else {
document.write(");
}
} else if (ie4up) {
if (i == 0) { document.write(");
} else {
document.write(");
}
}
}
function snowNS() {
for (i = 0; i doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx += stx;
document.layers["dot"+i].top = yp;
document.layers["dot"+i].left = xp + am*Math.sin(dx);
}
setTimeout("snowNS()", 10);
}
function snowIE() {
for (i = 0; i doc_height-50) {
xp = Math.random()*(doc_width-am-30);
yp = 0;
stx = 0.02 + Math.random()/10;
sty = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx += stx;
document.all["dot"+i].style.pixelTop = yp;
document.all["dot"+i].style.pixelLeft = xp + am*Math.sin(dx);
}
setTimeout("snowIE()", 10);
}
if (ns4up) {
snowNS();
} else if (ie4up) {
snowIE();
}
Nan je veux des smileys :p
Par Sherya le 1/2/2002 Ã 14:43:19 (#831495)
#supertext {
position:absolute;
left:0;
top:0;
visibility:hide;
visibility:hidden;
}
/*
Bouncy message script- By Dynamicdrive.com
Code based on Lloyd Hassell's, at http://www.dynamicdrive.com/dynamicindex4/bounceimage.htm
For full source, TOS, and 100s DTHML scripts, visit http://dynamicdrive.com
SCRIPT EDITE SUR L'EDITEUR JAVASCRIPT
http://www.editeurjavascript.com
*/
var thecontent=' Pour voir Ceb nus , Appuyez sur etoile * :D'
var hidetimer='';
var BallSpeed = 7;
var contentWidth;
var contentHeight;
var maxBallSpeed = 50;
var xMax;
var yMax;
var xPos = 0;
var yPos = 0;
var xDir = 'right';
var yDir = 'down';
var superballRunning = true;
var tempBallSpeed;
var currentBallSrc;
var newXDir;
var newYDir;
function initializeBall() {
if (document.all) {
xMax = document.body.clientWidth
yMax = document.body.clientHeight
document.all("supertext").style.visibility = "visible";
contentWidth=supertext.offsetWidth
contentHeight=supertext.offsetHeight
}
else if (document.layers) {
xMax = window.innerWidth;
yMax = window.innerHeight;
contentWidth=document.supertext.document.width
contentHeight=document.supertext.document.height
document.layers["supertext"].visibility = "show";
}
setTimeout('moveBall()',400);
if (hidetimer!='')
setTimeout("hidetext()",hidetimer)
}
function moveBall() {
if (superballRunning == true) {
calculatePosition();
if (document.all) {
document.all("supertext").style.left = xPos + document.body.scrollLeft;
document.all("supertext").style.top = yPos + document.body.scrollTop;
}
else if (document.layers) {
document.layers["supertext"].left = xPos + pageXOffset;
document.layers["supertext"].top = yPos + pageYOffset;
}
animatetext=setTimeout('moveBall()',20);
}
}
function calculatePosition() {
if (xDir == "right") {
if (xPos > (xMax - contentWidth - BallSpeed)) {
xDir = "left";
}
} else if (xDir == "left") {
if (xPos (yMax - contentHeight - BallSpeed)) {
yDir = "up";
}
}
else if (yDir == "up") {
if (yPos < (0 + BallSpeed)) {
yDir = "down";
}
}
if (xDir == "right") {
xPos = xPos + BallSpeed;
}
else if (xDir == "left") {
xPos = xPos - BallSpeed;
}
else {
xPos = xPos;
}
if (yDir == "down") {
yPos = yPos + BallSpeed;
}
else if (yDir == "up") {
yPos = yPos - BallSpeed;
}
else {
yPos = yPos;
}
}
function hidetext(){
if (document.all)
supertext.style.visibility="hidden"
else if (document.layers)
document.supertext.visibility="hide"
clearTimeout(animatetext)
}
if (document.all||document.layers){
document.write(''+thecontent+'')
window.onload = initializeBall;
window.onresize = new Function("window.location.reload()");
}
*
Par Topblaireau le 1/2/2002 Ã 14:46:52 (#831520)
Et voila le kdo
(ça me fait toujour aussi rire:D)
(si je le met en img je vire la bannière :p)
yahoouu another game !
Par Eldy le 1/2/2002 Ã 14:47:28 (#831528)
*appuie sur D*
AAAAAHHHH UN SERPENT !!! *cris strident*
*prend la fuite faisant donc le score ultime de 0* :D
JOL Archives 1.0.1
@ JOL / JeuxOnLine