Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Realm Conquest System Details »»
Realm Conquest System
Version: 1.3.0, by Jaxel Jaxel is offline
Developer Last Online: Sep 2013 Show Printable Version Email this Page

Category: Major Additions - Version: 3.8.x Rating:
Released: 04-21-2009 Last Update: 04-28-2009 Installs: 211
DB Changes Uses Plugins
Additional Files  
No support by the author.

This Conquest System is very similar to the vBarmy system, except it has a few specific fundamental changes. Instead of every player working alone to fight other players, players work together as a single nation to fight other players who are members of different nations. Everything else in the system is pretty much self-explanitory.

Product Demo:
http://www.8wayrun.com/conquest.php
Installation Procedure:
  1. Upload all files in the "upload" directory to your forum root.
  2. CHMOD /conquest/nations to 777.
  3. Import the product "product-conquest.xml" in your Product Manager.
Upgrade Procedure:
  1. Upload all files in the "upload" directory to your forum root.
  2. Import the product "product-conquest.xml" in your Product Manager.

Don't forget to click INSTALL!

If you want to donate, I'm all for it... as I'm an unemployed computer programmer...

Download Now

File Type: zip Conquest-1.3.0.zip (208.2 KB, 1187 views)

Screenshots

File Type: jpg conquest-index.jpg (259.9 KB, 0 views)
File Type: jpg conquest-home.jpg (222.8 KB, 0 views)
File Type: jpg conquest-armory.jpg (212.6 KB, 0 views)
File Type: jpg conquest-barracks.jpg (258.6 KB, 0 views)
File Type: jpg conquest-scout.jpg (218.4 KB, 0 views)
File Type: jpg conquest-admin-settings.jpg (238.0 KB, 0 views)
File Type: jpg conquest-admin-nations.jpg (217.8 KB, 0 views)
File Type: jpg conquest-admin-armor.jpg (190.7 KB, 0 views)
File Type: jpg conquest-admin-reset.jpg (217.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
Developerz, kevin.kool

Comments
  #392  
Old 06-29-2009, 10:40 PM
blissend blissend is offline
 
Join Date: Nov 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those interested in adding a trade system, here is my really sloppy attempt and how you can do it. Hopefully the author will consider adding it and that I'm not out of line for posting this 8)

Notes...
  • You can send troops or gold. Simply click the user as if you were to do a raid/spy run. You should see the trade area above the raid/spy run area. You can trade with anyone thus can have traitors
  • It will tax you depending on your size (smaller = no tax, bigger than 2x caps to 76% tax and will only let you send 2x their size in amount). You will see a notice like raid/spy runs show but it won't be seen in history (requires more than adding code to do that me thinks). I also made it cost 5 turns to send gold and 1 to send troops... to lazy to make that editable but its easy enough to change in the code.
  • I leave it to you to figure out how to add this to your code. Not sure if I'm allowed to post my version. Files to edit are function_conquest_village.php, conquest.php and a template modification.
add these functions to function_conquest_village.php
PHP Code:
function run_sendtroops($player$village)
{
    global 
$vbulletin$settings$passcolor$failcolor;
    
    if (
$player[pTurns] < 1)
    {
        return 
'<font color="'.$failcolor.'">You can not trade as you do not have enough turns available.</font>';
    }
    
    
$troops $vbulletin->input->clean_gpc('p'"troopamount"TYPE_UINT);
    
    if (!
is_numeric($troops) && !is_int($troops))
    {
        return 
'<font color="'.$failcolor.'">Please enter an appropriate value.</font>';
    }
    elseif (
$player[pTroops] == 0)
    {
        return 
'<font color="'.$failcolor.'">You can not send troops because you don\'t have any!</font>';
    }
    elseif (
$troops >= $player[pTroops])
    {
        return 
'<font color="'.$failcolor.'">You can not send all of your troops or more than what you have!</font>';
    }

    if (
$player[pTroops] >= ($village[pTroops]*2)) $sendtax .77;
    elseif (
$player[pTroops] >= ($village[pTroops]+1)) $sendtax pow(0.75, (($player[pTroops]/$village[pTroops])*2.5));
    else 
$sendtax 0;
    
    if (
$player[pTroops] > ($village[pTroops]*2) && ($troops > ($village[pTroops]*2)))
    {
        
$troops $village[pTroops]*2;
        
$transferTotal $troops - ($troops $sendtax);
    }
    else 
$transferTotal $troops - ($troops $sendtax);
    
$transferTotal ceil($transferTotal);
    
$troopsLost ceil($troops $sendtax);
    
    
$playerNewTroops $player[pTroops] - $troops;
    
$villageNewTroops $village[pTroops] + $transferTotal;
    
    
// for debugging purposes
    //return '<font color="'.$failcolor.'">FAIL FAIL FAIL ALERT! '
    //.'<br />tax: '.$sendtax
    //.'<br />troops to send: '.$troops
    //.'<br />after tax: '.$transferTotal
    //.'<br />troops lost: '.$troopsLost
    //.'<br />playerNewTotal: '.$playerNewTroops
    //.'<br />villageNewTotal: '.$villageNewTroops.'</font>';
    
    
$newTurnCount $player[pTurns] - 1;
    
    
$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTurns = '".$newTurnCount."' WHERE playerID = ".$player[playerID]."");
    
$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTroops = '".$playerNewTroops."' WHERE playerID = ".$player[playerID]."");
    
$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTroops = '".$villageNewTroops."' WHERE playerID = ".$village[playerID]."");
    
    
//send_notice(1, $player, $village, $lootRatio);
    
    
if($troopLost != 0)
    {
        
$randomMessageChoice mt_rand(1,3);
        switch (
$randomMessageChoice)
        {
            case 
1: return '<font color="'.$passcolor.'">You have sent '.$troops.' troops but '.$troopsLost.' ran away.</font>';


            case 
2: return '<font color="'.$passcolor.'">You have sent '.$troops.' troops but '.$troopsLost.' got lost along the way.</font>';
            default: return 
'<font color="'.$passcolor.'">You have sent '.$troops.' troops but '.$troopsLost.' troops failed to make it there.</font>';
        }
    }
    else return 
'<font color="'.$passcolor.'">You have sent '.$troops.' troops.</font>';
}

function 
run_sendgold($player$village)
{
    global 
$vbulletin$settings$passcolor$failcolor;
    
    if (
$player[pTurns] < 5)
    {
        return 
'<font color="'.$failcolor.'">You can not trade as you do not have enough turns available.</font>';
    }
    
    
$gold $vbulletin->input->clean_gpc('p'"goldamount"TYPE_UINT);

    if (!
is_numeric($gold) && !is_int($troops))
    {
        return 
'<font color="'.$failcolor.'">Please enter an appropriate value.</font>';
    }
    elseif (
$player[pGold] == 0)
    {
        return 
'<font color="'.$failcolor.'">You can not send gold because you don\'t have any!</font>';
    }
    elseif (
$gold $player[pGold])
    {
        return 
'<font color="'.$failcolor.'">You can not send more gold than what you have!</font>';
    }
    
    if (
$player[pTroops] >= ($village[pTroops]*2)) $sendtax .77;
    elseif (
$player[pTroops] >= ($village[pTroops]+1)) $sendtax pow(0.75, (($player[pTroops]/$village[pTroops])*2.5));
    else 
$sendtax 0;

    if (
$player[pTroops] > ($village[pTroops]*2) && ($gold > ($village[pTroops]*2)))
    {
        
$gold $village[pTroops]*2;
        
$transferTotal $gold - ($gold $sendtax);
    }
    else 
$transferTotal $gold - ($gold $sendtax);
    
$transferTotal ceil($transferTotal);
    
$goldLost ceil($gold $sendtax);

    
$playerNewGold $player[pGold] - $gold;
    
$villageNewGold $village[pGold] + $transferTotal;
    
    
// for debugging purposes
    //return '<font color="'.$failcolor.'">FAIL FAIL FAIL ALERT! '
    //.'<br />tax: '.$sendtax
    //.'<br />gold to send: '.$gold
    //.'<br />after tax: '.$transferTotal
    //.'<br />gold lost: '.$goldLost
    //.'<br />playerNewTotal: '.$playerNewGold
    //.'<br />villageNewTotal: '.$villageNewGold.'</font>';
    
    
$newTurnCount $player[pTurns] - 5;

    
$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTurns = '".$newTurnCount."' WHERE playerID = ".$player[playerID]."");
    
$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pGold = '".$playerNewGold."' WHERE playerID = ".$player[playerID]."");
    
$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pGold = '".$villageNewGold."' WHERE playerID = ".$village[playerID]."");
    
    
//send_notice(1, $player, $village, $lootRatio);
    
    
if ($goldLost != 0)
    {
        
$randomMessageChoice mt_rand(1,3);
        switch (
$randomMessageChoice)
        {
            case 
1: return '<font color="'.$passcolor.'">You have sent '.$gold.' gold but '.$goldLost.' was taken as draconian tax.</font>';
            case 
2: return '<font color="'.$passcolor.'">You have sent '.$gold.' gold but '.$goldLost.' was stolen by steelzepplin.</font>';
            default: return 
'<font color="'.$passcolor.'">You have sent '.$gold.' gold but '.$goldLost.' was taxed and lost during the transfer.</font>';
        }
    }
    else return 
'<font color="'.$passcolor.'">You have sent '.$gold.' gold.</font>';

add this check to conquest.php
PHP Code:
// ########################################################################
// IS USER SENDING TROOPS?

if ($village fetch_village($vbulletin->input->clean_gpc('p''sendtroops'TYPE_UINT)))
{
    
$noticeTEXT run_sendtroops($player$village);
    
$player fetch_player($vbulletin->userinfo[userid]);
}

// ########################################################################
// IS USER SENDING GOLD?

if ($village fetch_village($vbulletin->input->clean_gpc('p''sendgold'TYPE_UINT)))
{
    
$noticeTEXT run_sendgold($player$village);
    
$player fetch_player($vbulletin->userinfo[userid]);

modify the conquest_village template for each theme used to have this above the raid/spy run area
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr><td class="tcat" align="center">Trading</td></tr>

<tr><td class="alt1" align="center">
    <table cellpadding="5" cellspacing="0" border="0" width="100%" align="center">
    <tr>
        <td width="50%" valign="top">
            <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
            <tr>
                <td class="thead" align="center">Send Troops</td>
            </tr>
            <tr>
                <td class="alt1" align="center"><form action="$filename?do=village&pid=$village[playerID]" method="post">
                    <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                    <input type="hidden" name="sendtroops" value="$village[playerID]" />
                    <input name="troopamount" type="text" size="10" />
                    <input type="submit" value="Send">
                </form></td>
            </tr>
            </table>
        </td>
        <td width="50%" valign="top">
            <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
            <tr>
                <td class="thead" align="center">Send Gold</td>
            </tr>
            <tr>
                <td class="alt1" align="center"><form action="$filename?do=village&pid=$village[playerID]" method="post">
                    <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
                    <input type="hidden" name="sendgold" value="$village[playerID]" />
                    <input name="goldamount" type="text" size="10" />
                    <input type="submit" value="Send">
                </form></td>
            </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td width="50%" align="center"><strong>Performing a troop trade cost 1 turn</strong></strong></td>
        <td width="50%" align="center"><strong>Performing a gold trade cost 5 turns</strong></strong></td>
    </tr>
    </table>
    
</td></tr>
</table>
It isn't pretty but it works which is all I cared about when doing this.

Just wanted to add thanks for the author for this mod! It is awesome and I have wasted too many hours on it
Reply With Quote
  #393  
Old 06-30-2009, 04:32 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its a shame this has not had any updates in a while. I was beta testing it with my staff but they don't really seem that interested in this because of its lack of features/updates.
Reply With Quote
  #394  
Old 06-30-2009, 11:33 PM
Jaxel Jaxel is offline
 
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for the lack of updates... after a long wait I'm back to programming... working on a different mod right now (because that mod actually makes me money)... but this mod is up next.
Reply With Quote
  #395  
Old 07-01-2009, 12:01 AM
blissend blissend is offline
 
Join Date: Nov 2008
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
Sorry for the lack of updates... after a long wait I'm back to programming... working on a different mod right now (because that mod actually makes me money)... but this mod is up next.
Awesome! I can't wait 8)
Reply With Quote
  #396  
Old 07-01-2009, 07:40 AM
therogueforums's Avatar
therogueforums therogueforums is offline
 
Join Date: Mar 2007
Location: Louisville, KY
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
Sorry for the lack of updates... after a long wait I'm back to programming... working on a different mod right now (because that mod actually makes me money)... but this mod is up next.
Totally understandable looking forward to the updates!
Reply With Quote
  #397  
Old 07-02-2009, 12:49 PM
ged's Avatar
ged ged is offline
 
Join Date: Feb 2005
Location: Istanbul, Turkey
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
Sorry for the lack of updates... after a long wait I'm back to programming... working on a different mod right now (because that mod actually makes me money)... but this mod is up next.
Health first, money second and other mods third.

Good news!
Reply With Quote
  #398  
Old 07-02-2009, 08:43 PM
therogueforums's Avatar
therogueforums therogueforums is offline
 
Join Date: Mar 2007
Location: Louisville, KY
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blissend View Post
For those interested in adding a trade system, here is my really sloppy attempt and how you can do it. Hopefully the author will consider adding it and that I'm not out of line for posting this 8)
Just made the changes, and all seems to be working correctly. Thank you! Hopefully, there will be resources latter on (that provide certain benefits when you have/obtain them), and are trade-able.
Reply With Quote
  #399  
Old 07-03-2009, 08:09 AM
therogueforums's Avatar
therogueforums therogueforums is offline
 
Join Date: Mar 2007
Location: Louisville, KY
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to allow players to switch nations, WITHOUT going into the SQL?
Reply With Quote
  #400  
Old 07-03-2009, 11:05 AM
ged's Avatar
ged ged is offline
 
Join Date: Feb 2005
Location: Istanbul, Turkey
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think Jaxel has noted these suggestions and fixes, am I right Jaxel?
Reply With Quote
  #401  
Old 07-03-2009, 05:51 PM
Dutch_Boy Dutch_Boy is offline
 
Join Date: Dec 2007
Location: The Netherlands
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jaxel View Post
Sorry for the lack of updates... after a long wait I'm back to programming... working on a different mod right now (because that mod actually makes me money)... but this mod is up next.
Great still working on this mod.
Army is dead so i uninstalled it.

Ill give it a try
Reply With Quote
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. The time now is 12:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08954 seconds
  • Memory Usage 2,461KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete