Reaper5150 Posted December 13, 2019 Report Share Posted December 13, 2019 Simple but fun little script I put together awhile ago. What it does? It is bound to a object in this case "ItemObsidian" as a right click, but can be changed to whatever you want. It then will sends out a message to the players on the server and marks the player with red smoke and a marker on the map. The player will then get 2 mins of god mod acting like the amour. Once the amour takes damage (All it is is a countdown timer really) The god mode is then disabled so they can be killed. I'm still working on this and will update it when it is done. If any of you better scriptwriters then myself ( I'm still a noob lol) have any ideas on how to improve this? contact me so I can give you credit in the update :) Known bugs: marker sometimes stays on map Credits to : @Schalldampfer For helping me understand map markers Install: Place this in your scripts folder name it something like Jugg.sqf //======================================================== //========= Juggernaut script-Written by Reaper5150 =========== //======================================================= sleep 2; [nil,nil,rTitleText,"THERE IS A JUGGERNAUT,FIND HIM AND KILL HIM IF YOU CAN!!!","PLAIN",3] call RE; sleep 1; [nil, player, rSAY, "YOURSOUND.OGG", 100] call RE; //Add your custom sound here when Juggernaut spawns [] spawn { player removeMagazine 'ItemObsidian';//Add whatever object you want and bound to your right click function sleep 5; [nil,nil,rTitleText,"THE JUGGERNAUT HAS BODY ARMOR,WE CAN'T KILL HIM...HELP!!!","PLAIN",3] call RE; ////////Set marker///////////////////////////////////////////////////////////////////// [] execVM "scripts\marker.sqf"; //Start Smoke Marker////////////////////////////////////////////////////////////////////////// sleep 5; PJ_grenade = "SmokeShellRed" createVehicle position player; PJ_grenade attachto [vehicle player,[0.1,0,0]]; sleep 2; [nil,nil,rTitleText,"THE JUGGERNAUT (PLAYER) HAS BEEN MARKED WITH SMOKE AND ON THE MAP!!!","PLAIN",3] call RE; //Temp Godmode for 2 mins//////////////////////////////////////////////////// (vehicle player) removeAllEventHandlers "handleDamage"; (vehicle player) addEventHandler ["handleDamage", { false }]; (vehicle player) allowDamage false; //Acts like a countdown timer////////////////////////////////////////////////////////////////// sleep 90; [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR HAS TAKEN 30% DAMAGE","PLAIN",3] call RE; sleep 100; [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR HAS TAKEN 50% DAMAGE","PLAIN",3] call RE; sleep 110; [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR HAS TAKEN 90% DAMAGE","PLAIN",3] call RE; uiSleep 120; [nil,nil,rTitleText,"THE JUGGERNAUTS ARMOR IS WEAK...TAKE HIM OUT NOW!!!","PLAIN",3] call RE; sleep 2; //Start ending Juggernaut/////////////////////////////////// (vehicle player) addEventHandler ["handleDamage", { true }]; (vehicle player) removeAllEventHandlers "handleDamage"; (vehicle player) allowDamage true; uiSleep 240; deleteVehicle PJ_grenade; END; Call it from your right click ["ItemObsidian","JUGGERNAUT","execVM 'scripts\Jugg.sqf';","true"], marker.sqf: _unit = player; _nameP = name _unit; _markerobjp = createMarker [_namep,[0,0]]; _markerobjp setMarkerShape "ICON"; _markerobjp setMarkerType "mil_dot"; _markerobjp setMarkerColor "ColorRed"; _markerobjp setMarkerText _nameP; _markerobjp setMarkerSize [1,1]; while {alive _unit} do { _markerobjp setmarkerdir (getdir _unit); _markerobjp setMarkerPos (getPos _unit); _markerobjp setMarkerText _nameP; sleep 5; }; //////////////////////////////////////////// uiSleep 240; deleteMarker _markerobjp; Helion4 1 Link to comment Share on other sites More sharing options...
Reaper5150 Posted December 13, 2019 Author Report Share Posted December 13, 2019 I would like to have this only for high level players only (But cant figure out the humanity part for like 25000 heros and bandits) or even remove the god mode all together and just raise the players blood making it a little harder to kill them. Link to comment Share on other sites More sharing options...
rpg4e Posted September 19, 2021 Report Share Posted September 19, 2021 Can you change the script so that as long as a player has a gem in their inventory or backpack is displayed on the map without removing anything from their inventory? The marker should disappear again as soon as the gem is removed from the inventory or backpack. In this example, the gemstone stands for several possible objects that can be defined. Link to comment Share on other sites More sharing options...
Reaper5150 Posted September 20, 2021 Author Report Share Posted September 20, 2021 12 hours ago, rpg4e said: Can you change the script so that as long as a player has a gem in their inventory or backpack is displayed on the map without removing anything from their inventory? The marker should disappear again as soon as the gem is removed from the inventory or backpack. In this example, the gemstone stands for several possible objects that can be defined. I'm sure there maybe a way to have this set up like that, Unfortunately I do not know how to have the script check to see what is in a players backpack or in the gear as that is something pretty hard to do from what I have learned here before. I'm sure someone better at scripting then my noob self could figure it out? Although you could for now just change the 'ItemObsidian' to anything you would like to use. Link to comment Share on other sites More sharing options...
looter809 Posted September 20, 2021 Report Share Posted September 20, 2021 On 9/19/2021 at 10:00 AM, rpg4e said: Can you change the script so that as long as a player has a gem in their inventory or backpack is displayed on the map without removing anything from their inventory? The marker should disappear again as soon as the gem is removed from the inventory or backpack. In this example, the gemstone stands for several possible objects that can be defined. So infinite godmode? Why? But to answer, yes you just need a while loop running (have a sleep 1-5 second in the while loop to help FPS) and in the while loop check for the item in magazine player. This is just for the magazines in hand, I forget how to check backpack gear off the top of my head. Global markers can be created from client side but you will want to delete the marker and recreate it each loop. Setting the loop too low would be very unwise. Reaper5150 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now