Tekil Mesaj gösterimi
Şok ! Silkroad'ta Stat Point hesaplama
Alt
  (#1)
ozgur_desiciler is Offline
[10]Yeni Üye
ozgur_desiciler will become famous soon enoughozgur_desiciler will become famous soon enough
 
ozgur_desiciler - ait Kullanıcı Resmi (Avatar)
 
>Mesaj Sayısı: 716
>Açtığı Konu: 42

Level: 24 [♥ Bé-Yêu ♥]
Paylaşım: 58 / 581
Güç: 238 / 2314
Tecrübe: 26%

Üyelik tarihi: Apr 2007
Kullanıcı No: 610
Rep Puani: 100
Rep Derecesi : ozgur_desiciler will become famous soon enoughozgur_desiciler will become famous soon enough
   
Standart Şok ! Silkroad'ta Stat Point hesaplama - 04-19-2008



HTML-Kodu:
<html>
<head>
<title>Silkroad Stats</title>

<style type="text/css">
input 
{
	font-family:arial;	
	font-size:12px;
}
</style>

<script language="Javascript" type="text/javascript">
<!--

//Please do not remove. Created by nivlam.com

//Initlal setTimeout ID that determines how long the mouse has to be held down
//before it does something.
var timerID = 0;

//Second setTimeout ID that determines how fast it loops.	
var timerID2 = 0;

//Available stat points.
var avail = 0;

//var a: 0 is add, 1 is subtract
//var id: id of element  
function StartT(a, id)
{
	if (a == 0)
		timerID = setTimeout("AddT('" + id + "')", 500);
	else
		timerID = setTimeout("SubT('" + id + "')", 500);
}

//Clears both setTimeout timers when you release mouse or move away from button.
function EndT()
{
	clearTimeout(timerID);
	clearTimeout(timerID2);
}

//Function that keeps adding until you call EndT.
function AddT(id)
{
	//Adds three stats, 1 str, and 1 int every level.
	if (id == 'lv')
	{
		document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) + 3;
		document.getElementById('str').value = parseInt(document.getElementById('str').value) + 1;
		document.getElementById('int').value = parseInt(document.getElementById('int').value) + 1;
	}
	//Otherwise it subtracts from your total available stat points.
	else
		document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) - 1;

	//Adds 1 to whatever element.
	document.getElementById(id).value = parseInt(document.getElementById(id).value) + 1;
	
	//Update and set timer to start looping.
	UpdateValues();
	timerID2 = setTimeout("AddT('" + id + "')", 50);
}

//Function that keeps subtracting until you call EndT.
function SubT(id)
{
	if ((id == "str" || id == "int") && parseInt(document.getElementById(id).value) <= 20)
		return;
	else if (id == "lv" && parseInt(document.getElementById(id).value) <= 1)
		return;

	//Subtracts three stats, 1 str, and 1 int every time you delevel.
	if (id == 'lv')
	{
		document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) - 3;
		document.getElementById('str').value = parseInt(document.getElementById('str').value) - 1;
		document.getElementById('int').value = parseInt(document.getElementById('int').value) - 1;
	}
	//Otherwise it adds to your total available stat points.
	else
		document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) + 1;

	//Subtracts 1 from whatever.
	document.getElementById(id).value = parseInt(document.getElementById(id).value) - 1;
	
	//Update and set timer to start looping.
	UpdateValues();
	timerID2 = setTimeout("SubT('" + id + "')", 50);
}

//Adds 1 str and subtracts one stat point.
function AddStr_click()
{
	document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) - 1;
	document.getElementById('str').value = parseInt(document.getElementById('str').value) + 1; 
	
	UpdateValues(); 
}

//Adds 1 int and subtracts 1 stat point.
function AddInt_click()
{
	document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) - 1;
	document.getElementById('int').value = parseInt(document.getElementById('int').value) + 1; 
	
	UpdateValues(); 
}

//Adds 1 level, 3 stat points, 1 str, 1 int.
function AddLevel_click()
{
	document.getElementById('lv').value = parseInt(document.getElementById('lv').value) + 1; 
	document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) + 3; 
	document.getElementById('str').value = parseInt(document.getElementById('str').value) + 1; 
	document.getElementById('int').value = parseInt(document.getElementById('int').value) + 1;
	
	UpdateValues();
}

//Subtract
function SubStr_click()
{
	if (parseInt(document.getElementById('str').value) <= 20) 
		return; 
		
	document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) + 1;
	document.getElementById('str').value = parseInt(document.getElementById('str').value) - 1; 
	
	UpdateValues();
}
 
//Subtract
function SubInt_click()
{
	if (parseInt(document.getElementById('int').value) <= 20) 
		return; 
		
	document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) + 1;
	document.getElementById('int').value = parseInt(document.getElementById('int').value) - 1; 
	
	UpdateValues(); 
}

//Subtract
function SubLevel_click()
{
	if (parseInt(document.getElementById('lv').value) <= 1) 
		return; 
		
	document.getElementById('lv').value = parseInt(document.getElementById('lv').value) - 1; 
	document.getElementById('statAvail').value = parseInt(document.getElementById('statAvail').value) - 3; 
	document.getElementById('str').value = parseInt(document.getElementById('str').value) - 1; 
	document.getElementById('int').value = parseInt(document.getElementById('int').value) - 1;
	
	UpdateValues();
}

//Calculates your HP, MP, physical balance, and magical balance.
function UpdateValues()
{
	var maxstat =  28 + document.getElementById('lv').value * 4;
	document.getElementById('phy').value = parseInt(100 - (100 * 2/3 * (maxstat - document.getElementById('str').value ) / maxstat));
	document.getElementById('mag').value = parseInt(100 * document.getElementById('int').value / maxstat);
		
	document.getElementById('hp').value = parseInt(Math.pow(1.02,(parseInt(document.getElementById('lv').value) - 1)) * parseInt(document.getElementById('str').value) * 10); 
	document.getElementById('mp').value = parseInt(Math.pow(1.02,(parseInt(document.getElementById('lv').value) - 1)) * parseInt(document.getElementById('int').value) * 10); 
}

//-->
</script>

</head>

<body bgcolor="#000000">

	<!-- 
	
	Do not copy and paste the following code into your page.
	Instead, make sure that stats.html and stats.png are located
	in the same directory. Then add the following link to your page:
	
	<a href="javascript:void(0);" onclick="window.open('stats.html','SilkroadStats','status=0,toolbar=0,location=0,menubar=0,directories=0,resizeable=0,scrollbars=0,width=363,height=255'); ">Click here</a>
	
	-->

	
	<div id="content">
	
		<!-- Please do not remove.  Created by nivlam.com -->
		<img src ="http://www.srotr.com/stat/stats.png" width="363" height="255" alt="statAvail" usemap ="#stats" style="position:absolute; left:0px; top:0px;" border="0" />

		<map id ="stats" name="stats">
		  <area shape ="rect" coords ="44,110,61,127" href ="javascript:void(0)" alt="Add STR" onclick="AddStr_click();" onmousedown="StartT(0, 'str')" onmouseup="EndT()" onmouseout="EndT()" />
		  <area shape ="rect" coords ="44,139,61,156" href ="javascript:void(0)" alt="Add INT" onclick="AddInt_click();" onmousedown="StartT(0, 'int')" onmouseup="EndT()" onmouseout="EndT()" />
		  <area shape ="rect" coords ="319,30,336,47" href ="javascript:void(0)" alt="Add Level" onclick="AddLevel_click();" onmousedown="StartT(0, 'lv')" onmouseup="EndT()" onmouseout="EndT()" />
		  <area shape ="rect" coords ="63,110,80,127" href ="javascript:void(0)" alt="Subtract STR" onclick="SubStr_click();" onmousedown="StartT(1, 'str')" onmouseup="EndT()" onmouseout="EndT()" />

		  <area shape ="rect" coords ="63,139,80,156" href ="javascript:void(0)" alt="Subtract INT" onclick="SubInt_click();" onmousedown="StartT(1, 'int')" onmouseup="EndT()" onmouseout="EndT()" />
		  <area shape ="rect" coords ="338,30,355,47" href ="javascript:void(0)" alt="Subtract Level" onclick="SubLevel_click();" onmousedown="StartT(1, 'lv')" onmouseup="EndT()" onmouseout="EndT()" />
		</map>
		
		<input id="lv" type="text" style="background-color:transparent; color:#FFE27B; width:2em; text-align:left; border:none; position:absolute; left:340px; top:7px;" value="1" readonly />
		<input id="statAvail" type="text" style="background-color:transparent; color:#FFD953; width:2.5em; text-align:center; border:none; position:absolute; left:85px; top:84px;" value="0" readonly />
		
		<input id="str" type="text" style="background-color:transparent; color:white; width:2.5em; text-align:center; border:none; position:absolute; left:85px; top:110px;" value="20" readonly />
		<input id="int" type="text" style="background-color:transparent; color:white; width:2.5em; text-align:center; border:none; position:absolute; left:85px; top:139px;" value="20" readonly />
		
		<input id="phy" type="text" style="background-color:transparent; color:white; width:2.5em; text-align:center; border:none; position:absolute; left:100px; top:212px;" value="75" readonly />
		<input id="mag" type="text" style="background-color:transparent; color:white; width:2.5em; text-align:center; border:none; position:absolute; left:295px; top:212px;" value="62" readonly />

		
		<input id="hp" type="text" style="background-color:transparent; color:white; width:5em; text-align:center; border:none; position:absolute; left:210px; top:110px;" value="200" readonly />
		<input id="mp" type="text" style="background-color:transparent; color:white; width:5em; text-align:center; border:none; position:absolute; left:210px; top:139px;" value="200" readonly />
	
	</div>
	
</body>

</html>
yukardaki kodu html dosyasına farklı kaydet diyerek stat.html olarak kaydedin. lvlinizi arttırın. Çar alırken full int mi full str mi öğrenin
  
Alıntı ile Cevapla