Raised This Month: $51 Target: $400
 12% 

Sven Cooperative Experience Mod [Current Version: 17.0]


Post New Thread Reply   
 
Thread Tools Display Modes
Wrd
Senior Member
Join Date: Jul 2008
Location: The Netherlands
Old 02-11-2011 , 01:57   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #831

I edited the script, look at my previous post
Wrd is offline
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 02-11-2011 , 14:42   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #832

Hi guys. I've again optimized Wrd's last posted sma file.

Tested it under cs, it worked, though I've experienced some interesting stuff( also experienced it in the unpotimized version, so don't blame my optimizations ):
1) Why do I recieve bonus hps and armor at spawn even at level 0? When round begun, I always started with a +8 to hp and a +8 to armor. Also, when a new round begun while I didn't die in the last round, then I again recieved the bonus, having a maximum of +16 bonus.
2) If I create a lan server and get some XP, then disconnect, then recreate the server, my XP gets resetted. Shouldn't it be loaded from vault?

Anyway, here is my version( 17.31.1 ), plus I also include the bit.inc file, which I used for bit manipulations.
Attached Files
File Type: inc bit.inc (3.1 KB, 232 views)
File Type: sma Get Plugin or Get Source (scxpm_wrd.sma - 910 views - 78.0 KB)
Lulu the hero is offline
R4to0.exe
Member
Join Date: Sep 2008
Location: Sao Paulo,Brazil
Old 02-13-2011 , 22:17   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #833

Quote:
Originally Posted by Lulu the hero View Post
Hi guys. I've again optimized Wrd's last posted sma file.

Tested it under cs, it worked, though I've experienced some interesting stuff( also experienced it in the unpotimized version, so don't blame my optimizations ):
1) Why do I recieve bonus hps and armor at spawn even at level 0? When round begun, I always started with a +8 to hp and a +8 to armor. Also, when a new round begun while I didn't die in the last round, then I again recieved the bonus, having a maximum of +16 bonus.
2) If I create a lan server and get some XP, then disconnect, then recreate the server, my XP gets resetted. Shouldn't it be loaded from vault?

Anyway, here is my version( 17.31.1 ), plus I also include the bit.inc file, which I used for bit manipulations.
Do you have tested through mysql too?
R4to0.exe is offline
Send a message via MSN to R4to0.exe Send a message via Skype™ to R4to0.exe
Darkthrone
Senior Member
Join Date: Jun 2009
Old 02-14-2011 , 11:25   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #834

[bug] block attack also temporarily prevents using health charger, medkits and in general temporarily prevents gaining hp

17.31.1 2011-02-12
__________________
all the best for your Zombie:Reloaded server
Auto !zspawn | ZProp | Infinite Ammo | Anti-Doorblock

Darkthrone is offline
Wrd
Senior Member
Join Date: Jul 2008
Location: The Netherlands
Old 02-14-2011 , 15:23   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #835

The bonus hp and armor are the power of the medals. The more medals someone has the more hp and armor they get.
Wrd is offline
makiza
BANNED
Join Date: Mar 2009
Old 02-19-2011 , 20:41   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #836

Code:
02/18/2011 - 22:24:04: Start of error session.
L 02/18/2011 - 22:24:04: Info (map "exhale2platinum") (file "addons/amxmodx/logs/error_20110218.log")
L 02/18/2011 - 22:24:04: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:04: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:04: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:04: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1485)
L 02/18/2011 - 22:24:04: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:04: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:05: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:05: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:05: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:05: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1472)
L 02/18/2011 - 22:24:05: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:05: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:05: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:05: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:05: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:05: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1433)
L 02/18/2011 - 22:24:05: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:05: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:05: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:05: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:05: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:05: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1433)
L 02/18/2011 - 22:24:05: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:05: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:06: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:06: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:06: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:06: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1472)
L 02/18/2011 - 22:24:06: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:06: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:06: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:06: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:06: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:06: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1419)
L 02/18/2011 - 22:24:06: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:06: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:07: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:07: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:07: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:07: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1446)
L 02/18/2011 - 22:24:07: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:07: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:07: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:07: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:07: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:07: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1419)
L 02/18/2011 - 22:24:08: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:08: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:08: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:08: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:08: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:08: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1419)
L 02/18/2011 - 22:24:08: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:08: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:09: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:09: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:09: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:09: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1419)
L 02/18/2011 - 22:24:09: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:09: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
L 02/18/2011 - 22:24:09: [FUN] Item "ammo_sporeclip" failed to create
L 02/18/2011 - 22:24:09: [AMXX] Displaying debug trace (plugin "scxpm_wrd.amxx")
L 02/18/2011 - 22:24:09: [AMXX] Run time error 10: native error (native "give_item")
L 02/18/2011 - 22:24:09: [AMXX]    [0] scxpm_wrd.sma::scxpm_randomammo (line 1433)
L 02/18/2011 - 22:24:09: [AMXX]    [1] scxpm_wrd.sma::scxpm_regen (line 1593)
L 02/18/2011 - 22:24:09: [AMXX]    [2] scxpm_wrd.sma::scxpm_sdac (line 1942)
and it goes and goes....

when this happens it starts to give random ammo each second.

PD:i'm using the 17.31.1 version (the one with the bit.inc).
makiza is offline
Wrd
Senior Member
Join Date: Jul 2008
Location: The Netherlands
Old 02-21-2011 , 03:59   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #837

What server (mod) are you running.
Does the error occure with version 17.31?
Wrd is offline
makiza
BANNED
Join Date: Mar 2009
Old 02-21-2011 , 17:21   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #838

i tested this by myself in svencoop, and i´m not tested that version.
soon i´ll give more info.
makiza is offline
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 02-24-2011 , 22:31   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #839

Okay, Idea! I have an idea.

I think this whole projects needs a big edit. The plugin should be taken into two peaces. In one, would be the functions, handlings and etc for the DATA SAVING part, and the other would be the BONUSES part. And the two sould not be mixed as in currently in the code right now. We should rethink, what is the purpose of the plugin, plan the things ahead, then if prepared, we can start coding. At every new (sub)version something is patched, and two more errors bump up. Let's start it from scratch. Gonna post a code, when I have a basic code to show.
Lulu the hero is offline
Lulu the hero
Senior Member
Join Date: Oct 2009
Location: Budapest, Hungary
Old 02-25-2011 , 00:42   Re: Sven Cooperative Experience Mod [Current Version: 17.0]
Reply With Quote #840

Okay, I've started recreating it from scratch. Implementing the new features is much more easier this way, then patching through the existing plugins.
Some aimed goals in the version:
1) Multilanguage texts - was easy, gonna need translation, though
2) Some minimal effect on players when getting to a new level( like in NS ), to be seen by other players
3) Support for more mods( not just SC and CS ) - an implementation system is created
4) Add/Remove XP according to FRAGS, not just when KILLING - this way, for example in cs, you will get XP for bomb defuse, vip assassination, etc...

If you have some ideas, then please post it here, I will try to implement them.

The question, will it become a brand new plugin? Can this plugin still be called SCXPM, where it is not just for SvenCoop any more? Can I still say : AUTHOR = Silencer, when I rewrite all the code, with least as possible use of the original? If yes, then can I at least increase the major version number to 18.0?

Current code, so you can track, where I am with development, DON'T USE THESE ON SERVERS, UNTIL I GIVE OUT THE FINAL VERSION:
PHP Code:
/*
Used codes:
 - get_user_team fix by ConnorMcLeod ( http://forums.alliedmods.net/showthread.php?t=137996 )

Module/Plugin needs to run this besides the below-defined files:
 - multilingual.amxx

External files:
 - configs/scxpm.cfg
 - data/lang/scxpm.txt
*/

#include <amxmodx>
#include <amxmisc>
#include <bit>
#include <fakemeta>
#include <sqlx>

#pragma semicolon    1
#pragma ctrlchar    '\'

// ===========================================
//   Constants, defines
// ===========================================

#define DEBUG

#define VERSION        "18.0alpha"
#define PROMPT        "[SCXPM]"

// Extra offsets
#define XO_PLAYER    5

// Private data offsets
#define PDO_TEAM    114
#define PDO_DEATHS    444

enum MOD
{
    
MOD_UNIMPLEMENTED,
    
MOD_SVENCOOP,
    
MOD_CSTRIKE,
    
MOD_CZERO,
    
MOD_NS
};

// ===========================================
//   Variables
// ===========================================

new MOD:mod;

new 
msgid_scoreinfo;

// TODO : use enums, to structure data
new frags[32];

// ===========================================
//   Default entry points, initiallers
// ===========================================

public plugin_init()
{
    
register_plugin("SCXPM"VERSION"Lulu the hero");
    
    
register_dictionary("scxpm.txt");
    
    
get_modtype();
    if(
mod == MOD_UNIMPLEMENTED)
    {
        
server_print("%s %L"PROMPTLANG_SERVER"ERROR_MOD_UNIMPLEMENTED"VERSION);
        return;
    }
    
    
init_messages();
    
init_cvars();
    
    
register_event("TeamInfo""event_teaminfo_all""a");
}

public 
plugin_cfg()
{
    new 
file[50];
    
get_configsdir(filecharsmax(file));
    
format(filecharsmax(file), "%s/scxpm.cfg"file);
    if(!
file_exists(file))
    {
        
save_configfile(file);
    }
    else
    {
        
server_cmd("exec %s"file);
    }
}

public 
client_disconnect(id)
{
    
clear_stats(id);
}

public 
init_messages()
{
    
msgid_scoreinfo get_user_msgid("ScoreInfo");
}

public 
init_cvars()
{
    
}

// ===========================================
//   Events, logevents
// ===========================================

public event_teaminfo_all()
{
    new 
id read_data(1);
    if(!
is_user_connected(id)) return;
    
    new 
fr read_data(2);
    new 
oldfr frags[id-1];
    
    if(
oldfr != fr)
    {
        if(
oldfr fr)
        {
            
client_print(idprint_chat"DEBUG: +%d FRAG!"fr oldfrag);
            
        }
        else
        {
            
client_print(idprint_chat"DEBUG -%d FRAG!"fr oldfrag);
        }
        
frags[id-1] = fr;
    }
    
    if(!
is_user_alive(id))
    {
        new 
team get_pdata_int(idPDO_TEAMXO_PLAYER);
        if( 
team != get_user_team(id) )
        {
            
emessage_begin(MSG_BROADCASTmsgid_scoreinfo);
            
ewrite_byte(id);
            
ewrite_short(fr);
            
ewrite_short(get_pdata_int(idPDO_DEATHSXO_PLAYER));
            
ewrite_short(0);
            
ewrite_short(team);
            
emessage_end();
        }
    }
}

// ===========================================
//   Uncategorized
// ===========================================

public clear_stats(id)
{
    
frags[id-1] = 0;
}

public 
save_configfile(file[])
{
    
// TODO: save cvars
}

// ===========================================
//   Stocks
// ===========================================

stock get_modtype()
{
    
mod MOD_UNIMPLEMENTED;
    
    new 
modname[20];
    
get_modname(modnamecharsmax(modname));
    
    if(
equali(modname"svencoop"))
    {
        
mod MOD_SVENCOOP;
    }
    else if(
equali(modname"cstrike"))
    {
        
mod MOD_CSTRIKE;
    }
    else if(
equali(modname"czero"))
    {
        
mod MOD_CZERO;
    }
    else if(
equali(modname"ns"))
    {
        
mod MOD_NS;
    }

Language file: scxpm.txt:
Code:
[en]
ERROR_MOD_UNIMPLEMENTED = Error : This version of SCXPM( %s ) is not implemented for this mod yet!

[hu]
ERROR_MOD_UNIMPLEMENTED = Error : Az SCXPM ezen verzioja( %s ) meg nincs implementalva ehhez a modhoz!
The config file: scxpm.cfg
Is currently empty

Last edited by Lulu the hero; 02-25-2011 at 00:56.
Lulu the hero is offline
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 -4. The time now is 08:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode