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 2010-02-03 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
February 04, 2010, 12:53:07 AM *
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: Tome of exp based on player KDR  (Read 353 times)
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« on: May 26, 2009, 11:13:25 PM »

This is very good if you have respawn in server and do not want people to gain unfair exp by dying on purpose to buy tome of exp... I got this Idea from another server but their tome wasnt really working when 0 deaths but this one does so ENJOY!

Code
GeSHi (eventscripts):
 "KDRtome100"
 {
 "name"        "KDR tome of exp (min. kdr 4)"
 "description" "You must have atleast a Kill Death Ratio of 4 to buy 100exp"
 "category"    "5"
 "cost"        "10000"
 "level"       "2"
 "dab"         "2"
 "duration"    "0"
 "maxamount"   "1"
 "itemconfig"  "player_buy"
 "cmdbuy"      "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 / 1;if (server_var(wcs_tmp1) >= 1) 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"
 "cmdactivate" "0"
 }

Please comment and tell me what you think of the Idea
Logged
Sasuke[Icetouch]
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 181


FreeTimeCoder


« Reply #1 on: August 13, 2009, 06:21:30 PM »

Well I see the Topic is a bit old, but, partially I like the Idea.
However, the first thing I noticed is, you have to have an KDR over 4.
How the hell are beginners able to get an KDR of 4? They have to have 8/2 or 4/0 stats for that.
Second, why do you overcomplicate the whole thing? Your code confused me a bit, why don't you just set an variable named wcs_kills for est_getKills and one for the deaths? Would be easier to code the whole thing instead of using tmp and tmp1.
In your code you say that: if (server_var(wcs_tmp1) = 0) then es_xmath wcs_tmp / 1
This means, if the Deaths of the Player are 0, you divide the kills with 1. What's the point of that?

Maybe you'll read the response and think over it, or this topic will get lost again Shocked

Greets
Logged

################################
Join our new Server with the newest Mod on it!

################################
[kmz]kamikaze
Level 1 Trained Beginner
*
Offline Offline

Sweden

Posts: 30



« Reply #2 on: October 18, 2009, 09:38:22 AM »

Im not very great on coding but basicly I used est instead of wcs since im more familiar with eventscripts, and the answer to why its KDR 4 is cause i made this for a wcs/zm server Tongue so you get like 3 bonus points for killing a zombie but hey everyone is welcome to change it to please themselfs Cheesy
and yes it has to divide kills with 1 cause if you cant divide kills with 0 it will just give error, this is basicly the easiest way to have it functional... it took me about a week to figure it all out Tongue

this is mostly effective in wcs/zm servers where people die on purpose just to be able to buy tome of exp
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
February 02, 2010, 10:43:30 AM
Yap, he mean eventscripter xD
February 02, 2010, 01:03:48 AM
Eventscripter. lol
February 02, 2010, 12:23:17 AM
A WCS scripter?
February 01, 2010, 06:12:18 PM
izh lookeh for 1 scripter to supp0t me
February 01, 2010, 05:14:04 PM
does anyone had a server problem that skin shows errors because people doesn't get .mdl file download....
February 01, 2010, 01:06:01 PM
Type any est_command in console and it will tell you it's syntax automatically Smiley
February 01, 2010, 12:40:20 AM
whats est_freeze syntax?

Recent
[Today at 12:44:51 AM]

[February 03, 2010, 11:57:35 PM]

[February 03, 2010, 11:17:14 PM]

[February 03, 2010, 10:05:11 PM]

[February 03, 2010, 09:50:54 PM]

[February 03, 2010, 06:40:35 PM]

[February 03, 2010, 05:37:57 PM]

[February 03, 2010, 04:33:23 PM]

[February 03, 2010, 02:30:39 PM]

[February 03, 2010, 09:24:35 AM]
Theme switch

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