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 2009-11-24 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
November 24, 2009, 05:55:54 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Join the new Facebook Warcraft-Source.com Group! It has been currently opened!
Join!
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: No-name item  (Read 1020 times)
Frodo
Level 7 Expert
*****
Offline Offline

Posts: 854


Actinosphaerium eichhorni


WWW
ckenduro
aulix
« on: October 15, 2007, 06:23:26 PM »

Couldn't find a name. I was thinking about EIEM (Easiest Item Ever Made) but it EIEM is not rocking. Find it yourself.

Code:
"32"
  {
  "name"        "write your name here"
  "description" "Get additional score after doing a headshot!"
  "category"    "5"
  "cost"        "10000"
  "level"       "0"
  "dab"         "2"
  "duration"    "1"
  "itemconfig"  "player_spawn"
  "cmdbuy"      "es_keysetvalue WCSuserdata event_var(userid) hiscore 1"
  "cmdactivate" "es_keysetvalue WCSuserdata event_var(userid) hiscore 1"

Bah, you have to modify event player_death.
Find:
Code:
  es es_xif (server_var(wcs_deathcheck) = 1) do
  {
    es es_xexists wcs_exists key WCSuserdata event_var(userid)
    es es_xif (server_var(wcs_exists) = 1) do
    {
Click after last { and hit enter then copy+paste and its almost done.
Code:
      es es_xkeygetvalue wcs_tmp WCSuserdata event_var(attacker) hiscore
      if (server_var(wcs_tmp) = 1) do
      {
        if (event_var(headshot) = 1) then es est_KillAdd event_var(attacker) 1
      }

Now player_spawn, find:

    es es_xkeysetvalue WCSuserdata event_var(userid) "longjump" "0"

Create new string and c&p

Code:
    es es_xkeysetvalue WCSuserdata event_var(userid) "hiscore" "0"


done enjoy  Cheesy
Logged


Actually I found it as best Bux ever. Everything's automated!
HandyManny
Level 0 Beginner

Offline Offline

Posts: 14




Flambo20
« Reply #1 on: October 15, 2007, 07:24:51 PM »

how about "Cheap Shot"
Logged
Frodo
Level 7 Expert
*****
Offline Offline

Posts: 854


Actinosphaerium eichhorni


WWW
ckenduro
aulix
« Reply #2 on: October 15, 2007, 08:31:03 PM »

What your ass has to do with my item?
Logged


Actually I found it as best Bux ever. Everything's automated!
c6464
Guest
« Reply #3 on: October 15, 2007, 08:45:27 PM »

it is a pretty average (hard) skill, woundt call it "easy item"
Logged
Frodo
Level 7 Expert
*****
Offline Offline

Posts: 854


Actinosphaerium eichhorni


WWW
ckenduro
aulix
« Reply #4 on: October 16, 2007, 01:03:27 PM »

Why you say like that? Have you got any proofs that it is easy? I think it is easier than without custom commands in es_wcs.txt, because to make unique item without es_wcs you need many more ideas.

See, i will explain the code.

Code:
"32"
  {
  "name"        "write your name here"
  "description" "Get additional score after doing a headshot!"
  "category"    "5"
  "cost"        "10000"
  "level"       "0"
  "dab"         "2"
  "duration"    "1"
  "itemconfig"  "player_spawn"
  "cmdbuy"      "es_keysetvalue WCSuserdata event_var(userid) hiscore 1"
  "cmdactivate" "es_keysetvalue WCSuserdata event_var(userid) hiscore 1"

cmdbuy
cmdactivate
itemconfig player_spawn

These things are most important. The guy who buys the item is event_var(userid). He will got variable (easiest to explain - where you are at school, you would be es_keysetvalue WCSuserdata event_var(userid) school 1 Smiley )
"hiscore" set to 1. This means:

Code:
      es es_xkeygetvalue wcs_tmp WCSuserdata event_var(attacker) hiscore
      if (server_var(wcs_tmp) = 1) do
      {
        if (event_var(headshot) = 1) then es est_KillAdd event_var(attacker) 1
      }

And that one executes when a player dies. So if someone dies, it does those things: check if attacker (a player who killed another player) got variable "hiscore" set to 1, if its set to 1 - checks if it was a headshot kill (if (event_var(headshot) = 1)), if it was, it executes code es est_KillAdd event_var(attacker) 1 - means the command adds 1 kill to player event_var(attacker) - event_var(attacker) is a player who killed another player so, if he had "hiscore" set to 1, and the kill was headshot, it adds another score (kill)

But, if you will die (so loose your item), there is a problem - you won't get "hiscore" set to 0. So even if you don't have this item, you will get +1 score for each headshot kill. But if you add this code, which executes when a player spawns (player_spawn), you will set it to 0 again. As you can see, item's variable is "hiscore" "1" but any player_spawn items and skills executes codes AFTER setting those things:

Code:
...blablabla....
    es es_xkeysetvalue WCSuserdata event_var(userid) "longjump" "0"
...blablabla...
So if you add this one:
Code:
    es es_xkeysetvalue WCSuserdata event_var(userid) "hiscore" "0"
A player is going to have variable (actually i'm saying variable to make things easier to understand Smiley ) set "hiscore" to "0" and then, the item executes it's code so it is set "hiscore" to "1" so he can start owning again.

I hope i will make a guide which will be better than every other guide. In my opion making copy+paste races isn't good idea Smiley The best idea ever is to have a teacher who will help you understand things are you doing and what you should fix. That's what Stinky did, he teached me Smiley
Logged


Actually I found it as best Bux ever. Everything's automated!
Frodo
Level 7 Expert
*****
Offline Offline

Posts: 854


Actinosphaerium eichhorni


WWW
ckenduro
aulix
« Reply #5 on: October 16, 2007, 09:26:58 PM »

Hiscore is just a kind of name. You set it to don't get owned if there is same name again. You have to make it unique - i think i did.

It adds +1 kill if you get a headshot kill.

And i don't think its harder - why is it harder?
Logged


Actually I found it as best Bux ever. Everything's automated!
Frodo
Level 7 Expert
*****
Offline Offline

Posts: 854


Actinosphaerium eichhorni


WWW
ckenduro
aulix
« Reply #6 on: October 16, 2007, 09:56:23 PM »

What you mean "because you..."

So? Some of you (as i did) think if you modify es_wcs or any other file than shop db and race db you are god and very good.
Logged


Actually I found it as best Bux ever. Everything's automated!
=[LSS]= Soldier
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 538



WWW
Soldier62994
« Reply #7 on: October 16, 2007, 10:01:08 PM »

Umm...I know its not hard to do that...but you said that its the easiest to code, and we were just saying that is not the easiest, theres things that are easier than that
Logged


=[LSS]= NEW Wc3 Server
HOLLIDAY
<Race Maker>
Watchdogs
Level 7 Expert
*****
Offline Offline

Posts: 2288


of all the things ive lost i miss my mind the most


WWW
Wc3_HOLLIDAY_Wc3
wc3hollidaywc3

myServer 8.2.0.222:27015
(Warning: click connects through Steam)
« Reply #8 on: October 17, 2007, 09:26:26 AM »

lol  they both work tho...
Logged

Frodo
Level 7 Expert
*****
Offline Offline

Posts: 854


Actinosphaerium eichhorni


WWW
ckenduro
aulix
« Reply #9 on: October 17, 2007, 01:35:06 PM »

I like to keep smaller things in DBs and bigger things in ultimate, skill and es_wcs files.
Logged


Actually I found it as best Bux ever. Everything's automated!
Morph
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 183



« Reply #10 on: January 13, 2008, 05:03:20 PM »

hehe i was going to do that with killadd and stuff but u beet me to it
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 02:01:50 PM
the saddest part about it, for a second i thought it might have worked : P
Today at 11:34:26 AM
rofl my ass Cheesy
Today at 02:59:08 AM
lol TextNo and Maxxi.... rofl...
November 23, 2009, 05:48:23 PM
!votemute
November 23, 2009, 03:32:12 PM
First script is public :DDDD oO
November 23, 2009, 03:10:38 PM
/voteban
Recent
[Today at 11:34:56 AM]

[Today at 11:02:35 AM]

[Today at 10:51:48 AM]

[Today at 08:43:00 AM]

[Today at 03:36:27 AM]

[Today at 03:31:51 AM]

[Today at 03:11:17 AM]

[Today at 01:09:09 AM]

[Today at 12:44:16 AM]

[November 23, 2009, 11:33:21 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.281 seconds with 23 queries.