Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Pisanie / Poprawa Questów !


PoczatKujacy

Rekomendowane odpowiedzi

Opublikowano

Nie dropią:(

quest drop begin
state start begin
 when kill with not pc.is.npc() begin
  local a = {71084, 71085, 50513}
  local b = number(1,3)
  local c = number(1,100)
  local szansa = 100
  if szansa <= c then
    game.drop_item_with_ownership(a[b])
  end
 end
end
end

funkcja

game.drop_item_with_ownership

dodana

  • Odpowiedzi 8,7 tys.
  • Dodano
  • Ostatniej odpowiedzi
Opublikowano

No to zróbmy inaczej, może coś to da:

quest drop begin
state start begin
 when kill with not pc.is.npc() begin
  local c = number(1,100)
  local szansa = 50
  if c <= szansa then
local a = {71084, 71085, 50513}
local b = number(1,3)
game.drop_item_with_ownership(a[b])
  end
 end
end
end

 

Wystarczy zmienić if szansa <= c then na if c <= szansa then i będzie działać, mój błąd ;)

Koniec z MPCForum.pl i ogółem z metinem

:D

 

sunp.png

Sygnatura wykonana przez

Isuribi aka Amelka.

Opublikowano

Witam mógłby ktoś poprawić tego questa?.

Błąd jest w 151 linijce.

 

 

 

------------------------
----------Quest---------
------------by----------
-----CiagleZapominam-------
----------zakaz---------
--------kopiowania------
------zmienilem autora---
------wiec jest moj-------
------------------------
quest czapominam_komnata begin -- rozpoczyna quest
 state start begin -- rozpoczyna state
when 30121.chat."Chcę iść zabić smoka!" begin -- rozpoczyna when
if game.get_event_flag("komnata_smoka") > 0 then
 if game.get_event_flag("komnata_smoka_zamknieta") == 0 then
--if game.get_event_flag("ilosc_ludzi") > 10 then -- 10 liczba ile ludzi może wejść na mapę smoka
say_title(mob_name(30121))
say("")
say("Nie jesteś pierwszym który domaga się wejścia na smoka!")
say("Podaj mi tajemną liczbę w przeciwnym razie ")
say("nie mogę ciebie wpuścić!")
say_reward("Uwaga!")
say_reward("Wpisuj tylko liczby!")
say("")
local haslo_wejscia = tonumber(input())
if haslo_wejscia == game.get_event_flag("haslo") then
say_title(mob_name(30121))
say("")
say("Jeżeli chcesz zabiorę ciebie bezpośrednio do Komnaty Smoka!")
say("Daj mi tylko 3x "..item_name(80009))
say("")
say_item_vnum(80009)
say("")
local s = select("Daje tobie klucze i idę do Komnaty!", "Rozmyśliłem się!")
if s == 2 then
return
elseif s == 1 then
if pc.count_item(80009) >= 3 then
 say("Masz wszystkie klucze, możesz wejść!")
 pc.remove_item(80009, 3)
 pc.warp(9216, 2048)
 ----game.get_event_flag("ilosc_ludzi", game.set_event_flag()+1)
else
 say("Masz "..pc.count_item(80009).." z 3 wymaganych kluczy!")
 local mam2 = 3 - pc.count_item(80009)
 say("Zbierz ich jeszcze: "..mam2.." "..item_name(80009))
 say("")
 say_item_vnum(80009)
 say("")
end -- zamyka if pc.count_item(80009) >= 3 then
end -- zamyka if s == 2 then
end -- zamyka if haslo_wejscia == game.get_event_flag("haslo") then
 --else
--say("Liczba ludzi na mapię sięgneła 10, więc już nie możesz wejść!")
 --end
else
 say("Komnata jest już zamknięta!")
end -- zamyka if game.get_event_flag("komnata_smoka_zamknieta") == 0 then
end -- zamyka if game.get_event_flag("komnata_smoka") > 0 then
end -- zamyka when 30121.chat."Chcę iść zabić smoka!" begin
when 30121.chat."Chcę iść zabić smoka!" with game.get_event_flag("komnata_smoka") == 0 begin
game.set_event_flag("komnata_smoka", 1)
say_title(mob_name(30121))
say("")
say("Jesteś pierwszym który domaga się wejścia do Świątyni Smoka.")
say("Wpuszczę cię jeżeli posiadasz wyznaczoną liczbę kluczy!")
say("Na początku jednak musisz wpisać 5 cyfrowe hasło,")
say("które wpiszą twoi przyjaciele, aby dostać się do smoka.")
say_reward("Ustal hasło:")
say_reward("Uwaga!")
say_reward("Możesz wpisywać tylko liczby!")
local hasloo = tonumber(input())
game.set_event_flag("haslo", hasloo)
if hasloo > 5 then
 say("Hasło jest za długie!")
 return
end
if hasloo < 0 then
 say("Nie możesz wpisać hasła z -!")
else
 say_title(mob_name(30121))
 say("")
 say("Dobrze ustaliłeś hasło...")
 say("Podaj je swoim przyjacielom którzy idą z tobą na smoka!")
 wait()
 say_title(mob_name(30121))
 say("")
 say("Jeżeli chcesz zaniose ciebie bezpośrednio do smoka,")
 say("ale musisz mi dać:")
 say("3x "..item_name(80009))
 say("")
 say_item_vnum(80009)
 local s = select("Dam tobie klucze i wchodzę!", "Rozmyśliłem się...")
if s == 2 then
return
elseif s == 1 then
if pc.count_item(80009) >= 3 then
 say("Dobrze podaj kolegą hasło, aby mogli wejść razem z tobą!")
 say_reward("Uwaga!")
 say_reward("Wejście zamyka się po 5 minutach!")
 pc.setqf("pierwszy_login", 1)
 wait()
 pc.remove_item(80009, 3)
 pc.warp(9216, 2048)
 timer("zamkniecie", 5*60)
 --game.get_event_flag("ilosc_ludzi", game.set_event_flag()+1)
else
 say("Masz "..pc.count_item(80009).." z 3 wymaganych kluczy!")
 local mam = 3 - pc.count_item(80009)
 say("Zbierz ich jeszcze: "..mam.." "..item_name(80009))
 say("")
 say_item_vnum(80009)
 game.set_event_flag("haslo", 0)
 game.set_event_flag("komnata_smoka", 0)
end -- zamyka if pc.count_item(80009) >= 3 then
end -- zamyka if s == 2 then
end -- zamyka if haslo > 5 then
  end -- when 30121.chat."Chcę iść zabić smoka!" begin
when zamkniecie.timer begin
game.set_event_flag("komnata_smoka_zamknieta", 1)
end -- kończy zamkniecie.timer
when login with pc.getqf("pierwszy_login") == 1 and pc.get_map_index == 41 begin
timer("przeniesienie", 5*60)
timer("przeniesienie2", 15)
notice_in_map("Proszę czekać, za 5 minut zostaniecie przeniesieni do komanty smoka!")
end -- kończy login with pc.getqf("pierwszy_login")
when przeniesienie2.timer begin
notice_in_map("Za 4-5 minut zostaniecie przeniesieni do komnaty smoka!")
end -- kończy przeniesienie2.timer
when przeniesienie.timer begin
d.jump_all(41, 9216, 2048)
pc.setf("start", 1)
end -- kończy przeniesienie.timer
when login with pc.in_dungeon() and pc.get_map_index() == 41 and pc.getf("start") > 0 begin
--say_item_vnum(id_obrazka_"Witajcie w Kryształowej Komnacie!") -- jakiś ładny obrazek
d.notice("Witajcie w Kryształowej Komnacie!")
d.notice("Macie 1 godzinę na pokonanie smoka,")
d.notice("w innym razie zostaniecie wylogowani!")
d.notice("Uwaga, jeżeli ktoś wyloguje się w czasie")
d.notice("trwania bitwy ze smokiem, zostanie wyrzucony")
d.notice("z Kryształowej Komnaty!")
d.spawn_mob(2493, 117, 1104)
server_timer("zabicie_smoka", 5*60, get_server_timer_arg())
end -- kończy when login with pc.in_dungeon()
when logout with pc.getf("start") > 0 begin
pc.setqf("nie_wejde", 1)
end -- kończy when logout with pc.getf("start")
when login with pc.getqf("nie_wejde") > 0 then
pc.setqf("nie_wejde", 0)
pc.warp(9216, 2048) -- tela po za dungeon
end -- kończy when login with pc.getqf("nie_wejde")
when zabicie_smoka.server_timer begin
d.notice("Zostało wam 55 minut!")
server_timer("zabicie_smok2", 10*60, get_server_timer_arg())
clear_server_timer("zabicie_smoka", get_server_timer_arg())
end -- kończy zabicie_smoka.server_timer begin
when zabicie_smoka2.server_timer begin
d.notice("Zostało wam 45 minut!")
server_timer("zabicie_smoka3", 10*60, get_server_timer_arg())
clear_server_timer("zabicie_smoka2", get_server_timer_arg())
end -- kończy zabicie_smoka2.server_timer begin
when zabicie_smoka3.server_timer begin
d.notice("Zostało wam 35 minut!")
server_timer("zabicie_smoka4", 10*60, get_server_timer_arg())
clear_server_timer("zabicie_smoka3", get_server_timer_arg())
end -- kończy zabicie_smoka3.server_timer begin
when zabicie_smoka4.server_timer begin
d.notice("Zostało wam 25 minut!")
server_timer("zabicie_smoka5", 10*60, get_server_timer_arg())
clear_server_timer("zabicie_smoka4", get_server_timer_arg())
end -- kończy zabicie_smoka4.server_timer begin
when zabicie_smoka5.server_timer begin
d.notice("Zostało wam 15 minut!")
server_timer("zabicie_smoka6", 10*60, get_server_timer_arg())
clear_server_timer("zabicie_smoka5", get_server_timer_arg())
end -- kończy zabicie_smoka5.server_timer begin
when zabicie_smoka6.server_timer begin
d.notice("Zostało wam 5 minut!")
server_timer("zabicie_smoka7", 5*60, get_server_timer_arg())
clear_server_timer("zabicie_smoka6", get_server_timer_arg())
end -- kończy zabicie_smoka6.server_timer begin
when zabicie_smoka7.server_timer begin
clear_server_timer("zabicie_smoka7", get_server_timer_arg())
d.notice("Niestety, nie udało się zabić smoka!")
d.notice("Za 10 sekund zostaniecie wyrzuceni z mapy!")
timer("wyrzut")
end -- kończy zabicie_smoka7.server_timer begin
when wyrzut.timer begin
game.set_event_flag("haslo", 0)
game.set_event_flag("komnata_smoka", 0)
d.exit_all()
end -- kończy wyrzut.timer
when 2493.kill with pc.in_dungeon() and pc.get_map_index() == 41 and pc.getf("start") > 0 begin
d.notice("Udało wam się, zabiliście smoka!")
notice_all("Grupa: "..pc.get_name().." zabiła smoka!")
d.notice("Zostaniecie wylogowani za 10 sekund!")
timer("wyrzu2", 10)
clear_server_timer("zabicie_smoka", get_server_timer_arg())
clear_server_timer("zabicie_smoka2", get_server_timer_arg())
clear_server_timer("zabicie_smoka3", get_server_timer_arg())
clear_server_timer("zabicie_smoka4", get_server_timer_arg())
clear_server_timer("zabicie_smoka5", get_server_timer_arg())
clear_server_timer("zabicie_smoka6", get_server_timer_arg())
clear_server_timer("zabicie_smoka7", get_server_timer_arg())
end -- kończy when 2493.kill
when wyrzu2.timer begin
--game.set_event_flag("ilosc_ludzi", 0)
game.set_event_flag("komnata_smoka", 0)
game.set_event_flag("haslo", 0)
d.exit_all()
end -- kończy when wyrzu2.timer begin
 end -- kończy state
