vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - Realm Conquest System (https://vborg.vbsupport.ru/showthread.php?t=211920)

Sugoi na 05-11-2009 08:49 PM

Quote:

Originally Posted by Tagert (Post 1808910)
Just installed the mod on my forum and the people love it :)
I love it too!
Not sure if this has been mentioned before, but are there any plans on adding like a bribe feature.

Like player xx bribes player yy with xx amount of gold in order for him to join his nation or something like that :P

I am sorry but that would be a terrible addition as #1 people will nation hope just for cash & #2 1 person in a nation doesn't make much of a difference so it would be a waste to "bribe" them to join.

BlueNinjaGo 05-11-2009 09:10 PM

How about the ability to bribe a larger nation not to attack for x amount of turns/hours/days....?

Megatr0n 05-11-2009 09:12 PM

Sugoi na,

You said to "Set your items much lower lol.." in a post earlier to avoid that error that Flowsion mentioned. How would we do this?

Megatr0n 05-11-2009 09:12 PM

Quote:

Originally Posted by Flowsion (Post 1807152)
Also, if you have over a million defence 'Village Overview' doesnt work.

Darkfire122333, know how to resolve this issue? Get a Fatal error and too much memory was being used.

tipoboy 05-11-2009 09:25 PM

Quote:

Originally Posted by Flowsion (Post 1807152)
Also, if you have over a million defence 'Village Overview' doesnt work.

i had over a million defense rating on village overview and had no problem.

Jaxel is there a way to use different image extensions, i'd like to use animated gif's or transparent png's as images, instead of jpegs

thanks mate

Darkfire122333 05-12-2009 12:06 AM

Quote:

Originally Posted by Megatr0n (Post 1808948)
Darkfire122333, know how to resolve this issue? Get a Fatal error and too much memory was being used.

Best advice I can offer is reset the game. Reduce all the values of everything so that it will not add up to a million defense rating...

maybe add a reset feature to the game, that the game resets say.. once per month... giving people a chance to have a fun time playing and not have to battle all the high players all the time. This is just my optinion, it is not a fix, but a work-around.

Quote:

Originally Posted by tipoboy (Post 1808953)
i had over a million defense rating on village overview and had no problem.

Jaxel is there a way to use different image extensions, i'd like to use animated gif's or transparent png's as images, instead of jpegs

thanks mate

I would say open Conquest.php and look for "jpg". I did that, came up with about 7 options, change them all to bmp, or gif or whatever, and should work

DO NOT QUOTE ME ON THAT! I do not have a personal board to do this on, only my public one, and I am personally not going to try this on a running board. Sorry.

Tagert 05-12-2009 06:02 PM

got a few suggestion/additions:

team balance, so people can't just join a team because everyone is joing just that one :P

random team join function

ability to delete/destroy your village and start all over. If you made an error in planning or something :p

BlueNinjaGo 05-12-2009 08:29 PM

Major error.... I went to attack a user who joined in and got a huge error
Quote:

Fatal error:

* The following users were not found:
1. &quot
2. THE&quot
3. TRICKY

Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in [path]/includes/class_dm.php on line 810
#0 vb_error_handler(256,

* The following users were not found:
1. &quot
2. THE&quot
3. TRICKY
That was followed by a huge block of code/arrays that I can't screen shot or copy and paste due to it's length.

I'm assuming it's due to the user having " in his name since I removed " from his username and it works again.


Also, Suggestion: a clock in the conquest system that tells the users how long until the next cycle hits.

rknight111 05-12-2009 09:50 PM

I decided to uninstall the game on my site untill the errors are all fixed. I'll keep an eye on the thread and play on jaxals site. Once its all good I'll reinstall.

Darkfire122333 05-12-2009 09:52 PM

Re-Quoting how to edit so that teams have to be balanced... since people cannot read back few pages ^.^

Quote:

Originally Posted by Collussus (Post 1804652)
I fixed it up the ugly way. No plugins since there's no hooks in his add-on whatsoever, so i'm afraid you're gonna have to dig up the php files....

open up conquest.php

replace the whole
PHP Code:

if ($_REQUEST['do'] == 'enlist')
{
    
$totals =  $vbulletin->db->query_first("SELECT COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_players AS conquest_players
    "
);

    if (!
$totals['playerID']) { $totals['playerID'] = 1; }
    if (!
$totals['pGold']) { $totals['pGold'] = 1; }
    if (!
$totals['pTroops']) { $totals['pTroops'] = 1; }

    
$nations $vbulletin->db->query_read("SELECT conquest_nations.*, COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_nations AS conquest_nations
        LEFT JOIN "
.TABLE_PREFIX."conquest_players AS conquest_players ON conquest_nations.nationID = conquest_players.nationID
        GROUP BY conquest_nations.nationID
    "
);

    while (
$nation $vbulletin->db->fetch_array($nations))
    {
        if (
file_exists($thumbdir.'/nations/'.$nation['nationID'].'.jpg')) { $imageE true; } else { $imageE false; }
        
$nation['AVGplayerID'] = number_format($nation['playerID'] / $totals['playerID'] * 1002);
        
$nation['AVGpGold'] = number_format($nation['pGold'] / $totals['pGold'] * 1002);
        
$nation['AVGpTroops'] = number_format($nation['pTroops'] / $totals['pTroops'] * 1002);
        eval(
'$nationsHTML .= "' fetch_template('conquest_enlist_bit') . '";');
    }

    
$pageNAME $vbphrase['conquest_enlist'];
    eval(
'$conquestHTML .= "' fetch_template('conquest_enlist') . '";'); 

    
$navbits[] = $pageNAME
    
$navbits construct_navbits($navbits); 

    eval(
'$navbar = "' fetch_template('navbar') . '";'); 
    eval(
'print_output("' fetch_template('conquest_SHELL') . '");');


with

PHP Code:

if ($_REQUEST['do'] == 'enlist')
{
    
$totals =  $vbulletin->db->query_first("SELECT COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_players AS conquest_players
    "
);
    if (!
$totals['playerID']) { $totals['playerID'] = 1; }
    if (!
$totals['pGold']) { $totals['pGold'] = 1; }
    if (!
$totals['pTroops']) { $totals['pTroops'] = 1; }

    
$nations $vbulletin->db->query_read("SELECT conquest_nations.*, COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_nations AS conquest_nations
        LEFT JOIN "
.TABLE_PREFIX."conquest_players AS conquest_players ON conquest_nations.nationID = conquest_players.nationID
        GROUP BY conquest_nations.nationID
    "
);
    
$nationsagain $vbulletin->db->query_read("SELECT conquest_nations.*, COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_nations AS conquest_nations
        LEFT JOIN "
.TABLE_PREFIX."conquest_players AS conquest_players ON conquest_nations.nationID = conquest_players.nationID
        GROUP BY conquest_nations.nationID
    "
);
    
$totaleverything = array();
    while(
$nation2 $vbulletin->db->fetch_array($nationsagain))
    {
        
$totaleverything[] = number_format((($nation2['playerID']) + ($nation2['pTroops'])) / ($totals['playerID'] + $totals['pTroops']) * 1002);
        
    }
    
$id 0;
    while (
$nation $vbulletin->db->fetch_array($nations))
    {    
        if(!(
$totaleverything[$id] >= 33))
        {
            if (
file_exists($thumbdir.'/nations/'.$nation['nationID'].'.jpg')) { $imageE true; } else { $imageE false; }
                
$nation['AVGplayerID'] = number_format($nation['playerID'] / $totals['playerID'] * 1002);
                
$nation['AVGpGold'] = number_format($nation['pGold'] / $totals['pGold'] * 1002);
                
$nation['AVGpTroops'] = number_format($nation['pTroops'] / $totals['pTroops'] * 1002);
                eval(
'$nationsHTML .= "' fetch_template('conquest_enlist_bit') . '";');
        }
        
$id ++;
    }
    
    
$pageNAME $vbphrase['conquest_enlist'];
    eval(
'$conquestHTML .= "' fetch_template('conquest_enlist') . '";'); 
    
    
$navbits[] = $pageNAME
    
$navbits construct_navbits($navbits); 

    eval(
'$navbar = "' fetch_template('navbar') . '";'); 
    eval(
'print_output("' fetch_template('conquest_SHELL') . '");');


In this whole code i set it for 3 nations. Which means that if a nation is bigger than 33.33 percent it will not show on the enlist screen anymore.

You can change this setting here:

PHP Code:

if(!($totaleverything[$id] >= 33)) 

I know i fixed this up the ugly way, i'm sure the original maker will know a way to do this the good way. This was just my fast fix.



All times are GMT. The time now is 01:17 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.01840 seconds
  • Memory Usage 1,833KB
  • 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
  • (3)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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