mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 08:24:24 -05:00
Working copy
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
set_time_limit(-1);
|
||||
ini_set('max_input_time', '-1');
|
||||
ini_set('max_execution_time', '0');
|
||||
session_start();
|
||||
ob_start();
|
||||
|
||||
@@ -16,6 +12,11 @@ require_once './src/D2BitReader.php';
|
||||
require_once './src/D2Item.php';
|
||||
require_once './src/D2Char.php';
|
||||
|
||||
error_reporting(E_ERROR | E_PARSE);
|
||||
set_time_limit(-1);
|
||||
ini_set('max_input_time', '-1');
|
||||
ini_set('max_execution_time', '0');
|
||||
|
||||
define('DB_FILE', $_SESSION['modname'] . ".db");
|
||||
PDO_Connect("sqlite:" . DB_FILE);
|
||||
|
||||
@@ -42,10 +43,11 @@ foreach ($ISCData as $k => $v) {
|
||||
//$filePath = "D:\Diablo II\MODS\MedianXL2012\save\Test.d2s";
|
||||
|
||||
|
||||
$filePath = "Necro.d2s";
|
||||
$filePath = "Test.d2s";
|
||||
$char = new D2Char($filePath);
|
||||
$char->setChar("CharacterStatus", "Died", 0);
|
||||
$char->setChar("CharacterStatus", "Hardcore", 1);
|
||||
|
||||
//$char->setChar("CharacterStatus", "Died", 0);
|
||||
//$char->setChar("CharacterStatus", "Hardcore", 1);
|
||||
//$char->setChar("CharacterStatus", "Expansion", 1);
|
||||
//$char->setChar("LeftmousebuttonskillID", 223);
|
||||
|
||||
@@ -53,13 +55,21 @@ $char->setAllSkills(1);
|
||||
//$char->setSkill(1, 99);
|
||||
//$char->setChar("CharacterClass", "Necromancer"); // 127
|
||||
//$char->setChar("CharacterProgression", 1); // 0 in normal, 1 finished normal, 2 finished nm, 3 finished hell
|
||||
$char->setChar("CharacterLevel", 25);
|
||||
//$char->setStat("strength", 70);
|
||||
//$char->setStat("energy", 70);
|
||||
//$char->setStat("dexterity", 70);
|
||||
//$char->setStat("vitality", 70);
|
||||
//$char->setStat("mana", 200);
|
||||
//$char->setStat("maxmana", 200);
|
||||
|
||||
//$char->setChar("CharacterStatus", "Died", 1);
|
||||
$char->setChar("CharacterLevel", 99);
|
||||
$char->setStat("strength", 270);
|
||||
$char->setStat("energy", 270);
|
||||
$char->setStat("dexterity", 270);
|
||||
$char->setStat("vitality", 270);
|
||||
$char->setStat("hitpoints", 100);
|
||||
$char->setStat("maxhp", 150);
|
||||
$char->setStat("stamina", 280);
|
||||
$char->setStat("maxstamina", 290);
|
||||
$char->setStat("mana", 70);
|
||||
$char->setStat("maxmana", 200);
|
||||
|
||||
|
||||
//$char->setStat("soulcounter", 80);
|
||||
//
|
||||
//$char->setStat("hitpoints", 70);
|
||||
@@ -77,4 +87,6 @@ $char->setChar("CharacterLevel", 25);
|
||||
unset($char); // destroy $char so we can read it again after writing to it to get updated stats
|
||||
|
||||
$char = new D2Char($filePath);
|
||||
var_dump($char->cData);
|
||||
|
||||
var_dump($char->cData['CharacterStatus']);
|
||||
var_dump($char->cData['stats']);
|
||||
|
Reference in New Issue
Block a user