Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

So, I never really was a fan of people charging for assassination mods. Just seems like something everyone has a right to. So, I sat down and created this one.

Shout-out to newttster for the impromptu brain-storming which led to me figuring out how to select a random user.

Anywho, here's what it does:

--- Allows users to attempt an assassination on others

--- Cost is currently set to (assassinate-ee)'s level * 10 (As in, if you're trying to assassinate a level 5 user, it would cost 50 crystals) as well as half the (assassinator)'s maximum brave

--- 30% chance of success

--- 60% chance of the assassin coming back and sending the assassinator to the hospital instead

--- 10% chance of missing and hitting a random other user

assassination.php (V1):

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then just add this somewhere in viewuser.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

And here's V2 (Viewuser part is the same):

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Hope everyone can use it. Enjoy!

Edited by Seker
Posted

Okay, the forum seems to have added all the SPAN CLASS mess into my code, so here are the two files (V1 and V2) if you don't feel like removing all of it.

I've just used zips that contain the simple install instructions. Easier than renaming files and such. Enjoy!

[ATTACH]511[/ATTACH]

[ATTACH]512[/ATTACH]

Assassination V1.zip

Assassination V2.zip

Posted

Seker ... this looks excellent. Once I get my files back and up and running, this is something that I will definately be using. Thank you for the mention ... it is appreciated, though not necessary.

It is inspiring watching you ... makes me realize that although it is taking me forever to get things done for myself ... and with help of others ... that eventually I will succeed. Then again ... with the supposed end of the world coming in December ... I may be just banging my head against the wall for nothing! :)

Posted
Seker ... this looks excellent. Once I get my files back and up and running, this is something that I will definately be using. Thank you for the mention ... it is appreciated, though not necessary.

It is inspiring watching you ... makes me realize that although it is taking me forever to get things done for myself ... and with help of others ... that eventually I will succeed. Then again ... with the supposed end of the world coming in December ... I may be just banging my head against the wall for nothing! :)

I'm just happy someone can use it.

I've always been a firm believer in the power of the community. If we weren't all around to help each other, I don't think anyone would ever really complete anything. I don't care how good some is. We all run into problems, eventually.

Hoping to put out some more free mods like this one. It's a nice challenge for me to see if I can really put what's in my head into practice. And, when I do, I see no need not to share it with the community.

Posted (edited)

Nice one, Seeker.

EDIT:

Although, I would change the way you go about the random user.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Granted way more code.

However; doing a little testing (db only -not exact, using PHPMyAdmin)

I have 4 columns and 3 rows (`id`, `name`, `email`).

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

-Query took 0.0950 sec

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

-Query took 0.0019 sec

PHP bit to work out the random user, lets say id 3.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

-Query took 0.0017 sec

Total for the first yet less code work: 0.0950 sec.

Total for the second yet more code work: 0.0036 sec.

Now imagine this with a larger more appropriate table for users of a game (occasionally reaching 2000+).

Edited by Djkanna
Posted

Just realized I had kept this check in there (Was using it for testing purposes):

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Fixed it in both versions.

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