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)

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


All times are GMT. The time now is 07:20 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.01174 seconds
  • Memory Usage 1,801KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete