Jump to content

Recommended Posts

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I did this quest a while ago

item_proto.txt
vnum 70038
item_type ITEM_QUEST or 18

 

auto_cape.quest
 

define VNUM_CAPE 70038

quest auto_cape begin
	state start begin
	
		function capeAction()
			pc.aggregate_monster()
			pc.changegold(-1000)
		end
	
		when VNUM_CAPE.use begin
			if pc.getqf("wait_time") < get_time() then
				if item.get_socket(0) == 0 then
					item.set_socket(0, 1)
					pc.setqf("wait_time", get_time()+3)
					pc.setqf("cell_item", item.get_cell())
					auto_cape.capeAction()
					loop_timer("lt_autocape", 3)
				else
					item.set_socket(0, 0)
					cleartimer("lt_autocape")
				end
			else
				syschat("Espera un momento")
			end
		end
		when lt_autocape.timer begin
			auto_cape.capeAction()
		end
		when login begin
			if item.select_cell(pc.getqf("cell_item")) then
				if item.vnum == VNUM_CAPE and item.get_socket(0) == 1 then
					auto_cape.capeAction()
					loop_timer("lt_autocape", 3)
				end
			end
		end
		when die begin
			if item.select_cell(pc.getqf("cell_item")) then
				if item.vnum == VNUM_CAPE and item.get_socket(0) == 1 then
					item.set_socket(0, 0)
					cleartimer("lt_autocape")
				end
			end
		end
	end
end

 

Activate/Deactivate slot:
root/constInfo.py
 

def IS_AUTO_POTION_HP(itemVnum):
	if 72723 <= itemVnum and 72726 >= itemVnum:
		return 1
	elif itemVnum >= 76021 and itemVnum <= 76022:
		return 1
	elif itemVnum == 79012:
		return 1
	#ADD THIS
	elif itemVnum == 70038:
		return 1
	#

	return 0



 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.