Official Nodeka Board  

Go Back   Official Nodeka Board > Nodeka > Scripting > JMC

Reply
 
Thread Tools Display Modes
  #1  
Old 06-11-2009, 09:19 PM
Socco Socco is offline
Novice
 
Join Date: Jun 2009
Posts: 20
Default variables?

I want to be able to do something like this;

#act {You get < salvage >}{#outp {white} SALVAGE};#var salvage 1}
#act {You get < salvage >}{#outp {white} SALVAGE};{$if salvage=1}{#var salvage 2}}
#act {You get < salvage >}{#outp {white} SALVAGE};{$if salvage=2}{#var salvage 3}
#act {$if salvage=3}{recall}


Anyone know how I'd go about do that?
Making it so every 3x salvage it recalls
Reply With Quote
  #2  
Old 06-12-2009, 01:14 PM
grimm's Avatar
grimm grimm is offline
Apprentice
 
Join Date: Nov 2008
Posts: 78
Default

#act {You get < salvage >}{#outp {white} SALVAGE};{$if salvage=1&&check=false}{#var salvage 2;#var check true};{$if salvage=2&&check=false}{#var salvage 3;#var check true};{$if salvage=3&&check=false}{recall;#var salvage 1;#var check true};#var check false}


You'd want all of em to be in the same trigger. as having the same trigger capture, the latest trigger would overwrite the previous.

This way it does a "sort of" if else method. Unless there's an if else method than awesome just use that.
________
Mercedes-benz clc-class history

Last edited by grimm; 03-10-2011 at 02:51 AM.
Reply With Quote
  #3  
Old 06-18-2009, 12:34 AM
Drayke Drayke is offline
Wanderer
 
Join Date: Jan 2008
Posts: 3
Default

Quote:
Originally Posted by Socco View Post
I want to be able to do something like this;

#act {You get < salvage >}{#outp {white} SALVAGE};#var salvage 1}
#act {You get < salvage >}{#outp {white} SALVAGE};{$if salvage=1}{#var salvage 2}}
#act {You get < salvage >}{#outp {white} SALVAGE};{$if salvage=2}{#var salvage 3}
#act {$if salvage=3}{recall}


Anyone know how I'd go about do that?
Making it so every 3x salvage it recalls
#var salvage {0}
#act {You get < salvage >}{#outp {white} SALVAGE};#math {salvage} {$salvage+1};checksalvage}}

#alias {checksalvage} {#if {$salvage=3} {recall};#var salvage {0}}

alternatively you could create another action to reset the salvage var to 0 on an an action line from giving salvage to a gnome
Reply With Quote
  #4  
Old 04-05-2010, 03:47 PM
Tsuelf Tsuelf is offline
Wanderer
 
Join Date: Mar 2010
Location: home
Posts: 3
Default #var Dragon Stance/Savage Talons

I want to set up a trigger better than just:
#act {You are no longer affected by: dragon stance.}{dragon stance}

I'd like it to be something like.

#act {You are no longer affected by: dragon stance.}{aff}
if the affect is strength + savage talons, then #alias {kill}{vicious fist}
and if the affect is just strength, then #unalias kill
if there are no affects at all giving strength or savage talons then I'd like it
to reperform dragon stance.

I think I understand the #var {savageTalon}{1}
#if {$savageTalon == 1}{#alias kill vicious}
I just have no idea how to put it all together.
Reply With Quote
  #5  
Old 04-05-2010, 04:23 PM
Tsuelf Tsuelf is offline
Wanderer
 
Join Date: Mar 2010
Location: home
Posts: 3
Default what's wrong with these strings?

#var savagetalons {0}

#act {You are no longer affected by: dragon}{#outp {white}SAVAGETALONS};
#math {savagetalons} {$savagetalons+1};checkdragon;checksavage}}

#alias {checkdragon} {#if {$savagetalons=2} {dragon stance};#var savagetalons {0};#alias {kill}{vicious}}

#alias {checksavage} {#if {$savagetalons=1} {#unalias kill}}
Reply With Quote
  #6  
Old 04-05-2010, 05:17 PM
Tsuelf Tsuelf is offline
Wanderer
 
Join Date: Mar 2010
Location: home
Posts: 3
Default nevermind!

I actually figured it out.

#var {savagetalons} {0}
#act {You are no longer affected by: dragon}{#math {savagetalons}{$savagetalons+1};checkdragon;checks avage}
#alias {checkdragon}{#if {$savagetalons=2}{dragon stance;#var {savagetalons}{0};#alias {kill}{vicious}}}
#alias {checksavage}{#if {$savagetalons=1}{#unalias kill}}
#act {You lose your focus.}{in;in;in;in;in;in;in;in;in;in;in;in;in;dra gon stance}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:50 AM.


Design By: Miner Skinz.com
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.