Jump to content

Logi

Member
  • Posts

    69
  • Joined

  • Last visited

Posts posted by Logi

  1. I have been playing Epoch for about 3 months and I have never had a tame dog or seen anyone with one. So I thought rather than chasing after one with some raw meat, I would do it the easy way.

    I had no idea how the dogs worked so I just looked at the Epoch files and throw this basic script together. I am sure that it is not perfect and it has only been used for a very short time on my test server.

    I was intending to create some custom scripts for the dog to give it some actual purpose. But I don't really have the time at the moment.

    I did create a little script which made the dog bark every 5 seconds if there was another player or zombie within 100m. But I am sure that there are better uses for the dog.

    You could have a dog spawn when the player spawns or let players buy a dog. There is a dog kennel in the editor.

    On my test server I was just spawning the dog with a bar of gold.

    The script will probably need a bit of tweaking if you are going to put it on a live server.

     

    http://youtu.be/ZPFQltAZTw8

     

    Script.

     

    private ["_hasdog","_type","_pos","_dog","_animalID","_fsmid"];
     
    closedialog 0;
     
    // Check if player currently has a dog
    _hasdog = player getVariable ["dogID", 0];
     
    if (_hasdog == 0) then {
       _type = "DZ_Pastor";
       _Pos = getPosATL player;
     
       // Create dog
       _dog = createAgent [_type, _Pos, [], 0, "NONE"];
       PVDZE_zed_Spawn = [_dog];
       publicVariableServer "PVDZE_zed_Spawn";
       _animalID = [_pos,_dog] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
     
       // Tame dog
       _animalID = _dog getVariable "fsm_handle";
       _animalID setFSMVariable ["_isTamed", true]; 
       _dog disableAI "FSM";
       (group _dog) setBehaviour "AWARE";
       _fsmid = [_dog, typeOf _dog] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
       _fsmid setFSMVariable ["_handle", _fsmid];
       player setVariable ["dogID", _fsmid];
       _dog setVariable ["fsm_handle", _fsmid];
       _dog setVariable ["CharacterID", dayz_characterID, true];
     
       systemChat "Your dog has been spawned!";
    } else {
       systemChat "You already have a dog!";
    };

  2. Does it show all the vehicles with the same key or just one? on my server it only shows the last vehicle i bought andchanged the key :\

     

    At the moment the current release of the script only detects a single vehicle for each key. I have been meaning to update the script but I have been busy and forgot.

    I have just done a quick mod that should work for people using the vehicle key changer script.

    This is not an update to the script, it is just an alternative for now.

     

    This will not let players search with multiple keys in their toolbelt like the original script, it will only search with a single key. But it should find all vehicles associated with that key.

    You can just replace the locate_vehicle.sqf with the one from this file. But it has only been tested for a couple of minutes on my test server.

    https://drive.google.com/folderview?id=0B95EyIoSuUF0WkJxTHNLTk5kTkE&usp=sharing

  3. What are you adding the map markers for?

    If you are wanting permanent markers for a new trader city or something like that, then you should just add them in your mission.sqm, not via the editor.

    In your mission.sqm find the class Markers, underneath that you will see items=17; This is the number of markers.

    If you add a new marker, then you must increase the items number by 1.

    Underneath you will see all the markers. Add your new marker at the bottom of the Marker class. This is my black market map marker to give you an example.

    class Item17{

    position[]={4157.0.514,79,8310.75};

    name="BlackMarketTrader";

    text="Black Market Trader";

    type="mil_circle";

    colorName="ColorOrange";

    };

  4. I prefer to use this web based script: 

     

    Anyways it will not collide with any anti cheat system or bring in more security breaks. Also you can make a password on and use this for Donators - it does not sell anything ingame related!

    Greets

     

    I did see your web based tool, but I thought an in-game solution would be a lot better.

    Also isn't your web tool only for admin and only for Chernarus?

  5. Yes I have actually. Version 2.0 will have the option for scroll menu, GUI (kind of like infistar, but better construction), or both. The tool will be completely rewritten for better stability, efficiency, and usability. The general gui that you showed for the house spawn is one idea I had as well. Are you just adding the items one by one or are you pulling it from the actual epoch files? I plan to pull it from the epoch files as it will be much faster to code. My current method is incredibly tedious to code.

     

    That is good to hear. I do like using the scroll menu for certain tasks. I will be looking forward to version 2.0.

    I just pulled all of the data from the epoch files and then excluded certain items. For example from Cfgweapons I had to exclude all of the vehicle keys otherwise it added 12500 keys to the list and took ages to load.

    Some items such as the player skins may be better to load from a pre-defined array, but for the buildings you are probably best to pull them all from the config file. Its quicker and requires a lot less code.

     

    Edit

     

    I have just had a look at the files now and by using the graphical menus, I have reduced the AdminToolsMain.sqf from around 750 lines to less than 250, whilst increasing the items available to spawn.

    This would make it more manageable and less daunting for average users to modify their menu.

    For example, there where around 20+ menus and sub-menus for spawning buildings. With my mod there is only 1 menu required and any building can be spawned. It is similar for the weapon spawn.

    There is currently a primary weapon menu and a side arm menu, but the choice of weapons is limited. People can add more weapons to the menu, but it increases the number of sub-menus.

    With the graphical approach, I can spawn any weapon in the game and it only requires a single menu slot. An it is nice for noobs to be able to see images of the weapons/gear they want to spawn.

  6. Sounds great. I know people will be very happy about it.

     

    Hey mate, have you considered making the Admin Tool more graphical in order to reduce the number of sub menus?

    After you released version 1.9 I made some custom mods to the tool on my test server. But I stopped when I noticed quite a lot of bug reports and I have not had a chance to test v1.9.1 yet.

    Because of this I never got that far with the mod, but I think some of the features that I started to implement would be a nice addition to your tool.

    I created a player menu that lists all players on the server. At the moment only the humanity morph is working, but this could also be used for heal, teleport, spectate ect.

    I have just done a quick video to give you an idea of the mods I started to do.

    As you can see most of the new dialogs that I have created are just modified versions of your vehicle dialog.

     

    http://youtu.be/H7EtaxHQySA

  7. I have someone who requested a similar feature to be added to the Epoch Admin Tools and I was wondering if you would be ok with me adding some of your code from this to the tool. I can see some serious potential in having this in the tool and you would be given credit for the work obviously.

     

    Yeah mate that would be fine.

    This type of feature is probably better suited for admin use anyway. 

  8. Thanks for that. I knew that I saw the code somewhere, I just could not remember where.

     

    Like you say, it does work for the most part, but it still seems a bit strange that there is no check on the random selected key.

    You could potentially have 12500 vehicles without any duplicate keys.

    Although my script would make it easier to find these duplicates, even without my script, someone could travel the map and check each locked vehicle to find duplicates themselves.

    That is not very likely, but it would be better if it was not possible at all.

     

     

  9. Yeah like Axe Cop said, it is selected random from the 12500 possible keys. 

    If you have had matching keys with 400-450 vehicles, then I guess the probability of having matching keys is a bit higher than I thought.

     

    My script would only find the 1 vehicle for each key.

    But if two vehicles had the same key, then the person who owns the second vehicle would end up locating the other guys vehicle instead of his own, which would be a bit of a problem on PVP servers.

     

  10. Great script!

    I just wanted to point out that the car keys are completely random, so there is a not to small chance a key will match to some other vehicle that you don't own and your script will show all vehicles on the map (idk what your script exately does if a key matches to multiple vehicles?). :D

    I mean that can happen to real cars also, but then you don't have a map to where the vehicle is located so the chance of finding that is very rare. :)

     

    There are only about 10k different car keys in Epoch, if your server has many cars the chance is not to bad to find a random car, and players like to store more keys to lost cars and with this script there is no reason to dispose keys so you can keep hundreds of keys to find some cars  :P

     

    There are 12500 possible vehicle keys, so unless your server was very highly populated, I don't think the chance of getting multiple matching ID's is that high.

    I have only been running my server for about 5/6 weeks and it is only medium populated, so I cannot say what the effects may be over a long period on a very high pop server.

     

    Although my script just loops until it finds a matching characterID. So if multiple vehicles did have the same characeterID, the script would only find the first vehicle.

    But a couple of people have asked for it to be modified to be able to identify matching characterID's, so that it would work with the master key script.

    If I did modify the script to be able to find matching characterID's, then I guess what your saying could possibly become an issue on high pop servers.

  11. I have just gotten around to updating the script to fix the bug that BetterDeadThanZed discovered.

    Now it checks the type of vehicle to make sure that it is either an "Air", "Ship" or "LandVehicle".

     

    I also realised that it would make a lot more sense to have a single modifiable script rather than having a separate script for the people who do not want the map markers.

    So I have added a config section at the top of the script.

    Now you only need to modify this variable to either true or false depending on whether you want the map markers to show or not:

    _showMapMarker = True;   

     

    I have also added this variable to make it easier for people to choose the colour of the map markers:

    _markerColour = "ColorOrange";    // Alternatives = "ColorBlack", "ColorRed", "ColorGreen", "ColorBlue", "ColorYellow", "ColorWhite"

     

    If you have previously installed this script, you should download the new version. You only need to replace the locate_vehicle.sqf file.

    If you were previously using the identify keys only script, then you should update the script with the new one and just set the _showMapMarker variable to false:

    _showMapMarker = False;

     

     

  12. Could you put up some instructions as to how to implement this without the use of Maca's Right Click system please ?

     

    Do you have a custom server menu installed? You could add it to that.

    Maca's Right Click system or a server menu are the best methods to run the script.

    There are other ways to run the script but they are probably more difficult and less practical than the above options.

  13. I had a better chance to test this today with Infistar AH0332.

    All I had to do was find and remove these lines from where Coco-Nuts and Better Dead mentioned:

    createMarkerLocal='no';
    setMarkerShapeLocal='no';
    setMarkerTypeLocal='no';
    setMarkerColorLocal='no';
    setMarkerSizeLocal='no';
    setMarkerTextLocal='no';

    In older versions of Infistar, they may all look like this instead: createMarkerLocal='STR':

     

    Then find this line:

    vehicles = [vehicle player];

    An replace it with this.

    vehicles = vehicles;

    I did not need to change anything else.

    Hopefully this might work for the latest version as well. I will need to test it.

     

     

  14. Have you tried

    } count vehicles;

    No but if I did try that, it would have just returned 1 vehicle (me), at least with AH0332 it does.

     

    I just ran my script and modded it to place a local map marker at every vehicle regardless of the CharacterID. I don't know why I hadn't thought of that sooner.

    It placed 1 map marker at my location saying: here is sniper.

    So I had a little look and found this:

    vehicles = [vehicle player];

    That line was not in the older version that I saw earlier.

  15. Yeah the version of the script that I looked at was very out-dated.

     

    But basically the 'vehicles' command seems like the problem for Infistar users, it appears to be getting blocked.

    My script is identifying the keys and the correct vehicle CharacterID, but it is this part that does not work for Infistar non admin:

    {
    private ["_tID"];
    _tID = parseNumber (_x getVariable ["CharacterID","0"]);
    if ((_tID == _finalID)) then {
    _targetPosition = getPosATL _x;
    _targetVehicle = _x;
    _found = 1;
    };
     
    } forEach vehicles;

    It checks each vehicle on the server to see if the CharcterID matches the current key.

     

    I tested the script using cursor target as the target vehicle rather than looping through the vehicles array and it did work for the target vehicle. The map marker showed on the map.

    But it is pointless locating a vehicle if you need to be looking at the vehicle you want to locate.

     

  16. Great script good job,

    Would it be possible to count the cars on the one i have and are dedicated to that key this because i use the script.

    When i use it the original first key from that vehicle shows up on the map and the others tied to the key dont show up in the list and map.

     

    Thanks again! 

    I will install the masterkey script on my test server and give it a go, I have just been trying to sort the Infistar issue first.

     

    I was able to get a little look at the infistar script and I think that there should be a very simple solution to get this working with Infistar for non-admin.

    I must warn you that this may make your server more vulnerable to exploits or hackers that may use the local map marker or vehicles commands.

    Information on the vehicles command can be found here: https://community.bistudio.com/wiki/vehicles

    Basically you do what Coco-Nuts suggested and find this bit of code in your AH.sqf file.

    } forEach ['lbsetpicture','createDiaryRecord','createTask','createSimpleTask',
    'buttonSetAction','processDiaryLink','createDiaryLink','lbSetData','createTeam','profileNamespace',
    'exec','addGroupIcon','setGroupIconParams','markerText','setMarkerAlpha','setMarkerBrush','setMarkerColor',
    'setMarkerDir','setMarkerPos','setMarkerShape','setMarkerSize','setMarkerText','setMarkerType','addWeaponCargo',
    'addMagazineCargo','setVehicleAmmo','setVehicleAmmoDef','setWeaponReloadingTime','setVehicleInit','processInitCommands',
    'addMPEventHandler','createVehicleLocal','setWaypointStatements','addWaypoint','toLower','toUpper','loadFile','rcallVarcode',
    'saveStatus','loadStatus','saveVar','drawIcon','setMarkerDirLocal','setMarkerAlphaLocal','setMarkerPosLocal','setMarkerTextLocal','setMarkerTypeLocal',
    'setMarkerColorLocal','setMarkerBrushLocal','setMarkerSizeLocal','setMarkerShapeLocal','createMarkerLocal'];
    

    Then remove these from the list, or set them to false if yours looks like Better Dead Than Zed's:

    'createMarkerLocal'

    'setMarkerShapeLocal'
    'setMarkerTypeLocal'
    'setMarkerColorLocal'
    'setMarkerSizeLocal'
    'setMarkerTextLocal'

     

    Then a couple of lines below that, you should see:

    } forEach ['allUnits','entities','allMissionObjects','vehicles','playableUnits'];

    Just remove 'vehicles' and the script should work for non-admin.

    This is because my script uses a foreach loop on the array of vehicles to check if any of the CharacterID's match the key.

    I will see if I can find a better solution to this when I have a chance.

  17. Would an Infistar user mind testing the following code for me?

    private ["_vehicle","_vehicleID"];
    _vehicle = cursorTarget;
    _vehicleID = parseNumber(cursorTarget getVariable ['CharacterID', '0']);
    systemChat format ["Vehicle CharacterID: %1",_vehicleID];

    Get a vehicle that has a key and is definitely in the database. Then look at it and run the above script.

    Please test it as both an admin and a non admin and then post the results.

     

    It should just display: "Vehicle CharacterID: 0000"  (where 0000 is the actual vehicle characterID)

     

×
×
  • Create New...