Jump to content

I have no idea what to call this


cry of war

Recommended Posts

I am making a game and I have a registration page where you sign for my game. I want to add a Javascript that takes each character of a text field, say for like a screen name, and gives it a value then it adds all the values assigned to the characters of the name so I can give them a special stat when they are with in such and such number

 

Example

 

Cry of War

 

C=(some number)

r=(some number)

y=(some number)

(space)=(some number)

o=(some number)

f=(some number)

(space)=(some number)

W=(some number)

a=(some number)

r=(some number)

 

(All some numbers Added together)=(Some other number)

 

If some other number is between 0 and 10 do such and such

11 and 20 do such and such and so on and so forth

 

So do you guys think you can help me???

 

And would the JavaScript think that C R Y is different from c r y if something like this would work?

Link to comment
https://forums.phpfreaks.com/topic/59421-i-have-no-idea-what-to-call-this/
Share on other sites

<html>

<head>

<script type="text/javascript">
	var x
            Name = new String("the text or what ever from the text field goes here some how???")

            Name = Name.split("")

for (x in Name)
{
    document.write(Name[x]+"<br/>")
}


</script>

</head>

<body></body>

</html>

 

This is what i have so far seems to be working i almost get the effect i want all i have to do now is find a way to switch the Letters to numbers or if some one could help me with the php AZU was talking about that would be much appreciated

 

CoW

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.