vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   my battle hack (https://vborg.vbsupport.ru/showthread.php?t=41427)

nabeel 07-23-2002 02:54 PM

my battle hack
 
I'm looking for suggestions for an algorithm to use for battling.

I've already finished the challenge system, and I've installed that, just haven't enabled it, because it's kinda useless without the battle hack. I've planned out the coding for the battle hack, it's probably 70% done with planning, I'm integrating the Itemshop and the different classes. I'm thinking of integrating a points system, which won't be hard, just time consuming to code. Itemshop stuff will be used, people can choose different items to go in different "slots".

Any suggestions?

Chris M 07-23-2002 03:03 PM

Hit points?
The More you post, the higher your Hit points go with each Level you climb...
Magical Ability?
The More you post, the more Magical ability you get with each level you climb...

Stuff like that...

Satan

nabeel 07-23-2002 03:15 PM

i was thinking that, but it might be harder.

what im doing now is that as you post, you get points in the item shop, you get items which will be used. you can equip the items.

im also adding a skill tree, you get different points depending on which class, and every x amount of posts, you get x amount of points to spend on skill

Chris M 07-23-2002 03:21 PM

Hmmm...

So what are you doing for a Hit Points system? Surely your members arent Invincible?

Satan

nabeel 07-23-2002 03:27 PM

well ive setup teh basic skill points system, now i need to modify the values for the different classes.

so far ive come up with attack, defense, speed, agility, and they'll all play roles in the algorithm. ive also finished the little thing for every 50 posts, add 3 skill points which they can distribute wherever they want

hit points, itll depen on their attack rating, and the weapons their using (fists, sword, dagger etc)

Chris M 07-23-2002 03:31 PM

Hmmm I see...

It sounds very good!

Are you going to need BETA testers?

*Grins:p*

Satan

nabeel 07-23-2002 03:34 PM

hehe...ive got a few accounts setup for testing...but you can lend me ideas :p

Chris M 07-23-2002 03:42 PM

Hmmm...

I got one!

How about a healing algorithm? Your members surely have to be able to heal...When they buy Elixirs, or other Healing potions, why not have an option where, if they click on the item, a link appears saying "Heal myself!"...It then replaces some or all of the lost HP!

Satan

nabeel 07-23-2002 03:53 PM

yeah thats what i was thinking off too.

ill have a character page where you can set your "loadout", and then use potions and stuff. cool.

almost done with the default skill points, the thing is if you change your class, then the poitns will be reset. i like how that worked out :)

nabeel 07-23-2002 03:58 PM

ok heres where i need help

i have 5 variables:
attack, defense, magic, speed, agility

i help with making an alorithm that uses the 5 to work out something like:

