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:21:14 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: pit trap?  (Read 203 times)
Optimus Prime
Level 1 Trained Beginner
*
Offline Offline

United Kingdom

Posts: 27




OptimusPrime_
iamtony
« on: January 05, 2008, 10:50:40 PM »

hi all i had an idea to make a hunter type race, and and i was wondering if it was possible to combine a bury skill with a ward to make a pit trap? where its almost impossible to notice and if an enemy walks over it they get buried up to their neck? if its possible id be grateful if one of you could make it perhaps it doesnt dissapear until and enemy has walked on it and they get stuck for 3-5 seconds? 
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 #1 on: January 07, 2008, 04:11:04 PM »

i think it would be a great skill... but it could be cool if the sfx. could do something like really making hole in the map:) and then it if you got trapped you were able to jump up? but the hole would be there to end of round:)
Logged

Wizey
Level 3 Trained Apprentice
***
Offline Offline

United Kingdom

Posts: 66




eden_112
None

myServer 89.145.117.136:27015
(Warning: click connects through Steam)
« Reply #2 on: August 02, 2008, 11:22:17 PM »

Theres a skill that buries people underground but when your under a map you can still see so i guess if you made it an area with a nocollide code for it then it might succeed
Logged

May The Dragons Be With Us
[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 #3 on: August 04, 2008, 08:39:10 AM »

but that would require that the map is made for it, wouldnt it?
i have been making some maps myself, and have seen the possibility to set as nocollide, but never in es?
Logged

Rotgutts
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 292


Krechure Feature



b0n3s212
Merzlin
« Reply #4 on: August 04, 2008, 06:20:54 PM »

I think that would be an awesome skill, but you could just get coordinates to push him out of the trap once the time over 1 person is over such as est_pushto event_var(userid) wcs_x1 wcs_y1 wcs_z1 Or you could simply do a "est_physpush event_var(userid) 0 0 500 then es_xdelayed .1 est_physpush event_var(userid) 0 50 0" I'm not good with physpush, so please, I'm terribly sorry. Remember, only these codes could get him out, not in.
Logged


Join our clan today!
freddukes
WCS ESP Dev Team
Level 7 Expert

Offline Offline

United Kingdom

Posts: 265



« Reply #5 on: August 04, 2008, 08:14:15 PM »

Code
GeSHi (python):
# ../addons/eventscripts/wcs_pitfall/wcs_pitfall.py
import es
import gamethread
import playerlib
 
pitfalls = {}
 
def load():
   if not es.exists('command', 'wcs_pitfall'):
       es.regcmd('wcs_pitfall', 'wcs_pitfall/command', 'wcs_pitfall <attacker> <identifier effected> <x> <y> <z> <radius> [time]')
 
def command():
   if es.getargc() not in (7, 8):
       es.dbgmsg(0, 'WCS ERROR: wcs_pitfall <attacker> <identifier effected> <x> <y> <z> <radius> [time]')
       return
   attacker = int(es.getargv(1))
   ident      = es.getargv(2)
   location  = map(float, [es.getargv(x) for x in range(3, 6)])
   radius     = int(float(es.getargv(6))
   timeHere = None
   if es.getargc() == 8:
       timeHere = float(es.getargv(7))
   pitfalls[attacker] = {'location': location, 'radius': radius, 'ident': ident}
   if timeHere is not None:
       gamethread.delayed(timeHere, player_death, {'userid':attacker})
 
def player_footstep(ev):
   x, y, z = map(float, [ev[x] for x in ('x', 'y' ,'z'))
   for pitfall in pitfalls:
       if int(ev['userid']) not in playerlib.getUseridList(pitfalls[pitfall]['ident']:
           continue
       xx, yy, zz = pitfalls[pitfall]['location']
       if ((x - xx) ** 2 + (y - yy) ** 2 + (z - zz) ** 2) ** 0.5 < pitfalls[pitfall]['radius']:
           es.server.queuecmd('es_xsetpos %s %s %s %s' % (ev['userid'], x, y, z - 50) )
           es.tell(ev['userid'], '#multi', '#green :: #lightgreenPitfall - #defaultYou have been trapped by %s\'s pitfall trap' % es.getplayername(pitfall) )
           es.tell(pitfall, '#multi', '#green :: #lightgreenPitfall - #defaultYou have trapped %s by your pitfall!' % ev['es_username'])
 
def player_disconnect(ev):
   player_death(ev)
 
def player_death(ev):
   userid = int(ev['userid'])
   if userid in pitfalls:
       del pitfalls[userid]
 
def round_end(ev):
   pitfalls.clear()
 

Not tested... All you do is save this at the file location which is in the comment on the first line... You can then use this in keygroup races such as:


Code:
  "#"
{
"name"           "Hunter"
"author"         "freddukes"
"required_level" "0"
"maximum_level"   "0"
"allow_only"     "0"
"teamlimit"       "0"
"preloadcmd"     "0"
"player_spawn_cmd" "0"
"round_start_cmd" "0"
"round_end_cmd"   "0"
"numberofskills" "1"
"numberoflevels" "3"
"skillnames"     "PitFall"
"skilldescr"     "Set A pitfall trap to trap enemies"
"skillcfg"       "player_ultimate"
"skill1_setting" "es_xset radius 50|es_xset radius 100|es_xset radius 200"
"skill1_cmd"     "es_getplayerlocation wcs_x wcs_y wcs_z server_var(wcs_userid);es_getplayerteam wcs_team server_var(wcs_userid); if (server_var(wcs_team) == 2) then wcs_pitfall server_var(wcs_userid) #ct server_var(wcs_x) server_var(wcs_y) server_var(wcs_z); if (server_var(wcs_team) == 3) then wcs_pitfall server_var(wcs_userid) #t server_var(wcs_x) server_var(y) server_var(z)"
"skill1_sfx"     "0"
"ultimate_cooldown" "15"
}
}

The command is:

wcs_pitfall <player who is doing the pitfall> <playerget/set filter ('#all,#t,#ct,!dead') for exaple> <x origin> <y origin> <z origin> [Optional: Time to stay]

If the time to stay is not gave, then it will stay until either the player disconnects, dies, or the round ends

Remember this was not tested, and I wrote it in the "post reply" box, And I hate keygroup coding Lol

-freddukes
« Last Edit: August 04, 2008, 08:16:26 PM by freddukes » 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.09 seconds with 25 queries.