Commit Graph

824 Commits

Author SHA1 Message Date
oiad 9b96ddd2c3 Consolidate ItemKeyXXX/Colors to arrays.
Tidies up scripts inside epoch and for script creators.
Moved z_at_buyItems to epoch_generateKey.
2017-11-19 11:27:02 +13:00
oiad 2f178d8978 Consolidate weapon/magazine/backpack adding to function
This moves a lot of duplicated code from a server side only function
(server_addCargo) to a client/server function called fn_addCargo.
2017-11-19 11:06:00 +13:00
ebayShopper 9d64d318f6 Revert 83dd363, c4816c8
This reverts commits c4816c8 and 83dd363.

These were not errors, oiad did not properly update his dayz_server
before testing.

Renamed variables and added comments to clarify object or position can
be used
2017-11-18 11:39:41 -05:00
oiad c4816c8d18 Fix error from https://github.com/EpochModTeam/DayZ-Epoch/commit/c2d2ad29567a48cee4b50623d7b8b7c50ccfafb9#diff-a36371a7b1009b3a95c359f8b1cfa
Type name error, type Array expected Object
2017-11-18 23:11:18 +13:00
ebayShopper 14a6252911 Fix DZE_BuildHeightLimit behavior
Corrections for #1988
@BigEgg17 abs(_objHDiff) only tells you how much you have raised the
ghost from where it was when you started building. To test the actual
height above ground or sea level you need to use _position select 2.

Say DZE_BuildHeightLimit was 60m and DZE_buildMaxMoveDistance was 20m.
If the player started building at 55m and then raised the object 20m,
they would be allowed to build at 75m with your check.

Also getPosATL should not be used here. For example, I am swimming on
the surface of the water on Napf and getPosATL returns a height of 29m.

@oiad you missed zombie_wildGenerate.sqf in #1987
2017-11-14 13:09:15 -05:00
ebayShopper eefcdf2610 Add basic security checks to object_killed
PVDZ_veh_Save = [_obj,"killed"]; could be abused in the same way as
server_deleteObj (42e0047)
2017-11-13 16:14:22 -05:00
ebayShopper 89d10fc973 Revert "Only allow lock removal if door is unlocked"
This reverts commit b8dba25

As discussed with oiad on Discord, this serves no purpose now, since
DZE_lockDoor == charID means the player either just unlocked, built,
upgraded or downgraded the door, so they want to see the action.
Logically a combo lock can be removed while a door is open. In case of
it being locked, you already know the code, so it is assumed you put it
in before removing it. Completing two-three steps at once is more
convenient for the player.

Also removed _isDestructable because there are no classes which inherit
from "BuiltItems" and have a lock
2017-11-08 14:15:25 -05:00
ebayShopper e1b6125761 Fix Javelin selling and _HasKey check again
@oiad Add the Javelin magazine as trade_items to a trader which only
sells magazines (like FriendlyAssaultRifleAmmo) and the Javelin weapon
as trade_weapons to a trader which only sells weapons (like
FriendlyAssaultRifle), then test your changes from f8a230e with both in
your gear. You will see it allows you to sell all the magazines and the
weapon at both traders. This is because the only condition to add the
item to the sellable array is that it exists as an entry in the
category. It never checks the entry type. This commit will check to make
sure the type matches in the config and the player's inventory.

I changed your static "trade_any_vehicle" to find the type in the
config, because it could also be "trade_any_boat/bicycle/vehicle_free".
Boats are handled differently for the hitpoints check in sellItems.sqf.

Also I noticed that both the _HasKey check and your new _y == _myVehType
check were not working for upgraded vehicles _DZE[1-4] because they had
been swapped out to  _baseVehicle. I forgot to account for that when I
added that feature.

This should resolve both problems. I tested both and everything looks
good. It can do with some more thorough testing though. Note
DZE_SaleRequiresKey is false by default.
2017-11-07 16:53:33 -05:00
ebayShopper c2d2ad2956 Fix remove.sqf error from e079381
Wrecks were not deleted after removal following this change @icomrade

https://github.com/EpochModTeam/DayZ-Epoch/commit/e07938193161ae147523c3a4bae76eecbea787f4#diff-e057d99bdf425219ff82fc6220a85b86L154

In object_upgradeBuilding playerNear was exiting without readding
removed magazines.

I moved deletion back client side in packTent and upgradeStorage for
now, because there is potential for duping via pulling gear out of the
old tent during the deletion delay. PVS can be delayed especially when
the server is under load, so it can take a few seconds for the server to
delete the object after sending the request. These two scripts should be
the only ones where that could be problematic. Packing and upgrading
tents should eventually be moved completely server side like safes.
2017-11-04 14:35:51 -04:00
ebayShopper 42e00475d6 Add sender verification to publish and swap object
Continuation of 8035df0

This is important to have on publish to identify cheaters who spam
create objects in the database or create objects with bad inventory.

- Renamed variables to backport to vanilla
- Removed % and & due to code filtering in publicvariableval.txt

Changes in modular_build.sqf were the same as player_build.sqf.

Tested with building, upgrading buildable/vehicle/tent, downgrading,
buying a vehicle, destroying tent and removing an object.
2017-11-03 16:09:14 -04:00
ebayShopper 97a30adc3b Fix gem sell currency typo
@icomrade Correct me if I'm wrong, but it looks like this was a copy paste typo from https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_calcBuyableList.sqf#L57

in 83694a4
2017-10-25 14:12:01 -04:00
oiad 64b5659bbd Better checks for removing the owner of plots/doors
Revert
https://github.com/EpochModTeam/DayZ-Epoch/commit/f0e87969968646e0ae6e9acbdf7e3fa31a4dfd35

Partial revert:
https://github.com/EpochModTeam/DayZ-Epoch/commit/2f0774d531b950c3ab89ad82b019bd46c0c10ba4#diff-c3aa237d9007054fc3a724116a5d9f1a

This is a better check for removing the owner of plots/doors based on
conversations on discord.
Plot/door owner can remove them selves
plot/door friends can't remove plot owner
plot/door admins can remove anyone
2017-10-24 20:19:21 +13:00
oiad de94cdfb23 Check plot ownership when removing players from plot pole
Additional work for https://github.com/EpochModTeam/DayZ-Epoch/commit/73899d520fd2fe523ad9b0e28618697aa0933364#diff-0cdf3d56b40b62e92b498e7362874f34
This fixes an issue of players removing them selves from a plot so a friend can become plot owner and bypass the original DZE_limitPlots check
2017-10-15 23:53:24 +13:00
BigEgg c00b0ad1af Added build height check to modular_build.sqf 2017-10-07 23:53:20 -05:00
oiad 0aafb1d827 Alter DZE_SafeZonePosCheck to allow custom radii 2017-10-04 21:27:09 +13:00
icomrade e079381931 move deleteVehicle to server 2017-09-26 16:18:47 -04:00
icomrade d750f576ed Prevent Zed + loot spawn in safezones
thanks BaroN for the idea
2017-09-13 12:45:00 -04:00
oiad 50ec89489d Fix auto unlock to function like storage
Safe/lockbox will be able to be auto unlocked after placing due to setting dayz_combination to _combination.
Locked doors use DZE_Lock_Door instead.
2017-09-11 22:51:48 +12:00
oiad 76bafe55ec Fix auto unlock to function like storage
Safe/lockbox will be able to be auto unlocked after placing due to setting dayz_combination to _combination.
Locked doors use DZE_Lock_Door instead.
2017-09-11 22:50:52 +12:00
oiad 27801a111b Fix auto unlock to function like storage
Safe/lockbox will be able to be auto unlocked after placing due to setting dayz_combination to _combination.
Locked doors use DZE_Lock_Door instead.
2017-09-11 22:49:32 +12:00
oiad bc93e246ee Add extra magazine instead of reloading current one
https://github.com/DayZMod/DayZ/commit/e7ffb88075b2e71ef442946af0663ade57ea01c4
2017-09-09 09:22:51 +12:00
icomrade a21f4f797d Merge pull request #1977 from oiad/patch-8
Allow modular buildables to refund defined parts
2017-09-08 10:07:28 -04:00
icomrade 894ea80c16 Merge pull request #1974 from oiad/patch-3
Add support for keeping the key on vehicle sale
2017-09-08 10:04:35 -04:00
oiad cdd0db805f Remove debug lines 2017-09-03 19:27:30 +12:00
oiad 5378b1ad76 Fix random count 2017-09-03 19:18:55 +12:00
oiad 0507563e17 Allow modular buildables to refund defined parts 2017-09-03 19:11:53 +12:00
oiad 7a40f5d621 Add support for keeping the key on vehicle sale 2017-08-30 23:48:48 +12:00
oiad f8a230e3b1 Fix javelin/stinger selling
The previous fix https://github.com/EpochModTeam/DayZ-Epoch/commit/4fa36dfd94b0bbfc63a14bb28035a692101dd1b1 was not working correctly, if you had say the a stinger launcher and a stinger ammo it would detect them both as weapons, this properly classifies them and all others as how they should be.

Moved to use epoch_tempKeys also

This forces the player to only be able to sell a vehicle from the gear menu instead of backpack and vehicle menu since most of the time you would be using add all.

From: https://epochmod.com/forum/topic/44413-prevent-selling-vehicles-from-backpack/?tab=comments#comment-297328
2017-08-26 09:56:28 +12:00
ebayShopper 84556c9d03 Revert group menu color scheme to A2OA default 2017-07-30 12:44:58 -04:00
icomrade 096da756fe Merge branch 'master' of https://github.com/EpochModTeam/DayZ-Epoch 2017-07-29 21:09:26 -04:00
icomrade 8035df0ba0 Rudimentary auth for DeleteObj
limits distance to object, as well as validating random auth key.  added server_deleteObjDirect which is only for direct execution on the server, whereas server_deleteObj should be used for PVEH execution only
2017-07-29 21:09:20 -04:00
oiad 09bfddb46c Remove extra fn_selfActions check for refueling. (#1958) 2017-07-29 17:59:52 -04:00
ebayShopper 635e1e5483 Use alive for gut zombie check #1957
Closes #1957
2017-07-08 15:40:06 -04:00
ebayShopper 75ba14a68d Fix stringtable typo 2017-06-11 17:52:59 -04:00
ebayShopper e0d271671a Remove unused crafting recipes
Vanilla commits:

https://github.com/DayZMod/DayZ/commit/809de6a0a3a968f23b9ef35cc0f051de705094a4

https://github.com/DayZMod/DayZ/commit/93c128085a066932c4070a8070e786ddd5a5401f
2017-06-10 13:06:16 -04:00
ebayShopper abdb3e0e42 Fix survival time not counted after clothes change
Vanilla commits:

https://github.com/DayZMod/DayZ/commit/cf4fde633539a6980f3ca4297cd37c558d4fca03

https://github.com/DayZMod/DayZ/commit/74dd04616f81f580057927bad37be98156a7b123
2017-06-10 10:07:19 -04:00
ebayShopper 48858b2e6c Add medic anim function with proper interrupt
Closes #1386

Vanilla commits
applied:
https://github.com/DayZMod/DayZ/commit/f99a3deced4f4314c4b9a26c1c822e5c5d7f90eb
https://github.com/DayZMod/DayZ/commit/731b957e8e1c3f1bb08474fb397af6165e48a8df

Removed
two unused files and a few variables made redundant by actionInProgress
2017-06-06 15:25:14 -04:00
ebayShopper 78c4ebd597 Add hidden gear display for force saves
Vanilla commits:

https://github.com/DayZMod/DayZ/commit/a4f8690404514431246d99f351aa2d9f459f65a5

https://github.com/DayZMod/DayZ/commit/9170e0f8a0c602efb44a1b419e38ea3eb0dd7f95
2017-04-17 17:04:17 -04:00
oiad 2f0774d531 Forbid removing the plot/door owner from objects (#1948)
This makes it so only the door or plot owner can remove them selves from
doors/plots or the UIDS in
DZE_PlotManagementAdmins/DZE_DoorManagementAdmins.
2017-04-17 13:52:36 -04:00
ebayShopper 78fbd7ac53 Remove some unnecessary translations
Using "Wait for the previous action to complete to perform another" is
more accurate in these cases, because dayz_actionInProgress could have
been set by any action, not necessarily the same one.
2017-04-15 14:19:26 -04:00
ebayShopper e99792d0f4 Update jerry_fill.sqf
Vanilla commit:

https://github.com/DayZMod/DayZ/commit/ef236938c1531e9d7ba8865fdd09bdf006adc979
2017-04-14 11:26:23 -04:00
ebayShopper 9fc72a8b87 Change dayz_survived to actual play time
Vanilla commits:

https://github.com/DayZMod/DayZ/commit/18eaecb19fc1ea26f5769fccd920824bf843e19b

https://github.com/DayZMod/DayZ/commit/b76b1200cabac8661a0628489a128a561f1f379c

https://github.com/DayZMod/DayZ/commit/78ea61e3345e197e9350910b5808d85ef56f7f11

https://github.com/DayZMod/DayZ/commit/8309427f0dc3f7e5a6acd1d5ec1d155cbe11aec5

Should be ready for Hive update @icomrade . If you upload it to a test
folder I'll test it.
2017-04-13 18:35:28 -04:00
ebayShopper 267f34572e Update object_upgradeStorage.sqf
Vanilla commit: 6e4a697
2017-04-13 14:38:07 -04:00
oiad bf6a980d4c Dont show you have the item if it's not nearby (#1937)
* Dont show you have the item if it's not nearby

This was showing you had a vehicle in the trader menu even if it was
over the other side of the map, I think this works better only showing
it if it's within the trader zone.

* Forgot missing operator
2017-04-10 20:03:37 -04:00
ebayShopper 75cf8648d7 Fix error from 95ab6a2 2017-04-05 15:59:15 -04:00
ebayShopper 4b14397c7b Fix purchased boat not spawning on helipad
https://epochmod.com/forum/topic/43644-problem-with-napf-boat-spawn-in-1061/
2017-04-05 15:49:16 -04:00
ebayShopper 95ab6a28ab Fix unable to sell _DZE1-4 cars when base is removed from trader
https://epochmod.com/forum/topic/43643-vehicle-dze4-can-not-be-sell/
2017-04-05 12:04:00 -04:00
ebayShopper b70555e664 Delete added trees after chopping down
Like 496681c, if a tree or plant was added with createVehicle it can be
deleted with deleteVehicle.
2017-04-04 13:55:43 -04:00
ebayShopper 496681cd9b Add support for harvesting added plants
Closes #1928
2017-04-04 13:32:06 -04:00
oiad 088945e074 Remove public variable event handler when using config traders. (#1930)
* Remove public variable event handler when using config traders.

This stops the public variable event handler from being loaded when
you're using config based traders, it's not needed in this situation

* Change nearestObjects to nearEntities in z_checkCloseVehicle.sqf

* Fixes vehicle selling not able to sell correctly

If more than 1 vehicle of the same classname was in a trader and the
local vehicle was further away it would not be able to be sold till
moved closer. We are using DZE_myVehicle for everything and we do
previous checks to make sure it's not null and local so we can assume it
is okay to use.

Fixes
https://epochmod.com/forum/topic/43643-vehicle-dze4-can-not-be-sell/#comment-290036
2017-04-01 13:02:51 -04:00