Skip to content

Instantly share code, notes, and snippets.

@zg
Created July 22, 2011 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zg/1099005 to your computer and use it in GitHub Desktop.
Save zg/1099005 to your computer and use it in GitHub Desktop.
Something to do with NPCs and XML...
<?php
if(count($_GET) > 0)
{
$xmlstr = "<npcspawn>
<npcId>{$_GET['npcId']}</npcId>
<locationz>
<x>{$_GET['x']}</x>
<y>{$_GET['y']}</y>
<z>{$_GET['z']}</z>
</locationz>
<respawnTime>{$_GET['respawnTime']}</respawnTime>
<walkTime>{$_GET['walkTime']}</walkTime>
<comment>{$_GET['comment']}</comment>
</npcspawn>";
echo '<pre>'.htmlentities($xmlstr).'</pre><hr />';
}
?>
<form method="get">
<table>
<tr><td>NPC ID:</td><td><input type="text" name="npcId"></td></tr>
<tr><td>X:</td><td><input type="text" name="x" size="3"></td></tr>
<tr><td>Y:</td><td><input type="text" name="y" size="3"></td></tr>
<tr><td>Z:</td><td><input type="text" name="z" size="3"></td></tr>
<tr><td>Respawn Time:</td><td><input type="text" name="respawnTime" size="3"></td></tr>
<tr><td>Walk Time:</td><td><input type="text" name="walkTime" size="3"></td></tr>
<tr><td>Comment:</td><td><input type="text" name="comment"></td></tr>
<tr><td colspan="2"><input type="submit" value="Get XML!"></td></tr>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment