Credits go to Yukitsuki as I used his/her (sorry I don't know the person's gender) website to make this.
This is the code, so you may change it however you wish, but I will also upload the file of my version.
<aidescdata>
<template>
<imports>
<import file="data/db/ai/local/common_pet.xml" />
</imports>
<var_decl>
<var name="visualfield_radius" default="600" />
<var name="audio_range" default="400" />
</var_decl>
<sensor visualfield_radius="%visualfield_radius" visualfield_angle="90" audio_range="%audio_range" />
<character return_to_startpoint="false" auto_respawn="false" target_type="always" support_type="none">
</character>
<patterns>
<pattern name="wander">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@master_movestate == 0">
<then>
<if condition="expr" expr="@random > 0.5">
<then>
<cmd name="set_emotion" target="1" index="1" />
<cmd name="wait" min="15000" max="20000" />
</then>
<else>
<cmd name="set_emotion" target="1" index="0" />
<cmd name="wait" min="3000" max="5000" />
</else>
</if>
<if condition="expr" expr="15>@food">
<then>
<cmd name="say_to_all_immediate" text="I am hungry master D:|Please give me some food|I feel like dying ;~;|I can't live on x~x" />
<cmd name="follow" distance="150" run="false" continue="false" timeout="5000" />
<cmd name="wait" min="2000" max="3000" />
</then>
<else>
<if condition="expr" expr="@is_usable_skill(10004) and @random>0.5">
<then>
<cmd name="skill_relax" on="true" />
<cmd name="wait" min="7000" max="10000" />
<cmd name="skill_relax" on="false" />
<cmd name="wait" min="3000" max="5000" />
</then>
</if>
<if condition="expr" expr="@random>0.5">
<then>
<cmd name="say_to_all_immediate" text="I want to run away...|I am hungry... ;~;|Someone please help me...|I am just a tiny little Penguin Q^Q" />
<cmd name="move_random" radius="400" run="false" timeout="3000" />
</then>
</if>
<cmd name="wait" min="4000" max="7000" />
</else>
</if>
</then>
<else>
<if condition="expr" expr="@master_movestate == 1">
<then>
<cmd name="follow_target" target="1" distance="200" run="false" continue="false" timeout="5000" />
</then>
<else>
<cmd name="follow_target" target="1" distance="200" run="true" continue="false" timeout="5000" />
</else>
</if>
</else>
</if>
</sequence>
</pattern>
<pattern name="command:cute_trick">
<param_decl>
</param_decl>
<sequence>
<cmd name="chase" target="1" />
<cmd name="say_to_all_immediate" text="Watch me dance!|I love you Master!|Kyuuuuu~|Kyu Kyu!~" />
<cmd name="set_emotion" target="1" index="1" />
<cmd name="wait" min="15000" max="20000" />
</sequence>
</pattern>
<pattern name="command:sitdown">
<param_decl>
</param_decl>
<sequence>
<cmd name="skill_relax" on="true" />
<cmd name="say_to_all_immediate" text="I am so tired x3x|I want to go play...|I can't go on...|D:...." />
<cmd name="stop" />
</sequence>
</pattern>
<pattern name="command:standup">
<param_decl>
</param_decl>
<sequence>
<cmd name="say_to_all_immediate" text="I was just sitting! D:|I want to rest |Are we going somewhere?|My butt is itchy..." />
<cmd name="skill_relax" on="false" />
</sequence>
</pattern>
<pattern name="command:defense">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(20001) and @stamina>4">
<then>
<cmd name="say_to_all_immediate" text="XAX|I won't die! DX|I want to live!!!|Please save me!" />
<cmd name="prepare_skill" skill_id="20001" try_cnt="3" />
<cmd name="wait" min="10000" max="10000" />
<cmd name="cancel_skill" />
</then>
<else>
<cmd name="say_to_all_immediate" text="I can't go on! D:|I am too tired!|I don't want to be here!|Save me!" />
</else>
</if>
</sequence>
</pattern>
<pattern name="command:smash">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(20002) and @stamina>8">
<then>
<cmd name="prepare_skill" skill_id="20002" try_cnt="3" />
<cmd name="melee_attack" combo="1" timeout="6000" />
<cmd name="say_to_all_immediate" text="Take this!|Peck Attack!|I am going to kick your butt!|Die you monster!!" />
</then>
<else>
<cmd name="say_to_all_immediate" text="I am too tired to fight|Please save me!|I can't fight DX|I am just a tiny little pengy!" />
</else>
</if>
</sequence>
</pattern>
<pattern name="command:counter">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(20003) and @stamina>5">
<then>
<cmd name="say_to_all_immediate" text="Take this!|I don't want to die!!!|I want to live!|Someone save me!!!" />
<cmd name="prepare_skill" skill_id="20003" try_cnt="3" />
<cmd name="wait" min="10000" max="10000" />
<cmd name="cancel_skill" />
</then>
<else>
<cmd name="say_to_all_immediate" text="Nooooo!!!|I am too hungry!|Save me master!|I can't go on..." />
</else>
</if>
</sequence>
</pattern>
<pattern name="command:call">
<param_decl>
</param_decl>
<sequence>
<cmd name="say_to_all_immediate" text="Wait for me!~|Don't hurt me please.|Please don't kill me, right?|My legs hurt x~x" />
<cmd name="wait" min="500" max="1000" />
<cmd name="chase" target="1" />
</sequence>
</pattern>
<pattern name="command:pet_stop">
<param_decl>
</param_decl>
<sequence>
<cmd name="say_to_all_immediate" text="Ok!|I will just stand here.|My legs hurt X(|What do I do?" />
<cmd name="wait" min="3000" max="10000" />
</sequence>
</pattern>
<pattern name="command:firebolt">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(30201) and @mana>3">
<then>
<cmd name="stack_skill" skill_id="30201" charge="1" continue="true" />
</then>
<else>
<cmd name="say_to_all" text="_LT[xml.ai_local.210]" /></else>
</if>
</sequence>
</pattern>
<pattern name="command:icebolt">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(30301) and @mana>3">
<then>
<cmd name="stack_skill" skill_id="30301" charge="1" continue="true" />
<cmd name="say_to_all_immediate" text="Take my magical power!|Die Die Die!|I will shoot you!|Take this you monster!!" />
</then>
<else>
<cmd name="say_to_all_immediate" text="D:........|I can't fight!|I am drained of all power...|I must run away to live!!!" />
</else>
</if>
</sequence>
</pattern>
<pattern name="command:lightningbolt">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(30101) and @mana>3">
<then>
<cmd name="stack_skill" skill_id="30101" charge="1" continue="true" />
</then>
<else>
<cmd name="say_to_all" text="_LT[xml.ai_local.212]" /></else>
</if>
</sequence>
</pattern>
<pattern name="command:healing">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(30006) and @mana>20">
<then>
<cmd name="chase" target="1" />
<cmd name="say_to_all_immediate" text="I will save you master~!|Are you hurt~?|I will save you~|Am I helpful?" />
<cmd name="prepare_and_use_all_stacks" skill_id="30006" try_cnt="5" target="5" skilldelay="800" />
</then>
<else>
<cmd name="say_to_all_immediate" text="I am too tired :/|I can't help sorry.|Please don't kill me|I am sorry DX" />
</else>
</if>
</sequence>
</pattern>
<pattern name="command:first_aid">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_preparable_skill(10009)">
<then>
<cmd name="say_to_all_immediate" text="I will help you heal!|Hope you are fine.|I will help you in any way I can|owo" />
<cmd name="chase" target="1" />
<cmd name="prepare_skill" skill_id="10009" try_cnt="3" />
<cmd name="process_skill" target="5" />
</then>
<else>
<cmd name="say_to_all_immediate" text="Please don't hurt me|I am sorry!|Don't kill me!|I am just a baby~ ;~;" />
</else>
</if>
</sequence>
</pattern>
<pattern name="attack">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@stamina>8">
<then>
<if condition="random" rate="30">
<then>
<switch type="random">
<case rate="40">
<cmd name="melee_attack" combo="3" timeout="5000" />
</case>
<case rate="20">
<cmd name="prepare_skill" skill_id="20002" />
<cmd name="melee_attack" combo="1" timeout="5000" />
</case>
<case rate="10">
<cmd name="prepare_skill" skill_id="20001" />
<cmd name="move_around" radius="400" clockwise="true|false|" run="false" timeout="5000" />
<cmd name="cancel_skill" />
</case>
<case rate="10">
<cmd name="prepare_skill" skill_id="20003" />
<cmd name="wait" min="5000" max="5000" />
<cmd name="cancel_skill" />
</case>
<case rate="20">
<switch type="random">
<case rate="30">
<if condition="expr" expr="@is_usable_skill(30101) and @mana>10">
<then>
<cmd name="move_against" distance="800" run="true" timeout="2400" />
<cmd name="stack_skill" skill_id="30101" charge="1" continue="true" />
</then>
<else>
<cmd name="melee_attack" combo="3" timeout="5000" />
</else>
</if>
</case>
<case rate="30">
<if condition="expr" expr="@is_usable_skill(30201) and @mana>10">
<then>
<cmd name="move_against" distance="800" run="true" timeout="2400" />
<cmd name="stack_skill" skill_id="30201" charge="1" continue="true" />
</then>
<else>
<cmd name="melee_attack" combo="3" timeout="5000" />
</else>
</if>
</case>
<case rate="30">
<if condition="expr" expr="@is_usable_skill(30301) and @mana>10">
<then>
<cmd name="move_against" distance="800" run="true" timeout="2400" />
<cmd name="stack_skill" skill_id="30301" charge="1" continue="true" />
</then>
<else>
<cmd name="melee_attack" combo="3" timeout="5000" />
</else>
</if>
</case>
</switch>
</case>
</switch>
</then>
<else>
<cmd name="melee_attack" combo="3" timeout="5000" />
</else>
</if>
</then>
<else>
<cmd name="say_to_all" text="_LT[xml.ai_local.215]" />
<cmd name="move_around" radius="600" clockwise="true|false|" run="true|false|" timeout="3000" />
</else>
</if>
</sequence>
</pattern>
<pattern name="support">
<param_decl>
</param_decl>
<sequence>
<if condition="expr" expr="@is_usable_skill(30006) and @mana>20 and 0.9>@master_life/@master_life_max">
<then>
<cmd name="prepare_and_use_all_stacks" skill_id="30006" try_cnt="5" target="5" skilldelay="" />
</then>
</if>
<cmd name="wait" min="1000" max="1000" />
</sequence>
</pattern>
<pattern name="event_defence_success">
<param_decl>
<param name="delay" />
</param_decl>
<sequence>
<cmd name="melee_attack" combo="3" />
</sequence>
</pattern>
<pattern name="event_blowhit">
<param_decl>
<param name="delay" />
</param_decl>
<sequence>
<switch type="random">
<case rate="15">
<cmd name="prepare_skill" skill_id="20001" />
<cmd name="move_against" distance="1000" run="true" timeout="2000" />
<cmd name="cancel_skill" />
</case>
<case rate="15">
<cmd name="prepare_skill" skill_id="20001" />
<cmd name="move_random" radius="500" run="true" timeout="2000" />
<cmd name="cancel_skill" />
</case>
<case rate="70">
<cmd name="melee_attack" combo="3" timeout="4000" />
</case>
</switch>
</sequence>
</pattern>
</patterns>
<strategy>
<idle type="idle_pet" max_radius="500" follow_radius="100" comment="Wait for me!!!|I am so tired|I can't run with such tiny legs|My flippers hurt">
<pattern name="wander" />
<pattern id="attack" name="attack" radius="400" />
<pattern id="support" name="support" radius="500" />
<pattern id="submission" name="submission" />
<event name="blowhit">
<pattern name="event_blowhit" delay="0" />
</event>
<event name="defence">
<pattern name="event_defence_success" delay="0" />
</event>
</idle>
</strategy>
</template>
<definition race="aidescdata_pet_lizard">
<var_def>
<var name="visualfield_radius" value="800" />
<var name="audio_range" value="800" />
</var_def>
</definition>
</aidescdata>