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-10-20 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
October 20, 2009, 08:03:26 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: WCS Tournament being opened for applications!

Post here for signups!
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1] 2   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: Re: Making items based off KDR  (Read 517 times)
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2621


Big Berettonawak is watching you...


WWW
Bifkids
« on: January 14, 2009, 06:59:28 PM »

est_getkills
est_getdeaths
es_math
Tongue
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« Reply #1 on: January 25, 2009, 05:33:35 PM »

Okey so I actually tried doing this little KDR thingy but when you have 0 deaths it wont tell you the KDR since it apperantly can't divide by 0.... any could help me out just a little? I kind of suck at coding Cheesy

This works when the play died once or more

Code
GeSHi (eventscripts):
es_xset temp 0;es_xset temp2 0;es est_GetKills temp event_var(userid);es est_GetDeaths temp2
 
event_var(userid);es_math temp / server_var(temp2);es_tell event_var(userid) Your KDR is: server_var(temp);if (server_var(temp) >= 4) then
 
es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1

This is the what it says when you got 0 deaths and 1 kill --> Your KDR is : 1.#INF00
« Last Edit: January 25, 2009, 05:47:59 PM by [kmz]kamikaze » Logged
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« Reply #2 on: January 29, 2009, 02:30:01 PM »

BUMP

Anyone???
Logged
Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #3 on: January 29, 2009, 03:00:35 PM »

BUMP

Anyone???
use rounddecimal with a 2 then you should get 1.00
Logged

Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #4 on: January 29, 2009, 07:29:26 PM »

stop hijacking his topic make ur own !
its still the same question Tongue
Logged

Rasmus
Trapped in between
Level 7 Expert
*****
Offline Offline

Denmark Denmark

Posts: 1475




Rasmus4J
rasmus4j
« Reply #5 on: January 29, 2009, 07:48:08 PM »

est_getkills
est_getdeaths
es_math
Tongue

just one problem Tongue
if kills or deaths are less than 1 then it will give you 0 as kdr Wink

you might want a check for a specific amount of kills and/or deaths (like mani where you can set it to start giving rank after e.g. 10 kills)
Logged

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!"
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2621


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #6 on: May 22, 2009, 02:37:09 PM »

then use ifx true Smiley
www.eventscripts.com/pages/Ifx
Ifx true will only run the code if var != 0 Smiley
so ifx true(deaths) do
{
  es_math kills / deaths
}
Smiley
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« Reply #7 on: May 23, 2009, 03:54:55 PM »

Sry but im quite not following you :S like I said its been awhile =) could you please put it in the code I made? would really appreciate it, Ive tried alot of different things... I tried that ifx true(deaths) != 0 do es_xdelayed 1 es est_cash event_var(userid) + 10000
but that didnt really help :S Im probably doing it wrong but im not really that good at coding, in always learning a little bit at the time
Logged
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« Reply #8 on: May 23, 2009, 05:16:13 PM »

uhm not really Cheesy cause that cant be done Cheesy well basicly somekind of workaround so it can count the KDR even if deaths are 0... so if you got 5 kills and 0 deaths it should say your KDR is 5... its really complicated but it shouldnt be impossible cause I think its been done on all ranking systems like mani_admins rank and so on

Im trying to reach out to the eventscripts forums aswell :S

NEVERMIND I FOUND THE SOLUTION Cheesy

Code:
es_setinfo temp 0;es_setinfo temp2 0;es est_GetKills temp event_var(userid);es est_GetDeaths temp2 event_var(userid);es_math

temp / server_var(temp2) if server_var(temp2) == 0 then es_math temp / 1;es_tell event_var(userid) Your KDR is: server_var(temp);if

(server_var(temp) >= 4) then es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1;if (server_var(temp) <= 3.9) then es_xdelayed 1 es est_cash

event_var(userid) + 10000

NOW ENJOY
« Last Edit: May 23, 2009, 05:31:34 PM by [kmz]kamikaze » Logged
Stinkyfax
I <3 WCS
Level 7 Expert
*****
Offline Offline

United Kingdom

Posts: 1890



WWW
Xrushiov

myServer 84.55.62.45:27016
(Warning: click connects through Steam)
« Reply #9 on: May 23, 2009, 05:37:11 PM »

uhm not really Cheesy cause that cant be done Cheesy well basicly somekind of workaround so it can count the KDR even if deaths are 0... so if you got 5 kills and 0 deaths it should say your KDR is 5... its really complicated but it shouldnt be impossible cause I think its been done on all ranking systems like mani_admins rank and so on

Im trying to reach out to the eventscripts forums aswell :S

NEVERMIND I FOUND THE SOLUTION Cheesy

Code:
es_setinfo temp 0;es_setinfo temp2 0;es est_GetKills temp event_var(userid);es est_GetDeaths temp2 event_var(userid);es_math

temp / server_var(temp2) if server_var(temp2) == 0 then es_math temp / 1;es_tell event_var(userid) Your KDR is: server_var(temp);if

(server_var(temp) >= 4) then es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1;if (server_var(temp) <= 3.9) then es_xdelayed 1 es est_cash

event_var(userid) + 10000

NOW ENJOY
try: if( server_var(temp2) == 0) then temp2 = 1; ....
Logged



CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2621


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #10 on: May 24, 2009, 09:26:06 AM »

Actually none of that works... if I make temp2 = 1 then its staying as 1 forever.... so it will never get the deaths afterwards

I tried so many different ways but it doesnt count the KDR if I add more then 1 es_math it just takes the server_var(temp) which is set as kills... Ive tried like 50 ways with IF

I thought I had it done but I didnt completly test it I suppose... just saw it said your kdr is 0 which made me jump of joy lol...

Anyone got any ideas?
Show whole code when you say something doesn't work Sad
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« Reply #11 on: May 24, 2009, 03:00:35 PM »

Code:
es_setinfo temp 0;es_setinfo temp2 0;es est_GetKills temp event_var(userid);es est_GetDeaths temp2 event_var(userid);es_math

temp / server_var(temp2) if server_var(temp2) == 0 then es_math temp / 1;es_tell event_var(userid) Your KDR is: server_var(temp);if

(server_var(temp) >= 4) then es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1;if (server_var(temp) <= 3.9) then es_xdelayed 1 es est_cash

event_var(userid) + 10000

Maybe it would be easier to make it to an block instead Tongue

yeah I know its not impossible but I've run out of ideas... sat up from 00.00 to 06.00 this morning..
I could of easily just failed with 1 small thing.. and im not really that great on coding like you guys, im a real beginner thats why im trying so hard to learn all the time but then I just hit the roadblocks like this Tongue
Logged
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2621


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #12 on: May 24, 2009, 07:13:10 PM »

Code:
es_setinfo temp 0;es_setinfo temp2 0;es est_GetKills temp event_var(userid);es est_GetDeaths temp2 event_var(userid);es_math

temp / server_var(temp2) if server_var(temp2) == 0 then es_math temp / 1;es_tell event_var(userid) Your KDR is: server_var(temp);if

(server_var(temp) >= 4) then es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1;if (server_var(temp) <= 3.9) then es_xdelayed 1 es est_cash

event_var(userid) + 10000

Maybe it would be easier to make it to an block instead Tongue

yeah I know its not impossible but I've run out of ideas... sat up from 00.00 to 06.00 this morning..
I could of easily just failed with 1 small thing.. and im not really that great on coding like you guys, im a real beginner thats why im trying so hard to learn all the time but then I just hit the roadblocks like this Tongue
how could THAT work?
use that

Code:
es est_GetKills wcs_tmp event_var(userid);es est_GetDeaths wcs_tmp1 event_var(userid);if (server_var(wcs_tmp1) != 0) then es_xmath temp / server_var(temp2);es_tell event_var(userid) Your KDR is: server_var(wcs_tmp);if (server_var(wcs_tmp) >= 4) then es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1;if (server_var(wcs_tmp) <= 3.9) then es_xdelayed 1 es est_cash event_var(userid) + 10000
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« Reply #13 on: May 24, 2009, 08:11:21 PM »

Code:
es est_GetKills wcs_tmp event_var(userid);es est_GetDeaths wcs_tmp1 event_var(userid);if (server_var(wcs_tmp1) != 0) then es_xmath wcs_tmp / server_var(wcs_tmp1);es_tell event_var(userid) Your KDR is: server_var(wcs_tmp);if (server_var(wcs_tmp) >= 4) then
es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1;if (server_var(wcs_tmp) <= 3.9) then es_xdelayed 1 es est_cash event_var(userid) + 10000

This doesnt really work either... still says that error when 0 deaths but if u have 0kills and 0deaths then it says KDR is: -

Logged
CA.Berettonawak
Le renommé méconnu...
Watchdogs
Level 7 Expert
*****
Offline Offline

France France

Posts: 2621


Big Berettonawak is watching you...


WWW
Bifkids
« Reply #14 on: May 25, 2009, 09:13:37 AM »

Haha Smiley
Sorry, didn't really read what i wrote... use this:
Code:
es est_GetKills wcs_tmp event_var(userid);es est_GetDeaths wcs_tmp1 event_var(userid);if (server_var(wcs_tmp1) != 0) then es_xmath wcs_tmp / server_var(wcs_tmp2);es_tell event_var(userid) Your KDR is: server_var(wcs_tmp);if (server_var(wcs_tmp) >= 4) then es_xdelayed 1 wcs_givexp event_var(userid) 100 0 1;if (server_var(wcs_tmp) <= 3.9) then es_xdelayed 1 es est_cash event_var(userid) + 10000
Logged

Quote from: N0life
Beret, keep yourself focusing on 1 project. Be sure to memorize that down since it sounds good.
Quote from: myself
i love tuna juice Cheesy
Quote from: Pietro
=CA= Pietro: back
=CA= Pietro: sorry, was downstair sharing my chocolate with my cat
=CA= Pietro: you should see his face when he ate it xD
Quote from: myself
=CA= Berettonawak: just because you don't have hope doesn't mean we're doomed
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 06:57:29 PM
yeah, more then once O.o
Today at 06:53:12 PM
Ok, any body...
Put your finger up your ass.
When your finger is up your ass, read this under...







Lol, did you do it ?
Today at 06:53:01 PM
Ok, any body...
Put your finger up your ass.
When your finger is up your ass, read this under...




Lol, did you do it ?
Today at 06:16:27 PM
Ehmm can anyone tell how i download this race pack
http://warcraft-source.com/board/index.php/topic,7702.0.html
Today at 05:06:34 PM
Congrats Chuck !
Today at 05:00:20 PM
Today is my Birthday....turn 19
Today at 02:39:45 AM
Or my xfire :loganmcfarland
Recent
[Today at 08:02:27 PM]

[Today at 08:00:09 PM]

[Today at 07:56:39 PM]

[Today at 07:49:58 PM]

[Today at 07:28:30 PM]

[Today at 06:51:00 PM]

[Today at 06:31:53 PM]

[Today at 06:15:33 PM]

[Today at 06:14:51 PM]

[Today at 06:13:30 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.155 seconds with 23 queries.