Forum

> > CS2D > Scripts > Another weird script...
Forums overviewCS2D overview Scripts overviewLog in to reply

English Another weird script...

3 replies
To the start Previous 1 Next To the start

old Another weird script...

Mami Tomoe
User Off Offline

Quote
When I say weird I mean it's not showing errors on console.
Code >


This script meant to give you a random item when you drop a Gut Bomb / Flare.
But Flare should give you better chances to get good stuff. (Laser,Super Armor...)

It has no errors and that's why I cant fix it myself...

Script: http://www.unrealsoftware.de/files_show.php?file=13191
Made by: @TopNotch
(Some... legal things...)

old Re: Another weird script...

_oops
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mitedGuts = false
UnlimitedFlare = false

addhook("projectile","_projectile")
function _projectile(id,weapon,x,y)
          if (weapon==86) then
               local a = math.random(1,91)
               parse("spawnprojectile "..id.." "..a.." "..x.." "..y.." 16 0")
               if UnlimitedGuts then
                    parse("equip "..id.." 86")
               end
          elseif (weapon==54) then
               local b = math.random(1,91)
               parse("spawnprojectile "..id.." "..b.." "..x.." "..y.." 16 0")
               if UnlimitedFlare then
                    parse("equip "..id.." 54")
               end
        end
end

old Re: Another weird script...

Mora
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
UnlimitedGuts = false

addhook("projectile","_projectile")
function _projectile(id,weapon,x,y)
	if (weapon==86) then
local a = math.random(1,91)
parse("spawnprojectile "..id.." "..a.." "..x.." "..y.." 16 0")
		if UnlimitedGuts then
parse("equip "..id.." 86")
		end
	end
end
(@user _oops: was first)...
this one is works, but i suggest you to change spawnprojectile to spawnitem, bcs if you have to spawn a grenade it's will explode(he/gas/flash/flare etc).
And you don't know how to place end.. -.-

old Re: Another weird script...

Mami Tomoe
User Off Offline

Quote
user _oops has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mitedGuts = false
UnlimitedFlare = false

addhook("projectile","_projectile")
function _projectile(id,weapon,x,y)
          if (weapon==86) then
               local a = math.random(1,91)
               parse("spawnprojectile "..id.." "..a.." "..x.." "..y.." 16 0")
               if UnlimitedGuts then
                    parse("equip "..id.." 86")
               end
          elseif (weapon==54) then
               local b = math.random(1,91)
               parse("spawnprojectile "..id.." "..b.." "..x.." "..y.." 16 0")
               if UnlimitedFlare then
                    parse("equip "..id.." 54")
               end
        end
end


@user _oops: Thanks it worked but on line (1) you needed to write "UnlimitedGuts" not "mitedGuts"

@user Mora: I'm pretty new to scripting
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview