[IDEA's] configuration

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

[IDEA's] configuration

#1 Post by Technology »

Ok, so we had this idea on IRC, you are free to discuss and add more examples.

Code: Select all

teleport.item Fly Wing
teleport.skill Teleport 1
# TODO: we could search for an item: teleport.item_skill.item 4040 # in this case, the Creamy Card inside an equippable item

block teleport {
	options {
		auto 0
		addCommand 1
		enabled 1
	}

	condition skill {
                skills {skill}
        }
        action skill {
                useSkill {skill}
        }

        condition item {
                inventory {item}
        }
        action item {
                useItem {item}
        }

	# configured later with:
	#	teleport.item_skill {
	#		{location} leftAccesory
	#		{item} Clip [creamy] [1]
	#		{skill} Teleport 1
	#	}
	condition item_skill {
		inventory {item}
	}
	action item_skill {
		set {previous_item} equipped {location}
		equip {location} {item}
		block wait_equip {
			condition {
				equipped {item}
			}
			action {
				useSkill {skill}
			}
		}
		equip {location} {previous_item}
	}
}
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!