Jump to content

Rendril

Member
  • Content Count

    612
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Rendril

  1. The keys are an array of strings held for each player object. Storing an integer constant for the editor is feasible. I like it as a solution, but is it workable with the current system? The clickable has access to only the player accessing it. To have a function asking for "all players" means querying the database. If quertying the databse is acceptable (it puts a greater load on the server for MySQL overhead) then it could be done.
  2. I agree, it is not satifactory. But the solutions proposed are as expensive as the extra keys, if not moreso.
  3. An excellent outline, you beat me to it again Form validation is of great importantance, never assume that the user gave correct input.
  4. I posted elsewhere abotu the way the keys get stored. I do not think storing the editor info is a feasible solution right now. In concept it is simple enough: Take the one-dimensional array and convert it into a two-dimensional array of depth 2 or more. But there are 32k living accoutns on the server. To go through the entire player database and restructure the key settings would take a substantial amount of time. Remember the time it took just to delete the inactive accounts? But now, what if something goes wrong? What if the array conversion algorithm hits a snag on an unexpected key
  5. Form text box can easily be done, you can use anything HTML has. I'll post an example using both <textarea> , <select> and maybe radio/checkbox. The thing to be careful of when accepting user-typed input is that it is safe for consumption, don't assume the user sent it correctly. Another note, allow a certain level of tolerance for the input, not all will make it the exact format you want and speaking from my own experience, I make typos on a constant basis. Once the button is pressed and the script loads again, it will have done so with the key in the user's possesion. For
  6. I'm not sure what you mean. I was talking about the server having to store more as well. It is not a heavy strain, no. But an unnecessary one.
  7. The keys are stored an a serialized array, the structure cannot be changed easily. It affects every location you can access. As I said, there is no "creator" stored for a key. While a good idea it is not an easy task ot implement. You would also be charging an additional overhead on the server of now storing 2 values for every key, effectively doubling the key-use anyway. Maybe a simple solution is to append the editor ID and if desired, an expiration date for a key.
  8. [quote name='Chewett' date='01 November 2009 - 05:33 PM' timestamp='1257089639' post='46296'] so this will remove what key? all keys of that name? from everyone? [/quote] There are no "all keys of that name", you can only have one instance of a specific key, addign more of the same name does nothing (it overwrites it thus eliminating duplicates) And only the person accessing the clickable can have keys removed or given. [quote name='Udgard' date='01 November 2009 - 05:46 PM' timestamp='1257090383' post='46297'] Yes chew. And rendril, I think no one means, can we remove keys without n
  9. To remove a key use mds_take_rpqc_keys("key name") He won't have access to your script.
  10. Have a look at the manual for [url="http://magicduel.invisionzone.com/topic/5497-debugging-you-code/"]debugging your code[/url]
  11. Burns, the asterisk will work in regular expressions but cannot find keys with anything behind them. It would be highly exploitable if it worked, you could scan the keys a player has, and given tem all to yourself, thereby giving yourself access to the quests the palyer is on. And in some cases, judging by the key name you could change it to give yourself multiple-path access. Not to mention it would show you access to MD itself. This is why there is no mds_get_all_keys() function
  12. So Kafuuka, what you are proposing is to "label" the scripts which belong to a certain quest which allows you to delete them in one call? Storages would also need ot be given a label which corresponds to the script's label, so that the garbage collector knows to take it down too. The problem with keys is that they are not editor-specific, in other words 2 people could be using a key of the same name (that is why I suggest using key prefixes in all your code) how would the cleanup know which ones to take? IAB, if you are using echo to see what is inside the variable, rather use debug() It
  13. That's exactly right Udgard. It all depends on how you want to set your quest, and you could even have multiple end keys RJ, I sent you a PM, I'm won't be on a for few hours though.
  14. It should be fine to hold a key to determine their story path. Once they complete the quest/it has ended, be sure tou clean up all keys and you can give them a single "quest-ended" key so they can't start it up again, or remove that code too. You could also try using arrays in storages to manage progres,which would be more elegant, but much more complex. I'll write an example of the key cleanup when I get a chance.
  15. I did not say it was an actual item. My point is that people will likely not part with it since it will cost them something (the possibility of getting the wp) If there had been no reward announcd, I think swapping would be more probable.
  16. That's why browser's come with search functions. Try ctrl+f and "aotu" Maybe we can get to assign frame parameters before it is created, that way we specify height, borders, backgrounds etc instead of js workarounds.
  17. The storages can have different types: ao = all objects. Refer to the script manual section for more info. Is this what you mean for between a certain ID range? [code] @vl = 1000;//lower bound @vu = 2000;//upper bound //check that user is is bewteen upper and lower bounds if((uv('id') > @vl)) && (uv('id') < @vu)) { echo "Your ID was within the correct range." } [/code] You might notice how the expressions are wraped in brackets when they usually wouldn't be, this is because the parser might get a restriction on "&@" and I find t jsut makes managing the orde
  18. Strange, I just tested it and it works fine. Here it is without comments, see if that helps: [code] @vz = "rendrilrevant-"; retrieve(@vt); if(mds_has_rpcq_keys(@vz . "timer-started")) { @vd = floor((@vt - time())/60 / 60); echo "You only have " . @vd . " hours to sa"."ve the earth!"; } else { @vt = time() + (14 * 60 * 60); mds_give_rpcq_keys(@vz . "timer-started"); store(@vt); echo "You have 14 hours to sa"."ve the earth!<br />Run! Run like the wind!"; } [/code]
  19. You could try with 4 seperate arrays: [code] @va = array(123451,1214,6326); @vb = array(4362,62,34737); @vc = array(1515,1231,2626); @vd = array(2752,1257,2579); [/code] Then build a specific if-block for each array, effectively copying the code fom the initial post 4 times. Storages do work across multiple items, that is the "ao" part of the types. As for showing capital letters, I suggest echo'ing out from the @content for now.
  20. This sounds like a fun quest to me. I think there will be a problem however in the way to gain the items. For Udgard's item hunt quest I had people asking for ridiculous amounts of silver just to send a description/screen shot. It cost them nothing and they (not all, but many players) wanted payment, and in many case couldn't be bothered just to type it out or copy-paste it. This time they are expected to give up the item and possibility of gaining the WP. However, since we don't know [b]where[/b] the WP is (or do we?) people will hopefully be more willing to part with items. [color="#F
  21. Nice code Chewett, but I think you mean @vh [b]+[/b] 10 * 60 Otherwise it would be checked in the next 6000 years or so Burns, regarding the scope of the storage. It will work for each user seperately, we are waiting for multiple types to be supported. Also you're right about the @vh needing to be @vd. This example performs the same logic checks as above and shows how to calculate the remaining time. It gives the user 14 hours to save the world. Object1: [code] @vz = "rendrilrevant-";//define key prefix retrieve(@vt);//get timer data //check if the player started the timer alre
  22. I think you will have to remove the text manually for now. Remember to do the appropriate garbage removal on keys and storages you don't need.
  23. It should not be forcing you to echo any content if you don't want to. Have you tried something like this: [code] <!-- content separator --> content1 <!-- content separator --> content2 <!-- content separator --> content3 <!-- content separator --> content4 [/code]
  24. [quote name='No one' date='29 October 2009 - 01:51 PM' timestamp='1256817117' post='46046'] Can you explain a bit the difference between the 2 and how to set them (if there is a difference).[/quote] The types are specified like this: [access level for objects][access level for users] So toau = this object all users and aoau = all objects all users. I could be mistaken but this is how I understand their uses. toau will allow the storage to only be accessed from the object it was created on but will have the data available to all users that access it. aoau allows all objects to to shar
  25. Your script output will always be in lowercase, this is in order to ensure security. The best way I can suggest to overcome this is put the text you want to display into the content section The uppercase/lowercase functions have not bee allowed, they would be a nice addiiton, although a pain to simply capitilise single letters repeatedly. It might be to preserve case integrity while still providing the protection. For now use the content section. @Udgard: I haven't seen the /safe place/ keywords, could you post the link?
×
×
  • Create New...