Author Topic: Multiple variables required, possible or impossible  (Read 1085 times)

I was wondering if it was possible to create somthing that required multiple variables to use, such as a forge where in order to make a bronze bar, you needed a piece of tin ore and a piece of copper ore.

I've tried this, but for some reason it only keeps track of the tin and gives people negative copper ore and only stops when you run out of tin.

I was wondering if anyone knew how to stop that.

yes i noticed this when i tryed to make a potion mixing vat (might meddle around a bit and see what is possible) but you could allways try:

onactivate, self, ifvariable, player, tin, equalsgreater, 1,
variabletrue, self, ifvariable, player, copper, equalsgreater, 1,
variabletrue, player, addvariable, bronze, 1,
variabletrue, player, addvariable, tin and copper, -1,
variabletrue, client, displayvariable, bronze,
variablefalse, client, centerprint, You dont have enough copper or tin to make bronze,

You either need multiple bricks, or use this.

Hope this helps you


onActivate>Self>ifVariable>Player>copper ore>GreaterEquals>1
onActivate>Self>ifVariable>Player>tin ore>GreaterEquals>1
onActivate>Client>displayVariable>Player>ChatMessage>Copper Ore
onActivate>Client>displayVariabe>Player>ChatMessage>Tin Ore
VariableTrue>Player>addVariable>Copper Ore>-1
VariableTrue>Player>addVariable>Tin Ore>-1
VariableTrue>Player>addVariable>Bronze Bar>1
VariableTrue>Client>displayVariable>Player>ChatMessage>Bronze Bar
VariableFalse>Client>MessageBoxOK>It requires 1 Copper Ore and 1 Tin ore to forge a Bronze Bar


Hope this helps you


onActivate>Self>ifVariable>Player>copper ore>GreaterEquals>1
onActivate>Self>ifVariable>Player>tin ore>GreaterEquals>1
onActivate>Client>displayVariable>Player>ChatMessage>Copper Ore
onActivate>Client>displayVariabe>Player>ChatMessage>Tin Ore
VariableTrue>Player>addVariable>Copper Ore>-1
VariableTrue>Player>addVariable>Tin Ore>-1
VariableTrue>Player>addVariable>Bronze Bar>1
VariableTrue>Client>displayVariable>Player>ChatMessage>Bronze Bar
VariableFalse>Client>MessageBoxOK>It requires 1 Copper Ore and 1 Tin ore to forge a Bronze Bar



Yeah i was wrong forget that

i tried that and it is (oalmost) imposible. I variables.