<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://dyrdex.com/index.php?action=history&amp;feed=atom&amp;title=Game_Code_Examples</id>
	<title>Game Code Examples - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://dyrdex.com/index.php?action=history&amp;feed=atom&amp;title=Game_Code_Examples"/>
	<link rel="alternate" type="text/html" href="http://dyrdex.com/index.php?title=Game_Code_Examples&amp;action=history"/>
	<updated>2026-08-04T22:36:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4809&amp;oldid=prev</id>
		<title>Admin: /* Skill Attack */</title>
		<link rel="alternate" type="text/html" href="http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4809&amp;oldid=prev"/>
		<updated>2026-08-04T20:38:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Skill Attack&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:38, 5 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot;&gt;Line 115:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 115:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**multi_hit( ch, victim, gsn_circle ) — delivers the actual attack, tagged as circle.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**multi_hit( ch, victim, gsn_circle ) — delivers the actual attack, tagged as circle.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***Likely further modifiers baked into other game functions (apply Damage Roll, etc)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***Likely further modifiers baked into other game functions (apply Damage Roll, etc)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**adjust_favor( ch, 10, 1 ) — deity favor adjustment.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**adjust_favor( ch, 10, 1 ) — deity favor adjustment &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(when applicable)&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**check_illegal_pk — validates the kill was legal.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**check_illegal_pk — validates the kill was legal.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4808&amp;oldid=prev</id>
		<title>Admin: /* Skill Attack */</title>
		<link rel="alternate" type="text/html" href="http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4808&amp;oldid=prev"/>
		<updated>2026-08-04T20:36:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Skill Attack&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:36, 5 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l107&quot;&gt;Line 107:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 107:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;Success vs. failure&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;Success vs. failure&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**can_use_skill( ch, percent, gsn_circle ) compares your adjusted roll against your percentage adept in the skill.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**can_use_skill( ch, percent, gsn_circle ) compares your adjusted roll against your percentage adept in the skill.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;***Player: success when percent &amp;lt; LEARNED(ch, gsn_circle) — your adjusted roll must land under your learned circle %.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;***NPC: success when percent &amp;lt; 85 — flat 85 threshold, learned value irrelevant.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;On success:&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;On success:&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4807&amp;oldid=prev</id>
		<title>Admin: /* Skill Attack */</title>
		<link rel="alternate" type="text/html" href="http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4807&amp;oldid=prev"/>
		<updated>2026-08-04T19:48:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Skill Attack&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:48, 5 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot;&gt;Line 67:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*They aren&amp;#039;t here&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*They aren&amp;#039;t here&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*How can you sneak up on yourself?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*How can you sneak up on yourself?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;you &lt;/del&gt;need to wield a piercing or stabbing weapon.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;You &lt;/ins&gt;need to wield a piercing or stabbing weapon.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*You can&amp;#039;t circle when you aren&amp;#039;t fighting.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*You can&amp;#039;t circle when you aren&amp;#039;t fighting.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*You can&amp;#039;t circle around a person who is not fighting.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*You can&amp;#039;t circle around a person who is not fighting.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l120&quot;&gt;Line 120:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 120:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**Same 2 * PULSE_VIOLENCE lag.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**Same 2 * PULSE_VIOLENCE lag.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**damage( ch, victim, 0, gsn_circle ) — deals 0 damage but still &amp;quot;connects&amp;quot; as an action, which triggers the miss message and puts you into combat with them.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**damage( ch, victim, 0, gsn_circle ) — deals 0 damage but still &amp;quot;connects&amp;quot; as an action, which triggers the miss message and puts you into combat with them.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Spell Attack=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Spell Attack=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4806&amp;oldid=prev</id>
		<title>Admin: /* Basic Skill */</title>
		<link rel="alternate" type="text/html" href="http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4806&amp;oldid=prev"/>
		<updated>2026-08-04T19:47:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Basic Skill&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:47, 5 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;The roll&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;The roll&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**can_use_skill(ch, number_percent(), gsn_hide)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**can_use_skill(ch, number_percent(), gsn_hide)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***rolls 1–100 and checks it against your learned hide percentage - it&#039;s a straight skill-vs&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/del&gt;roll check.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;***rolls 1–100 and checks it against your learned hide percentage - &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;it&#039;s a straight skill-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;adept-percent &lt;/ins&gt;vs roll check.&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;The outcome&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&amp;#039;&amp;#039;&amp;#039;The outcome&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**On success: xSET_BIT(ch-&amp;gt;affected_by, AFF_HIDE) sets the hide affect, and learn_from_success gives a chance to improve the skill.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**On success: xSET_BIT(ch-&amp;gt;affected_by, AFF_HIDE) sets the hide affect, and learn_from_success gives a chance to improve the skill.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**On failure: just learn_from_failure — no hide, but learn anyway.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**On failure: just learn_from_failure — no hide, but learn anyway.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Passive Skill=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Passive Skill=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4805&amp;oldid=prev</id>
		<title>Admin at 19:46, 4 August 2026</title>
		<link rel="alternate" type="text/html" href="http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4805&amp;oldid=prev"/>
		<updated>2026-08-04T19:46:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:46, 5 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     return;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;/&lt;/ins&gt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4804&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Code Examples For Nerds  Here&#039;s some clearcut examples from the old public SMAUG 1.8 release that show how things work on the back end.   Spoiler Alert: &#039;&#039;&#039;It&#039;s exactly like D&amp;D&#039;&#039;&#039; *Skills &amp; Physical attacks do some dice roll to see if they hit. If they do hit, then you roll damage.  *Magical attacks &#039;just happen&#039; but the defender get&#039;s a chance to save their ass by rolling a saving throw. Successful save reduces damage by some factor.  =Basic Skill=  For the &#039;hide&#039; skil...&quot;</title>
		<link rel="alternate" type="text/html" href="http://dyrdex.com/index.php?title=Game_Code_Examples&amp;diff=4804&amp;oldid=prev"/>
		<updated>2026-08-04T19:46:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Code Examples For Nerds  Here&amp;#039;s some clearcut examples from the old public SMAUG 1.8 release that show how things work on the back end.   Spoiler Alert: &amp;#039;&amp;#039;&amp;#039;It&amp;#039;s exactly like D&amp;amp;D&amp;#039;&amp;#039;&amp;#039; *Skills &amp;amp; Physical attacks do some dice roll to see if they hit. If they do hit, then you roll damage.  *Magical attacks &amp;#039;just happen&amp;#039; but the defender get&amp;#039;s a chance to save their ass by rolling a saving throw. Successful save reduces damage by some factor.  =Basic Skill=  For the &amp;#039;hide&amp;#039; skil...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Code Examples For Nerds&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s some clearcut examples from the old public SMAUG 1.8 release that show how things work on the back end. &lt;br /&gt;
