<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://oldwiki.eq2classic.com/index.php?action=history&amp;feed=atom&amp;title=LUA%3ASetRequiredHistory</id>
	<title>LUA:SetRequiredHistory - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://oldwiki.eq2classic.com/index.php?action=history&amp;feed=atom&amp;title=LUA%3ASetRequiredHistory"/>
	<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:SetRequiredHistory&amp;action=history"/>
	<updated>2026-07-14T02:41:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.3</generator>
	<entry>
		<id>https://oldwiki.eq2classic.com/index.php?title=LUA:SetRequiredHistory&amp;diff=6196&amp;oldid=prev</id>
		<title>Smash: Created page with &quot;= LUA Functions: SetRequiredHistory() = Required a player to have a Lua history entry set as a certain data value for access to this spawn.   ==== Syntax ==== SetRequiredHistory(...&quot;</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.eq2classic.com/index.php?title=LUA:SetRequiredHistory&amp;diff=6196&amp;oldid=prev"/>
		<updated>2016-01-28T03:43:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= LUA Functions: SetRequiredHistory() = Required a player to have a Lua history entry set as a certain data value for access to this spawn.   ==== Syntax ==== SetRequiredHistory(...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= LUA Functions: SetRequiredHistory() =&lt;br /&gt;
Required a player to have a Lua history entry set as a certain data value for access to this spawn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
SetRequiredHistory(param1, param2, param3, [param4], [param5], [param6])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Parameters ====&lt;br /&gt;
; Required - ''param1'' (Spawn), ''param2'' (int32), ''param3'' (int32)&lt;br /&gt;
: ''param1'' is the spawn we want to set&lt;br /&gt;
: ''param2'' is the event ID that is required&lt;br /&gt;
: ''param3'' is the history value1 that is required&lt;br /&gt;
; Optional - ''param4'' (int32), ''param5'' (int8), ''param6'' (int16)&lt;br /&gt;
: ''param4'' is the history value2 that is required&lt;br /&gt;
: ''param5'' sets a spawn as private when the player does not meet history reqs, grants access when they do. Set as 1 if used.&lt;br /&gt;
: ''param6'' vis_flags override value to be used while a player does not meet history reqs, uses vis_flags as normal when they do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function spawn(Spawn)&lt;br /&gt;
    SetRequiredHistory(Spawn, 1234, 5, 0, 1, 0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets spawn access requirements for a spawn. Both value 1 and value 2 must match and the player must have this history entry. When a player does not meet spawn access requirements, no vis flags will be sent for the spawn to that player.  This disables use of the spawn (cannot target, use commands) but allows the player to still see the spawn. Using the private_spawn param (5) hides this spawn completely from the player. If you only want certain flags to be sent while a player does not have access to the spawn use the vis_flags override (param6). Notes on this below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
To calculate the values for vis flags, use the base values of (attackable = +64), (show_level = +32), (show_name = +16), (targetable = +4), (show_command_icon = +2). Add the sum of all the values you wish to be activated. For instance to have just show_name and targetable, use 20 as the value (4+16).&lt;/div&gt;</summary>
		<author><name>Smash</name></author>
		
	</entry>
</feed>