50 lines
2.5 KiB
PHP
50 lines
2.5 KiB
PHP
<h2>Editing <?= $drop['name'] ?></h2>
|
|
<form action="/admin/drops/<?= $drop['id'] ?>" method="post" hx-post="/admin/drops/<?= $drop['id'] ?>" hx-target="#main">
|
|
<table width="90%">
|
|
<tr><td width="20%">ID:</td><td><?= $drop['id'] ?></td></tr>
|
|
<tr><td width="20%">Name:</td><td><input type="text" name="name" value="<?= $drop['name'] ?>"></td></tr>
|
|
<tr>
|
|
<td width="20%">Monster Level:</td>
|
|
<td>
|
|
<input type="number" name="mlevel" value="<?= $drop['mlevel'] ?>"><br>
|
|
<span class="small">Minimum monster level that will drop this item.</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="20%">Attribute 1:</td>
|
|
<td>
|
|
<input type="text" name="attribute1" value="<?= $drop['attribute1'] ?>"><br>
|
|
<span class="small">Must be a special code. First attribute cannot be disabled. Edit this field very
|
|
carefully because mistakes to formatting or field names can create problems in the game.</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="20%">Attribute 2:</td>
|
|
<td>
|
|
<input type="text" name="attribute2" value="<?= $drop['attribute2'] ?>"><br>
|
|
<span class="small">Should be either a special code or <span class="highlight">X</span> to
|
|
disable. Edit this field very carefully because mistakes to formatting or field names can create
|
|
problems in the game.</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<button type="submit">Save</button>
|
|
<button type="reset">Reset</button>
|
|
</form>
|
|
|
|
<br>
|
|
|
|
<h3>Special Codes</h3>
|
|
Special codes are used in the two attribute fields to give the item properties. The first attribute field must contain a special code, but the second one may be left empty ("X") if you wish. Special codes are in the format <span class="highlight">attribute,value</span>. <span class="highlight">Attribute</span> can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. <span class="highlight">Value</span> may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be <span class="highlight">maxhp,50</span>.<br><br>
|
|
Suggested user fields for special codes:<br>
|
|
maxhp - max hit points<br>
|
|
maxmp - max magic points<br>
|
|
maxtp - max travel points<br>
|
|
goldbonus - gold bonus, in percent<br>
|
|
expbonus - experience bonus, in percent<br>
|
|
strength - strength (which also adds to attackpower)<br>
|
|
dexterity - dexterity (which also adds to defensepower)<br>
|
|
attackpower - total attack power<br>
|
|
defensepower - total defense power
|