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 2008-12-06 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
December 06, 2008, 12:24:47 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Hall of Fame-Designer
Must Visit it
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: player_victim/player_attacker  (Read 78 times)
Luthic
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



« on: March 05, 2008, 03:01:19 AM »

If I wanted to reverse the effects of the Shadow Hunter's skill that slows enemies down (Want players to be slowed when attacking the player, instead the player slowing someone when attacking them), would a quick manipulation of the Shadow Hunter's code work? Replacing all "attacker" instances with "victim"?

Code pulled from this thread:
http://www.warcraft-source.com/board/index.php?topic=3233.0

Code
GeSHi (eventscripts):
  "skill2_setting"    "es_xset wcs_speed 0.75;es_xset wcs_duration 2|es_xset wcs_speed 0.65;es_xset wcs_duration 3|es_xset wcs_speed 0.60;es_xset wcs_duration 4|es_xset wcs_speed 0.55;es_xset wcs_duration 5|es_xset wcs_speed 0.55;es_xset wcs_duration 6"
   "racealias_sh2"     "es est_speed event_var(attacker) server_var(wcs_speed);es_delayed server_var(wcs_duration) wcs_removefx speed event_var(attacker);wcs_getlanguage wcs_lng wcs_lng_r_slowdown;es_tell event_var(attacker) #multi #green : event_var(es_attackername) server_var(wcs_lng) #green event_var(es_username).;es_tell event_var(attacker) #multi #green : event_var(es_attackername) server_var(wcs_lng) #green event_var(es_username)."
   "skill2_cmd"        "if (server_var(wcs_dice) <= 30) then est_isalive wcs_alive event_var(attacker);if (server_var(wcs_dice) <= 30) then es_xif (server_var(wcs_alive) = 1) then racealias_sh2"
   "skill2_sfx"        "if (server_var(wcs_dice) <= 30) then es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);if (server_var(wcs_dice) <= 30) then es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(attacker);es_xmath wcs_z1 + 40;es_xmath wcs_z2 + 40;if (server_var(wcs_dice) <= 30) then est_effect 3 #a 0 sprites/yellowflare.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 1 5 5 0 0 255 255"
 
Logged
HOLLIDAY
<Race Maker>
Watchdogs
Level 7 Expert
*****
Offline Offline

Posts: 1907



WWW
Wc3_HOLLIDAY_Wc3
wc3hollidaywc3

myServer 8.2.0.222:27015
(Warning: click connects through Steam)
« Reply #1 on: March 06, 2008, 07:28:18 AM »


just change the skill_cfg from player_attacker to player_victim

and change event_var(userid) to event_var(attacker)


edit :  i now notice that you already have the code....you want to know if it will work?
Logged


  connect 8.2.0.222:27015
Luthic
Level 1 Trained Beginner
*
Offline Offline

United States United States

Posts: 25



« Reply #2 on: March 07, 2008, 06:04:19 AM »

Hey Holliday, thanks for the reply. From what I understand the code I posted above will slow players that are shot. If I just change the skillcfg, that will reverse the effect? Also I don't see an instance of event_var(userid).
Logged
HOLLIDAY
<Race Maker>
Watchdogs
Level 7 Expert
*****
Offline Offline

Posts: 1907



WWW
Wc3_HOLLIDAY_Wc3
wc3hollidaywc3

myServer 8.2.0.222:27015
(Warning: click connects through Steam)
« Reply #3 on: March 07, 2008, 08:45:36 AM »

what you have will slow the player that is shooting
you want it to be player_victim so that when someone shoots you they get slowed down,if you use it as player_attacker then it will slow you down when you shoot someone


i didnt look at the skill at first so i was saying to change event_var(userid) to event_var(attacker)

but thats already been done in the skill you posted
it does exactly what you want it to,
« Last Edit: March 07, 2008, 08:49:01 AM by HOLLIDAY » Logged


  connect 8.2.0.222:27015
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
December 04, 2008, 09:57:56 PM
gg
December 04, 2008, 09:46:16 PM
hey guys, how are you?
gonna sleep, cya tomorrow
December 03, 2008, 12:45:48 PM
@ bombkill : all mods should be compatible with WCS... but we can't be sure
@retrokboy : css server? provider? other mods?
December 03, 2008, 01:49:25 AM
I NEED SERVER HELP MY FORUM IS IN BUG REPORT PLEASE REPLY I NEED HALP
December 02, 2008, 10:05:01 PM
does anyone know where all the wcs compatible mods are listed or a website i can find them
December 02, 2008, 08:24:47 PM
/agree
Recent
[Today at 09:15:37 AM]

[Today at 08:33:01 AM]

[Today at 12:26:04 AM]

[December 05, 2008, 10:26:03 PM]

[December 05, 2008, 08:10:32 PM]

[December 05, 2008, 07:51:01 PM]

[December 05, 2008, 07:33:12 PM]

[December 05, 2008, 07:11:25 PM]

[December 05, 2008, 06:44:09 PM]

[December 05, 2008, 12:14:07 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.083 seconds with 27 queries.