&lt;br /&gt;
Spoiler Alert: &amp;#039;&amp;#039;&amp;#039;It&amp;#039;s exactly like D&amp;amp;D&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Skills &amp;amp; Physical attacks do some dice roll to see if they hit. If they do hit, then you roll damage. &lt;br /&gt;
*Magical attacks &amp;#039;just happen&amp;#039; but the defender get&amp;#039;s a chance to save their ass by rolling a saving throw. Successful save reduces damage by some factor.&lt;br /&gt;
&lt;br /&gt;
=Basic Skill=&lt;br /&gt;
&lt;br /&gt;
For the &amp;#039;hide&amp;#039; skill: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void do_hide( CHAR_DATA *ch, char *argument )&lt;br /&gt;
{&lt;br /&gt;
    if ( IS_NPC(ch) &amp;amp;&amp;amp; IS_AFFECTED( ch, AFF_CHARM ) )&lt;br /&gt;
    {&lt;br /&gt;
        send_to_char( &amp;quot;You can&amp;#039;t concentrate enough for that.\n\r&amp;quot;, ch );&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    if ( ch-&amp;gt;mount )&lt;br /&gt;
    {&lt;br /&gt;
        send_to_char( &amp;quot;You can&amp;#039;t do that while mounted.\n\r&amp;quot;, ch );&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    send_to_char( &amp;quot;You attempt to hide.\n\r&amp;quot;, ch );&lt;br /&gt;
    if ( IS_AFFECTED(ch, AFF_HIDE) )&lt;br /&gt;
        xREMOVE_BIT(ch-&amp;gt;affected_by, AFF_HIDE);&lt;br /&gt;
    if ( can_use_skill(ch, number_percent(), gsn_hide ) )&lt;br /&gt;
    {&lt;br /&gt;
        xSET_BIT(ch-&amp;gt;affected_by, AFF_HIDE);&lt;br /&gt;
        learn_from_success( ch, gsn_hide );&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
        learn_from_failure( ch, gsn_hide );&lt;br /&gt;
    return;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Entry gates&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**Charmed NPC — same guard as the other skills; a charmed mob can&amp;#039;t concentrate enough to hide.&lt;br /&gt;
**Mounted — can&amp;#039;t hide while on a mount.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The attempt&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**send_to_char(&amp;quot;You attempt to hide.&amp;quot;) — you always get this message just for trying, regardless of outcome.&lt;br /&gt;
**if ( IS_AFFECTED(ch, AFF_HIDE) ) xREMOVE_BIT(ch-&amp;gt;affected_by, AFF_HIDE);&lt;br /&gt;
***Clear existing hide first. If you&amp;#039;re already hidden, the AFF_HIDE bit is stripped before the roll. This means re-hiding is a fresh attempt — you drop your current hide and have to succeed again to get it back. A failed re-hide leaves you un-hidden. So spamming hide when already hidden can actually expose you.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The roll&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**can_use_skill(ch, number_percent(), gsn_hide)&lt;br /&gt;
***rolls 1–100 and checks it against your learned hide percentage - it&amp;#039;s a straight skill-vs-roll check.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;The outcome&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**On success: xSET_BIT(ch-&amp;gt;affected_by, AFF_HIDE) sets the hide affect, and learn_from_success gives a chance to improve the skill.&lt;br /&gt;
**On failure: just learn_from_failure — no hide, but learn anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Passive Skill=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Skill Attack=&lt;br /&gt;
Here&amp;#039;s the super old code for thieve&amp;#039;s &amp;#039;circle&amp;#039; from the public release of SMAUG 1.8.&lt;br /&gt;
&lt;br /&gt;
Actually, the first section is just a bunch of qualifiers I&amp;#039;m going to omit cuz its boring, you can imagine what they do from their messages:&lt;br /&gt;
*You can&amp;#039;t circle while mounted.&lt;br /&gt;
*Circle around whom?&lt;br /&gt;
*They aren&amp;#039;t here&lt;br /&gt;
*How can you sneak up on yourself?&lt;br /&gt;
*you need to wield a piercing or stabbing weapon.&lt;br /&gt;
*You can&amp;#039;t circle when you aren&amp;#039;t fighting.&lt;br /&gt;
*You can&amp;#039;t circle around a person who is not fighting.&lt;br /&gt;
*You can&amp;#039;t circle around them without a distraction.&lt;br /&gt;
&lt;br /&gt;
Ok, then actual &amp;#039;hit&amp;#039; code: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    percent = number_percent( ) - (get_curr_lck(ch) - 16) &lt;br /&gt;
              + (get_curr_lck(victim) - 13);&lt;br /&gt;
&lt;br /&gt;
    check_attacker( ch, victim );&lt;br /&gt;
    WAIT_STATE( ch, skill_table[gsn_circle]-&amp;gt;beats );&lt;br /&gt;
    if ( can_use_skill( ch, percent, gsn_circle ) )&lt;br /&gt;
    {&lt;br /&gt;
        learn_from_success( ch, gsn_circle );&lt;br /&gt;
        WAIT_STATE( ch,     2 * PULSE_VIOLENCE );&lt;br /&gt;
        global_retcode = multi_hit( ch, victim, gsn_circle );&lt;br /&gt;
        adjust_favor( ch, 10, 1 );      &lt;br /&gt;
        check_illegal_pk( ch, victim );&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        learn_from_failure( ch, gsn_circle );&lt;br /&gt;
        WAIT_STATE( ch,     2 * PULSE_VIOLENCE );&lt;br /&gt;
        global_retcode = damage( ch, victim, 0, gsn_circle );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The skill roll&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* percent = number_percent() - (get_curr_lck(ch) - 16) + (get_curr_lck(victim) - 13);&lt;br /&gt;
**number_percent() rolls 1–100. Then luck adjusts the roll:&lt;br /&gt;
***Your luck above 16 lowers the number (subtracted), which helps you — lower rolls are better against your skill threshold.&lt;br /&gt;
***Victim&amp;#039;s luck above 13 raises the number, hurting you.&lt;br /&gt;
***So high-luck attacker + low-luck victim = easier success. The 16 and 13 are just the neutral baselines for each side.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Committing to the attempt&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**check_attacker — flags you as the aggressor (PK bookkeeping).&lt;br /&gt;
**WAIT_STATE( ch, skill_table[gsn_circle]-&amp;gt;beats ) — applies the skill&amp;#039;s base lag immediately, whether or not you succeed.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Success vs. failure&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**can_use_skill( ch, percent, gsn_circle ) compares your adjusted roll against your percentage adept in the skill.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;On success:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**learn_from_success — chance to improve the skill.&lt;br /&gt;
**Another WAIT_STATE of 2 * PULSE_VIOLENCE (extra lag).&lt;br /&gt;
**multi_hit( ch, victim, gsn_circle ) — delivers the actual attack, tagged as circle. &lt;br /&gt;
***Likely further modifiers baked into other game functions (apply Damage Roll, etc)&lt;br /&gt;
**adjust_favor( ch, 10, 1 ) — deity favor adjustment.&lt;br /&gt;
**check_illegal_pk — validates the kill was legal.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;On failure:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**learn_from_failure — you still might learn from botching it.&lt;br /&gt;
**Same 2 * PULSE_VIOLENCE lag.&lt;br /&gt;
**damage( ch, victim, 0, gsn_circle ) — deals 0 damage but still &amp;quot;connects&amp;quot; as an action, which triggers the miss message and puts you into combat with them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Spell Attack=&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s a really old example from the public relase of SMAUG 1.8 for mage&amp;#039;s &amp;#039;burning hands&amp;#039; spell. This uses a pre-determined table of damage values, does some rolls on them, applies saving throws, to determine damage. Bear in mind that [[Resistances]] are then applied AFTER, and are a different chunk of code/logic.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ch_ret spell_burning_hands( int sn, int level, CHAR_DATA *ch, void *vo )&lt;br /&gt;
{&lt;br /&gt;
    CHAR_DATA *victim = (CHAR_DATA *) vo;&lt;br /&gt;
    static const sh_int dam_each[] =&lt;br /&gt;
    {&lt;br /&gt;
         0,&lt;br /&gt;
         0,  0,  0,  0, 14,     17, 20, 23, 26, 29,&lt;br /&gt;
        29, 29, 30, 30, 31,     31, 32, 32, 33, 33,&lt;br /&gt;
        34, 34, 35, 35, 36,     36, 37, 37, 38, 38,&lt;br /&gt;
        39, 39, 40, 40, 41,     41, 42, 42, 43, 43,&lt;br /&gt;
    44, 44, 45, 45, 46, 46, 47, 47, 48, 48,&lt;br /&gt;
    49, 49, 50, 50, 51, 51, 52, 52, 53, 53,&lt;br /&gt;
    54, 54, 55, 55, 56, 56, 57, 57, 58, 58&lt;br /&gt;
    };&lt;br /&gt;
    int dam;&lt;br /&gt;
&lt;br /&gt;
    level       = UMIN(level, sizeof(dam_each)/sizeof(dam_each[0]) - 1);&lt;br /&gt;
    level       = UMAX(0, level);&lt;br /&gt;
    dam         = number_range( dam_each[level] / 2, dam_each[level] * 2 );&lt;br /&gt;
    if ( saves_spell_staff( level, victim ) )&lt;br /&gt;
        dam /= 2;&lt;br /&gt;
    return damage( ch, victim, dam, sn );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s how Claude explains that: &lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Setup&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**victim is the target, cast from the generic void *vo pointer.&lt;br /&gt;
**dam_each[] is a lookup table mapping the caster&amp;#039;s level to a base damage value. &lt;br /&gt;
***Low levels (0–4) do 0, then it jumps to 14 at level 5 and scales up to 58 at the top.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Clamping the level&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**level = UMIN(level, sizeof(dam_each)/sizeof(dam_each[0]) - 1) caps the damage level at the last valid table index &lt;br /&gt;
***(70 here, since the array has 71 entries indexed 0–70). This prevents reading past the end of the array.&lt;br /&gt;
**level = UMAX(0, level) ensures level isn&amp;#039;t negative. After these two lines, damage level is guaranteed to be a safe index.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Rolling damage&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**dam = number_range( dam_each[level] / 2, dam_each[level] * 2 ) picks a random integer between half and double the base value for that level. &lt;br /&gt;
***So at level 5 (base 14), it rolls between 7 and 28. This gives a wide random spread averaging roughly the base value (slightly above it, since the midpoint of half-to-double is 1.25× base).&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Saving throw&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**if ( saves_spell_staff( level, victim ) ) dam /= 2; — if the victim successfully makes a saving throw (save vs. spells/staves), damage is halved. &lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Applying it&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
**return damage( ch, victim, dam, sn ) deals the final damage from caster ch to victim, tagged with the spell number sn (used for messages, damage type, resistances, etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s how that maps out to actual damage values per level: &lt;br /&gt;
*The &amp;#039;Base&amp;#039; column is the base damage pulled from the index table of values in the spell code before randomization&lt;br /&gt;
*The code then operates upon that by doing &amp;quot;number_range(base/2, base*2)&amp;quot; to set the random spread. So base is the center-ish of the roll — the min is half of it, the max is double it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lvl  Base  NoSave(min-max)  Saved(min-max)&lt;br /&gt;
---  ----  ---------------  --------------&lt;br /&gt;
  0     0              0-0             0-0&lt;br /&gt;
  1     0              0-0             0-0&lt;br /&gt;
  2     0              0-0             0-0&lt;br /&gt;
  3     0              0-0             0-0&lt;br /&gt;
  4     0              0-0             0-0&lt;br /&gt;
  5    14             7-28            3-14&lt;br /&gt;
  6    17             8-34            4-17&lt;br /&gt;
  7    20            10-40            5-20&lt;br /&gt;
  8    23            11-46            5-23&lt;br /&gt;
  9    26            13-52            6-26&lt;br /&gt;
 10    29            14-58            7-29&lt;br /&gt;
 11    29            14-58            7-29&lt;br /&gt;
 12    29            14-58            7-29&lt;br /&gt;
 13    30            15-60            7-30&lt;br /&gt;
 14    30            15-60            7-30&lt;br /&gt;
 15    31            15-62            7-31&lt;br /&gt;
 16    31            15-62            7-31&lt;br /&gt;
 17    32            16-64            8-32&lt;br /&gt;
 18    32            16-64            8-32&lt;br /&gt;
 19    33            16-66            8-33&lt;br /&gt;
 20    33            16-66            8-33&lt;br /&gt;
 21    34            17-68            8-34&lt;br /&gt;
 22    34            17-68            8-34&lt;br /&gt;
 23    35            17-70            8-35&lt;br /&gt;
 24    35            17-70            8-35&lt;br /&gt;
 25    36            18-72            9-36&lt;br /&gt;
 26    36            18-72            9-36&lt;br /&gt;
 27    37            18-74            9-37&lt;br /&gt;
 28    37            18-74            9-37&lt;br /&gt;
 29    38            19-76            9-38&lt;br /&gt;
 30    38            19-76            9-38&lt;br /&gt;
 31    39            19-78            9-39&lt;br /&gt;
 32    39            19-78            9-39&lt;br /&gt;
 33    40            20-80           10-40&lt;br /&gt;
 34    40            20-80           10-40&lt;br /&gt;
 35    41            20-82           10-41&lt;br /&gt;
 36    41            20-82           10-41&lt;br /&gt;
 37    42            21-84           10-42&lt;br /&gt;
 38    42            21-84           10-42&lt;br /&gt;
 39    43            21-86           10-43&lt;br /&gt;
 40    43            21-86           10-43&lt;br /&gt;
 41    44            22-88           11-44&lt;br /&gt;
 42    44            22-88           11-44&lt;br /&gt;
 43    45            22-90           11-45&lt;br /&gt;
 44    45            22-90           11-45&lt;br /&gt;
 45    46            23-92           11-46&lt;br /&gt;
 46    46            23-92           11-46&lt;br /&gt;
 47    47            23-94           11-47&lt;br /&gt;
 48    47            23-94           11-47&lt;br /&gt;
 49    48            24-96           12-48&lt;br /&gt;
 50    48            24-96           12-48&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>