Jump to content
Sign in to follow this  
shinkicker

Help with scripts.txt

Recommended Posts

I am having trouble understanding the syntax and inner workings of the server side reporting to a level that I can control what is kicked and what is not.

The particular call is:

createvehiclelocal getpos _house;

This is for an open door animation made by mondkalb.

It invokes a Script Restriction # 21 which maps to the following line:

5 createVehicle !"\"createVehicle\"," !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;" !"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;"

My first change was to amend '5' to '1', so rather than kick, this is meant to log as far as I understand. I restarted the server & its DB & client (to be sure), and still I got a #21 kick.

I then tried to comment out the whole line thinking it likely to be '"\createVehicleLocal"\, and then the next line up kicked me, which confused me even more.

5 createMine !"\"createMine\","

Commented that out too and then the one before that:

5 createTarget !"\"createTarget\","

This then allowed me to open / close the door without a kick. So I know the line above is the line that generated the script restriction.

The BE version is 1.164. I believe I have the latest scripts.txt

Does anyone have any ideas here as I can't find any luck searching out a manual or some documentation.

I expect ideally it would be better to explicitly whitelist the createvehiclelocal setpos _house command, so as that one can execute, but all the other malicious stuff is still blocked. Is there a whitelist function?

EDIT: Read the whole thread again and it found out that is a !"but not this" expression.

So looks like I should need to do this:

!"but not this"

!"createvehiclelocal getpos _house;"

I am now even more confused by this line:

5 createMine !"\"createMine\","

Is this now not saying:

Block all createMine calls, but not when createMine is part of a path? e.g. '\'

Edited by shinkicker

Share this post


Link to post
Share on other sites

Hi

I cannot answer you about what your asking, but just thought i'd point out to you that when

you are making a post with code, use the advanced part of posting seen at the bottom right of a post,

and then take the code you have highlight it, and then hit the button that is labeled as #,

this will put your codes into a quote like window that will be formatted different and scrollable, also better readable.

heres an example of what it looks like:

5 createVehicle !"\"createVehicle\"," !"createVehicleLocal" !"createVehicle [\"WeaponHolder\", _iPos, [], _radius, \"CAN_COLLIDE\"" !"_fire = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"_object = createVehicle [_classname, _location, [], 0, \"CAN_COLLIDE\"" !"if (_height < 100) then {\n_bolt = createVehicle [\"BoltSteelF\", _endPos, [], 0, \"CAN_COLLIDE\"];\n_bolt setPosATL _endPos;" !"_tent = createVehicle [\"TentStorage\", _location, [], 0, \"CAN_COLLIDE\"];\n_tent setdir _dir;"
!"if ((random _int)>2.2) then\n{\n_b=\"SmallSecondary\" createvehicle (getpos _v);\n};" !"exitwith {};\n_b=\"SmallSecondary\" createvehicle (_v modelToWorld _effect2pos);\n} foreach (_list);" !"_bag = createVehicle [format[\"WeaponHolder_%1\",_item],getPosATL player,[], 0, \"CAN_COLLIDE\"];\n_bag setdir (getDir player);" !"_bag = createVehicle [\"WeaponHolder_ItemTent\",_pos,[], 0, \"CAN_COLLIDE\"];\n_bag setdir _dir;\nplayer reveal _bag;" !"_object = _type createVehicleLocal _position;\n_object setPos _position;\n_object setDir _dir;\n_object allowDamage false;"

Just thought i'd mention that.

Share this post


Link to post
Share on other sites

I figured it out now, I just needed to add

!"createvehiclelocal getpos _house;"

to the createvehiclelocal line

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×