Jump to content

Hello Please Help Me I Will Appreciate It Much


Skymaster

Recommended Posts

Hello Please help me i will appreciate it much

need help with some of calculator

its hard for me to describe but i hope you understand.

i need something like a hero stats

where it say "level" i need it to be number 1,2,3,4 etc and arrows on left and right side of it, so i can click on error or type in

at the moment i type or click on arrows the stats hp, atk, def, spi changes

and it should be like +1 stats for each lv it gets

the other thing is , instead of change in the picture it needs to say boost

and its same like the other each time i click on arrows or add a number the 4 stats increase this time by +3 on each

lvlup.jpg

hope anyone can help and understand i really appreciate it

i use dreamweaver

Link to comment
Share on other sites

no not really i tried to replicate some other sites but they got too much added and dont think i can just copy it to my dreamweaver cuz when i tried that didnt work.

 

its way to much add on but it should work almost same

 

http://www.tosbase.com/tools/stat-calculator/

 

or this

 

http://devilesk.com/dota2/apps/hero-calculator/

 

or this

 

http://www.diablo1.ru/poleznoe/data/skills.html?class=sor〈=eng

Edited by Skymaster
Link to comment
Share on other sites

Well, yeah, it's a lot of work to create something like that. It's not as easy as just making an interface. If you want to learn how to write Javascript we can help, but we aren't going to just make all of that for you.

if i could get a start would be great then

 

like how actually position it the right place, with the picture in the back

 

is it really that hard to just make functions where you can click?

 

level, boost and the 4 stats.

 

it needs to be like the picture not like the links i gave, but those in the links have some of the code that make it work i just cant see what it is

Edited by Skymaster
Link to comment
Share on other sites

If you're starting from scratch then you need to start at the beginning, with the basics. That's HTML and CSS, that's how you create the layout and position everything where you want it to be. It looks like you're going to have to use background images for everything with that layout, rather than using CSS for borders and things like that. You can use CSS to specify a background image for any element.

 

is it really that hard to just make functions where you can click?

