Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @file Version: 1.0.0.0
- @file Author: RYN_Ryan
- @Modified by: RPGforYOU
- @file edit: 20.01.2015
- Copyright © 2015 Ryan Torzynski, All rights reserved
- All servers are allowed to use this code, modify and publish it. Every modified release of this script must contain "Original by RTT"!
- */
- ship_obj_arr = ["Land_Wreck_Traw_F","Land_Wreck_Traw2_F","_var"];
- //########################## CONFIGURATION ##########################
- ship_chance = 100;
- ship_positions = [[4462.89,6515.78,-2.19486],[5391.75,25136.2,-1.98308],[25323.2,27886.6,-2.15125]];
- _ship_time_interval = [1,2]; //
- _var=floor(random 4);
- if (_var==0) then {
- ship_loot_array = [["silverbar",46],["goldbar",22]];
- };
- if (_var==1) then {
- ship_loot_array = [["diamondc",14],["goldbar",25],["ruby",7]];
- };
- if (_var==2) then {
- ship_loot_array = [["diamondc",23],["silverbar",8],["goldbar",12],["ruby",3]];
- };
- if (_var==3) then {
- ship_loot_array = [["diamondc",28],["silverbar",9],["goldbar",4],["ac",2]];
- };
- if (_var==4) then {
- ship_loot_array = [["silverbar",16],["goldbar",37],["ruby",2],["diamondc",17]];
- };
- ship_loot_amount = 1;
- //######################## CONFIGURATION END ########################
- // Do not modify the following code
- ship_time_min = _ship_time_interval select 0;
- ship_time_max = _ship_time_interval select 1;
- ship_time_min = ship_time_min*450;
- ship_time_max = ship_time_max*600;
- if (ship_time_min>=ship_time_max OR count ship_loot_array < ship_loot_amount) exitWith {ship_enable=false;};
- ship_enable=true;
- sleep 1;
- if (!ship_enable) exitWith {};
- _chance = floor(random 100);
- if (_chance>ship_chance) exitWith {};
- _toWait = (random (ship_time_max - ship_time_min)) + ship_time_min;
- sleep _toWait;
- // ship STARTEN
- [[5,"<br/><t align='center'><t size='6'><img image='textures\shipheader.paa'/></t></t><br/><br/><t size='1.4'><t color='#A5DF00'>SHIP WRECK</t></t><br/><br/><t size='1'>A ship stranded on the coast of Altis! The Radius has been marked on your map!<br/> <br/> The loot will be washed away by the water in 60 minutes!<br/><br/> So hurry and watch out for other treasure hunters! <br/><br/> Don't forget your <t size='1.5'><img image='icons\items\lance.paa'/></t>lance and <t size='1.5'><img image='icons\items\wetool.paa'/></t>welding tools!</t>"],"life_fnc_broadcast",true,false] spawn life_fnc_MP;
- _poses = count ship_positions;
- _inArr = floor(random _poses);
- _dest = ship_positions select _inArr;
- sleep 5;
- _marker = createMarker ["shipmarker", _dest];
- "shipmarker" setMarkerColor "ColorGreen";
- "shipmarker" setMarkerType "Empty";
- "shipmarker" setMarkerShape "ELLIPSE";
- "shipmarker" setMarkerSize [300,300];
- _markerText = createMarker ["shipmarkertext", _dest];
- "shipmarkertext" setMarkerColor "ColorBlack";
- "shipmarkertext" setMarkerText "Ship Wreck";
- "shipmarkertext" setMarkerType "mil_warning";
- "shipmarker" setMarkerAlpha 0.3;
- // Spawning the wreck
- _type = "";
- _chance = floor(random 2);
- if (_chance==1) then {_type = "Land_Wreck_Traw_F"} else {_type = "Land_Wreck_Traw2_F"};
- _xPOS = floor(random 150);
- _yPOS = floor(random 150);
- _wreck = createVehicle [_type, [(_dest select 0)+_xPOS,(_dest select 1)+_yPOS,0], [], 0, "CAN_COLLIDE"];
- _wreck allowDamage false;
- _wreck enableSimulation false;
- _wreck setVariable ["trunk_in_use",false,true];
- _lootArray = ship_loot_array;
- _wreck setVariable ["Trunk",[_lootArray,500],true];
- sleep 3600;
- [[5,"<br/><t align='center'><t size='6'><img image='textures\shipheader.paa'/></t></t><br/><br/><t size='1.4'><t color='#A5DF00'>Shipwreck</t></t><br/><br/><t size='1'>All the loot is now gone in the endless waters of Altis!</t>"],"life_fnc_broadcast",true,false] spawn life_fnc_MP;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement