Raised This Month: $51 Target: $400
 12% 

[TEST] Hero: Phantom


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 11-07-2011 , 03:00   [TEST] Hero: Phantom
Reply With Quote #1

TEST: Phantom

Description
Get a sword and dual pistols, protect your teammates with the good ring and cause bad luck for enemies with the bad ring.


http://www.superherodb.com/Phantom/10-889/

shconfig.cfg CVARS
Code:
//Phantom
phantom_level 5 //level hero is available
phantom_radius 350 //radius of good luck
Code:
/* Changelog:
* v0.1 BETA - Jelle - 7/11/2011
*      - First beta
* v0.2 BETA - Jelle - 7/11/2011
*      - Changed the way it calculates the luck thanks to G-Dog.
*/
**SuperHero Mod 1.2.0 & up ONLY**

Test version!! I have not yet tested it and do not have time for it. Please report any issues.

To do:
Add announcement when keydown is pressed.
Add announcement when you get good luck from another guy who has phantom.
Add announcement when you get bad luck from phantom.
Clean up code.
Optimize code.
Change description (both here and in the hero itself)
Attached Files
File Type: zip sh_phantom_required_files.zip (456.8 KB, 69 views)
File Type: sma Get Plugin or Get Source (sh_phantom.sma - 590 views - 3.2 KB)
__________________
No idea what to write here...

Last edited by Jelle; 11-07-2011 at 15:24.
Jelle is offline
Send a message via MSN to Jelle
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 11-07-2011 , 10:35   Re: [TEST] Hero: Phantom
Reply With Quote #2

the way you have it now unless damage is greater than 100 you'll get 0 bonus for the luck calculations, because when doing math with integers only, the remainder isn't counted at all. To fix, you can either use floats or do the multiplication before the division i.e. instead of
PHP Code:
sh_add_hp(victimdamage 100 25
you would want either
PHP Code:
sh_add_hp(victimfloatround(damage 100.0 25)) 
or
PHP Code:
sh_add_hp(victimdamage 25 100
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 11-07-2011 , 15:23   Re: [TEST] Hero: Phantom
Reply With Quote #3

Updated, thanks!
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode