Spellcast Item/food Rules. Help

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Spellcast Scripting » Other » Spellcast item/food rules. Help
Spellcast item/food rules. Help
 Cerberus.Keeo
Offline
サーバ: Cerberus
Game: FFXI
Posts: 117
By Cerberus.Keeo 2013-03-06 09:12:32  
Is there a way with spellcast to monitor the use of items/food to give you a warning when the effect is going to wear off? E.g Fanatic's drink. The effect lasts 60 seconds what would my rules be to firstly monitor that i used fanatics and secondly a 10 second warning when the effect will run out?

This would also be handy with food like curry buns.
 Shiva.Paulu
Offline
サーバ: Shiva
Game: FFXI
user: Paulu
Posts: 769
By Shiva.Paulu 2013-03-06 09:30:32  
I use a combo of autoexec to do this for Fanatic's Drink.

Autoexec
Code
<register event="gainbuff_physical*" silent="true">wait 50; input /ma "Dancing Chains" <t></register>


spellcast
Code
<if spell="Dancing Chains">
		<cancelspell />
		<addtochat Color="8">FANATICS WEARS IN 10!!!</addtochat>
		<addtochat Color="8">FANATICS WEARS IN 10!!!</addtochat>
		<addtochat Color="8">FANATICS WEARS IN 10!!!</addtochat>
		<addtochat Color="8">FANATICS WEARS IN 10!!!</addtochat>
		<addtochat Color="8">FANATICS WEARS IN 10!!!</addtochat>	
	</if>


I have diplayed 5 times so I don't miss it in battle spam anymore.
 Cerberus.Keeo
Offline
サーバ: Cerberus
Game: FFXI
Posts: 117
By Cerberus.Keeo 2013-03-06 09:35:24  
Thanks thats exactly what i am looking for.

Is there a way to do this with food or would the wait command be to long? e.g 30 minute food efect would be a wait 1800, is that even possible?
 Shiva.Paulu
Offline
サーバ: Shiva
Game: FFXI
user: Paulu
Posts: 769
By Shiva.Paulu 2013-03-06 09:38:18  
I'm sure what the limitations to wait are but you could try it.
 Shiva.Damonz
Offline
サーバ: Shiva
Game: FFXI
user: Damonz
Posts: 211
By Shiva.Damonz 2013-03-06 09:42:12  
it should be possible, (I never used autoexec so I don't know the correct format for the code)
Code
<register event="losebuff_food*" silent="true">wait 50; input /ma "Dummy Spell" <t></register>

Code
<if spell="Dummy Spell">
        <cancelspell />
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>   
    </if>
Offline
Posts: 1018
By kenshynofshiva 2013-03-06 09:47:54  
Just as gainbuff is used in autoexec you can use losebuff as a trigger with food it doesn't state what food so duration would be rough since many variables on food so you could fire off the spam whenever you lose your food buff...

Shiva.Damonz said: »
it should be possible, (I never used autoexec so I don't know the correct format for the code)
Code
<register event="losebuff_food*" silent="true">wait 50; input /ma "Dummy Spell" <t></register>

Code
<if spell="Dummy Spell">
        <cancelspell />
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>   
    </if>

Pretty much above just remove the wait 50 and <t> since you wont always have a target can just make it me...
 Shiva.Damonz
Offline
サーバ: Shiva
Game: FFXI
user: Damonz
Posts: 211
By Shiva.Damonz 2013-03-06 09:53:43  
kenshynofshiva said: »
Just as gainbuff is used in autoexec you can use losebuff as a trigger with food it doesn't state what food so duration would be rough since many variables on food so you could fire off the spam whenever you lose your food buff...

Shiva.Damonz said: »
it should be possible, (I never used autoexec so I don't know the correct format for the code)
Code
<register event="losebuff_food*" silent="true">wait 50; input /ma "Dummy Spell" <t></register>

Code
<if spell="Dummy Spell">
        <cancelspell />
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>
        <addtochat Color="8">FOOD JUST WORE!!!</addtochat>   
    </if>

Pretty much above just remove the wait 50...
ahh yah forgot to remove the wait, but I wasn't even certain that losebuff was a tag (just an assumption)
Offline
Posts: 1018
By kenshynofshiva 2013-03-06 09:55:59  
lol -> http://wiki.windower.net/display/Windower/Autoexec
 Cerberus.Keeo
Offline
サーバ: Cerberus
Game: FFXI
Posts: 117
By Cerberus.Keeo 2013-03-06 10:06:46  
Ok with out autoexec

Would somthing like this work in spellcast

Code xml
<var name="Food">0</var>
		
		<if advanced='"$Food" == "1"'>
			<if notbuffactive = "Food*">
				<action type="addtochat" color="167">Eat your Food!</action>		
			</if>
		</if>
		
		<if advanced='"$Food" == "0"'>	
			<if buffactive = "Food*">
				<action type="command" when="aftercast">sc var set Food 1</action>
			</if>
		</if>


Its just the buffactive food* part im not sure about.
Offline
Posts: 1018
By kenshynofshiva 2013-03-06 10:19:14  
Cerberus.Keeo said: »
Ok with out autoexec

Would somthing like this work in spellcast

Code xml
<var name="Food">0</var>
		
		<if advanced='"$Food" == "1"'>
			<if notbuffactive = "Food*">
				<action type="addtochat" color="167">Eat your Food!</action>		
			</if>
		</if>
		
		<if advanced='"$Food" == "0"'>	
			<if buffactive = "Food*">
				<action type="command" when="aftercast">sc var set Food 1</action>
			</if>
		</if>


Its just the buffactive food* part im not sure about.

It never sets food back to 0 unless your doing it some place else also this code would get run a lot autoexec would be less processing.
 Shiva.Damonz
Offline
サーバ: Shiva
Game: FFXI
user: Damonz
Posts: 211
By Shiva.Damonz 2013-03-06 10:22:28  
Cerberus.Keeo said: »
Ok with out autoexec

Would somthing like this work in spellcast

Code xml
<var name="Food">0</var>
		
		<if advanced='"$Food" == "1"'>
			<if notbuffactive = "Food*">
				<action type="addtochat" color="167">Eat your Food!</action>		
			</if>
		</if>
		
		<if advanced='"$Food" == "0"'>	
			<if buffactive = "Food*">
				<action type="command" when="aftercast">sc var set Food 1</action>
			</if>
		</if>


Its just the buffactive food* part im not sure about.

You might be able to get away with just
Code
   <if notbuffactive = "Food*">
            <action type="addtochat" color="167">Eat your Food!</action>       
   </if>

Most likely it would have to be at or near the end of your XML
(the advanced tag is used for variables, so what you're telling SC with the other code to do is, {is food variable set to 1? if so do this <if notbuffactive = "Food*">
<action type="addtochat" color="167">Eat your Food!</action>
</if>

EDIT: and yes doing it this way is going to eat up more processor, since it's going to check this each and every action you do
 Cerberus.Keeo
Offline
サーバ: Cerberus
Game: FFXI
Posts: 117
By Cerberus.Keeo 2013-03-06 10:29:45  
Yes i would have to macro in a swap back for 0. it was just somthing i come up with quickly. Maybe ill try autoexec.

Some of my spellcast have a lot of coding in them would it be better to put as much of what i can in to autoexec.

other than the obvious autoexec detects changes, buffs,days and so on whats is the diffrence between autoexec and spellcast from a processing point of view. I always asumed that With autoexec Continually running that would be worse than a spellcast that runs just when you perform an action.
 Shiva.Damonz
Offline
サーバ: Shiva
Game: FFXI
user: Damonz
Posts: 211
By Shiva.Damonz 2013-03-06 10:35:52  
I think the major difference is that spellcast checks everytime you do an action, where autoexec reads memory/chat log and triggers on that (IE SC doesn't know your food wore until you do an action after it wore, where autoexec knows it wore as soon as it hits chatlog)
Log in to post.