Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Rendril

  1. It shows the outcome of the battle. In your case you recieved 137.8 VP and 0.106 energetic immunity. This isn't related to the MD Script, can someone move it to the appropriate section?
  2. It goes beyond clickables. The scenes themselves are affected by keys. If you have the key for Golemus, you can use the gate to get in. The key for Loreroot is what makes sure the guards are not there. I think that being out of tutorial mode is managed by a key too.
  3. What about the concatentaion that I use in all the sample scripts with keys? I have no intention of typing out the prefix all the time, especailly if it can change at the drop of a hat
  4. Deleting all keys K requires an exhaustive search of the player table to find exactly who has the keys. Granted, it would be done infrequently but it's still a big process. How would you search for the has_keys() function in the script? Using a regex? If so what would your delimiters be? The only guarenteed ending bracket you can take is ") or '), there are a multitude of function calls that end in the same way. Tell me if you have some other idea in mind. The possibilty of a player opening a clickable set for deletion is there, but from what I understand there would be no script for the
  5. It's not a simple case of just adding a table for them. As I addressed earlier, in the worst case it means every scene in MD needs ot be edited. While I doubt this will be the case, it is still a big change. If there is enough of an outcry for a dedicated key table, Mur might make one. I am not convinced of a table being needed for this, the solutions cost as much as the leakage if not more. The best is perhaps the multidimensional array with ID integer stored alongside it's key name string sibling.
  6. I somehow didn't see the post you made about the key storing over time. A script could be labelled so it knows to be deleted, but you would need to assign which keys belong ot it specifically. In some cases I want keys to be around for ages, some I want gone within days. The direct deletion trigger or expiration would be very useful, but how do we link them? At least we adhere to mutual exclusion when dual-threading [color="#FFFFFF"]Those of us who get this joke need help[/color]
  7. [quote name='Kafuuka' date='02 November 2009 - 07:23 PM' timestamp='1257182610' post='46414'] Why would you put the same array into the ram multiple times? The one exception to this is multithreading. But even then you only need one copy to read from and you cannot have multiple copies to write to, lest you wish to risk data going out of sync. If there are 30k players, there will be 30k player objects. These objects hold things like keys, name, creatures owned stats etc. The key part isn't taking up the majority of that 1kb though.[/quote] Each clickable being accessed would needs its own
  8. You put forth a powerful solution but there is a big flaw, your assumption. With the way you have proposed it, there would be a player array with 30k entries. Even if we assume a mere 1kb per player info (counting name, keys, id etc) it would take 30mb at minimum. That is almost a percent of the server's total RAM, and only a minimal estimate. If 100 clickables were ot be accessed concurrenmtly that's the whole server taken down because it's trying to hold 300k rows in memory. Please correct me if I have misundertood what you meant. I'm guessing you were refering to the array of players
  9. Storing an integer identifer is not the problem (well, it's a rather small one comparitively) The problem in my view coems from trying to select keys held by other plqyers, not the one accessing the item. I don't know MySQL's performance ranges on the tables but I am fairly certain that scanning 30k+ records, multiple times, will not be cheap.
  10. I wish I could have devoted more time to this quest. Can you tell me what my final score was?
  11. 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.
  12. I agree, it is not satifactory. But the solutions proposed are as expensive as the extra keys, if not moreso.
  13. An excellent outline, you beat me to it again Form validation is of great importantance, never assume that the user gave correct input.
  14. 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
  15. 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
  16. 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.
  17. 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.
  18. [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
  19. To remove a key use mds_take_rpqc_keys("key name") He won't have access to your script.
  20. Have a look at the manual for [url="http://magicduel.invisionzone.com/topic/5497-debugging-you-code/"]debugging your code[/url]
  21. 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
  22. 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
  23. 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.
  24. 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.
  25. 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.
  • Create New...