Code: Select all

`[origem=getSelected()]`

[switchToken(origem)]

[input("nome|0|Nome da Arma","tipo|Combate Desarmado,Faca,Punhal,Cajado,Porrete,Gladio,Espada,Cimitarra,Machado,Machadinha,Machado Crescente,Clava,Maca,Martelo de Guerra,Mangual Leve,Arco Simples,Arco Composto,Arco de Guerra,Lanca Leve,Lanca de Guarda,Lanca Pesada,Espada de Mao-e-Meia,Montante,Machado de Guerra,Axa de Armas,Maca de Armas,Mangual,Marreta de Guerra,Lanca de Justa,Lanca de Cavalaria|Tipo de Arma|LIST|SELECT=0 VALUE=STRING","mag|0|Bonus Magico","n|1|Numero")]

[foreach(prop,GruposArmas,"",";"): eval(prop)]

[switch(tipo),code:

case "Combate Desarmado":{

[gr=CD]

[l=0+gr+mag]

[m=-3+gr+mag]

[p=-6+gr+mag]

[db=1+mag+Forca]

[comp="Nome="+nome+";AtqL="+l+";AtqM="+m+";AtqP="+p+";DanoB="+db]

[if(n=="1"):Arma1=comp]

[if(n=="2"):Arma2=comp]

[if(n=="3"):Arma3=comp]

[if(n=="4"):Arma4=comp]

};

case "Faca":{

[gr=Cl]

[l=2+gr+mag]

[m=-3+gr+mag]

[p=-5+gr+mag]

[db=2+mag+Forca]

[comp="Nome="+nome+";AtqL="+l+";AtqM="+m+";AtqP="+p+";DanoB="+db]

[if(n=="1"):Arma1=comp]

[if(n=="2"):Arma2=comp]

[if(n=="3"):Arma3=comp]

[if(n=="4"):Arma4=comp]

};

case "Punhal":{

[gr=Cl]

[l=2+gr+mag]

[m=-2+gr+mag]

[p=-5+gr+mag]

[db=3+mag+Forca]

[comp="Nome="+nome+";AtqL="+l+";AtqM="+m+";AtqP="+p+";DanoB="+db]

[if(n=="1"):Arma1=comp]

[if(n=="2"):Arma2=comp]

[if(n=="3"):Arma3=comp]

[if(n=="4"):Arma4=comp]

};

...

}]

Basicaly, this macro is called from a Campaign Macro. it can't be edited by players. An input asks for a name, a weapon type, a magic bonus e a number. So it will switch between the avaliable types of weapons, do some calculations e modify the original value of the Token Property

*Arma#*.

Everything works perfectly, and no errors occours. But the Token Property

*Arma#*is not being modified.

Any helps?