[Release] DTWeb 2.0 Release (r00tme version)

Status
Not open for further replies.
Сайта никога не е мислен да поддържа нови сезони и всичко е писано и тествано според на Дарк файловете, които са 97 и 99.

Единственият проблем да работи с нови сезони е липсата на функции за новите предмети, което означава, че всички модули които работят с предмети в сайта няма да работят изобщо или ще работят некоректно.
Всички останали функции и модули нямат проблем със сезоните.

По принцип всеки сървър може да има най-различни комбинации на предметите (имена, скинове и т.н), затова най-добра практика е да се използва оригиналният item.txt на сървъра и според него да се рендират имената, големината и опциите на предметите.

В Дт обаче всичко, което е свързано с предметите е базирано на таблицата DP_Jewel_Deposit_Items, която оригинално е създадена от RaFa към търг-а и допълвана от мен. За да стане използваем за нови сезони, най напред трябва да се допълни базата с предмети (ако си избрал да не променяш начина на работа) и техните стоиности за всички останали сезони. След това да се допълнят всички функции, които работят с хекс дължина 20 в момента до сезон 1 с 32 до сезон 8, ако не се лъжа и 64 за 8-12 и IGCN. Дали ще бъде като се добавят нови функции и се сменят според конфиг или ще се допълнят съществуващите е въпрос на личен избор. Като цяло задачата не е толкова сложна, но във всички случаи ще отнеме доста време, особенно ако искаш да го направиш да поддържа сезон 12 и IGCN модификациите, тъй като те имат доста допълнения. Като цяло уебсайта във времето доста съм го систематизирал и почти всичко е изведено в основни функции. С други думи не се налага да променяш всеки един модул, който работи с предмети по отделно, а само основната функция.

В конкретният случай за сезон 3 добавките в предметите не са драстични и може да стане доста по-лесно и бързо.

Това е в общи линии, ако искаш нещо по-конкретно да помогна, ми пиши на лично и ще го помислим.

Много ти благодаря за изчерпателния отговор, ако има нещо конкретно ще пиша! :)
 
I have not ever posted the web in other places, because it is not related to them and I do not care what they want. This is not a commercial project, but a hobby work.

I have even advised to not trust other people as DemonuMu, who regularly copy-pasting my work in other places as it is not a genuine source and I do not want my name to be related to it.

In facts, I only care what DarksTeam members want, because this is the place where I have started with MuOnline and this is the only place wherever I want to share.

What is your problem ? how does it mean not to trust me ? have I ever said this website is created by me ? I said who is the creator and everything I posted was created by you I really do not understand you sometimes

I tried to help you on other forums to make this website more popular and to have more customs thanks to you r00tme but there is no problem I will fix the mistake

Today on the forum where I posted your web I will ask admin to delete the post I created and have your web here in the forum where you posted

I promise you will never see me again in this topic do what you want with your project bye :wave:
 
What is your problem ? how does it mean not to trust me ? have I ever said this website is created by me ? I said who is the creator and everything I posted was created by you I really do not understand you sometimes

I tried to help you on other forums to make this website more popular and to have more customs thanks to you r00tme but there is no problem I will fix the mistake

Today on the forum where I posted your web I will ask admin to delete the post I created and have your web here in the forum where you posted

I promise you will never see me again in this topic do what you want with your project bye :wave:


you must get permission from the author for posts and other files in another forum
 
What is your problem ? how does it mean not to trust me ? have I ever said this website is created by me ? I said who is the creator and everything I posted was created by you I really do not understand you sometimes

Well, you do not have to ask me for a permission to share something on the web, that's ridiculously stupid. But one thing can be mentioned for sure.. whenever you post somewhere else, link to the website where you found the stuff is essential, plus you have to be able to answer all questions related to it. You didn't do both on your post in Ragez0ne (and who knows where else), that's why I said a word.

I tried to help you on other forums to make this website more popular and to have more customs thanks to you r00tme but there is no problem I will fix the mistake

I do not need your help, but thanks for the attempt. Do you really think that if that'was the plan I would not flood the community myself? It was my decision to share it only here and you must respect that, but I can not teach you how to behave. As I have many times said, this is a web which is built for free to support Darkmaster files as much as possible, how did you decide to share it else and why? I do not need customers and popularity this is a free project, baby.

Today on the forum where I posted your web I will ask admin to delete the post I created and have your web here in the forum where you posted

It is up to you and doesn't bother me.

I promise you will never see me again in this topic do what you want with your project bye :wave:

It is up to you and doesn't bother me.
 
Another small update is up:

Added
- Posting news in all supported languages (select field)
- Editing the news directly from the home page if you are the administrator
Fixes
- Jewels depositor slow functionality (the script was rewrited at full)
 
Last edited:
how about ss2 (think) do you have any update?

- 1.16:
cannot see " Code Check "
cannot see Register Link?

Can you dev a new feature like "Guild Bank"?
 
Last edited:
how about ss2 (think) do you have any update?

- 1.16:
cannot see " Code Check "
cannot see Register Link?

Can you dev a new feature like "Guild Bank"?

I am not working on new seasons support.

There is no problem with the registration, it is working fine.

Can you describe Guild Bank module in details?
 
all member in a guild have same bank (guild bank) to store item, zen, cspoint.
everyone can deposit/withdrawal item/zen/cspoint without verify or confirmation so member a sharing item with member b...
 
For Season 2 you have to add the new items to item table and edit all functions which work with item hex length from 20 to 32.

That's all you need for Season 2. Very basic PHP understanding and logic are plenty enough to do it yourself.

For a Guild Bank, you can use this one https://darksteam.net/releases/22780-release-guild-bank-v0-1-a.html?highlight=Guild+bank. I haven't tested it but I am sure RaFa did a good job, and testing is not essential to know it.

Guild bank for me as you described is like the web storage you have already built in Dtweb, so with small queries changes and additional checks, you will have it. One jocker... add another column in Storage table in which you can store the guild name that item belongs to. Using this set point you can switch between and show the results to the particular player and so on.

PS. If you need a support to make DTweb working with your season, contact me with a pm and I will help.
 
Last edited:
These are the current webstorage functions from market_functions.php with tips to make it work for Season 2. In the same way, you can change all of them. As you can see almost everything is represented with a function which makes the things much easier.

PHP:
function storage_out($item_id,$buyer){
	  $success     = "";
	  $user        = clean_post($buyer); 
	  $id          = (int)($item_id);
      $market_item = mssql_query("Select * from [Storage] where [id] = '".$id."'");
	  $market_pr   = mssql_fetch_array($market_item);
	  $mycuritems  = all_items($user,1200); // Check your warehouse Item column length and type it here  -1920 for Season 2
	  $item        = ItemInfoUser($market_pr['item']);
	  $slot        = smartsearch($mycuritems, $item['x'], $item['y']);
      $test        = $slot * 20;	  // Change this to 32 instead of 20
      $mynewitems  = substr_replace($mycuritems, $market_pr['item'], ($test), 20);   // Change this to 32 instead of 20 
      $message     = array();
      if((mssql_num_rows($market_item)) == 0){
		    $message[] = phrase_storage_invalid_item;
	  }
      elseif(mssql_num_rows(mssql_query("Select * From MEMB_STAT WHERE ConnectStat=1 and memb___id='".$user."'")) != 0){
			$message[] = phrase_leave_the_game;
	  }
	  elseif($market_pr['end_date'] != 'NULL'){
		  $message[] = phrase_storage_invalid_item;
	  }
	  elseif($slot == 1337){
			$message[] = phrase_no_enough_space;
	  }
	  else{
	 
			$success = 1;
			mssql_query("Update [warehouse] set [Items]=0x" . $mynewitems . " where [AccountId]='".$user."'");
			mssql_query("Update [Storage] set end_date='".time()."', buyer_ip='".ip()."' where [id]='".$id."'");
            $message[] = phrase_storage_the_item. "<span title=\"" . $item['name'] . " <br><br><img src=" . $item['thumb'] . "\" class=\"someClass\" >
            <font style=\"font-size: 14px;color:#ff5c26\">" . $item['name'] . " </span></font>" . phrase_itemа_success_re;
            refresh1();
		
			  
	}
    message($message,$success);	
}

function storage_in($item_serial,$item_id,$item_type){
	
include("configs/config.php"); 
if(isset($_SESSION['dt_username']))	{
$user        = ($_SESSION['dt_username']);
$rez         = mssql_fetch_array(mssql_query("Select [AccountId],[Items],[Money] from [warehouse] where [AccountID]='".$user."'"));
$is_online   = mssql_fetch_array(mssql_query("Select [ConnectStat] from [MEMB_STAT] WHERE [memb___id]='".$user."'"));    	
$messages    = array();
$wh_content  = array();
$item_level  = id_type($item_serial);
$itemtem     = ItemInfoUser($item_serial);	
$mycuritems  = all_items($user,1200); // Check your warehouse Item column length and type it here  -1920 for Season 2
$itemsa      = array($mycuritems);
	if (strlen($item_serial) != 20) {  // Change this to 32 instead of 20
	    $messages[] = phrase_market_invalid_item;
	}

	elseif (in_array($item_id."/".$item_type,$option['storage_banned_items'])) {
	    $messages[] = phrase_market_banned_item;
	}
    elseif ($is_online['ConnectStat'] != 0) {
        $messages[] = phrase_leave_the_game;
	}	
	elseif (in_array($item_serial,$itemsa)) {
	    $messages[] = phrase_market_item_not_yours;
	}
	elseif ($rez['AccountId'] != $_SESSION['dt_username']) {
	    $messages[] = phrase_market_item_not_yours;
	}	
	else{


	if (preg_match("/{$item_serial}/", $mycuritems)) {
	    $empty           = str_repeat("F",20); // Change this to 32 instead of 20
	    $mynewitems      = str_replace($item_serial, $empty, $mycuritems);
        
		$update_market   = mssql_query("INSERT INTO [Storage] 
		([item_type],[item_id],[item],[seller],[start_date],[seller_ip],[name], [level],[skill],[luck],[options],[excellent]) VALUES
		('".$item_level["level1"]."','".$item_level["level2"] . "','".$item_serial."','".$user."','".time()."','".ip()."','".$itemtem['name']."','".$itemtem['level']."','".$itemtem['srch_skill']."','".$itemtem['srch_luck']."','".$itemtem['opt']."','".$itemtem['exl']."')");	
		     
		if(!$update_market){
			$messages[] = phrase_market_error_contact_admin;
		}
		else{
	    mssql_query("Update [warehouse] set [Items]=0x" . $mynewitems . " WHERE [AccountId]='" . $user . "'");
		
	    $messages[] = phrase_storage_the_item ."<span style=\"text-shadow:1px 1px; font-size:12pt;cursor: pointer;\" title=\"".$itemtem['name']." <br><br><img src=".$itemtem['thumb']." \" class=\"someClass\" >
        <font style=\"font-size: 14px;color:#ff5c26\">".$itemtem['name']." </span></font>". phrase_item_success_storage;        
		$success = 1;
		
		}
	 } 
    else {	
	    $messages[] .= phrase_storage_item_not_found;
	  }	  
	}
    message($messages,$success); 
  }
} 


 function smartsearch($whbin, $itemX, $itemY) {
        if (substr($whbin, 0, 2) == '0x') {
            $whbin = substr($whbin, 2);
        }

        $items = str_repeat('0', 120);
        $itemsm = str_repeat('1', 120);
        $i = 0;
        while ($i < 120) {
            $_item = substr($whbin, (20 * $i), 20); // Change this to 32 instead of 20
            $level = substr($_item, 0, 1);
            $level2 = substr($_item, 1, 1);
            $level3 = substr($_item, 14, 2);
            $level1 = hexdec(substr($level, 0, 1));
            if (($level1 % 2) <> 0) {
                $level2 = "1" . $level2;
                $level1--;
            }
            if (hexdec($level3) >= 128) {
                $level1 += 16;
            }
            $level1 /= 2;
            $id = hexdec($level2);

            $result = mssql_query("select [x],[y],[Name] from [DPWeb_JewelDeposit_Items] where [id]={$id} and [type]={$level1}");
            $res = mssql_fetch_array($result);


            $y = 0;
            while ($y < $res['y']) {
                $y++;
                $x = 0;
                while ($x < $res['x']) {
                    $items = substr_replace($items, '1', ($i + $x) + (($y - 1) * 8), 1);
                    $x++;
                }
            }
            $i++;
        }
        $y = 0;
        while ($y < $itemY) {
            $y++;
            $x = 0;
            while ($x < $itemX) {
                $x++;
                $spacerq[$x + (8 * ($y - 1))] = true;
            }
        }
        $walked = 0;
        $i = 0;
        while ($i < 120) {
            if (isset($spacerq[$i])) {
                $itemsm = substr_replace($itemsm, '0', $i - 1, 1);
                $last = $i;
                $walked++;
            }
            if ($walked == count($spacerq)) {
                $i = 119;
            }
            $i++;
        }
        $useforlength = substr($itemsm, 0, $last);
        $findslotlikethis = '#^' . str_replace('++', '+', str_replace('1', '+[0-1]+', $useforlength))."#";
        $i = 0;
        $nx = 0;
        $ny = 0;
        while ($i < 120) {
            if ($nx == 8) {
                $ny++;
                $nx = 0;
            }
            if ((preg_match($findslotlikethis, substr($items, $i, strlen($useforlength)))) && ($itemX + $nx < 9) && ($itemY + $ny < 16)) {
                return $i;
            }
            $i++;
            $nx++;
        }
        return 1337;
    }
 
Last edited:
Why do not you preconfig all variable use $option['item_hex_lenght']?

Because I am not interested in this now, I am developing other things and improvements. If DarkMaster release another season will do it for sure but will be again based on his work.

If I ever do such update will have to test every single aspect to make sure it works in any conditions (server variations) as much as I understand and can, so it is not only about changing the variables for me. You can no just say "Season 2 is supported now" and to be full of bugs and so on, right? Then the people won't get you seriously and that is not me.

So as you understand to make it work for your season is one story, but to make it work for all kind of Season 2 variations is completely another.
 
Last edited:
  • Like
Reactions: heroes1412
New character inventory rendering update is coming.

asd.png
 
Няма скинове, правя го да разпознава всичко, както е според едитора.
 
Няма скинове, правя го да разпознава всичко, както е според едитора.

А кой едитор ползваш, ако не е тайна?
 
Не е тайна, аз винаги съм ползвал само MuMaker MuMaker 1.12

MuMaker1.09

За сезон <=1 ти трябва версия 1.05 ако не се лъжа
 
Last edited:
за следващите месеци ще ми трябва за Сезон 3 (извинявам се , че се откланяме от темата).
 
за следващите месеци ще ми трябва за Сезон 3 (извинявам се , че се откланяме от темата).

Щом е в следващите месеци, може и да измислим нещо.
 
Status
Not open for further replies.