Author Topic: Shop Weapon Upgrade  (Read 1137 times)

Offline max42

  • Level 1 Trained Beginner
  • *
  • Posts: 20
Shop Weapon Upgrade
« on: March 06, 2008, 05:38:06 PM »
Hi Guys

Here Are A Few Of The Weapons Upgrades I Have On My Server


Deagle Of Dispair This Weapon Will Deal Extra 100 Dmg Per Hit But Will Stip You Of Other Weapons And Sets Health To 75hp
Code: [Select]
//1
 "weapon1"
  {
  "name"        "Deagle Of Dispair"
  "description" "This Weapon Will Deal Extra 100 Dmg Per Hit \nBut Will Stip You Of Other Weapons \nAnd Sets Health To 75hp"
  "category"    "8"
  "cost"        "10000"
  "level"       "10"
  "dab"         "1"
  "duration"    "1"
  "maxamount"   "0"
  "itemconfig"  "player_attacker"
  "cmdbuy"      "es_delayed 0.1 est_removeweapon event_var(userid) 3;es_delayed 0.1 est_removeweapon event_var(userid) 2;es_delayed 0.1 est_removeweapon event_var(userid) 1;es_delayed 0.2 est_RestrictAll event_var(userid);es_delayed 0.3 est_unrestrict event_var(userid) weapon_deagle;es_delayed 0.4 es_give event_var(userid) weapon_deagle;es_delayed 0.4 es est_SetAmmo event_var(userid) weapon_deagle 1000;es est_sethealth event_var(userid) 75"
  "cmdactivate" "es wcs_dealdamage event_var(attacker) event_var(userid) 100"
  }


Nade Of Plenty This Item Will Give You 5 HEGrenades
Code: [Select]
//2
 "weapon2"
  {
  "name"        "Nade Of Plenty"
  "description" "This Item Will Give You 5 HEGrenades"
  "category"    "8"
  "cost"        "11000"
  "level"       "10"
  "dab"         "1"
  "duration"    "0"
  "maxamount"   "1"
  "itemconfig"  "player_buy"
  "cmdbuy"      "es_delayed 0.2 es_give event_var(userid) weapon_hegrenade;es_delayed 0.2 es est_SetAmmo event_var(userid) weapon_hegrenade 5"
  "cmdactivate" "0"
  }


Mask Of Blindness This Item Will Give You 4 Smoke Grenades
Code: [Select]
//3
 "weapon3"
  {
  "name"        "Mask Of Blindness"
  "description" "This Item Will Give You 4 Smoke Grenades"
  "category"    "8"
  "cost"        "11000"
  "level"       "10"
  "dab"         "1"
  "duration"    "0"
  "maxamount"   "1"
  "itemconfig"  "player_buy"
  "cmdbuy"      "es_delayed 0.2 es_give event_var(userid) weapon_smokegrenade;es_delayed 0.2 es est_SetAmmo event_var(userid) weapon_smokegrenade 4"
  "cmdactivate" "0"
  }


Mask Of Confusion This Item Will Give You 5 Flashbang's
Code: [Select]
//4
 "weapon4"
  {
  "name"        "Mask Of Confusion"
  "description" "This Item Will Give You 5 Flashbang's"
  "category"    "8"
  "cost"        "11000"
  "level"       "10"
  "dab"         "1"
  "duration"    "0"
  "maxamount"   "1"
  "itemconfig"  "player_buy"
  "cmdbuy"      "es_delayed 0.2 es_give event_var(userid) weapon_flashbang;es_delayed 0.2 es est_SetAmmo event_var(userid) weapon_flashbang 5"
  "cmdactivate" "0"
  }


Critical Grenade With This Grenade You Will Deal 100 Extra Damage
Code: [Select]
//5
"weapon5"
  {
  "name"        "Critical Grenade"
  "description" "With This Grenade You Will Deal 100 Extra Damage"
  "category"    "8"
  "cost"        "12000"
  "level"       "10"
  "dab"         "1"
  "duration"    "1"
  "maxamount"   "0"
  "itemconfig"  "player_attacker"
  "cmdbuy"      "es_give event_var(userid) weapon_hegrenade"
  "cmdactivate" "es es_xif (event_var(weapon) in server_var(wcs_wpn_grenades)) then es wcs_dealdamage event_var(attacker) event_var(userid) 100"
  }


Gnomish Assault Rifle This Item Will Give You The G3SG1 With 20 Bullets And 1000 Clip
Code: [Select]
//8
 "weapon8"
  {
  "name"        "Gnomish Assault Rifle"
  "description" "This Item Will Give You The G3SG1 \nWith 20 Bullets And 1000 Clip"
  "category"    "8"
  "cost"        "16000"
  "level"       "45"
  "dab"         "1"
  "duration"    "0"
  "maxamount"   "1"
  "itemconfig"  "player_buy"
  "cmdbuy"      "es_delayed 0.3 est_removeweapon event_var(userid) 1;es_delayed 0.4 es_give event_var(userid) weapon_g3sg1;es_delayed 0.4 es est_SetAmmo event_var(userid) 1 1000"
  "cmdactivate" "0"
  }


