Author Topic: WCS Update: Requests!  (Read 8136 times)

Offline Icetouch

  • Level 7 Expert
  • *****
  • Posts: 236
  • FreeTimeCoder
    • Superhero Source
Re: WCS Update: Requests!
« Reply #30 on: January 18, 2009, 09:34:15 PM »
well, would be possible, but you have to change several things, will you really make such an effort only for skywalkers?
###############################
Join my Server and experience a new Mod! Click

Or visit superhero-source.com !
################################

Offline Maxxi

  • Level 7 Expert
  • *****
  • Posts: 1486
Re: WCS Update: Requests!
« Reply #31 on: January 18, 2009, 10:15:32 PM »
well, would be possible, but you have to change several things, will you really make such an effort only for skywalkers?
you can just make that if they are in the air that they have an amount of time to fly and then drop down or if they are in the air to long they get slayed

Offline Icetouch

  • Level 7 Expert
  • *****
  • Posts: 236
  • FreeTimeCoder
    • Superhero Source
Re: WCS Update: Requests!
« Reply #32 on: January 19, 2009, 05:50:16 PM »
well, would be possible, but you have to change several things, will you really make such an effort only for skywalkers?
you can just make that if they are in the air that they have an amount of time to fly and then drop down or if they are in the air to long they get slayed

Well, you know what skywalking means?
You are standing on top of an building where you usually can't get.
if you slay them while flying, where's the point? They deactivate the flying if they are on top of the building.
###############################
Join my Server and experience a new Mod! Click

Or visit superhero-source.com !
################################

Offline La Muerte

  • Administrator
  • Level 7 Expert
  • *****
  • Posts: 509
  • 85.234.148.14:27025
    • Counterstrike Combat Crew
Re: WCS Update: Requests!
« Reply #33 on: January 19, 2009, 05:53:51 PM »
Why so much trouble about skywalking? -.- If you dont like skywalkers then fix ur maps so its not possible to skywalk, its not that hard with SDK source.
Stay to the origin of this topic and post nice IDEAS for the wcsmod?!

Offline Icetouch

  • Level 7 Expert
  • *****
  • Posts: 236
  • FreeTimeCoder
    • Superhero Source
Re: WCS Update: Requests!
« Reply #34 on: January 19, 2009, 06:03:03 PM »
Well, someone posted an idea of doing something against the skywalking, and we just discussed if it is possible to stop.
###############################
Join my Server and experience a new Mod! Click

Or visit superhero-source.com !
################################

Offline Maxxi

  • Level 7 Expert
  • *****
  • Posts: 1486
Re: WCS Update: Requests!
« Reply #35 on: January 19, 2009, 06:59:23 PM »
well, would be possible, but you have to change several things, will you really make such an effort only for skywalkers?
you can just make that if they are in the air that they have an amount of time to fly and then drop down or if they are in the air to long they get slayed

Well, you know what skywalking means?
You are standing on top of an building where you usually can't get.
if you slay them while flying, where's the point? They deactivate the flying if they are on top of the building.
i always mix that up sry my bad :P

Offline Namolem

  • Level 6 Experienced
  • *****
  • Posts: 199
Re: WCS Update: Requests!
« Reply #36 on: January 23, 2009, 11:17:30 AM »
Every thing is possible ;)

Offline Rasmus

  • Trapped in between
  • Level 7 Expert
  • *****
  • Posts: 1472
Re: WCS Update: Requests!
« Reply #37 on: January 23, 2009, 11:23:51 AM »
i doubt that everything is possible ;)
where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"

Offline Namolem

  • Level 6 Experienced
  • *****
  • Posts: 199
Re: WCS Update: Requests!
« Reply #38 on: January 23, 2009, 12:20:53 PM »
It seems to work...
1. Open wcs/WCSfunsctions/WCSxp
2. Find block load and add
Code: [Select]
  es_xexists ex command wcs_takelevel
  if (ex == 0) do
  {
es_xregcmd wcs_takelevel wcs/WCSfunctions/WCSxp/wcs_takelevel "wcs_takelevel - usage: wcs_takelevel <userid> <amount> <reason>"
  }
3. Then add to end of file:
Code: [Select]
block wcs_takelevel
{
  if (server_var(wcs_debug) = 1) then profile begin takelevel
  // usage:  wcs_takelevel <userid> <amount> <reason> <forced>
  // userid: give a VALID userid
  // amount: how many level to add
  // reason: text (optional)
  es_xset skill_num 0
  es_xgetargv wcs_takeuserid 1
  es_xgetargv wcs_amount 2
  es_xgetargv wcs_reason 3
  es_exists ex userid server_var(wcs_takeuserid)
  if (server_var(ex) = 1) then es_xexists ex key "WCSuserdata" server_var(wcs_takeuserid)
  // check for bots
  if (server_var(wcs_cfg_allowbotsgetxp) = "0") do
  {
    es_keygetvalue wcs_tmp WCSuserdata server_var(wcs_takeuserid) id
    if ("BOT" in server_var(wcs_tmp)) then es_xset ex 0
  }
  if (server_var(ex) = 1) do
  {
      es_keygetvalue wcs_unused WCSuserdata server_var(wcs_takeuserid) "unused"
      es_keygetvalue wcs_race WCSuserdata server_var(wcs_takeuserid) "race"
      es_keygetvalue skill_num WCSraces server_var(wcs_race) "numberofskills"
      es_keygetvalue wcs_level WCSuserdata server_var(wcs_takeuserid) "level"
      es_keygetvalue wcs_xp WCSuserdata server_var(wcs_takeuserid) "xp"
      es_keygetvalue wcs_total_level "WCSuserdata" server_var(wcs_takeuserid) "total_level"
      if (server_var(wcs_amount) > 0) do
      {
        if (server_var(wcs_total_level) > server_var(wcs_amount)) do
        {
          es_math wcs_total_level - server_var(wcs_amount)
        }
        else do
        {
          es_xset total_level 0
        }
        es_keysetvalue "WCSuserdata" server_var(wcs_takeuserid) "total_level" server_var(wcs_total_level)
        if (server_var(wcs_level) >= server_var(wcs_amount)) do
        {
          es_math wcs_level - server_var(wcs_amount)
          if (server_var(wcs_unused) >= server_var(wcs_amount)) do
          {
            es_math wcs_unused - server_var(wcs_amount)
            es_keysetvalue "WCSuserdata" server_var(wcs_takeuserid) "unused" server_var(wcs_unused)
          }
          else do
          {
            if (server_var(wcs_unused) != 0) do
            {
              es_math wcs_amount - server_var(wcs_unused)
              es_keysetvalue WCSuserdata server_var(wcs_takeuserid) "unused" "0"
            }
            es_xset done 0
            es_xset count server_var(skill_num)
            while "server_var(count) > 0" "es_xdoblock wcs/WCSfunctions/WCSxp/takeskill;es_xmath count - 1"
          }
        }
        else do
        {
          es_xset wcs_level 0
        }
        es_keysetvalue WCSuserdata server_var(wcs_takeuserid) "level" server_var(wcs_level)
      }
      // check for top10
      es_xset wcs_allow "1"
      if ("BOT" in event_var(es_steamid)) then es_xif (server_var(wcs_cfg_allowbotstop10) = "0") then es_xset wcs_allow "0"
      if (server_var(wcs_enabletop10) = "1") then es_xif (server_var(wcs_allow) = "1") then wcs_checktop10 server_var(wcs_takeuserid)
      // nice fx
      es_getplayerprop wcs_dead server_var(wcs_takeuserid) "CCSPlayer.baseclass.pl.deadflag"
      if (server_var(wcs_graphicfx) = "1") do
      {
        if (server_var(wcs_dead) = "0") do
        {
          es_getplayerlocation wcs_x wcs_y wcs_z server_var(wcs_takeuserid)
          es_xmath wcs_z + 50
          es est_Effect 10 #a 0 "sprites/steam1.vmt" server_var(wcs_x) server_var(wcs_y) server_var(wcs_z) 20 50 3 20 5 2 223 54 142 200 1
        }
      }
      if (server_var(wcs_soundfx) = "1") then es_xif (server_var(wcs_dead) = "0") then est_PlayPlayer server_var(wcs_takeuserid) "ambient/machines/teleport3.wav" 0.7
      es wcs_saveplayer server_var(wcs_takeuserid)
  }
  if (server_var(wcs_debug) = 1) then profile end takelevel
}

block takeskill
{
  es_xset cskill 0
  es_xset skill_l 0
  if (server_var(done) = 0) do
  {
    es_format cskill "skill_%1" server_var(count)
    es_keygetvalue skill_l WCSuserdata server_var(wcs_takeuserid) server_var(cskill)
    if (server_var(skill_l) >= server_var(wcs_amount)) do
    {
      es_xset done 1
      es_math skill_l - server_var(wcs_amount)
      es_keysetvalue "WCSuserdata" server_var(wcs_takeuserid) server_var(cskill) server_var(skill_l)
    }
    else do
    {
    es_math wcs_amount - server_var(skill_l)
    es_keysetvalue WCSuserdata server_var(wcs_takeuserid) server_var(cskill) 0
    }
  }
}

How it works:
Like wcs_givelevel, but it decrease player's level. If you try to decrease 5 levels from player with 4, it will decrease 4
Also decreases skill point from unused points (first), then from used skill point, from 1 to N (N - how many skills player has)
Changed color of Beam Ring and sound
« Last Edit: January 23, 2009, 07:23:35 PM by Namolem »

Offline Rasmus

  • Trapped in between
  • Level 7 Expert
  • *****
  • Posts: 1472
Re: WCS Update: Requests!
« Reply #39 on: January 23, 2009, 12:29:06 PM »
but do players then have to re-place their skillpoints? like if they have 3 points on skill 1 and 2 and then 2 on 3, wont that be reset so they have to spend thei points again?
where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"

Offline Namolem

  • Level 6 Experienced
  • *****
  • Posts: 199
Re: WCS Update: Requests!
« Reply #40 on: January 23, 2009, 12:33:56 PM »
I'm not sure that right understand you
Before:
skill1: 5
skill2: 5
skill3: 5
unused: 3

wcs_takelevel userid 10

skill1: 0
skill2: 3
skill3: 5
unused: 0
« Last Edit: January 23, 2009, 01:14:43 PM by Namolem »

Offline Rasmus

  • Trapped in between
  • Level 7 Expert
  • *****
  • Posts: 1472
Re: WCS Update: Requests!
« Reply #41 on: January 23, 2009, 02:17:05 PM »
I'm not sure that right understand you
Before:
skill1: 5
skill2: 5
skill3: 5
unused: 3

wcs_takelevel userid 10

skill1: 0
skill2: 3
skill3: 5
unused: 0

so the skill will just be lower level ? because when you in wcs take 1 level from the player, he will have to re-arrange the skill points again.
where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"

Offline Namolem

  • Level 6 Experienced
  • *****
  • Posts: 199
Re: WCS Update: Requests!
« Reply #42 on: January 23, 2009, 02:21:11 PM »
yes, skill will be lower
How it works:
1) decrease unused_points by wcs_amount,
2) if wcs_amount was more than unused_points it begin to decrease skills:
  it goes by all skills, begining with 1st. Decreases current skill and if it's already 0 begins to decrease next.

Offline Rasmus

  • Trapped in between
  • Level 7 Expert
  • *****
  • Posts: 1472
Re: WCS Update: Requests!
« Reply #43 on: January 23, 2009, 03:26:49 PM »
ok, just a suggestion, wouldn't it be smarter to let it take unused points, and then ultimate and downwards from there?
where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"

Offline Namolem

  • Level 6 Experienced
  • *****
  • Posts: 199
Re: WCS Update: Requests!
« Reply #44 on: January 23, 2009, 04:03:30 PM »
Why?

You can do it by replacing string
Code: [Select]
while "server_var(count) <= server_var(skill_num)" "es_xdoblock wcs/WCSfunctions/WCSxp/takeskill;es_xmath count + 1"with
Code: [Select]
es_set count server_var(skill_num)
while "server_var(count) > 1" "es_xdoblock wcs/WCSfunctions/WCSxp/takeskill;es_xmath count - 1"

but explain why it is smarter
« Last Edit: January 23, 2009, 04:08:30 PM by Namolem »