Jump to content
MakeWebGames

Recommended Posts

Posted

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

  • 2 months later...
Posted

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

Posted

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.)

Posted

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).

Posted

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.

Posted

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.

Posted

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.

  • 3 weeks later...
Posted

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

  • 2 weeks later...
Posted

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.

  • 6 months later...
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...