while(challenger_health != 0 || challenged_chealth !=0{
challenger goes:
choose first item
calculate probabilty of hitting
hit
calculate probabilty of challenged moving
get damage taken by challenged (hit - defense)
chellenged goes:
same thing
}

that hard thing would be what kinda of hit....physical or magical. blah, it could be chosen by random

then experience would be calculated, the results but into the challenege table, and status updated

Chris M 07-23-2002 04:15 PM

Hmmm...

Im not sure how I can help without knowing more about the coding itself...

For instance - What are your 5 variables set to do?

Satan

nabeel 07-23-2002 04:15 PM

woohoo! almost done with the stats system, just need the distributing code, which is almost done

nabeel 07-23-2002 04:19 PM

well i have a huge if/elseif changing the stat points for each of the different classes.

actually ill just post it, its easier:

PHP Code:

if($mage != $bbuserinfo[mage]){
        if (
$bbuserinfo[mage] == "0") {            //bystander
            
$attack=0;
            
$defense=0;
            
$magic=0;
            
$speed=0;
            
$agility=0;
        } elseif (
$bbuserinfo[mage] == "1") {    //white mage
            
$attack=2;
            
$defense=1;
            
$magic=3;
            
$speed=2;
            
$agility=1;
        } elseif (
$bbuserinfo[mage] == "2") {    //black mage
            
$attack=2;
            
$defense=1;
            
$magic=2;
            
$speed=2;
            
$agility=1;
        } elseif (
$bbuserinfo[mage] == "3") {    //theif
            
$attack=1;
            
$defense=3;
            
$magic=0;
            
$speed=3;
            
$agility=3;
        } elseif (
$bbuserinfo[mage] == "4") {    //avalanchee
            
$attack=3;
            
$defense=2;
            
$magic=2;
            
$speed=3;
            
$agility=4;
        } elseif (
$bbuserinfo[mage] == "5") {    //bounty hunter
            
$attack=3;
            
$defense=2;
            
$magic=1;
            
$speed=3;
            
$agility=3;
        } elseif (
$bbuserinfo[mage] == "6") {    //eidolonmage
            
$attack=2;
            
$defense=2;
            
$magic=3;
            
$speed=2;
            
$agility=3;
        } elseif (
$bbuserinfo[mage] == "7") {    //exsoldier
            
$attack=4;
            
$defense=3;
            
$magic=1;
            
$speed=3;
            
$agility=4;
        } elseif (
$bbuserinfo[mage] == "8") {    //jenova clone
            
$attack=3;
            
$defense=3;
            
$magic=1;
            
$speed=3;
            
$agility=2;
        } elseif (
$bbuserinfo[mage] == "9") {    //knight
            
$attack=3;
            
$defense=4;
            
$magic=2;
            
$speed=3;
            
$agility=3;
        } elseif (
$bbuserinfo[mage] == "10") {    //seed
            
$attack=2;
            
$defense=2;
            
$magic=2;
            
$speed=1;
            
$agility=2;
        } elseif (
$bbuserinfo[mage] == "11") {    //seed teacher
            
$attack=3;
            
$defense=3;
            
$magic=2;
            
$speed=2;
            
$agility=2;
        } elseif (
$bbuserinfo[mage] == "12") {    //summoner
            
$attack=2;
            
$defense=3;
            
$magic=4;
            
$speed=2;
            
$agility=2;
        } elseif (
$bbuserinfo[mage] == "13") {    //timberowl
            
$attack=3;
            
$defense=2;
            
$magic=2;
            
$speed=3;
            
$agility=3;
        } elseif (
$bbuserinfo[mage] == "14") {    //turk
            
$attack=3;
            
$defense=2;
            
$magic=1;
            
$speed=3;
            
$agility=3;
        }

         
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='".intval($customtitle)."',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]', gender='$gender', mage='$mage', attack='$attack', defense='$defense', magic='$magic', speed='$speed', agility='$agility' WHERE userid='$bbuserinfo[userid]'");
    }
    
// end calculating default
    ///////////////////////////////////////////////////

     
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='".intval($customtitle)."',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',usergroupid='$bbuserinfo[usergroupid]', gender='$gender', mage='$mage' WHERE userid='$bbuserinfo[userid]'"); 

i think ill add a iif() to the query, since that'll shorten it

i think ill also release the stats hack, but the think is im not good with the templates, i just put the code in need into my own page template, i dont bother with the vB templates...so if you can help with that satan, thatd be cool

Chris M 07-23-2002 04:20 PM

Cool...

Any inclining as to what you will be able to do with the hack?

Satan

Chris M 07-23-2002 04:23 PM

That coding is very big lol!

Satan

nabeel 07-23-2002 04:24 PM

lol

umm well with every 50 posts (you can change it), you user gets 3 skill points(you can change that too), and they can be applied towards the skills.

i dunno what you could use it for, but im using it for the battle stuff

Chris M 07-23-2002 04:26 PM

I could help with Templating if you need:)

Satan

nabeel 07-23-2002 04:29 PM

ok cool.

what do you need for it/how does it work?

nabeel 07-23-2002 04:42 PM

alrighti finished 90% of it, im gonna make the instructions for what i have so far, what do you need for the template? im going to start coding that in a few

nabeel 07-23-2002 04:50 PM

actually thinking about it..i might not release it..bah

Chris M 07-23-2002 04:58 PM

Lol...

:(:cry::suicidal: <- :( No smiley for that...Oh wait! :dead::D

Satan

nabeel 07-23-2002 05:00 PM

haha

sorry

you can always join my site tho :)

www.fragblast.com
hehe

okrogius 07-23-2002 06:40 PM

Maybe sell it?

Chris M 07-23-2002 07:06 PM

:)

I may just do that;)

Satan

nabeel 07-23-2002 07:07 PM

hehe cool

sell it? i dunno, maybe one day.

who would buy it though?

Chris M 07-23-2002 07:17 PM

MEEEEEEEEE!

Satan


All times are GMT. The time now is 09:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01511 seconds
  • Memory Usage 1,825KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (26)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete