Город

Enjoy666

Новичок
Репутация
0 / 37
В общем, естьу меня арена ( из исходника YouStory а точнее zaltren.php) Кто смотрел скрипт знает что при нажатии на изображение ботов происходит нападение (кто не знает вот скрин
359637a42267.jpg
)
В общем хочу сделать тоже самое только с локациями (тоесть зашол в город, нажал на изображение здания и в него вошол)
вот код этого зала
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>

<center>

<table cellspacing=0 cellpadding=0 border=0 width="500">

<tr>

<td width="14" height="25" nowrap background="../images/b_t.jpg" valign="bottom">
b_t_1.jpg
</td>

<td width="220" nowrap background="../images/b_t.jpg">
b_t_l.jpg
</td>

<td width="48" nowrap background="../images/b_t.jpg" align="right">
uinf_2_2.jpg
</td>

<td width="160" nowrap background="../images/uinf_2_3.jpg" style="font-size: 7pt; color: yellow; font-weight: bold; font-family: Verdana;">
<div align="center">Тренировочная Арена </div></td>

<td width="47" nowrap background="../images/b_t.jpg">
uinf_2_4.jpg
</td>

<td width="177" nowrap background="../images/b_t.jpg" align="right">
b_m_1.jpg
</td>

<td width="10" nowrap background="../images/b_t.jpg">
b_m_t.jpg
</td>

<td width="201" nowrap background="../images/b_t.jpg">
b_t_right.jpg
</td>

<td width="15" nowrap background="../images/b_t.jpg">
b_r_t.jpg
</td>
</tr>

<tr>

<td nowrap background="../images/b_l_bg.jpg" valign="top"></td>

<td colspan="5"><div>/images/arenanew.png
<map name="myMap" id="myMap">
<area shape="circle" href='main.php?locations=lavka' coords='321,168,60' title='Воин меча' onmouseover="t4_anim(3,this,1,'d')" class=point/>
<area shape="circle" href="main.php?action=pipec3" coords="428,263,57" title="Знатный воин" onmouseover="t4_anim(3,this,1,'d')" class="point"/>
<area shape="circle" href="main.php?action=pipec4" coords="553,219,68" title="Каратель" onmouseover="t4_anim(3,this,1,'d')" class="point"/>
<area shape="circle" href='main.php?action=pipec5' coords='694,181,67' title='Римский гладиатор' onmouseover="t4_anim(3,this,1,'d')" class=point/>
<area shape="circle" href='main.php?action=pipec6' coords='850,226,69' title='Чучело' onmouseover="t4_anim(3,this,1,'d')" class=point/>
<area shape="circle" href='main.php?action=pipec' coords='134,177,78' title='Злой Тигр' onmouseover="t4_anim(3,this,1,'d')" class=point/>
</map>
</div>


</div> </td>


<td nowrap background="../images/b_m_bg.jpg"></td>

<td valign="top" background="../images/loc_info_bg.jpg">

loc_info_t.jpg


<center>
<table cellspacing=0 cellpadding=0 border=0 >

<tr>

<td width="35" nowrap>
cht_title_l.jpg
</td>

<td width="100" nowrap background="../images/cht_title_c.jpg"><center>
<div align="center">Тренировочная </div></td>

<td width="35" nowrap>
cht_title_r.jpg
</td>
</tr>

<tr>

<td colspan="3" align="left"><div style="padding-top: 2px;">

arrow.jpg
<?
echo "<input type=button class=loc ".build_go_string('arena',$lastom_new)." value='Зал Воинов'>
";?> </div>

<div style="padding-top: 2px;">

arrow.jpg

<?
echo "<input type=button class=loc ".build_go_string('',$lastom_new)." value='Турнирный Зал'>
";?></div>

<div style="padding-top: 2px;">

arrow.jpg

<?
echo "<input type=button class=loc ".build_go_string('city0',$lastom_new)." value='Выход в город'>
";?>
</div> </td>
</tr>
</table>

<table cellspacing=0 cellpadding=0 border=0 style="margin-top: 5px;">

<tr>

<td width="35" nowrap>
cht_title_l.jpg
</td>

<td width="100" nowrap background="../images/cht_title_c.jpg"><center>Персонажи</td>

<td width="35" nowrap>
cht_title_r.jpg
</td>
</tr>

<tr>

<td colspan="3" align="left">

<div style="padding-top: 2px;">

person.jpg
<input type=button class=hbutton value='Злой Тигр (0-3)'style='width:100%;' border=0 onmousemove="s_hint('pipec');" onmouseout="t4_anim(3,this,0)" onclick="{if(confirm('Вы действительно хотите напасть?')) location='main.php?action=pipec'}" onmouseover="t4_anim(3,this,1,'d')" class=point>
<?php
$cnt=0;
if (@$_GET["action"]=="pipec")
{
$rnd = rand(1,4);
switch ($rnd) {
case 1: $last.="bot=10900"; $cnt=1; break;//test
case 2: $last.="bot=10901"; $cnt=1; break;//test
case 3: $last.="bot=10902"; $cnt=1; break;//test
case 4: $last.="bot=10903"; $cnt=1; break;//test
};
}
###
if ($cnt>0){
begin_fight ($pers["user"],$last,"Тренировочный бой",50,300,1,0);
echo "<script>location='main.php';</script>";
};

/*
if (@$_GET["action"]=="pipec")
{
$leader.="bot=10901|" or $leader.="bot=10900|" or $leader.="bot=10902|" or $leader.="bot=10903|";
begin_fight ($pers["user"],$leader,"Тренировочные бои",50,300,1,0);
sql("UPDATE bots_cell SET time=".(time()+360)." ,`count`=".rand(1,2)." WHERE xy='".$cell["x"]."_".$cell["y"]."' and id='".$b["id"]."' and time<".time()." LIMIT 1;");
echo "<script>location='main.php';</script>";
} */
?>
</div>
<div style="padding-top: 2px;">

person.jpg
<input type=button class=hbutton value='Воин меча (3-10)'style='width:100%;' border=0 onmousemove="s_hint('pipec2');" onmouseout="t4_anim(3,this,0)" onclick="{if(confirm('Вы действительно хотите напасть?')) location='main.php?action=pipec2'}" onmouseover="t4_anim(3,this,1,'d')" class=point>
<?php
$cnt=0;
if (@$_GET["action"]=="pipec2")
{
$rnd = rand(1,8);
switch ($rnd) {
case 1: $last.="bot=11100"; $cnt=1; break;//test
case 2: $last.="bot=11101"; $cnt=1; break;//test
case 3: $last.="bot=11102"; $cnt=1; break;//test
case 4: $last.="bot=11103"; $cnt=1; break;//test
case 5: $last.="bot=11104"; $cnt=1; break;//test
case 6: $last.="bot=11105"; $cnt=1; break;//test
case 7: $last.="bot=11106"; $cnt=1; break;//test
case 8: $last.="bot=11107"; $cnt=1; break;//test
};
}
###
if ($cnt>0){
begin_fight ($pers["user"],$last,"Тренировочный бой",50,300,1,0);
echo "<script>location='main.php';</script>";
};

/*
if (@$_GET["action"]=="pipec")
{
$leader.="bot=10901|" or $leader.="bot=10900|" or $leader.="bot=10902|" or $leader.="bot=10903|";
begin_fight ($pers["user"],$leader,"Тренировочные бои",50,300,1,0);
sql("UPDATE bots_cell SET time=".(time()+360)." ,`count`=".rand(1,2)." WHERE xy='".$cell["x"]."_".$cell["y"]."' and id='".$b["id"]."' and time<".time()." LIMIT 1;");
echo "<script>location='main.php';</script>";
} */
?>
</div>
<div style="padding-top: 2px;">

person.jpg
<input type=button class=hbutton value='Знатный Воин (10-15)'style='width:100%;' border=0 onmousemove="s_hint('pipec3');" onmouseout="t4_anim(3,this,0)" onclick="{if(confirm('Вы действительно хотите напасть?')) location='main.php?action=pipec3'}" onmouseover="t4_anim(3,this,1,'d')" class=point>
<?php
$cnt=0;
if (@$_GET["action"]=="pipec3")
{
$rnd = rand(1,6);
switch ($rnd) {
case 1: $last.="bot=11200"; $cnt=1; break;//test
case 2: $last.="bot=11201"; $cnt=1; break;//test
case 3: $last.="bot=11202"; $cnt=1; break;//test
case 4: $last.="bot=11203|bot=11203"; $cnt=2; break;//test
case 5: $last.="bot=11204"; $cnt=1; break;//test
case 6: $last.="bot=11205|bot=11205"; $cnt=2; break;//test
};
}
###
if ($cnt>0){
begin_fight ($pers["user"],$last,"Тренировочный бой",50,300,1,0);
echo "<script>location='main.php';</script>";
};

/*
if (@$_GET["action"]=="pipec")
{
$leader.="bot=10901|" or $leader.="bot=10900|" or $leader.="bot=10902|" or $leader.="bot=10903|";
begin_fight ($pers["user"],$leader,"Тренировочные бои",50,300,1,0);
sql("UPDATE bots_cell SET time=".(time()+360)." ,`count`=".rand(1,2)." WHERE xy='".$cell["x"]."_".$cell["y"]."' and id='".$b["id"]."' and time<".time()." LIMIT 1;");
echo "<script>location='main.php';</script>";
} */
?>
</div>
<div style="padding-top: 2px;">

person.jpg
<input type=button class=hbutton value='Каратель (20-30)'style='width:100%;' border=0 onmousemove="s_hint('pipec4');" onmouseout="t4_anim(3,this,0)" onclick="{if(confirm('Вы действительно хотите напасть?')) location='main.php?action=pipec4'}" onmouseover="t4_anim(3,this,1,'d')" class=point>
<?php
$cnt=0;
if (@$_GET["action"]=="pipec4")
{
$rnd = rand(1,11);
switch ($rnd) {
case 1: $last.="bot=11600"; $cnt=1; break;//test
case 2: $last.="bot=11601|bot=11601"; $cnt=2; break;//test
case 3: $last.="bot=11602"; $cnt=1; break;//test
case 4: $last.="bot=11603|bot=11613"; $cnt=2; break;//test
case 5: $last.="bot=11604"; $cnt=1; break;//test
case 6: $last.="bot=11605|bot=11605"; $cnt=2; break;//test
case 7: $last.="bot=11606"; $cnt=1; break;//test
case 8: $last.="bot=11607|bot=11607"; $cnt=2; break;//test
case 9: $last.="bot=11608"; $cnt=1; break;//test
case 10: $last.="bot=11609|bot=11609"; $cnt=2; break;//test
case 11: $last.="bot=11610"; $cnt=1; break;//test
};
}
###
if ($cnt>0){
begin_fight ($pers["user"],$last,"Тренировочный бой",50,300,1,0);
echo "<script>location='main.php';</script>";
};

/*
if (@$_GET["action"]=="pipec")
{
$leader.="bot=10901|" or $leader.="bot=10900|" or $leader.="bot=10902|" or $leader.="bot=10903|";
begin_fight ($pers["user"],$leader,"Тренировочные бои",50,300,1,0);
sql("UPDATE bots_cell SET time=".(time()+360)." ,`count`=".rand(1,2)." WHERE xy='".$cell["x"]."_".$cell["y"]."' and id='".$b["id"]."' and time<".time()." LIMIT 1;");
echo "<script>location='main.php';</script>";
} */
?>
</div>
<div style="padding-top: 2px;">

person.jpg
<input type=button class=hbutton value='Римский гладиатор(15-20)'style='width:100%;' border=0 onmousemove="s_hint('pipec5');" onmouseout="t4_anim(3,this,0)" onclick="{if(confirm('Вы действительно хотите напасть?')) location='main.php?action=pipec5'}" onmouseover="t4_anim(3,this,1,'d')" class=point>
<?php
$cnt=0;
if (@$_GET["action"]=="pipec5")
{
$rnd = rand(1,6);
switch ($rnd) {
case 1: $last.="bot=11300"; $cnt=1; break;//test
case 2: $last.="bot=11301|bot=11301"; $cnt=2; break;//test
case 3: $last.="bot=11302"; $cnt=1; break;//test
case 4: $last.="bot=11303|bot=11303"; $cnt=2; break;//test
case 5: $last.="bot=11304"; $cnt=1; break;//test
case 6: $last.="bot=11305|bot=11305"; $cnt=2; break;//test
};
}
###
if ($cnt>0){
begin_fight ($pers["user"],$last,"Тренировочный бой",50,300,1,0);
echo "<script>location='main.php';</script>";
};

/*
if (@$_GET["action"]=="pipec")
{
$leader.="bot=10901|" or $leader.="bot=10900|" or $leader.="bot=10902|" or $leader.="bot=10903|";
begin_fight ($pers["user"],$leader,"Тренировочные бои",50,300,1,0);
sql("UPDATE bots_cell SET time=".(time()+360)." ,`count`=".rand(1,2)." WHERE xy='".$cell["x"]."_".$cell["y"]."' and id='".$b["id"]."' and time<".time()." LIMIT 1;");
echo "<script>location='main.php';</script>";
} */
?>
</div>
<div style="padding-top: 2px;">

