Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2010-04-12 (original capture). Home · Forum · All archived topics · Downloads

Author Topic: Reverting from v0.77 to v0.75...  (Read 258 times)

Offline Neo.AKFTW

  • Level 0 Beginner
  • Posts: 7
Reverting from v0.77 to v0.75...
« on: February 18, 2008, 05:14:45 AM »
Hi folks,
Wondering if I can safely go back from v0.77 to v0.75 with the same user database (text file). I need the functionality to automatically give new users levels and it is broken in the new release. I would love to keep everyone's xp/levels.
Advice much appreciated.
Neo.AKFTW

*edit* The answer is no, you cannot use the user database from 0.77 with 0.75. I tested it.
So now my question is, who can fix the wcs_cfg_newplayerbonus functionality in 0.77?
I can't strip my players of their levels, as they will surely leave and never come back but I need this functionality.
« Last Edit: February 18, 2008, 05:48:30 AM by Neo.AKFTW »


Offline Stinkyfax

  • I <3 WCS
  • Level 7 Expert
  • *****
  • Posts: 1902
    • WarCraft III Custom races and more Server
Re: Reverting from v0.77 to v0.75...
« Reply #1 on: February 18, 2008, 08:20:57 AM »
many of us can, but we are so lazy.  :roll:



Offline Neo.AKFTW

  • Level 0 Beginner
  • Posts: 7
Re: Reverting from v0.77 to v0.75...
« Reply #2 on: February 18, 2008, 03:40:49 PM »
many of us can, but we are so lazy.  :roll:


Haha touche. If someone could fix this and post the code that would need to be changed, it would be greatly appreciated. A fix would appeal to a great number of people, as I see several threads about this problem (albeit, all with the same extraneous response). I gather it wouldn't take much for one of you folks to fix it. Cheers.

http://www.warcraft-source.com/board/index.php?topic=3116.0
http://www.warcraft-source.com/board/index.php?topic=3070.0

I've noticed in the source for v0.77 that it does not even have the code to support the newplayerbonus. It appears as if, the "fix for new races" was implemented in a hurry, without integrating the newplayerbonus functionality. While the old version would perform a sequence of events if the users race=0 (newplayerbonus) this new version simply sets race=1. Having said that, this could very well be a cut/paste fix for someone who knows a bit more about the sourcecode. Could someone spare 5 minutes to fix this for me and post it up here?
« Last Edit: February 18, 2008, 07:35:55 PM by Neo.AKFTW »


Offline Stinkyfax

  • I <3 WCS
  • Level 7 Expert
  • *****
  • Posts: 1902
    • WarCraft III Custom races and more Server
Re: Reverting from v0.77 to v0.75...
« Reply #3 on: February 18, 2008, 08:16:16 PM »
internet is lagging, no TV there is still no porn shown, i'm bored so i'll have a look right now and try to find out what's wrong.



Offline Stinkyfax

  • I <3 WCS
  • Level 7 Expert
  • *****
  • Posts: 1902
    • WarCraft III Custom races and more Server
Re: Reverting from v0.77 to v0.75...
« Reply #4 on: February 18, 2008, 09:01:33 PM »
after 40 min looking how it's done i think about next:
he made it race "1" insetad of "0" to prevent errors for quering race "0" when it doesn't exist (maybe i'm wrong).
I do not use .77 version and can't test.
Things i can do for u:
recode on your own risk to select race "0" and after choosing race check if last race = 0, if yes => add bonus lvls.
or safe and easy: with first race choosen give to this race (as i understand it will always be undead) extra lvls. Benefitis - safe and without any problems, but person can't choose race to which bonus lvls should be given.



Offline Neo.AKFTW

  • Level 0 Beginner
  • Posts: 7
Re: Reverting from v0.77 to v0.75...
« Reply #5 on: February 19, 2008, 03:29:24 AM »
safe and easy: with first race choosen give to this race (as i understand it will always be undead) extra lvls. Benefitis - safe and without any problems, but person can't choose race to which bonus lvls should be given.


Stinky, it would be amazing if you could do that for me! I'm not really too worried about the user being able to choose which race the free levels go on, undead is fine. Main thing is just to give them a jump start so they have a race to be competitive with. Thanks much!!


Offline Stinkyfax

  • I <3 WCS
  • Level 7 Expert
  • *****
  • Posts: 1902
    • WarCraft III Custom races and more Server
Re: Reverting from v0.77 to v0.75...
« Reply #6 on: February 19, 2008, 02:14:59 PM »
I can't promise if it works, but you may try.
open es_WCSfunctions.txt

insert inside of block codes which are highlited.

block wcs_getplayer
{
if (server_var(wcs_debug) = 1) then profile begin getplayer
  es_xgetargv wcs_uid 1
  es_xgetargv wcs_params 2
  es_exists ex key WCSuserdata server_var(wcs_uid)
  ifx false(ex) do
  {
    if (server_var(wcs_cfg_newplayerbonus) != "0") do
    {
      wcs_getlanguage "wcs_lng" "wcs_lng_newplayerbonus"
      es_format wcs_lng server_var(wcs_lng) server_var(wcs_cfg_newplayerbonus)
      es_delayed 15 wcs_givelevel server_var(wcs_uid) server_var(wcs_cfg_newplayerbonus) server_var(wcs_lng)
    }
  }

  ifx true(ex) do
  {
    es_keygetvalue wcs_id WCSuserdata server_var(wcs_uid) id
    // check for old player record (WCSusers keygroup)
    es_exists ex key WCSusers server_var(wcs_id)
    ifx true(ex) do
    {
wcs_debuglog OLD WCSUSERS FORMAT WCSusers exist
       // get the WCSusers -> WCSuserdata stuff
« Last Edit: February 19, 2008, 02:16:45 PM by Stinkyfax »



Offline Stinkyfax

  • I <3 WCS
  • Level 7 Expert
  • *****
  • Posts: 1902
    • WarCraft III Custom races and more Server
Re: Reverting from v0.77 to v0.75...
« Reply #7 on: February 21, 2008, 07:20:11 PM »
So? Did it work?



Offline Stinkyfax

  • I <3 WCS
  • Level 7 Expert
  • *****
  • Posts: 1902
    • WarCraft III Custom races and more Server
Re: Reverting from v0.77 to v0.75...
« Reply #8 on: February 24, 2008, 10:56:35 PM »
To tell you the truth I don't know. Also i haven't enough time to find mistakes, so - i'm sorry.  :(