No, it's easy when you know how to do it. But making a click event handler isn't the first step in Javascript (unless you want to just run a function that doesn't do anything). There's plenty to learn about in Javascript first, that should be your third tutorial. You'll need to build a program that keeps track of its state in some variables, and then have various functions for editing the different pieces of the state.
Link to comment
Share on other sites

The most important thing is to clarify your requirements. This is what I've picked up so far:

 

You have the following inputs:

  • Left arrow button
  • Left arrow on keyboard
  • Right arrow button
  • Right arrow on keyboard
  • A text field you can type in
  • A "Hate: team with lieutenant blue" button

You have the following data:

  • Lv: Number
  • HP: Number
  • Atk: Number
  • Def: Number
  • Spi: Number
  • Def modifier (45%): Boolean

The following are the desired behaviors:

  • When left arrow button or left arrow key are activated, subtract 1 from HP, Atk, Def, and Spi
  • When right arrow button or right arrow key are activated, add 1 to HP, Atk, Def and Spi
  • When "Hate: team with lieutenant blue" is clicked, Def modifier switches between true and false
  • When calculating the numbers to display on the screen Def needs to add 45% of its value if "Def modifier" is true
  • [What does the text field do?]
  • When any of the previous actions have occurred display "Boost" somewhere on the screen (you haven't specified where or for how long) and update the numbers on the screen.

You seem to have more than one character with stats, if it's the case that you can switch between characters then this must be part of the requirements as well. So far your explanation of the requirements assumes that there only ever is one character, if we built it that way you would hit a roadblock before you finished your project.

 

You also seem to be trying to make a stat calculator, this means that certain stats depend on other stats through a formula, you have to specify what the formula is.

 

Tell me what is missing from this list or if any of these requirements are incorrect. Your requirements are incomplete, so we cannot even start yet. The requirements have to be very clearly defined before starting a project.

Link to comment
Share on other sites

The most important thing is to clarify your requirements. This is what I've picked up so far:

 

You have the following inputs:

  • Left arrow button
  • Left arrow on keyboard
  • Right arrow button
  • Right arrow on keyboard
  • A text field you can type in
  • A "Hate: team with lieutenant blue" button

You have the following data:

  • Lv: Number
  • HP: Number
  • Atk: Number
  • Def: Number
  • Spi: Number
  • Def modifier (45%): Boolean

The following are the desired behaviors:

  • When left arrow button or left arrow key are activated, subtract 1 from HP, Atk, Def, and Spi
  • When right arrow button or right arrow key are activated, add 1 to HP, Atk, Def and Spi
  • When "Hate: team with lieutenant blue" is clicked, Def modifier switches between true and false
  • When calculating the numbers to display on the screen Def needs to add 45% of its value if "Def modifier" is true
  • [What does the text field do?]
  • When any of the previous actions have occurred display "Boost" somewhere on the screen (you haven't specified where or for how long) and update the numbers on the screen.

You seem to have more than one character with stats, if it's the case that you can switch between characters then this must be part of the requirements as well. So far your explanation of the requirements assumes that there only ever is one character, if we built it that way you would hit a roadblock before you finished your project.

 

You also seem to be trying to make a stat calculator, this means that certain stats depend on other stats through a formula, you have to specify what the formula is.

 

Tell me what is missing from this list or if any of these requirements are incorrect. Your requirements are incomplete, so we cannot even start yet. The requirements have to be very clearly defined before starting a project.

damn i wish my english was that good, and i could explain that well

 

yeah there is more than 1 character, but when one is done i should just edit few places with some numbers no? for the other characters

 

dont think you got the other arrow at bottom in it

 

  • When left arrow button or left arrow key are activated, subtract 3 to HP, Atk, Spi and 45 to Def
  • When right arrow button or right arrow key are activated, add 3 to HP, Atk, Spi and 45 to Def

Base stats where the picture stats must start is as in the picture

HP: 23

ATK: 23

DEF: 359

SPI: 30

maybe a code that maybe has some of the needs in it

i dont no how to make it as a link so you guys can look at it and edit and see stuff but here goes a ohms law calculation

<html><head>
<title>Ohms Law Calculator</title>
<!--- Author - Bill Bowden - 10/20/99 --->
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>Ohms Law Calculator</h1>
</center>
<blockqoute><blockquote>
Enter any two known values and press "Calculate" to solve for the others.
For example, a 100 watt light bulb operating on 120 volts AC will have
144 ohms of resistance and will draw 0.833 Amps. Enter 100 in the
Watts field and 120 in the Voltage field and press Calculate to find
the resistance and current. Fields should be reset to 0 before each
new calculation.
<center><p><b>
Voltage (E) = Current (I) * Resistance ®
<br>
Power (watts) = Current Squared (I^2) * Resistance ®
<br>
Power = I*E = E^2 / R
</b>
</p></center>
</blockquote>
<script language="JavaScript">
<!--
var Volts=1.2345678;
var Amps;
var Ohms;
var Watts;
function Process(form)
{
if (Volts > 0 && Ohms > 0) { Amps =Volts/Ohms; Watts=Volts*Amps;}
if (Volts > 0 && Amps > 0) {Ohms =Volts/Amps; Watts =Volts*Amps;}
if (Volts > 0 && Watts > 0){Amps =Watts/Volts; Ohms=Volts/Amps;}
if (Ohms > 0 && Amps > 0) { Volts =Amps*Ohms; Watts=Amps*Amps*Ohms;}
if (Amps > 0 && Watts > 0) { Volts =Watts/Amps; Ohms=Volts/Amps;}
if (Ohms > 0 && Watts > 0) { Amps=Math.sqrt((Watts/Ohms),2); Volts=Amps*Ohms;}
Volts = Math.round (Volts*100000);
Volts = Volts/100000;
Amps = Math.round(Amps*100000);
Amps = Amps/100000;
Ohms = Math.round(Ohms*100000);
Ohms = Ohms/100000;
Watts = Math.round(Watts*100000);
Watts = Watts/100000;
form.Watts.value = Watts;
form.Ohms.value = Ohms;
form.Amps.value = Amps;
form.Volts.value = Volts;
}
function SetVolts(X) { Volts = X.value;}
function SetAmps(I) { Amps = I.value; }
function SetOhms® { Ohms = R.value; }
function SetWatts(P) { Watts = P.value;}
function ClearForm(form){
Volts=0;
Amps=0;
Ohms=0;
Watts=0;
form.Volts.value = 0;
form.Amps.value = 0;
form.Ohms.value = 0;
form.Watts.value=0;
}
// -->
</script>
<center>
<form method="POST">
<table border="5">
<tbody><tr>
<td><div align="center"><b>Volts (E)</b></div></td>
<td><div align="center"><b>Amps (I)</b></div></td>
<td><div align="center"><b>Ohms ®</b></div></td>
<td><div align="center"><b>Power (Watts)</b></div></td>
<td><input type="BUTTON" onclick="Process(this.form)" value="Calculate"></td>
</tr>
<tr>
<td><div align="center"><input type="text" name="Volts" size="12" onchange="SetVolts(this)"></div></td>
<td><div align="center"><input type="text" name="Amps" size="12" onchange="SetAmps(this)"></div></td>
<td><div align="center"><input type="text" name="Ohms" size="12" onchange="SetOhms(this)"></div></td>
<td><div align="center"><input type="text" name="Watts" size="12" onchange="SetWatts(this)"></div></td>
<td><div align="center"><input type="BUTTON" value=" Reset " onclick="ClearForm(this.form)"></div>
</td></tr>
</tbody></table>
</form>
<a href="index.html#menu">menu</a>
</center>
<br>
<!-- WiredMinds eMetrics tracking with Enterprise Edition V5.4 START -->
<script type="text/javascript" src="https://count.carrierzone.com/app/count_server/count.js"></script>
<script type="text/javascript"><!--
wm_custnum='4b5dc18b1765aace';
wm_page_name='ohmslaw.htm';
wm_group_name='/services/webpages/b/o/bowdenshobbycircuits.info/public';
wm_campaign_key='campaign_id';
wm_track_alt='';
wiredminds.count();
// -->
</script>
<!-- WiredMinds eMetrics tracking with Enterprise Edition V5.4 END -->
</blockqoute></body></html>
Link to comment
Share on other sites

If you have more than one character, you don't have to just create the system to manage stats, you also have to create the system that selects characters and stores information. Everything needs to be taken into account.

 

But let's start with something more basic so that you can learn web languages. Try creating the visual interface that you would like to see using just HTML and CSS. Do not mind all the clicking events until you have finished the design.

Link to comment
Share on other sites

i cant get it to work the right way i want it but.. here goes

 

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="stats.css">
<title>Heroes Stats</title>
</head>
<body>
<h1>Heroes Stats</h1>
<div id="wrap">
<p>Stats</p>
<span id="stats"></span> stats =
<input type="number" min="0" id="level" value="1" /> Level
<input type="number" min="0" id="boost" value="0" /> Boost
<br><p>HP</p>
<input type="number" min="0" id="hp" value="23" /> <br>
<p>ATK</p>
<input type="number" min="0" id="atk" value="23" /> <br>
<p>DEF</p>
<input type="number" min="0" id="def" value="359" /> <br>
<p>SPI</p>
<input type="number" min="0" id="spi" value="30" /> <br>
<center>
<img src="images/minister_shen.jpg" width="270" height="480" alt=""/>
<img src="images/minister_shen_modified.jpg" width="546" height="480" alt=""/>
</center>
</div>
<script src="stats.js"></script>
</body>
</html>
----------------------------------------
@charset "UTF-8";
/* CSS Document */
input{
width:80px;
height:15px;
text-align:center;
}
span#stats{
display:inline-block;
vertical-align:top;
text-align:center;
width:60px;
height:25px;
border:1px solid #ccc;
}
#wrap{
padding:15px;
width:700px;
height:500px;
border:1px solid #bbb;
font-size:20px;
font-weight:bold;
}
#hp {
float:right;
clear:both;
}
#atk {
float:right;
clear:both;
}
#def {
float:right;
clear:both;
}
#spi {
float:right;
clear:both;
}
p{
float:right;
clear:both;
}
---------------------------
// JavaScript Document
document.getElementById('level').onchange = handler;
document.getElementById('boost').onchange = handler;
document.getElementById('hp').onchange = handler;
document.getElementById('atk').onchange = handler;
document.getElementById('def').onchange = handler;
document.getElementById('spi').onchange = handler;
function handler(){
var l = Number(document.getElementById('level').value.trim());
var b = Number(document.getElementById('boost').value.trim());
var h = Number(document.getElementById('hp').value.trim());
var a = Number(document.getElementById('atk').value.trim());
var d = Number(document.getElementById('def').value.trim());
var s = Number(document.getElementById('spi').value.trim());
var h = l;
var a = l;
var d = l;
var s = l;
var h = b;
var a = b;
var d = b;
var s = b;
document.getElementById('stats').innerHTML = l.toFixed();
document.getElementById('stats').innerHTML = b.toFixed();
}//end of function
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...