person.jpg
<input type=button class=hbutton value='Боевое чучело (0-2)'style='width:100%;' border=0 onmousemove="s_hint('pipec6');" onmouseout="t4_anim(3,this,0)" onclick="{if(confirm('Вы действительно хотите напасть?')) location='main.php?action=pipec6'}" onmouseover="t4_anim(3,this,1,'d')" class=point>
<?php
$cnt=0;
if (@$_GET["action"]=="pipec6")
{
$rnd = rand(1,3);
switch ($rnd) {
case 1: $last.="bot=11000"; $cnt=1; break;//test
case 2: $last.="bot=11001"; $cnt=1; break;//test
case 3: $last.="bot=11002"; $cnt=1; break;//test
};
}
###
if ($cnt>0){
begin_fight ($pers["user"],$last,"Тренировочный бой",50,300,1,0);
echo "<script>location='main.php';</script>";
};

/*
if (@$_GET["action"]=="pipec")
{
$leader.="bot=10901|" or $leader.="bot=10900|" or $leader.="bot=10902|" or $leader.="bot=10903|";
begin_fight ($pers["user"],$leader,"Тренировочные бои",50,300,1,0);
sql("UPDATE bots_cell SET time=".(time()+360)." ,`count`=".rand(1,2)." WHERE xy='".$cell["x"]."_".$cell["y"]."' and id='".$b["id"]."' and time<".time()." LIMIT 1;");
echo "<script>location='main.php';</script>";
} */
?>
</div> </td>
</tr>
</table></td>

<td nowrap background="../images/b_r_bg.jpg"></td>
</tr>

<tr>

<td height="13" nowrap background="../images/b_b_bg.jpg" valign="bottom">
b_b_1.jpg
</td>

<td background="../images/b_b_bg.jpg">
b_b_l.jpg
</td>

<td background="../images/b_b_bg.jpg"> </td>

<td background="../images/b_b_bg.jpg"> </td>

<td background="../images/b_b_bg.jpg"> </td>

<td background="../images/b_b_bg.jpg" align="right">
b_m_lb.jpg
</td>

<td background="../images/b_b_bg.jpg">
b_m_mb.jpg
</td>

<td background="../images/b_b_bg.jpg">
b_m_b.jpg
</td>

<td nowrap background="../images/b_b_bg.jpg">
b_r_b.jpg
</td>
</tr>
</table>

</center>


</BODY></html>



</div>
 
Код:
  <area shape="circle"  href='city.php?cityname=main' coords='694,181,67' title='City's main district' onmouseover="t4_anim(3,this,1,'d')" class=point/>

make city.php and then.

Код:
if( $_GET["cityname"] == main)
  {
     echo "Welcom to main district";
}

это основная идея как...
я надеюсь, что это поможет
 
Код:
  <area shape="circle"  href='city.php?cityname=main' coords='694,181,67' title='City's main district' onmouseover="t4_anim(3,this,1,'d')" class=point/>

make city.php and then.

Код:
if( $_GET["cityname"] == main)
  {
     echo "Welcom to main district";
}

это основная идея как...
я надеюсь, что это поможет

The requested URL /city.php was not found on this server.
Apache/2.2.4 (Win32) PHP/5.2.1 Server at localhost Port 80
 
ay гений!
это идея, как работать далжно, а не copy-paste.
Сам думай тоже..
 
для этого есть квестологи, имею ввиду чтоб тыкнул и начался бой, далее разберешься, для того чтобы тыкнул в определенное место и тебя переместило есть <map> далее гугла скажут что это такое и с чем его кушать....
 
Всё, сделал, если кому надо вот что получилось

Код:
<area shape="circle" coords='x,y,z' title='Торговая Площадь' onmouseover="t4_anim(3,this,1,'d')" class="loc" onclick="top.goloc('city1','bb18c43475ae031c0fc61f089b3a83bf')"/>

Координаты нужно подогнать coords='x,y,z' тут
 
А что на скрине только тень тигра есть. остольные духи? :lol:
 
Всё, сделал, если кому надо вот что получилось

Код:
<area shape="circle" coords='x,y,z' title='Торговая Площадь' onmouseover="t4_anim(3,this,1,'d')" class="loc" onclick="top.goloc('city1','bb18c43475ae031c0fc61f089b3a83bf')"/>

Координаты нужно подогнать coords='x,y,z' тут
дримвивер в помощь
 
А как им пользоваться?))


гений =) качаешь адоби дримвюер,устоналиаешь - открываешь zaltren и тебе сразу будет понятно (только поставь режим разделения чтобы выдить и диз и код)

а вообще даже пеинте есть функция координат =)
 
гений =) качаешь адоби дримвюер,устоналиаешь - открываешь zaltren и тебе сразу будет понятно (только поставь режим разделения чтобы выдить и диз и код)

а вообще даже пеинте есть функция координат =)
на тупые вопросы ответит гугл, посылай туда) народ совсем нехочет нечего понимать сам
 

Похожие темы

Сверху