Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Variables Only With Certain Items

18 years ago
When scripting is released, it will be nice if you could have certain variables only show up on pages if you have a certain item, like 'blackmagic' for instance, only comes up if you are carrying the magic book or something.

Variables Only With Certain Items

18 years ago
Yeah. That would help everyone a lot.

Variables Only With Certain Items

18 years ago
You can do this easily with the advanced scripting.

Here is some pheusdocode:

If Item (Spellbook) is in Inventory
  Than show Var (BlackMagic)
Else
EndIf

You'll have to find the code for that though.  You give me ideas...

Variables Only With Certain Items

18 years ago

Here is what you need to use in a Global Page Script. Replace the 92 in $ITEMSTATE92 with the actual ID of your item (can be found next to the name of your item on the item page). Also, replace the variable enclosed in quotes, so $PAGETEXT + "%%ITEM92VAR%% can be replaced with whatever variable you wanted.


IF $ITEMSTATE92 = 1 THEN
$PAGETEXT := $PAGETEXT + "%%ITEM92VAR%%"

 

If you want you can display a whole different text for the page if your item is being held line would be:
$PAGETEXT := "This is the new description"

Also, you can include the old pagetext (the original) and add more writing:
$PAGETEXT := $PAGETEXT + "This some extra description and you can display variables like %%VARIABLEHERE%% this."

Variables Only With Certain Items

18 years ago
That's confusing.. very confusing.