Tyr Posted February 10, 2010 Posted February 10, 2010 Ok so I had a bit of time to spare and saw this [mccode lite] Mod Idea In the requests section. Granted the request was for McLite and was done by Zeddicus but I wanted to make one for V2. So here it is (: Enjoy! Any problems let me know. sendbomb.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. SQLS You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Viewuser Link You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Now open up imadd.php and find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Right beneath this add the following You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Close/Save Now open up itemsend.php and find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. below this add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. close and save Now open up itemsell.php find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. beneath add You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Close and Save If you have any other files where users can send items in their inventory away just add the same type restrictions to those files as well. The Bombs are determined off the 2nd column added in users table "bombattempts" There are multiple differant ways users can obtain this, the choice is all up to you. It can be a donator only option Perhaps a Random Streets Find Daily Reward, etc etc. I'd suggest limiting the amount of bombs people gain, keeping it small :-) Any problems post here and I'll fix. **EDIT** Guess it would help to let everyone know what this mod does a *.* Basically a user can opt to plant a bomb on another user. If the other user has a bomb planted on them, they can go to a bomb diffusion center and attempt to cut 1 of 4 wires. The wires are always random so there is no cheating. If the user fails they are hospitalized for 20 minutes. If they succeed they get a random 1 through 100 stat gain in a Random userstat. If they do not try and diffuse it, in 10 minutes the timer goes off and they are hospitilized. cron next Quote
Tyr Posted February 10, 2010 Author Posted February 10, 2010 add this above ?> in cron_minute.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
ddgamedesign Posted April 19, 2010 Posted April 19, 2010 Hey all, Need a little help here. I'm wanting to add an event to the user that gets sent a bomb, to let them know they've been sent one so they can act on it. I assume an event_add needs to go in here somewhere: echo "You successfully Planted the bomb on ".$bomb['username']." Home"; item_add($_GET['ID'], 3, 1); $kapow = sprintf("UPDATE `users` SET `bombattempts`=`bombattempts`-1 WHERE `userid`=%u", $ir['userid']); $db->query($kapow); Thanks! Derek Quote
ddgamedesign Posted April 19, 2010 Posted April 19, 2010 Never mind...figured it out myself. PHP is a weird language at times. Quote
rowbvp Posted April 21, 2010 Posted April 21, 2010 Can someone make a quick file where user can buy a bomb? with crystals and do we make item and change the ID 3 to item of bomb Quote
ddgamedesign Posted April 21, 2010 Posted April 21, 2010 Yes, you would change the =3 in all the appropriate cases to the item ID of the bomb you create, unless its 3 already. (I helped someone with a coding question. The world must be coming to an end, surely.) Quote
rowbvp Posted April 21, 2010 Posted April 21, 2010 one last thing do you add a effect or anything? Quote
ddgamedesign Posted April 21, 2010 Posted April 21, 2010 Yeah, I had to take on moment on this too...no, when you create the item, just create it as a 'special' and assign it a name (Mail Bomb, whatever). Then link the item in your inevntory to a label that points to the sendbomb.php file for the effect of the item (the wire cutting sequence). Quote
rowbvp Posted April 22, 2010 Posted April 22, 2010 For some reason i can't get the thing working,i made item 3 named it mail bomb.had a user buy it then attack but keep getting error. You cannot bomb a member of your own clan! The only i got it to work is to add it manual to user in php admin. Quote
ddgamedesign Posted April 22, 2010 Posted April 22, 2010 Forgot about that....I ended up deleting the lines below where it checked to see about whether the user was a member of their own gang, and it worked: elseif($bomb['gang'] == $ir['gang']) { echo "You cannot bomb a member of your own clan!"; $h->endpage(); exit; Otherwise, two players not in a gang (both have gang status 0) couldn't send bombs to one another. The way it checks to see if you can bomb someone is that it increments the variable in Users table: bombattempts It's not an attack, per se, it gives a user the User Bomb, and they have to diffuse it within 10 minutes or it blows up. I like the mod, but it isn't as polished usability wise as it could be. Quote
rowbvp Posted April 24, 2010 Posted April 24, 2010 anyone get this working? Still can't get user to buy bomb ans use it Quote
CrazyT Posted April 25, 2010 Posted April 25, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This is pritty useless when your using, is_numeric, abs, and int at the same time. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Zero-Affect Posted May 10, 2010 Posted May 10, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This is pritty useless when your using, is_numeris, abs, and int at the same time. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Yeah i've always wondered why people do that lol Quote
Agon Posted May 23, 2010 Posted May 23, 2010 I've tried this out. Working on debugging. Will fix up asap. Issues: Need a check on inventory if the user has purchased a bomb. Event notifying user they have been bombed. Quote
secret_life Posted December 13, 2010 Posted December 13, 2010 when user1 attack user2 in event he write Attacked by user2 in reason he should wirte Attacked by user1 how corect rhis ? i have try to find where the time is set into the bdd because now the timer is set to 1 minte after you receive a bomb how i can change that ? thanx 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.