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:18:36 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Races and Items added into Download section from our great Race Coders!
Such as HOLLIDAY|NovaKiller|Stinkyfax|Frodo|TeacherCreature|Phat_Wizard
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: Need help with slightly different mind control  (Read 118 times)
Fechin
Level 0 Beginner

Offline Offline

United States United States

Posts: 19



« on: October 16, 2008, 07:05:54 PM »

Alright, so I've seen the code to have a player switch teams by chance on attack. Okay, that's nothing new. I want to get code set up to where the player would have the mind control set to an ability and be able to change a person to their team if the person's level was less than theirs and then it would initiate a cooldown AND give the player exp for a kill. I play regularly on a server that uses this as an ability for Dark Archon (those starcraft fans out there will recognize this) and i was wanting to make myself a nice Jedi race with the same ability as a Jedi Mind Trick kinda thing, ya know? Few questions to get everyone started on helping me and then any bit of code you could me out with would be great.

1.) Since this is a use ability, would I specify it as player_spawn or player_attacker?

2.) How do i set up usable abilities in script? More specifically, what are codes to setup cool downs and whatnot?

3.)After all this is said and done, how would I code in the extra experience?

4.) And how would I do coding to check what the level for the other player is and run it against the level of the player using the ability? I know it's something along the lines of (but not in code form): store player a's level, store player b's level, if b <= a, then run alias for mind control script. But I don't quite no how to enter those variables.

Anything else you would like to add would be greatly appreciated. Here's the original code for the on chance with attack ability. Any tweaking and reposting of code you could do for me would be good too.

Code:
"skill3_setting"    "es_xsetinfo wcs_chance 3|es_xsetinfo wcs_chance 4|es_xsetinfo wcs_chance 5|es_xsetinfo wcs_chance 6|es_xsetinfo wcs_chance 7"
"racealias_en21" "es_xsetinfo wcs_level1 0;es_xsetinfo wcs_level2 0;es_keygetvalue wcs_level1 WCSuserdata event_var(attacker) level;es_keygetvalue wcs_level2 WCSuserdata event_var(userid) level;es_math wcs_level1 - server_var(wcs_level2);if (server_var(wcs_level1) > 0) then racealias_en22; if (server_var(wcs_level1) <= 0) then racealias_en23;racealias_en25"
"racealias_en22" "es_getplayerteam wcs_team event_var(userid);es_xsetinfo wcs_pcount 0;es_getlivingplayercount wcs_pcount server_var(wcs_team);if (server_var(wcs_pcount) > 1) then racealias_en24"
"racealias_en24" "es_keysetvalue WCSuserdata event_var(userid) swap server_var(wcs_team);es ma_swapteam event_var(userid);es_tell event_var(userid) #green You now fight for your enemies due to Enchant skill by event_var(es_attackername). ;es_tell event_var(attacker) #green event_var(es_username) Now fights for you due to Enchant skill. ;racealias_en27"
"racealias_en27" "es est_csay event_var(userid) YOUR TEAM IS SWAPPED;es_delayed 1.5 est_csay event_var(userid) YOUR TEAM IS SWAPPED;es_delayed 3 est_csay event_var(userid) YOUR TEAM IS SWAPPED;es_tell event_var(userid) #green Your team will be swapped back on round end."
"racealias_en23" "es est_speed event_var(userid) 0.8;es es_xdelayed 5 wcs_removefx speed event_var(userid);es_tell event_var(userid) #green you was slowed by Enchant skill ;es_tell event_var(attacker) #green you slowed enemy by Enchant skill "
"racealias_en25" "es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(attacker);es_getplayerlocation wcs_x2 wcs_y2 wcs_z2 event_var(userid);es est_Effect 3 #a 0 effects/strider_pinch_dudv_dx60.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) 8 60 50 255 255 255 205"
    "skill3_cmd"        "if (server_var(wcs_dice) <= server_var(wcs_chance)) then est_IsAlive wcs_alive event_var(userid);if (server_var(wcs_dice) <= server_var(wcs_chance)) then es_xif (server_var(wcs_alive) = 1) then racealias_en21"
    "skill3_sfx"        "0"

Really appreciate the so far with my ideas. Hope you guys can me on this one too
Logged
EvilGenuix
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 226




xF |:. Evil Genuix |A|
« Reply #1 on: October 16, 2008, 10:27:26 PM »

Abilities are coded as player_spawn and then you have to code a block under es_WCSskills.txt. Take a look at the serpent wards there and it follows that sort of scheme.

For xp you mean when they kill someone you get xp, not sure if that is possible?

Evil Genuix
Logged
Fechin
Level 0 Beginner

Offline Offline

United States United States

Posts: 19



« Reply #2 on: October 17, 2008, 07:48:46 AM »

Nah, I meant gaining XP for a successful team swap. I know the whole linking kills back thing isn't workable. Thanks for the input
Logged
EvilGenuix
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 226




xF |:. Evil Genuix |A|
« Reply #3 on: October 17, 2008, 10:43:53 AM »

Oh ok then you would just add into the block to give xp when activated at the same time as switch team, cant remember the exact code look for wcsgivexp in search and it should come up,

Evil Genuix
Logged
[H.F.M.]Rasmus{Chef}
WCS Supporter
Level 7 Expert
*****
Offline Offline

Denmark Denmark

Posts: 889




Rasmus4J
rasmus4j

myServer 85.190.17.115:27015
(Warning: click connects through Steam)
« Reply #4 on: October 17, 2008, 03:30:56 PM »

Oh ok then you would just add into the block to give xp when activated at the same time as switch team, cant remember the exact code look for wcsgivexp in search and it should come up,

Evil Genuix

es wcs_givexp event_var(userid) (amount) 0 0    Cant rememver what the zero zero is for.
Logged

Fechin
Level 0 Beginner

Offline Offline

United States United States

Posts: 19



« Reply #5 on: October 18, 2008, 04:04:23 AM »

Thanks a lot guys. I'll work on the code some tonight and see what I can come up with. I'll post the coding here to see if you have any recommendations on it.
Logged
[H.F.M.]Rasmus{Chef}
WCS Supporter
Level 7 Expert
*****
Offline Offline

Denmark Denmark

Posts: 889




Rasmus4J
rasmus4j

myServer 85.190.17.115:27015
(Warning: click connects through Steam)
« Reply #6 on: October 18, 2008, 07:49:49 PM »

ok.
Logged

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.047 seconds with 25 queries.