Jump to content

Rendril

Member
  • Posts

    612
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Rendril

  1. Here is some sample code. Remember to remove the comments (some have script restricted words) This code will allow the user the recieve the "Noon Key" only at midday. [code] @vz = "rendrilrevant-";//the key prefix to use if(mds_has_rpcq_keys(@vz. "noon-key")){//check if the player is carrying the key already echo "The Sun smiles upon you, you are carrying the Noon Key"; } else { //check that the current time is between 11:30 and 12:30 if(time() > mktime(11, 30, 0, date("m") , date("j"), date("Y")) && time() < mktime(12, 30, 0, date("m") , date("j"), date("Y"))) { mds_give_rpcq_keys(@vz . "noon-key"); echo "Rays of light shimmer across the water, materialising into the Noon Key.<br/>You take the key and move on with your quest."; } else { echo "You look into the pool of water and see only your own reflection.<br/>Words of the poem linger in your thoughts<br/><br/>\"<i>Only at the Sun's zenith will you see the light</i>\""; } } [/code] A game of roll the dice agaisnt a gambler Content: [code] <br/>Roll the dice, winning is nice <!-- content separator --> [[name]] rolled<br />[[di1]] and [[di2]]<br />Total: [[sum]] [/code] Code: [code] @vp = array(rand(1, 6), rand(1, 6));//create player's dice rolls @vg = array(rand(3, 6), rand(2, 6));//create gambler's dice rolls and give him a slight advantage @vs[0] = @vp[0] + @vp[1];//sum of player's rolls @vs[1] = @vg[0] + @vg[1];//sum of gamberl's rolls @vk = 0;//intialize player counter, could support more players in the game @tpl = array();//amke sure @tpl is clear //assign values to @tpl @tpl[@vk]['di1'] = @vp[0]; @tpl[@vk]['di2'] = @vp[1]; @tpl[@vk]['name'] = uv('name'); @tpl[@vk]['sum'] = @vs[@vk]; ++@vk;//increment player counter @tpl[@vk]['di1'] = @vg[0]; @tpl[@vk]['di2'] = @vg[1]; @tpl[@vk]['name'] = "Gambler"; @tpl[@vk]['sum'] = @vs[@vk]; mds_template(@content[1],@tpl,false,2,'style="width:180;border:1px solid"');//call template function retrieve(@vd);//get the player's scorign array if(@vd == null)//check if the score were initialized yet, if not, initiliaze them @vd = array(0, 0, 0); //check for wins, losses or draws and increment appropriate counter if(@vs[0] > @vs[1]) { echo "You have won!"; @vd[0]++; } else if(@vs[0] < @vs[1]) { echo "You lost =("; @vd[1]++; } else { echo "It was a tie"; @vd[2]++; } store(@vd);//save the player's progress //output the score echo "<br/><br/>Your progress against the gambler<br/>"; echo "Wins: " . @vd[0] . "<br/>Losses: " . @vd[1] . "<br/>Draws: " . @vd[2]; [/code] This is an example of a bank and market. Once the aoau type works and the creature/item transaction is added, it can become fully automated. [code] function transfer(@vi, @vv) { (prepare function) retrieve(@va); @va['bank'][@vi]['balance'] = @va['bank'][@vi]['balance'] + @vv; @va['bank'][@vi]['last_transaction'] = time(); store(@va); return @va['bank'][@vi]['balance']; } function add_creature(){ (prepare function) @vc = array(); @vc['id'] = (int) @input['id']; @vc['name'] = @input['name']; @vc['ctc'] = @input['ctc']; @vc['price'] = (int) @input['price']; retrieve(@va); @va['market'][@vc['id']] = @vc; store(@va); } function buy(@vi) { (prepare function) retrieve(@va); @vc = @va['market'][@vi]; @vb = transfer(uv('id'), -1 * @vc['price']); @va['market'] = take_creature(@va['market'], @vc['id']); store(@va); echo "Purchased the <b>" . @vc['name'] . "</b><br/>Account balance: <b>" . @vb . "</b><br/>CTC: <b><font color='red'>" . @vc['ctc'] . "</font></b><br/>Please store it immediatly"; return @va; } function take_creature(@va, @vi) { (prepare function) @vn = array(); foreach(@va as @vc){ if(@vc['id'] != @vi) @vn[@vc['id']] = @vc; } return @vn; } echo @content[1]; retrieve(@va); if(@va == null) { @va = array('market' => array(), 'bank' => array()); echo "storage was null"; } if(in_array(uv('id'), array(44582, 1028))){ echo @content[2]; if(@input) if(@input['action'] == "add_creature"){ add_creature(); @temp = count(@va['market']); retrieve(@va); if(@temp < count(@va['market'])) echo "Creature was added to the market<br/>"; else echo "Creature was not added<br/>"; } else if(@input['action'] == "add_funds"){ @vb = transfer(@input['id'], @input['amount']); echo "Current balance for <b>". @input['id'] ."</b> is <b>" .@vb. "</b>"; } } if(isset(@input['buy_creature']) && (@input['cid'])) { @va = buy(@input['cid']); } retrieve(@va); echo @content[4]; @vu = @va['bank']; if(@vu[uv('id')]['balance'] == null){ @vu[uv('id')]['balance'] = 0; @vu[uv('id')]['last_transaction'] = 0; @va['bank'] = @vu; store(@va); echo "Account created for " . uv('name') . "(" . uv('id') . ")<br/>"; } echo "Hello " . uv('name') . " (ID: " . uv('id'). ")<br/>Account balance: " . @vu[uv('id')]['balance'] . "<br/>Last transaction: " . @vu[uv('id')]['last_transaction'] . "<br/>"; echo @content[3]; if(@va['market']){ @tpl = array(); @vk = 0; foreach(@va['market'] as @vc){ @tpl[@vk]['name'] = @vc['name']; @tpl[@vk]['id'] = @vc['id']; @tpl[@vk++]['price'] = @vc['price']; } mds_template(@content[5],@tpl,false,4,'style="width:180;border:1px solid"'); } else{ echo "The market does not have creatures"; } [/code] I have set up a live example of the bank and market at the signpost in front of the labyrinth. Please note that changes you make are only visible to you and if you enter garbage, it will have garbage. The bank itself is simple, extra features could be interest rate, limited credit borrowing, transaction fees etc. I will add some more scripts here when I finish them (sending over phone right now)
  2. A random function is already available Limitation on the number of keys an item provides can be done within the current framework too, think about the store holding the number of keys, or which keys are allowed. When a key is given it would remove it from the store for example.
  3. [quote name='dst' date='26 October 2009 - 04:39 PM' timestamp='1256567982' post='45779'] Damn! Now I have to remember (or learn) how to code again (not only basic like if do..) ( [/quote] The more you know how to code, the quicker you will pick up on how to use the MD script I think the documentation will be easy for beginners to follow and the sample code will be available for reference.
  4. Since it is a tribute to Knator Commander, is there any request to use a knator in the rituals?
  5. I would like to join. In addition to No one's questions, will increases from the MD shop be allowed?
  6. Phantom Orchid, we already had the intention of archiving such knowledge. We are still in the process of reorganising the alliance. Most members are under demanding schedules in RL and we lost some key members of the alliance. Give us some time to get things running again Grido, I think the element sections you are refering to are part of the quest Yrthilian is working on.
  7. It is a good idea but there are inaccuracies in what you have written. As for learning how MD works, there is a basic "How to play MD" given in the tutorial, but the finesses of the game are meant to be discovered on your own. Yes, there are many ways to do this, you can ask around and get help. But the point is that if you want to find something, you must get a shovel dig for it, not have it given to you on a platter from the forum.
  8. PHP has a mail to function which can do this. It can easily take whatever is in the message (or multiple messages) and email it to you. I have never seen PM's getting lost. Instead, both the default window and the cloud display only the last 80 messages. I'm guessing the SELECT has a limit of 80, this could be solved by paginating.
  9. I think the stat modifiers are a great idea. The reason for the imballance is that the increases are not proportional. Giving a static increase to the stat causes this imballance, for example if 2 students have a test and frist student scores 100% while the other scores 50%, and the teacher decides to give and increase onto the mark by 20, first student gets 120% and second has 70% but the proportional increase for student 2 was higher and he benefited more. I would like a proportional stat modifier but rather than implementing new modifiers for the creatures, just use the given stats as the modifier. This is what I propose: [b]Creature's stat in the battle = creature's stat * (your personal stat / 100)[/b] This is how it would work: You assign a %-slider before the battle as always, this determineswhat part of your stats are given to the ritual. Let us say you have 600 of some personal stat, call it [i]stat S[/i]. You use 2 creatures, creature A and creature B. [i]Creature A[/i] has stat S of 200. [i]Creature B[/i] has stat S of 100. Lets say you set the slider to 100%, you give to each creature [i]300 stat S[/i] (600 * 100 / 100 / 2). Now each creature gets their stat S modified as given in the formula. [b]Creature A's stat S = 200 * (300 / 100) = 600. Creature B's stat S = 100 * (300 / 100) = 300.[/b] Ritual's total stat S = 900. The difference however is that the individual creatures will get stronger proportionally, and thus it would not simply be a matter of what it can target. I am aware that having less than 100 of a stat (or settign slider to 0%) would mean a decrease to the creature's performance. It can be solved by either: using a multiplier of 1 (thereby not affecting the creature's stat) or applying a different forumla such as [b]creature's stat in the battle = creature's stat * (your personal stat / 100 [u]+ 1[/u])[/b] It can be applied to any creature stat, including the VE increase, and used for the increase from tokens. This means no new fields needed for the creatures by using the creatures' existing strengths and weaknesses, performing only a simple pre-battle calculation.
  10. Czez, I see the usefulness in anonymity when gifting an item and I feel the mail system can accommodate the notification as it is. If the mail were to be sent from your account but with a different name or perhaps a category added, you could see it in the outgoing messages and surpress it, thus preventing the receiver from seeing who sent it. The idea for transfering many items at a time has already been brought up, it did not occur to me that I needed to include it in my suggestion. Certainly, with mass transfer of coins getting flooded by mails would be a problem, so I would hope the mass item transfer would be in place for such a thing.
  11. You are of course entitled to your opinion. I would like to know exactly what powers were removed. I know there was the teleportation to Golemus, which as king (regardless of being and RPC or not) it is understandable for Yrhilian to be able to revoke, but were there other powers taken away?
  12. [quote name='Pipstickz' date='01 October 2009 - 05:29 AM' timestamp='1254367787' post='43326'] Oh, and Rendril again: It wasn't entirely RP, as Yrth took some of Grido's spells. Then there's also Khal the White, which COULD be an RP thing, but then he does control the actual account, as far as I know. [/quote] He, as king, stripped his subject of his powers and exiled him. How is this not RP? I agree, the manipulation of the account is stretching it, but it is being used as a method to resolve an in-game issue, in and in-game fashion.
  13. [quote name='Pipstickz' date='01 October 2009 - 05:17 AM' timestamp='1254367042' post='43318'] Because it brings people like you who bring up definitions of the word, which is not what this is about. This isn't your English king, this is MD. And to Renril: Lots of things are based on public opinion in MD. Lifeline's banned accounts (In my opinion, a slightly less blown-up, but bigger issue than this) were decided by vote, new features are decided by vote...Mur wants his players happy and entertained xD [/quote] The events differ greatly. Grido's exile was an RP and in-game matter, Lifeline's alt abuse, and the addition of features, are not RP matterw (although the result of them can affect RP, they themselves are not RP)
  14. [quote name='Grido' date='01 October 2009 - 03:09 AM' timestamp='1254359383' post='43289'] I'm just asking, specifically to the bold bits, but you know, any bit, which bit describes the situation yrth is in? There is a large proportion of "his" people objecting to his rule, [s][b]ruling is cemented[/b][/s][b], [/b][s][b]stable[/b][/s], and there are complaints about his abilitie to rule as well, bad decisions etc. [s][b]undeniable ability of the King to rule[/b][/s] So...yeah, how is he a king again?[b] [/b] [/quote] It appears to me that this is an in-game issue which you are trying to solve through an out-of-game means. As Awiiya and Tarquinus have aptly put, I feel you should stage a coup if you intend on dethoning Yrthilian. Remember, you are holding a public vote (something I doubt a threatened king would allow) through a means by which the king cannot stop you (apart perhaps from arguing back) and just as he cannot affect whether this vote is held, I do not see why this vote would affect his kingship. If you wish to remove him from power, do so in an appropriate fashion. Incite the denizens of Golemus who are supposedly suffering, convince them that Yrthilian is unfit to rule. Bear down and dethrone him yourself. (I could be mistaken but I see only 2 people of Golemus showing an inclination to dethrone him, you and Metal Bunny) Of course, the removal of the crown itself has to be done by Mur but if he bases such a decision on a mere vote, consider the repercussion on the game. It would plain and simply be divine intervention. From the game's viewpoint: Yrthilian exiles Grido, Grido is unhappy about it *poof* Yrthilian is king no more. (Perhaps you have been taking in-game action against him but I have no seen or heard such, though admittedly I have not been around much) This thread asks "Should Yrthrilian be diposed?" thus you get a public opinion on the matter, I fail to see why such a vote should determine whether he remains king. If the thread is an effort to rally the people against him so be it, but why then the vote? Do you wish to see how many would stand agaisnt him? I don't think the thread gives an accurate reflection.
  15. I noticed that the game doesn't notify you when you receive an item, or who it was from. I think it would be useful to have a log of sorts, which displayed items your character has given or received, perhaps something akin to the public log, which could even act as a history of the player. However, this would require substantial coding and would ask for an entire new section devoted for it. I suggest using a system already in place, the mailing system (I think this is already used for alliance invitations) Have a message sent to the receiver saying "You received <item name> from <player name>" It can be sent from something like "System" or "Inventory", even the giver's name with some word appended (it cannot be a player name since the player could then send a fake mail) Or simply, the player could receive a mail from their own account. I don't know the implementation of the item feature, but I suspect that it would require merely 1 line of code right after the the call to give the item (maybe a few more for performing the check to see if the transfer was successful) It might be obvious who the sender was for unique items, in the case of coins I think there should certainly be some information on who sent it. For example: If you were to run an event where players have an entrance fee of 1 coin, you go camping for the weekend and find 10 people applied but you only received 9 coins. It could also be applied when sending wish points or spell documents, although those come with the sender information already attached.
  16. Try reading how to play it...
  17. I have sifted through the logs to determine the outcome. As defined by the agreement, you are considered killed when you have an IN attack which you lost, your are considered to have killed when you have an OUT attack with a victory or win and have not yet been killed. Please correct me if I have misunderstood, or if I made a mistake in the logging. Allies: Knights of the Bell. Liberty Cless Metal Bunny Jtz Champion Handy Pockets AqlBeast Death Ring Defenders: Necrovion Sentinels, Children of the Eclipse Raven Ailith Pamplemousse Jester skinwalker fiju Guybrush Threepwood Tarquinus Amoran Sparrhawk Falen Angel [code] Action Time Winner Liberty killed Falen Angel 21:00:21 Allies Liberty killed Tarquinus 21:00:39 Allies Liberty killed Amoran 21:00:53 Allies Pamplemousse killed Liberty 21:01:07 Defenders Pamplemousse killed Cless 21:02:32 Defenders Guybrush Threepwood kill Death Ring 21:02:39 Defenders AqlBeat killed Jinta Shook* 21:02:40 Allies Jtz Champion killed Sparrhawk 21:02:41 Allies Jester killed Handy Pockets 21:02:56 Defenders Jtz Champion killed Jester 21:02:58 Allies Metal Bunny killed Raven 21:03:28 Allies Ailith killed AqlBeast* 21:03:33 Defenders Guybrush Threepwood killed MetalBunny 21:03:59 Defenders Guybrush Threepwood killed Jtz Champion 21:06:32 Defenders [/code] Kill ratio for Allies:Defenders [b]7:7[/b] Note: I am checking for possible draws. * denotes result was derived from non graphic battle log, AqlBeast or Ailith, please post an image for your logs. Can someone supply a list of participants so we can see whose logs need to be posted and who the survivors are? According to the list, it appears that all Allies were killed and thus the Allies lost.
  18. I also experienced this problem (after the announcement about the updates taking place) The scene flashes on and off, fixed by refreshing. Also noticed the scenes not loading at all, but players and chat remain, only happened twice so far refreshing seems to fix it after a while.
  19. [quote name='Fenrir Greycloth' date='14 September 2009 - 12:59 AM' timestamp='1252882743' post='41702'] That is not true in al cases. Tendril. [/quote] Which is why I said there is a reason behind it when they do not show
  20. [quote name='Prince Lewas' date='13 September 2009 - 07:43 PM' timestamp='1252863794' post='41695'] I absolutely agree with Strange... I think, it would be great to mark the arrows with the place where they points to. Marking with at least the coordinates of the place would be good enough [/quote] Arrows already show the name of the location they point to, there is a popup when you hover over them, if they don't show the name there is a reason behind it.
  21. Do you mean messages in game or on the forum? HTML in messages wouldn't affect server load since it is simple text being sent (your browser renders it) Messages should be sanitized but it would be nice to have text formatting (changing words to bold, italics etc) something similar to BB-Codes. I haven't noticed this happening in game though.
  22. Rendril

    Md 3D

    I agree, the images are not the heaviest consumers of reasources but they still add up to many gigabytes that could be used elsewhere. The biggest impact will be for each user. Yes the browsers cache well (usually if tuned correctly) but they have periodic clearing, this serves as a stable library of sorts. The scene images alone take more than 100kb, I have times when I get 5mb for a week, that equates to being able to load about 50 scenes in total. I'm sure others could benefit too. Remember that images would only be the beginning and can lead from there with more storing. It's a simple suggestion that is easy to implement, redirecting the default location. Anyway, I think we have derailed this topic more than enough
  23. Rendril

    Md 3D

    Having the static image in front of you will not reveal any hidden features. I'm not saying to download the flash files (although that would speed things up even more) but just changing where they load their content from. Those who know how to find the hidden parts can find them whether they are make readily downloadable or not, they are hardly impeded by the current system. What I am talking about is saving the images themselves that everybody can already navigate through as it is.
  24. Rendril

    Md 3D

    But the images can already be viewed. The content that needs to be hidden would not made available for download until it is released. We all already have the files downloaded by our browsers as it is, it is not exactly "hidden".
×
×
  • Create New...