Rendril Posted October 29, 2009 Report Posted October 29, 2009 Simply gets a random number and outputs the quest info. [php] @vb = rand(1, 4); echo @content[@vb]; [/php] Gives/removes a key depending on certain event [php] @vz = "rendrilrevant-";//define key prefix //make sure user cannot retrigger the events if(!mds_has_rpcq_keys(@vz . "random-event-triggered")){ @vb = rand(1, 4);//generate random number from 1 to 4 inclusive if(@vb == 2)//event in case of 2 { mds_give_rpcq_keys(@vz . "second-event-key"); } else if(@vb == 3)//event in case of 3 { mds_remove_rpcq_keys(@vz . "third-event-key") } mds_give_rpcq_keys(@vz . "random-event-triggered"); echo @content[@vb];//display event's content } else { echo "You have already been here...move along." } [/php] Sometimes the user might want to retrace their steps to look for clues in the quest where they have been, in that case barring them from revisiting might not be the best choice. But this was a random event, better remember it next time Muratus del Mur 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.