Maebius Posted May 22, 2012 Report Posted May 22, 2012 (edited) Thank you Rendril!array|boolean mds_is_itc(string $itc) Returns false if invalid ITC is supplied, otherwise it returns an array with item information.["id"] - The ID of the item itself.["uid"] - The ID of the owner! ["playername"] - The playername of the owner["name"] - The name of the object (ie: "Silver Coin")["creationdate"] - When it was created (as epoch seconds I think?)["transferdate"] - last transfer date (also as epoch secondS?)["tag"] - Tag ("tool", "Valuable", "enchanted, consumable", etc) When inputting an item transfer code, never use the full string, it will be treated as invalid and return false. I find it best to copy from the ITC to MDI of the code, that is all it needs to identify the creature.if(isset(@input['submit']))//check that button was clicked { @vc= mds_is_itc(@input['ctc0']); if (@vc) { echo "<table border=1>"; echo "<tr><td>Item Name:</td><td>".@vc["name"]."</td></tr>"; echo "<tr><td>Item ID:</td><td>".@vc["id"]."</td></tr>"; echo "<tr><td>Owner ID:</td><td>".@vc["uid"]."</td></tr>"; echo "<tr><td>Owner Playername: </td><td>".@vc["playername"]."</td></tr>"; echo "<tr><td>Created:</td><td>".date("F j, Y, g:i a",@vc["creationdate"])."</td></tr>"; echo "<tr><td>Last Transfer:</td><td>".date("F j, Y, g:i a",@vc["transferdate"])."</td></tr>"; echo "<tr><td>Tags:</td><td>".@vc["tag"]."</td></tr>"; echo "</table>"; echo @content[0]; } else { echo "Sorry, it appears that is not a va"."lid Item Transfer Code.<br>"; echo @content[0]; } } else { //echo the html, it is not shown by default echo @content[0]; } if(isset(@input['submit']))//check that button was clicked { @vc= mds_is_itc(@input['ctc0']); if (@vc) { echo "<table border=1>"; echo "<tr><td>Item Name:</td><td>".@vc["name"]."</td></tr>"; echo "<tr><td>Item ID:</td><td>".@vc["id"]."</td></tr>"; echo "<tr><td>Owner ID:</td><td>".@vc["uid"]."</td></tr>"; echo "<tr><td>Created:</td><td>".date("F j, Y, g:i a",@vc["creationdate"])."</td></tr>"; echo "<tr><td>Last Transfer:</td><td>".date("F j, Y, g:i a",@vc["transferdate"])."</td></tr>"; echo "<tr><td>Tags:</td><td>".@vc["tag"]."</td></tr>"; echo "</table>"; echo @content[0]; } else { echo "Sorry, it appears that is not a va"."lid Item Transfer Code.<br>"; echo @content[0]; } } else { //echo the html, it is not shown by default echo @content[0]; }<form method="post" action=""> Enter an ITC to check<br /> <input name="ctc0" type="text" /><br /> <br /> <input name="submit" type="submit" value="Submit"/><br /> <br /> <font size="1px">*Copy from "ITC" to "MDI", not the entire code</font> </form> Edited June 9, 2013 by Chewett Quote
Zyrxae Posted June 9, 2013 Report Posted June 9, 2013 What's the significance behind this function and mds_is_ctc being designed to return the owner's UID but not their name? It's simple enough to manually find someone's name from their UID, so spoilers/secrets wouldn't seem to be an issue. Quote
Root Admin Chewett Posted June 9, 2013 Root Admin Report Posted June 9, 2013 What's the significance behind this function and mds_is_ctc being designed to return the owner's UID but not their name? It's simple enough to manually find someone's name from their UID, so spoilers/secrets wouldn't seem to be an issue. Probably because thats what information was available and therefore easy to access, i have added playername and updated the docs for both functions Zyrxae 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.