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)
-   -   Add-On Releases - vBArmy - vBulletin Army System (https://vborg.vbsupport.ru/showthread.php?t=208977)

NavS 04-12-2009 01:17 AM

Sorry my fault, it has to be like this... only problem is it won't give you an error, it just wont process it... nother problem is you can still do 1.5 and 2.5 or whatever... however you won't be able to sell nothing and get away with it.

PHP Code:

//****
//Process Selling Items
//****
$att->clean(p,'posted2',str);
if(
$att->clean['posted2']=='yes')
{
    
//begin sell

    
$SellWeaponArray=array();
    
$SellArmorArray=array();

    foreach(
$InventoryWeaponArray as $value)
    {
        
$att->clean(p,"sellweapon$value[id]",uint);
        if(
$att->clean["sellweapon$value[id]"]>1)
        {
            
$SellWeaponArray[$value['itemid']]=$att->clean["sellweapon$value[id]"];
        }
        if(
$att->clean["sellweapon$value[id]"]>$value['quantity'])
        {
            
standard_error("You do not have that many items to sell");
        }
    }

    foreach(
$InventoryArmorArray as $value)
    {
        
$att->clean(p,"sellarmor$value[id]",uint);
        
        if(
$att->clean["sellarmor$value[id]"]>1)
        {
            
$SellArmorArray[$value['itemid']]=$att->clean["sellarmor$value[id]"];
        }
        if(
$att->clean["sellarmor$value[id]"]>$value['quantity'])
        {
            
standard_error("You do not have that many items to sell");
        }
    }

    
//calculate total reimbursement
    
$TotalSellValue=0;
    foreach(
$SellWeaponArray as $key=>$value)
    {
        
$SellValue=0;
        
$SellValue=round($WeaponList[$key]['cost']-$WeaponList[$key]['cost']*$WeaponList[$key]['sellpenalty']/100);
        if(
$SellValue<0)
        {
            
$SellValue=0;
        }
            
$TotalSellValue=$TotalSellValue+$SellValue*$value;
    }
    foreach(
$SellArmorArray as $key=>$value)
    {
        
$SellValue=0;
        
$SellValue=round($ArmorList[$key]['cost']-$ArmorList[$key]['cost']*$ArmorList[$key]['sellpenalty']/100);
        if(
$SellValue<0){
            
$SellValue=0;
        }
        
$TotalSellValue=$TotalSellValue+$SellValue*$value;
    }

    
//give money
    
$NewGoldAmount=$playerinfo['gold']+$TotalSellValue;
    
$data->set(as_user);
    
$data->update(gold,$NewGoldAmount);
    
$data->where(id,$playerinfo['id']);
    
$data->execute(update);
    
//end give money
    //complete order.
    
foreach($SellWeaponArray as $key=>$value)
    {
        
$data->set(as_inventory);
        
$data->select('*');
        
$data->where(playerid,$playerinfo['id']);
        
$data->where(item,'weapon');
        
$data->where(itemid,$key);
        
$SellInfo=$data->execute(select1);

        
$NewQuantity=$SellInfo['quantity']-$value;

        if(
$NewQuantity==0){
            
$data->set(as_inventory);
            
$data->delete();
            
$data->where(playerid,$playerinfo['id']);
            
$data->where(item,'weapon');
            
$data->where(itemid,$key);
            
$data->execute(delete);
        }else{
            
$data->set(as_inventory);
            
$data->update(quantity,$NewQuantity);
            
$data->where(playerid,$playerinfo['id']);
            
$data->where(item,'weapon');
            
$data->where(itemid,$key);
            
$data->execute(update);
        }
    }
    foreach(
$SellArmorArray as $key=>$value)
    {

        
$data->set(as_inventory);
        
$data->select('*');
        
$data->where(playerid,$playerinfo['id']);
        
$data->where(item,'armor');
        
$data->where(itemid,$key);
        
$SellInfo=$data->execute(select1);

        
$NewQuantity=$SellInfo['quantity']-$value;

        if(
$NewQuantity==0)
        {
            
$data->set(as_inventory);
            
$data->delete();
            
$data->where(playerid,$playerinfo['id']);
            
$data->where(item,'armor');
            
$data->where(itemid,$key);
            
$data->execute(delete);
        }else{
            
$data->set(as_inventory);
            
$data->update(quantity,$NewQuantity);
            
$data->where(playerid,$playerinfo['id']);
            
$data->where(item,'armor');
            
$data->where(itemid,$key);
            
$data->execute(update);
        }
    }
    
//end complete order
    
$att->redirect("$att_filename.php?do=armory");
    
//end sell
}
//****
//End Process Selling Items
//**** 


Hornstar 04-12-2009 10:19 PM

It is nice to see this mod progressing since I have tracked this mod for at least the last 3 years when the other coder was making it. But I just wish those last few bugs would be gone so I can install it. Marked as installed and will keep an eye on it.

rob01 04-13-2009 05:05 AM

so how many bugs this version has

and how many security holes

or anything i should now?

Lethal Geass 04-13-2009 08:36 AM

The new version fixes all the bugs recently discovered by users. If you found more bugs let me know.

Sugoi na 04-13-2009 01:57 PM

Can we possibly receive a list of the repaired bugs? I know you said you repaired them all but I want to confirm.

Thanks!

Jaxel 04-13-2009 08:08 PM

1 Attachment(s)
What about the template problems? And do they actually look better now?

I mean, besides the uncached templates, I'm talking about how UGLY this mod looks. This mod doesn't seem to match up correctly with the default VB skin. Attached some screenshots of it displays on my forums...

1. No borders around the mod shell, instead the table for the mod is PADDED...
2. Where did that UGLY gray background come from? It should be alt2, not this default gray.
3. No borders within the mod pages itself. All tables should follow the vb styles.

The third screenshot is how a mod SHOULD look.

Lethal Geass 04-13-2009 10:08 PM

Fixes: Negative values are invalid. Float values i.e 0.5 in buying and selling items are now rounded.

Template problem will be fixed shortly. However its not hard for you to go through yourself and change it where you see it necessary.

atmo5ph3r 04-14-2009 02:37 AM

Quote:

Originally Posted by Lethal Geass (Post 1790580)
Fixes: Negative values are invalid. Float values i.e 0.5 in buying and selling items are now rounded.

Template problem will be fixed shortly. However its not hard for you to go through yourself and change it where you see it necessary.

thanks for fixing, but any upgrade since 21 march ?
there are best idea for better game, we like it :up:;)

rknight111 04-14-2009 05:29 AM

I found a way of the member cheating quite easy and I have alot of members that have discovered this allready. They can click on the link to recruit members and it will add one to there army. Then if you have another computer you can do it again, then after an hour or two you can do this all over again. Is there a quick fix for this so I can stop this.

Otherwise thanks for the game.

Skyrider 04-14-2009 05:32 AM

Quote:

Originally Posted by rknight111 (Post 1790809)
I found a way of the member cheating quite easy and I have alot of members that have discovered this allready. They can click on the link to recruit members and it will add one to there army. Then if you have another computer you can do it again, then after an hour or two you can do this all over again. Is there a quick fix for this so I can stop this.

Otherwise thanks for the game.

You can change this in the admin options menu, to change it from 2 hours to any hour you desire. And this is not exactly a "cheat". You have to gain an army somehow. If people refuse to click the link, you can do it yourself.


All times are GMT. The time now is 10:55 AM.

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.01510 seconds
  • Memory Usage 1,805KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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