Jump to content

Rendril

Member
  • Posts

    612
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Rendril

  1. If we at least have a list here, we can use it if needed for future reference
  2. I saw it discussed in chat but the way I understood it was that he was fixing the bug (and determining its origin)
  3. The same happened to me. I wasn't aware that he asked us to PM him. I was not able to find the topic, could you link to it?
  4. Viewer has been updated to work with the new combat log system. Option to delete battles was added. Moderator/admin levels added as well (they will be more apparent in the next update) Some minor changes were made to the appearance. The battle viewer is still located on the signpost in the Marble Dale Park. Number of publishable battles is currently limited to 1, it will be changed in the next update.
  5. [quote name='blackriderrom' date='29 December 2009 - 08:06 PM' timestamp='1262109981' post='51357'] Would seem rather tedious to do (unless you keep them constantly plugged in) [/quote] Keep it plugged in for the duration of your stay at the university/work computer. The computers where I am clear their hardrives on each reset. It is more tedious to re-install a browser every reboot, rather than plug in a memory stick for me.
  6. If you have a memory stick/portable harddrive, install FF/Opera onto it and run the browser directly from there. I find it helps with caching too.
  7. Try to have Seamonkey identify itself as FireFox or some other compatible browser, if it can. Depending on whether Seamonkey can run the flash/javascript correctly, you might want to simply download another browser.
  8. We have the tools available to make a post office. MD script makes this an idea which can be realised without any intervention needed from Mur. @Grido: the Postman isn't around at all times, he has to deliver more than just mail
  9. Absolutely right, seems I'm losing my marbles Example has been updated.
  10. Orlando, what you are asking for already exists, but isn't available publically. Global chat would lead to many abuses and I think there are already more than enoguh facilities available for talking to people. A global chat would take away from the charm as many have said. But being able to shout is an interesting idea that Rhaegar brought up a while ago. Shout in one location, and it can be heard in nearby locations. Could be good for drawing attention to an event or getting people to stop by. It can include the location/direction the shouting came from and come aat an AP cost to prevent spamming.
  11. Whoops! I meant to compare the id's, not the cid's Thanks for noticing As for the double loop, why would it not work?. From what I can tell it performs the 6 comparisons as needed: 0 is compared to 1, 2 and 3 1 is compared to 2 and 3 2 is compared to 3 Looking at your implementation of the linear loop, I think you misunderstood how the for-loop runs. [code]for(@va = 0; @va < 3; @va++)[/code] Will trigger only 3 times, from 0 to 2 I agree, my method performs in a O(n[sup]2[/sup]), more specifically, it does (n(n-1))/2 comparisons (please correct me if I am mistaken) What you suggested is to pre-sort, then apply the linear loop. Paying for the sort could make it less efficient then the nested loops (at least for this small scale comparison), sort() is implemented using a quicksort. So the performance gain would indeed only be present if the number of elements was larger. Also, will it sort on id by default? I checked the sort() reference and it seems that it is designed for sorting an array of single items rather than of arrays. There is an msort suggested however (it needs to be told the key to sort on) You haven't initialized any of your counters, although PHP is loosely typed, I don't think it will initialize them correctly through the postfix increment. Looking back on the code, I see that I could have performed the counting directly in the replication check, I'll add that when I have internet again. I also realsied the owner needs to be compared. This is however, an example code for the function reference. It would be better to discuss it in the sample codes section.
  12. Added the repeat check, not sure why the comments were missing but it has been fixed. Repeat check could be done with just 6 if-statements...but I like accomodating for expansion. Admittedly, array size should be used rather than magic numbers
  13. Cutler, I like your duplicate solution, I have updated the example to reflect it. I also fixed the typos, thank you for pointing them out, Burns.
  14. Example updated. Rememeber to remove the comments. I'm not sure how the in_array() function will perform with duplicates in the array, I will change the example if needed.
  15. array|boolean mds_is_ctc(string $ctc) Returns false if invalid CTC is supplied, otherwise it returns an array with creature information. Returned array will have the following structure: ["id"] : creature ID ["uid"]: owner ID ["playername"]: owner Playername ["cid"]: creature type ["tokens"]: tokens held by creature ["dateBorn"]: timestamp when creature was created ["transfercount"] : number of transfers ["tradevalue"]: trade value ["customName"]: custom name of the creature, if any ["vitality"]: creature's maximum vitality ["level"] : creature's level ["experience"] : creature's experience ["battlesWon"] : number of battles won by creatre ["age"] : creature's age in days When inputting a creature transfer code, never use the full string, it will be treated as invalid and return false. I find it best to copy from the CTC to MDC of the code, that is all it needs to identify the creature. Example: HTML <form method="post" action=""> Pete the Bull stands guard, send the CTC's* of the creatures to defeat him<br /> <input name="ctc0" type="text" /><br /> <input name="ctc1" type="text" /><br /> <input name="ctc2" type="text" /><br /> <input name="ctc3" type="text" /><br /> <br /> <input name="submit" type="submit" value="Submit"/><br /> <br /> <font size="1px">*Copy from "CTC" to "MDC", not the entire code</font> </form> Script if(isset(@input['submit']))//check that button was clicked { //load the "ctc"'s into an array @vc[0]= mds_is_ctc(@input['ctc0']); @vc[1]= mds_is_ctc(@input['ctc1']); @vc[2]= mds_is_ctc(@input['ctc2']); @vc[3]= mds_is_ctc(@input['ctc3']); //check whether ctc's are valid if(@vc[0] && (@vc[1]) && (@vc[2]) && (@vc[3])) { @vt = true; //test for repeats //set the counters of each creature type in associative array for(@vi = 0; @vi < 3; @vi++) { for(@vj = @vi + 1; @vj < 4; @vj++) { if(@vc[@vi]['id'] == @vc[@vj]['id']) { @vt = false; break; } } if(isset(@vd["" . @vc[@vi]['cid']])) ++@vd["" . @vc[@vi]['cid']]; else @vd["" . @vc[@vi]['cid']] = 1; } if(isset(@vd["" . @vc[3]['cid']])) ++@vd["" . @vc[3]['cid']]; else @vd["" . @vc[3]['cid']] = 1; //check there are no repeats if(@vt) { //create an array of the creature types @va = array(@vc[0]['cid'], @vc[1]['cid'], @vc[2]['cid'], @vc[3]['cid']); //check if required creatures types are in the array if((@vd['12'] == 2) && (@vd['2'] == 1) && (@vd['5'] == 1)) { echo "you have defeated pete the bull!"; } else { echo "pete laughs at your feeble attacks"; } } else { echo "pete looks at " . uv('name') . " with doubt"; } } else { echo "inva"."lid ctc(s) supplied"; } } else { //echo the html, it is not shown by default echo @content[0]; }
  16. Or he could find the solution by actually producing what he was paid for.
  17. Remember that the storage simply holds a variable. You could erase it with something like this, akin to initializing: [code] @vs = mds_storage("storage-name","storage-type"); @storage[@vs] = null; [/code] Link it with a form to trigger on the click of a button and you can make a nice admin interface
  18. Absolutely right Burns. I had forgotten to start it off as an aray in the event that the creatore checks first
  19. I think it's because of the storage startign as a non-array. I updated the first post to initiliaze the storage, see if it helps.
  20. That's strange, take out the comments completely and tell me exactly the error you get. Might be that I made a syntax error somewhere.
  21. This script will log a user's progress through various parts of a quest. In this example we store the user's name, their age at the time of completing the stage, the MD day that it was completed and the current progress. Note that anything can be kept in a storage, and here it is done with array. It would be better to store the timestamp rather than only a day but I keep it simple for the sake of demonstration. When picking a storage name, make it descriptive and try to reuse where possible. Storage type depends on your needs for the quest, in most cases it will be aoau or toau. [code]@vi = 123456790;//your ID, see the limiting access to a quest by id thread for more ideas @vs = mds_storage("storage-name","storage-type");//get the id of the storage if(@storage[@vs] == null)@storage[@vs] = array(); //initialize storage array if(uv('id') != @vi)//check whether it is a participant or quest creator { @vp = 3;//progress for this stage of the quest //create an array storign the particulars you want recorded @temp = array('name' => uv('name'), 'age' => uv('age'), 'day' => date('z'), 'progress' => @vp); @storage[@vs][uv('id')] = @temp;//save the array to the storage echo "you have completed stage " . @vp . "!"; } else{ //echo the desired info for you to see foreach(@storage[@vs] as @vl){ echo @vl['name'] . " reached stage " . @vl['progress'] . " on day " . @vl['day'] . " with " . @vl['age'] . " active days<br />"; } }[/code] Various other checks can be done such as preventing the user from repeating a quest by the use of keys. I eliminated duplicate entries for the same user here, but you might want ot log ALL tries the user has had.
  22. WP's can already be farmed by alts because of the broken pattern gazebo reward, but since they can't be transfered it is limited effect. 1 per year is sufficient, it would take extreme tenacity just to bring an alt to a year of age only to try get a WP on it. It is great it alts can be prevented from it, but there are some alts with roles and purpose that are going on 2 years already, and they deserve the WP as much as the main account.
  23. Perhaps I am misunderstanding, but isn't 1.7 greater than 1.44?
  24. There was a lot of break down in communication with the departure of previous members. Innocence is currently in charge of the site, and I have some approval powers. I'm not sure who else has.
  25. I too would like to step forth to be considered for the position. Rekindling the interest in not only the Archivists, but in archiving, is my primary interest at present. I have already taken steps to do so by completely rennovating the bookshelves in the archives, in an effort to both increase interest in coming to read the archives and inspiring more authors. Additionally, I have been discussing the matter of creating a quest run by the archivsts with my fellow members to promote a community spirit by giving the need to do research and speak to others. Currently the quest is still in development but planned to be in the finishing stages for the new year. Admittedly, the Archivists are few, thus my intention is to bring more members to the alliance. However, one is not required to be in the Archivists in order to produce an article. There has been positive feedback from the community regarding the new bookshelves and I have already been approached by people interested in submitting work, be it for quests or simply to add to the archives. [quote name='Akasha' date='02 December 2009 - 06:08 PM' timestamp='1259770125' post='48911'] the only one who made the archivist job and master archivist job is Awii and i think we all agree on this.. [/quote] I agree that Awiiya is most suitable for the position, but from what I heard he declined the offer.
×
×
  • Create New...