end -- kończy quest

 

 

Opublikowano

Index.php sklepu którego nie umiem skonfigurować:

 


<?php
session_start();
require_once("config_is.php");
mysql_select_db("site");
?>
<?php
function DeCode($string,$operation,$key='')
{
$key=md5($key);
$key_length=strlen($key);
$string=$operation=='D'?base64_decode($string):substr(md5($string.$key),0,8).$string;
$string_length=strlen($string);
$rndkey=$box=array();
$result='';
for($i=0;$i<=255;$i++)
{
$rndkey[$i]=ord($key[$i%$key_length]);
$box[$i]=$i;
}
for($j=$i=0;$i<256;$i++)
{
$j=($j+$box[$i]+$rndkey[$i])%256;
$tmp=$box[$i];
$box[$i]=$box[$j];
$box[$j]=$tmp;
}
for($a=$j=$i=0;$i<$string_length;$i++)
{
$a=($a+1)%256;
$j=($j+$box[$a])%256;
$tmp=$box[$a];
$box[$a]=$box[$j];
$box[$j]=$tmp;
$result.=chr(ord($string[$i])^($box[($box[$a]+$box[$j])%256]));
}
if($operation=='D')
{
if(substr($result,0,8)==substr(md5(substr($result,8).$key),0,8))
{
return substr($result,8);
}
else
{
return'';
}
}
else
{
return str_replace('=','',base64_encode($result));
}
}
?>
<STYLE type=text/css>
img {
border:0;
}
</style>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta name="Description" content="airo,mt2,metin2" /> <meta name="Keywords" content="airo,mt2,metin2" />
<title><?php
include ("nazwastrony.php");?> :: ItemShop</title>
</head>
<body>
<center><font color="#A8031E" size="2"><?php
include ("status.php");
?></font></center>
<div align="center">
<img src="enter/img/header.png" width="586" height="125">
</div>
<?php
if(isset($_SESSION["UserID"]) && strlen($_SESSION["UserID"])>1){
shop();
}else{login();}
function login(){
?>
<form id="Login" name="Login" method="post" action="Loginok.php">
<div align="center">
<table>
<tr><td>
<font color="#A8031E" size="2"><b>Login</font>: </b><input name="userid" type="text" id="userid2" size="20" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"/>
</td></tr>
<tr><td>
<font color="#A8031E" size="2"><b>Hasło</font>: </b><input name="password" type="password" autocomplete="off" id="password2" size="20" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"/>
</td></tr>
<tr><td align="right">
<input type="submit" name="Submit" value="Zaloguj" class="button">
<input type="hidden" name="shop_login" value="login" /> <center>
<br><font color="#A8031E" size="2">Nie masz konta? <a href="../reg.php"><b>Zarejestruj sie</b></a> juz teraz!</font>
<br><font color="#A8031E" size="2"><a href="../index.php"><b>Wroc</b></a> do strony glownej</font></center>
</form>
</td></tr>
</table>
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]<?php
}
function shop(){
echo "<p class=dane> <B>ID Konta:</b> ".$_SESSION["UserID"]."<br/><B>ILO¦Ć pkt:</b><span style='color:black;'>  ".$_SESSION["cash"]."  </span><Br/><a href=\"Loginout.php\" class=link>Wyloguj</a></p>";
?>
<script type="text/javascript">
document.location='default.php';
</script>

<?php
$classid=$_GET["classid"];
if($classid<0 || $classid=="" || is_numeric($classid)==false){$classid=0;}
if($classid>0){
$exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop where classid=$classid)";
}else{
$exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop)";
}
mysql_query("set names gb2312 ");
mysql_query("set CHARACTER gb2312 ");
$result=mysql_query($exec);
$rs=mysql_fetch_array($result);
$num=$rs[0];
if(empty($_GET['page'])){
$page=0;
}else{
$page=$_GET['page'];
if($page<0)$page=0;
if($page>=ceil($num/16))$page=ceil($num/16)-1;
}
if($classid>0){
$exec="select item_proto.vnum,item_proto.gb2312name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum and item_proto_shop.classid=$classid order by item_proto.vnum desc limit ".($page*16).",16";
}else{
$exec="select item_proto.vnum,item_proto.gb2312name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum order by item_proto.vnum desc limit ".($page*16).",16";
}

$result=mysql_query($exec);
while($rs=mysql_fetch_array($result)){
$i+=1;
?>
<?
}
?>
<?
}
?>
<Br/>
</body>
</html>


 

Index.php sklepu który jest dobrze skonfigurowany i ten u góry ma też czytać site-> itemshop_cats , itemshop_items w navi zebym mogl dopisywac w itemshop_items nr kategorii i zeby dodwalo do tego u góry

 

TU TEN PHP DOBRZE SKONFIGUROWANY! :


<?php include('../header.php') ?>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <div id="content">[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]
<div id="content_m">

<div id="content_b">


<div id="holder">

<div id="leftcolumn">
<div class="module_menu">
<div>
<div>
<div>
<h3>Menu</h3>
<ul class="menu"><li id="current" class="active item1"><a href="../index.php?id=news"><span>Strona główna</span></a></li></ul>
<ul class="menu"><li id="current" class="active item1"><a href="../index.php?id=chat"><span>Chat</span></a></li></ul>
<ul class="menu"><li id="current" class="active item1"><a href="../index.php?id=baned"><span>Zbanowani</span></a></li></ul>
</div>
</div>
</div>
</div>[/left]

[/size][/font]


[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <div class="module">
<div>
<div>
<div>
<h3>Logowanie</h3>
<form name="form1" method="post" action="panel.php">
<center><?php include("../minipanel.php"); ?></center>
</form>
</div>
</div>
</div>
</div>
<div class="module">
<div>
<div>

</div>
</div>
</div>
<div class="module">
<div>
<div>
<div>
<h3>Menu</h3>

<?php
require_once('../config.php');
connect();
mysql_select_db('site');
$query=mysql_query("SELECT * FROM itemshop_cats ORDER BY id desc");
while($cats = mysql_fetch_assoc($query)){
echo '<li class="page_item"><a href="cat.php?id='.$cats['id'].'">'.$cats['name'].'</a></li>';
}
?>[/left]

[/size][/font]


[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
</div>
</div>
</div>[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <div class="module_none">
<div>
<div>
<div>

<br /> </div>
</div>
</div>
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <br />
<div style="width:137px;text-align:center;margin:0 auto;">
<br />[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</div>
<br />
</div>

<div id="maincolumn">

<div class="nopad">
<div class="newsflash">
<div class="module">
<div>
<div>
<div>
[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
</div>
</div>
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>


<span class="single-entry-titles" style="margin-top: 20px;"></span>
<h3 class="post-title"><br></a></h3>
<center>
<table border="0">
<tr>
<td>
<br><a href="regulamin.php"> <img src="../images/regulamin.png" align="middle" /><br>Regulamin ItemShop'u</a></td>
<td><br> <a href="buysm.php"><img src="../images/kup.png" align="middle" /><br>Kup meridianskie monety</a> </td></tr></table></center>

<div><span style="font-size: 12pt;"><span style="color: #ff0000;"><strong><br /></strong></span></span></div>
</tr>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</table>
<span class="article_separator"> </span>
</div>
<div>[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</table>
</div>
</div>







<div id="rightcolumn">
<div class="module">
<div>
<div>
<div>
<h3>Status</h3>
<?php include('../status.php'); ?>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
</div>
</div>
</div>

<div class="module">
<div>
<div>
<div>
<h3>Top10</h3>
<center><?php include("../rank.php") ?></center> </div>
</div>
</div>
</div>




[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]
<div class="module">
<div>
<div>
<div>
<h3>Top10 Gildie</h3>
<center><?php include("../rankg.php") ?></center> </div>
</div>
</div>
</div>




[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
<div class="clr"></div>

</div>
</div>
</div>
</div>

<div id="footer">

Meridia - polski prywatny serwer Metin2
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</div>
</body>[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</html>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]


Opublikowano

 

Index.php sklepu którego nie umiem skonfigurować:

 

 


<?php
session_start();
require_once("config_is.php");
mysql_select_db("site");
?>
<?php
function DeCode($string,$operation,$key='')
{
$key=md5($key);
$key_length=strlen($key);
$string=$operation=='D'?base64_decode($string):substr(md5($string.$key),0,8).$string;
$string_length=strlen($string);
$rndkey=$box=array();
$result='';
for($i=0;$i<=255;$i++)
{
$rndkey[$i]=ord($key[$i%$key_length]);
$box[$i]=$i;
}
for($j=$i=0;$i<256;$i++)
{
$j=($j+$box[$i]+$rndkey[$i])%256;
$tmp=$box[$i];
$box[$i]=$box[$j];
$box[$j]=$tmp;
}
for($a=$j=$i=0;$i<$string_length;$i++)
{
$a=($a+1)%256;
$j=($j+$box[$a])%256;
$tmp=$box[$a];
$box[$a]=$box[$j];
$box[$j]=$tmp;
$result.=chr(ord($string[$i])^($box[($box[$a]+$box[$j])%256]));
}
if($operation=='D')
{
if(substr($result,0,8)==substr(md5(substr($result,8).$key),0,8))
{
return substr($result,8);
}
else
{
return'';
}
}
else
{
return str_replace('=','',base64_encode($result));
}
}
?>
<STYLE type=text/css>
img {
border:0;
}
</style>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta name="Description" content="airo,mt2,metin2" /> <meta name="Keywords" content="airo,mt2,metin2" />
<title><?php
include ("nazwastrony.php");?> :: ItemShop</title>
</head>
<body>
<center><font color="#A8031E" size="2"><?php
include ("status.php");
?></font></center>
<div align="center">
<img src="enter/img/header.png" width="586" height="125">
</div>
<?php
if(isset($_SESSION["UserID"]) && strlen($_SESSION["UserID"])>1){
shop();
}else{login();}
function login(){
?>
<form id="Login" name="Login" method="post" action="Loginok.php">
<div align="center">
<table>
<tr><td>
<font color="#A8031E" size="2"><b>Login</font>: </b><input name="userid" type="text" id="userid2" size="20" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"/>
</td></tr>
<tr><td>
<font color="#A8031E" size="2"><b>Hasło</font>: </b><input name="password" type="password" autocomplete="off" id="password2" size="20" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"/>
</td></tr>
<tr><td align="right">
<input type="submit" name="Submit" value="Zaloguj" class="button">
<input type="hidden" name="shop_login" value="login" /> <center>
<br><font color="#A8031E" size="2">Nie masz konta? <a href="../reg.php"><b>Zarejestruj sie</b></a> juz teraz!</font>
<br><font color="#A8031E" size="2"><a href="../index.php"><b>Wroc</b></a> do strony glownej</font></center>
</form>
</td></tr>
</table>
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]<?php
}
function shop(){
echo "<p class=dane> <B>ID Konta:</b> ".$_SESSION["UserID"]."<br/><B>ILO¦Ć pkt:</b><span style='color:black;'>  ".$_SESSION["cash"]."  </span><Br/><a href=\"Loginout.php\" class=link>Wyloguj</a></p>";
?>
<script type="text/javascript">
document.location='default.php';
</script>

<?php
$classid=$_GET["classid"];
if($classid<0 || $classid=="" || is_numeric($classid)==false){$classid=0;}
if($classid>0){
$exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop where classid=$classid)";
}else{
$exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop)";
}
mysql_query("set names gb2312 ");
mysql_query("set CHARACTER gb2312 ");
$result=mysql_query($exec);
$rs=mysql_fetch_array($result);
$num=$rs[0];
if(empty($_GET['page'])){
$page=0;
}else{
$page=$_GET['page'];
if($page<0)$page=0;
if($page>=ceil($num/16))$page=ceil($num/16)-1;
}
if($classid>0){
$exec="select item_proto.vnum,item_proto.gb2312name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum and item_proto_shop.classid=$classid order by item_proto.vnum desc limit ".($page*16).",16";
}else{
$exec="select item_proto.vnum,item_proto.gb2312name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum order by item_proto.vnum desc limit ".($page*16).",16";
}

$result=mysql_query($exec);
while($rs=mysql_fetch_array($result)){
$i+=1;
?>
<?
}
?>
<?
}
?>
<Br/>
</body>
</html>


 

 

Index.php sklepu który jest dobrze skonfigurowany i ten u góry ma też czytać site-> itemshop_cats , itemshop_items w navi zebym mogl dopisywac w itemshop_items nr kategorii i zeby dodwalo do tego u góry

 

 

TU TEN PHP DOBRZE SKONFIGUROWANY! :

 


<?php include('../header.php') ?>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <div id="content">[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]
<div id="content_m">

<div id="content_b">


<div id="holder">

<div id="leftcolumn">
<div class="module_menu">
<div>
<div>
<div>
<h3>Menu</h3>
<ul class="menu"><li id="current" class="active item1"><a href="../index.php?id=news"><span>Strona główna</span></a></li></ul>
<ul class="menu"><li id="current" class="active item1"><a href="../index.php?id=chat"><span>Chat</span></a></li></ul>
<ul class="menu"><li id="current" class="active item1"><a href="../index.php?id=baned"><span>Zbanowani</span></a></li></ul>
</div>
</div>
</div>
</div>[/left]

[/size][/font]


[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <div class="module">
<div>
<div>
<div>
<h3>Logowanie</h3>
<form name="form1" method="post" action="panel.php">
<center><?php include("../minipanel.php"); ?></center>
</form>
</div>
</div>
</div>
</div>
<div class="module">
<div>
<div>

</div>
</div>
</div>
<div class="module">
<div>
<div>
<div>
<h3>Menu</h3>

<?php
require_once('../config.php');
connect();
mysql_select_db('site');
$query=mysql_query("SELECT * FROM itemshop_cats ORDER BY id desc");
while($cats = mysql_fetch_assoc($query)){
echo '<li class="page_item"><a href="cat.php?id='.$cats['id'].'">'.$cats['name'].'</a></li>';
}
?>[/left]

[/size][/font]


[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
</div>
</div>
</div>[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <div class="module_none">
<div>
<div>
<div>

<br /> </div>
</div>
</div>
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] <br />
<div style="width:137px;text-align:center;margin:0 auto;">
<br />[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</div>
<br />
</div>

<div id="maincolumn">

<div class="nopad">
<div class="newsflash">
<div class="module">
<div>
<div>
<div>
[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
</div>
</div>
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>


<span class="single-entry-titles" style="margin-top: 20px;"></span>
<h3 class="post-title"><br></a></h3>
<center>
<table border="0">
<tr>
<td>
<br><a href="regulamin.php"> <img src="../images/regulamin.png" align="middle" /><br>Regulamin ItemShop'u</a></td>
<td><br> <a href="buysm.php"><img src="../images/kup.png" align="middle" /><br>Kup meridianskie monety</a> </td></tr></table></center>

<div><span style="font-size: 12pt;"><span style="color: #ff0000;"><strong><br /></strong></span></span></div>
</tr>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</table>
<span class="article_separator"> </span>
</div>
<div>[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</table>
</div>
</div>







<div id="rightcolumn">
<div class="module">
<div>
<div>
<div>
<h3>Status</h3>
<?php include('../status.php'); ?>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
</div>
</div>
</div>

<div class="module">
<div>
<div>
<div>
<h3>Top10</h3>
<center><?php include("../rank.php") ?></center> </div>
</div>
</div>
</div>




[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]
<div class="module">
<div>
<div>
<div>
<h3>Top10 Gildie</h3>
<center><?php include("../rankg.php") ?></center> </div>
</div>
</div>
</div>




[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left] </div>
<div class="clr"></div>

</div>
</div>
</div>
</div>

<div id="footer">

Meridia - polski prywatny serwer Metin2
</div>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</div>
</body>[/left]

[/size][/font]

[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]</html>[/left]

[/size][/font]
[font=tahoma, helvetica, arial, sans-serif][size=3]

[left]


 

 

Tu jest pisanie/poprawa questów, nie stron...

Opublikowano

Mam dwa pytania

Co zrobic zeby postac respila sie sie na ktordach mapki np 100.100

gry wpisze /warp 3072 1203 laduje na kordach 0.0 tak jak na ss

jakiej fukcji uzyc , prosze o jakis przyklad

 

 

30776865572863495932.jpg

 

 

Drugie pytanie

game.drop_item() -Wyrzuca na ziemię item bez nazwy

pc.give_item2() -Daje nam item wprost do EQ.

 

czy jest jakas funkcja ktora rzuca na ziemie ale z nazwa albo jak to inaczej zrobic zeby bylo na ziemi ale mialo nazwe.

Opublikowano

Mam dwa pytania

Co zrobic zeby postac respila sie sie na ktordach mapki np 100.100

gry wpisze /warp 3072 1203 laduje na kordach 0.0 tak jak na ss

jakiej fukcji uzyc , prosze o jakis przyklad

 

 

30776865572863495932.jpg

 

 

Drugie pytanie

game.drop_item() -Wyrzuca na ziemię item bez nazwy

pc.give_item2() -Daje nam item wprost do EQ.

 

czy jest jakas funkcja ktora rzuca na ziemie ale z nazwa albo jak to inaczej zrobic zeby bylo na ziemi ale mialo nazwe.

game.drop_item_with_ownership

Proszę :).

 

Pytanie o :

server_timer

 

 

Robię np coś takiego :

when 9003.chat."Wlacz wiadomosc" begin
-- zmienna od wyboru, dialogi, bla bla
if x == 1 then
server_timer("wiadomosc", 60*4, get_server_timer_arg())
end
end
when wiadomosc.server_timer begin
clear_server_timer("wiadomosc", get_server_timer_arg())
-- wiadomosc serwerowa
server_timer("wiadomosc", 60*4, get_server_timer_arg()) -- powtarzam timer
end

Gdy robię coś takiego timerem, a timer powinien dobiec końca to wywala kanał ..

 

 

1377371138-U1002370.png

Opublikowano

Wiecie może co jest źle w tym quescie?

http://wklej.to/dZc6B

wywala takie coś

expecting 'state' biolog_surka_145lv.quest:98:Abort (core dumped)

Obama wie, co robisz!!!
131894.jpg                                                                                                                                                    4906167742.png

                                                                                                                                                                                                                                                                                      LTE Play Opole

Opublikowano

dlaczego taki quest nei dziala?

quest abc begin
state etap begin
when 8019.kill begin
		local a = pc.getqf("ile")+1
			if a < 5 then
				pc.setqf("ile", a)
			else
				say("Czas na nastepny etap!")
				say("Kostucha juz coraz blizej.")
				wait()
				pc.warp(391700, 1293100)
			end
	end
end

Prosze o poprawe tego questa:

 

quest katakumby begin
state start begin
when 1093.kill with pc.get_map_index() == 12 begin
say("Mozesz isc na DC!")
d.new_jump_all(12 , 3072 , 12032)
setstate(etap1)
end

when 9998.chat."Diabelskie Katakumby" begin
say_title("Duch sury:")
say("")
say("Piekielne Katakumby są dostępne od 75 poziomu")
wait()
if pc.get_level() < 75 then
say("Twój poziom jest zbyt niski, bym")
say("mógł cię wpuścić!")
end
if pc.get_level() >= 75 then
say("Dobrze, zostaniesz przeniesiony.")
pc.warp(315200,1209800)
end
end
end


state etap1 begin
when login with pc.get_map_index() == 12 begin
d.jump_all(81,58)
say_title("Witaj w Diabelskich Katakumbach")
say("")
say("Masz 60 minut, badz ostrozny")
say("Znajdz starozytnego wojownika")
say("Przekaz mu tajemniczy klucz ktory dostaniesz")
say("z podziemnych potworow.")
end

when 2501.kill or
            2502.kill or
            2503.kill begin
local a = math.random(100)
               if a >=1 and a <= 10 then
                   game.drop_item(30082)
               end
       end


         when 9997.chat."Chce isc dalej" with pc.count_item(30082) >0   begin
            if pc.getqf("collect_count")< 9 then     
                       local index =pc.getqf("collect_count")+1
                       pc.setqf("collect_count",index)
                               say("Duch wojownika:")

						    say("Zostaniesz przeniesiony dalej.")
						    say("Na kolejnej mapie będziesz musiał dojść")
						    say("do żółwia znajdującego się w środku labiryntu.")
						    say("")
                local s = select("Przenies mnie!", "Zostaje tu.")
						    if s == 1 then
								    pc.warp(361700, 1207500)
						    else
								    return
						    end

               wait()
         end
         setstate(etap2)
         end
         end

state etap2 begin
when 8029.kill  begin
say("To jest to, czuje moc Azazela!")
say("")
say("Kolejne wyzwanie bedzie polegalo")
say("na zabiciu wszystkich 5 mini bosow")
say("po zabiciu ostatniego przenisiesz")
say("sie dalej")
wait()
pc.warp(442500, 1228200)
end
end
state etap3 begin
when 8019.kill begin
           local a = pc.getqf("ile")+1
               if a < 5 then
                   pc.setqf("ile", a)
               else
                   say("Czas na nastepny etap!")
                   say("Kostucha juz coraz blizej.")
                   wait()
                   pc.warp(391700, 1293100)
               end
               setstate(list)
       end
end
state list begin
       when letter begin
           send_letter("Zabij 5 metinow")
       end
       when button or info begin
           say("Masz do zabicia 5 "..mob_name(8039).."!")
           say("Zrob to szybko!")
           say("")
           setstate(zabij)
       end
   end
state zabij begin
       when 2514.kill begin
       local a = pc.getqf("ile")+1
           if a < 5 then
               pc.setqf("ile", a)
           else
               say("Gratulacje! Udalo ci sie! ")
               pc.warp(391700, 1293100)
end
end
end                





end

 

 

Opublikowano

dlaczego taki quest nei dziala?

quest abc begin
state etap begin
when 8019.kill begin
		local a = pc.getqf("ile")+1
			if a < 5 then
				pc.setqf("ile", a)
			else
				say("Czas na nastepny etap!")
				say("Kostucha juz coraz blizej.")
				wait()
				pc.warp(391700, 1293100)
			end
	end
end

Prosze o poprawe tego questa:

 

quest katakumby begin
state start begin
when 1093.kill with pc.get_map_index() == 12 begin
say("Mozesz isc na DC!")
d.new_jump_all(12 , 3072 , 12032)
setstate(etap1)
end

when 9998.chat."Diabelskie Katakumby" begin
say_title("Duch sury:")
say("")
say("Piekielne Katakumby są dostępne od 75 poziomu")
wait()
if pc.get_level() < 75 then
say("Twój poziom jest zbyt niski, bym")
say("mógł cię wpuścić!")
end
if pc.get_level() >= 75 then
say("Dobrze, zostaniesz przeniesiony.")
pc.warp(315200,1209800)
end
end
end


state etap1 begin
when login with pc.get_map_index() == 12 begin
d.jump_all(81,58)
say_title("Witaj w Diabelskich Katakumbach")
say("")
say("Masz 60 minut, badz ostrozny")
say("Znajdz starozytnego wojownika")
say("Przekaz mu tajemniczy klucz ktory dostaniesz")
say("z podziemnych potworow.")
end

when 2501.kill or
		 2502.kill or
		 2503.kill begin
local a = math.random(100)
			if a >=1 and a <= 10 then
				game.drop_item(30082)
			end
	end


	  when 9997.chat."Chce isc dalej" with pc.count_item(30082) >0   begin
		 if pc.getqf("collect_count")< 9 then	
					local index =pc.getqf("collect_count")+1
					pc.setqf("collect_count",index)
							say("Duch wojownika:")

							say("Zostaniesz przeniesiony dalej.")
							say("Na kolejnej mapie będziesz musiał dojść")
							say("do żółwia znajdującego się w środku labiryntu.")
							say("")
			 local s = select("Przenies mnie!", "Zostaje tu.")
							if s == 1 then
									pc.warp(361700, 1207500)
							else
									return
							end

			wait()
	  end
	  setstate(etap2)
	  end
	  end

state etap2 begin
when 8029.kill  begin
say("To jest to, czuje moc Azazela!")
say("")
say("Kolejne wyzwanie bedzie polegalo")
say("na zabiciu wszystkich 5 mini bosow")
say("po zabiciu ostatniego przenisiesz")
say("sie dalej")
wait()
pc.warp(442500, 1228200)
end
end
state etap3 begin
when 8019.kill begin
		local a = pc.getqf("ile")+1
			if a < 5 then
				pc.setqf("ile", a)
			else
				say("Czas na nastepny etap!")
				say("Kostucha juz coraz blizej.")
				wait()
				pc.warp(391700, 1293100)
			end
			setstate(list)
	end
end
state list begin
	when letter begin
		send_letter("Zabij 5 metinow")
	end
	when button or info begin
		say("Masz do zabicia 5 "..mob_name(8039).."!")
		say("Zrob to szybko!")
		say("")
		setstate(zabij)
	end
end
state zabij begin
	when 2514.kill begin
	local a = pc.getqf("ile")+1
		if a < 5 then
			pc.setqf("ile", a)
		else
			say("Gratulacje! Udalo ci sie! ")
			pc.warp(391700, 1293100)
end
end
end				





end

 

 

Zjadłeś setstate chyba tylko. nie sprawdzałem całości, nie mam czasu zbytnio.

 

quest katakumby begin
   state start begin
       when 1093.kill with pc.get_map_index() == 12 begin
           say("Mozesz isc na DC!")
           d.new_jump_all(12 , 3072 , 12032)
           setstate(etap1)
       end

       when 9998.chat."Diabelskie Katakumby" begin
           say_title("Duch sury:")
           say("")
           say("Piekielne Katakumby są dostępne od 75 poziomu")
           wait()
               if pc.get_level() < 75 then
                   say("Twój poziom jest zbyt niski, bym")
                   say("mógł cię wpuścić!")
               end
               if pc.get_level() >= 75 then
                   say("Dobrze, zostaniesz przeniesiony.")
                   wait()
                   pc.warp(315200,1209800)
               end
       end
   end


   state etap1 begin
       when login with pc.get_map_index() == 12 begin
           d.jump_all(81,58)
           say_title("Witaj w Diabelskich Katakumbach")
           say("")
           say("Masz 60 minut, badz ostrozny")
           say("Znajdz starozytnego wojownika")
           say("Przekaz mu tajemniczy klucz ktory dostaniesz")
           say("z podziemnych potworow.")
       end

       when 2501.kill or
           2502.kill or
           2503.kill begin
               local a = math.random(100)
                   if a >=1 and a <= 10 then
                       game.drop_item(30082)
                   end
       end

       when 9997.chat."Chce isc dalej" with pc.count_item(30082) > 0 begin
           if pc.getqf("collect_count")< 9 then    
               local index = pc.getqf("collect_count")+1
                   pc.setqf("collect_count", index)
                   say("Duch wojownika:")

                   say("Zostaniesz przeniesiony dalej.")
                   say("Na kolejnej mapie będziesz musiał dojść")
                   say("do żółwia znajdującego się w środku labiryntu.")
                   say("")
                       local s = select("Przenies mnie!", "Zostaje tu.")
                           if s == 1 then
                               pc.warp(361700, 1207500)
                           else
                               return
                           end

                   wait()
           end
               setstate(etap2)
       end
   end

   state etap2 begin
       when 8029.kill  begin
           say("To jest to, czuje moc Azazela!")
           say("")
           say("Kolejne wyzwanie bedzie polegalo")
           say("na zabiciu wszystkich 5 mini bosow")
           say("po zabiciu ostatniego przenisiesz")
           say("sie dalej")
           wait()
           setstate(etap3)
           pc.warp(442500, 1228200)
       end
   end
   state etap3 begin
       when 8019.kill begin
           local a = pc.getqf("ile")+1
               if a < 5 then
                   pc.setqf("ile", a)
               else
                   say("Czas na nastepny etap!")
                   say("Kostucha juz coraz blizej.")
                   wait()
                   pc.warp(391700, 1293100)
               end
           setstate(list)
       end
   end
   state list begin
       when letter begin
           send_letter("Zabij 5 metinow")
       end
       when button or info begin
           say("Masz do zabicia 5 "..mob_name(8039).."!")
           say("Zrob to szybko!")
           say("")
           setstate(zabij)
       end
   end
   state zabij begin
       when 2514.kill begin
           local a = pc.getqf("ile")+1
               if a < 5 then
                   pc.setqf("ile", a)
               else
                   say("Gratulacje! Udalo ci sie! ")
                   pc.warp(391700, 1293100)
               end
       end
   end                            
end

 

***


Nie gram już w ogóle w metina,


ale jeśli potrzeba komuś pomoc z questem


to jeśli będę potrafił to mogę pomóc.


***

Opublikowano

W dungeonach nie stosuje się state, całość powinna być tylko w state start

Koniec z MPCForum.pl i ogółem z metinem

:D

 

sunp.png

Sygnatura wykonana przez

Isuribi aka Amelka.

Opublikowano

Witam mam prośbę

wytłumaczcie mi jak się używa funkcji w dungeonie

 

d.check_eliminated

 

Najlepiej bym prosił wytłumaczyć na skrawku questu

 

Zrobiłem tak czy to jest dobrze?

 

http://wklej.to/0so7c

Opublikowano

A kurwa duża ;)

Żadna, nie wypowiadaj się jeśli tak się znasz.

<51

oznacza poniżej 51, czyli 50, 49, 48, 47...

<=50

oznacza równe lub mniejsze niż 50, czyli 50, 49, 48, 47...

No i widzisz tu różnicę?

Opublikowano

Wiem, ze to trochę śmieszne pytanie, ale muszę je zadać.

Czym różni się

pc.get_level

od

pc.level

bo jak zrobiłem sobie (dodatkowego) biologa to z komendą pc.get_level nie działał quest (dobrze sie wgrywał ale w grze go nie było) a z pc.level juz tak

Obama wie, co robisz!!!
131894.jpg                                                                                                                                                    4906167742.png

                                                                                                                                                                                                                                                                                      LTE Play Opole

Opublikowano

Wszystkie funkcje z get można skrócić właśnie o to get. Tak to działa:

pc.get_level() - pc.level

pc.get_gold() - pc.gold

pc.get_alignment() - pc.alignment

item.get_vnum() - item.vnum

npc.get_race() - npc.race

itd, itd..

Koniec z MPCForum.pl i ogółem z metinem

:D

 

sunp.png

Sygnatura wykonana przez

Isuribi aka Amelka.

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...