Gurubashi Dwarf Destroyer This Item Will Give You The AWP With 10 Bullets And 1000 Clips
Code: [Select]
//9
 "weapon9"
  {
  "name"        "Gurubashi Dwarf Destroyer"
  "description" "This Item Will Give You The AWP \nWith 10 Bullets And 1000 Clips"
  "category"    "8"
  "cost"        "16000"
  "level"       "60"
  "dab"         "1"
  "duration"    "0"
  "maxamount"   "1"
  "itemconfig"  "player_buy"
  "cmdbuy"      "es_delayed 0.3 est_removeweapon event_var(userid) 1;es_delayed 0.4 es_give event_var(userid) weapon_awp;es_delayed 0.4 es est_SetAmmo event_var(userid) 1 1000"
  "cmdactivate" "0"
  }








Offline HOLLIDAY

  • <Race Maker>
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 2384
  • Country: 00
  • of all the things ive lost i miss my mind the most
    • http://holliday.clanservers.com
Re: Shop Weapon Upgrade
« Reply #1 on: March 06, 2008, 06:11:00 PM »
you cant set ammo for grenades, you can only hold one at a time

there are a few ways to do this
you could make a simple script to give grenades in event hegrenade_detonate, grenade_bounce, or weapon_fire (weapon_fire requires noisy)

or give one grenade and es_delay so many seconds and give another one ...ect


or use the existing shopmenu item

Code: [Select]
  "21"
  {
  "name"        "wcs_lng_s_gloves"
  "description" "wcs_lng_s_glovesd"
  "category"    "5"
  "cost"        "2500"
  "level"       "0"
  "dab"         "1"
  "duration"    "0"
  "maxamount"   "2"
  "itemconfig"  "player_buy"
  "shopalias_glv" "es es_xdelayed 3 wcs_giveitem event_var(userid) server_var(wcs_grenade);es es_xdelayed 13 wcs_giveitem event_var(userid) server_var(wcs_grenade);es es_xdelayed 23 wcs_giveitem event_var(userid) server_var(wcs_grenade);es es_xdelayed 33 wcs_giveitem event_var(userid) server_var(wcs_grenade)"
  "cmdbuy"      "es_xsetinfo wcs_grenade 0;es es_xif (server_var(wcs_game) = server_var(wcs_game_css)) then es_xsetinfo wcs_grenade weapon_hegrenade;es es_xif (server_var(wcs_game) = server_var(wcs_game_dods)) then es_xif (event_var(es_userteam) = 2) then es_xsetinfo wcs_grenade frag_us;es es_xif (server_var(wcs_game) = server_var(wcs_game_dods)) then es_xif (event_var(es_userteam) = 3) then es_xsetinfo wcs_grenade frag_ger;shopalias_glv"
  "cmdactivate" "0"
  }


Offline max42

  • Level 1 Trained Beginner
  • *
  • Posts: 20
Re: Shop Weapon Upgrade
« Reply #2 on: March 06, 2008, 06:15:43 PM »
yes you can set the ammo for the grenades using est_SetAmmo event_var(userid) weapon_hegrenade 5 cmd

the reason you can is your setting your ammo not your clip
your clip is what you hold
the ammo is what you have in reserve

you can see this working perfectly on my game server

217.163.24.219:27015

all the above scrip[ts have been tested and work perfectly you can see them working on my server!
« Last Edit: March 06, 2008, 06:19:56 PM by max42 »

Offline HOLLIDAY

  • <Race Maker>
  • Moderator
  • Level 7 Expert
  • *****
  • Posts: 2384
  • Country: 00
  • of all the things ive lost i miss my mind the most
    • http://holliday.clanservers.com
Re: Shop Weapon Upgrade
« Reply #3 on: March 06, 2008, 06:30:43 PM »
possibly, your giving your self 5 grenades, standing in the same spot when firing..lol
1 in your hand 4 on the ground that you pic up one by one after throwing them


Offline max42

  • Level 1 Trained Beginner
  • *
  • Posts: 20
Re: Shop Weapon Upgrade
« Reply #4 on: March 06, 2008, 06:41:25 PM »
ok dood hate to say this but your wrong here is a screenshot i just took off my server


by the statement u make i would have 1 grenade and 4 on floor well here it is 5 in my ammo

by all means check it out urself


« Last Edit: March 08, 2008, 07:00:37 PM by max42 »

Offline lTeam Andresl

  • The Nicest Admin =D
  • Level 0 Beginner
  • Posts: 9
Re: Shop Weapon Upgrade
« Reply #5 on: March 07, 2008, 01:35:50 PM »
Yea this is all fine , so if someone could move it to the finished section please =D

As i am not currently a forum mod, tho ive been asked so ill say yes..

Offline D3vil

  • Level 7 Expert
  • *****
  • Posts: 549
Re: Shop Weapon Upgrade
« Reply #6 on: March 08, 2008, 09:36:42 PM »
nice skills
is it possible to turn those skills into rpg skills?

Offline Espeladden

  • Pwning ultra sexy beastly hot legend
  • Level 7 Expert
  • *****
  • Posts: 590
    • Undead Vengeance
Re: Shop Weapon Upgrade
« Reply #7 on: March 08, 2008, 10:52:19 PM »
Do u mean for the mod rpg?
And if the mod ur talking about is in eventscripts, just fix up the codes a little(If they run wcs commands) then yeah

- Noobzard