+ Reply to Thread
Results 1 to 3 of 3

Thread: Something wrong

  1. #1
    Mabination User Shironi the golem slayer Shironi's Avatar
    Mabinogi
    Server
    NA - Alexina
    Character
    Shironi
    Total Level
    5xx
    Race
    Giant
    Guild
    Astonish
    Playing?
    Playing actively
    Vindictus/Heroes
    Playing?
    Not interested
    Join Date
    Apr 2010
    Location
    Cor
    Posts
    575
    Gold
    9,960

    Something wrong

    So, I tried to turn my hand to pet ais. It didn't turn out well.

    See, I wanted a simple script that would let my jindo look for a fomor, smash it, defend, combo, defend and so on. Basically a attack-defend script. But it failed, and now everytime it succesfully defends a attack, it tries to smash the opponent. WHich I think is the fault of the first rule, but I don't know how to fix eet. Help?

    Code:
    <rules>
    	<rule name="FInd">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="smash" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="seek_target"/>
    	</rule>
    	<rule name="Attack">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="now_targeting"/>
    	</rule>
    	<rule name="Use Defense">
    		<conditions>
    			<condition name="target_state" state="shoved"/>
    		</conditions>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attack" pet_attackable_skill="all" down="false"/>
    	</rule>
    	<rule name="Use Defense anyway">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attack" pet_attackable_skill="basic" down="true"/>
    	</rule>
    	<rule name="Attac kafter Defending">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="defence" defence_enable_skill="basic"/>
    	</rule>
    	<rule name="Attac kMagic">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="target_magic_prepare"/>
    	</rule>
    	<rule name="Attack Ranged">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="aimed"/>
    	</rule>
    	<rule name="Defend after being attacked">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attacked" master_skill="all" down="false"/>
    	</rule>
    	<rule name="Defend after being knocked down">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attacked" master_skill="all" down="true"/>
    	</rule>
    	<rule name="Smash a walker">
    		<conditions>
    			<condition name="target_state" state="walk"/>
    		</conditions>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="smash" try_cnt="0" timeout="0"/>
    				<cmd name="process_skill" target="enemy" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="target_skill_prepare"/>
    	</rule>
    </rules>

  2. #2
    Nyo has disabled reputation
    Mabinogi
    Server
    NA - Ruairi
    Character
    Mandrake
    Race
    Human
    Talent
    Medicine
    Playing?
    Playing rarely
    Vindictus/Heroes
    Join Date
    Apr 2010
    Posts
    198
    Gold
    5,170
    Based on your description and code, I made some modifications and corrections.
    Code:
    <rules>
    	<rule name="FInd">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="smash" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="seek_target"/>
    	</rule>
    	<rule name="Attack">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="now_targeting"/>
    	</rule>
    	<rule name="Use Defense">
    		<conditions>
    			<condition name="target_state" state="shoved"/>
    		</conditions>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attack" pet_attackable_skill="all" down="false"/>
    	</rule>
    	<rule name="Use Defense anyway">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attack" pet_attackable_skill="basic" down="true"/>
    	</rule>
    	<rule name="Attac kafter Defending">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="defence" defence_enable_skill="basic"/>
    	</rule>
    	<rule name="Attac kMagic">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="target_magic_prepare"/>
    	</rule>
    	<rule name="Attack Ranged">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="melee_attack" timeout="5000"/>
    			</sequence>
    		</pattern>
    		<event name="aimed"/>
    	</rule>
    	<rule name="Defend after being attacked">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attacked" master_skill="all" down="false"/>
    	</rule>
    	<rule name="Defend after being knocked down">
    		<conditions/>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="defence" try_cnt="0" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="attacked" master_skill="all" down="true"/>
    	</rule>
    	<rule name="Smash a walker">
    		<conditions>
    			<condition name="target_state" state="walk"/>
    		</conditions>
    		<pattern>
    			<param_decl/>
    			<sequence>
    				<cmd name="prepare_skill" pet_skill="smash" try_cnt="0" timeout="0"/>
    				<cmd name="process_skill" target="enemy" timeout="0"/>
    			</sequence>
    		</pattern>
    		<event name="target_skill_prepare"/>
    	</rule>
    </rules>
    I'd describe what I did, but it's way past my bedtime and I'm too tired to be coherent.
    [Ruairi NA] Mandrake the level 2000 herb | Nyon the Japanese Bobtail
    [Tarlach NA] Nyo the level 30 beta tester
    [Triona JP] Stephen the level 60 at age 260 | Nyon the mikeneko
    [Cichol JP] Nyo who is stalking Majikaru

  3. #3
    Mabination User Shironi the golem slayer Shironi's Avatar
    Mabinogi
    Server
    NA - Alexina
    Character
    Shironi
    Total Level
    5xx
    Race
    Giant
    Guild
    Astonish
    Playing?
    Playing actively
    Vindictus/Heroes
    Playing?
    Not interested
    Join Date
    Apr 2010
    Location
    Cor
    Posts
    575
    Gold
    9,960
    Thanks! I'll have to test this out tomorrow as well xP

+ Reply to Thread

Bookmarks