viewtopic.php?f=15&t=1845
Some people said it was impossible but it was not..
I came up with my way to do itklimyriad wrote:ermm i done this with different maps like 1 map has 1 menu and a different map with a different menu but the way you want to do it i do not think it is possible.
This is what we will be doing
Lets start
First we want to open your maps .cfg
PlatinumArtsSandbox2.5\my_stuff\packages\base
After that
find this
Code: Select all
"on_start" = [
coin = 1
food = 0
sword = 0
treasure = 0
hp = 0
mp = 0
barrel = 0
book = 1
]
Code: Select all
"on_start" = [
book = 1
]
Now we want to start.
Now find your GUI were your NPC talks... Now find the VERY LAST Gui he says...
this is mine
Code: Select all
newgui Buying [
guitext "Ok, please but me 14 food, And bring it back" chat
guitext "Heres the money also" chat
guibar
guibutton "Take Gold"
]
under
Code: Select all
guibutton "take Gold"
your going to want to add this
Code: Select all
if ( > $book 0 ) [
book = ( - $book 0 )
book = ( + $book 25 )
]
]
Code: Select all
guibutton "Take Gold" [
if ( > $book 0 ) [
book = ( - $book 0 )
book = ( + $book 25 )
]
]
Code: Select all
newgui Buying [
guitext "Ok, please but me 14 food, And bring it back" chat
guitext "Heres the money also" chat
guibar
guibutton "Take Gold" [
if ( > $book 0 ) [
book = ( - $book 0 )
book = ( + $book 25 )
]
]
]
This will basically say If Book number is 0 or higher it will take 0 books away and add 25 so now the int is 26
now find the VERY FIRST thing he says
mine is this
Code: Select all
newgui Athely [
guitext "I have a quest for you? Can you help?" chat
guibar
guibutton "Yes i can." "showgui quest"
guibutton "No. not right now" "cleargui"
]
Code: Select all
if ( > $book 25 ) "showgui ?" [
Code: Select all
newgui quest [
if ( > $book 25 ) "showgui ?" [
guitext "Can you buy something for me? Ill give money" chat
guibar
guibutton "Yes i can." "showgui Buying"
guibutton "No. not right now" "cleargui"
]
Have fun!