Jump to content

Photo

A shop question


  • Please log in to reply
5 replies to this topic

#1 Yapollo

Yapollo

    To Discover

  • Members
  • Location:Somewhere in the U.S.

Posted 17 April 2011 - 01:45 PM

Would it be possible to implement a bit of script that would allow one shop type to switch to another without resorting to creating another screen. Or better yet, is it possible to add and remove elements from a shop type using scripting. I would really appreciate an answer, I have a very sparse knowledge of ZScript.

Thank you in advance.

Edited by Yapollo, 17 April 2011 - 01:46 PM.


#2 Rastael

Rastael

    Wizard

  • Members
  • Real Name:Raphael
  • Location:Austria

Posted 18 April 2011 - 04:47 AM

Maybe this can help you:
http://www.purezc.co...showtopic=43829

This is a Oracle-style-shop-script. Here, you have the function that one of the items can only be bought once.

(sorry or my bad english)

#3 Yapollo

Yapollo

    To Discover

  • Members
  • Location:Somewhere in the U.S.

Posted 18 April 2011 - 12:30 PM

Well that does help, thank you for the link, but would there be a way to do such a thing with two or three items per room with a total of approximately 9 or 10 items altogether?

#4 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 18 April 2011 - 12:36 PM

That script can make up to 32 items per screen - 1 per FFC. Changing these items would probably take some heavy modifications, though.

#5 Giggidy

Giggidy

    We live for chaos so that we may die for ourselves.

  • Banned

Posted 18 April 2011 - 01:30 PM

Make a screen control script that reads from a global variable, then places items in the shop depending upon the variable's value. Then have screens elsewhere with scripts that change the value of that variable. This way, you can have things like, say, clearing a dungeon puts up a new item for sale in town.

#6 Yapollo

Yapollo

    To Discover

  • Members
  • Location:Somewhere in the U.S.

Posted 18 April 2011 - 04:24 PM

QUOTE(Giggidy @ Apr 18 2011, 02:30 PM) View Post

Make a screen control script that reads from a global variable, then places items in the shop depending upon the variable's value. Then have screens elsewhere with scripts that change the value of that variable. This way, you can have things like, say, clearing a dungeon puts up a new item for sale in town.


This should work for what I'm trying to go for (with some tweaking), and Joe123's solution seems to be pretty good too. I'll start working on it.

Thank you one and all.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users