Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

How do I limit the use of a shop ?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Mar 27, 2005 3:12 am    Post subject: How do I limit the use of a shop ? Reply with quote

I would like my hero not be able a shop after he has used a shop 4 or 5 times ? Does somoene can tell me if there is a way to do that ? if yes could you explain me how ? if not could somoene give a method without using shops ?

Thank you very much for the help!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jack
the fool




Joined: 30 Jul 2004
Posts: 773

PostPosted: Sun Mar 27, 2005 4:55 am    Post subject: Reply with quote

you could use tags.

have the 'use shop #--' tag on the first text box. then set a tag so that the next time you talk to the guy, a new text box comes up. then do the same thing until the 4 or 5th text box.

i dunno if you can understand that clear enough, if you need more help ill try and describe more.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Leo
The wizard of many faces...




Joined: 02 Nov 2004
Posts: 95
Location: Way far up north in Sweden...

PostPosted: Sun Mar 27, 2005 5:09 am    Post subject: Reply with quote

Use a global variable. Something like this:

Code:
global variable (1,var)

script,shop,begin
 if (var<=4) then
 begin
  increment (var,1)
  use shop (?) #shop number
 end
 else (?) #whatever you want to happen after 4 times
end


run this from the shop npc
_________________
"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."
-Douglas Adams

Download Zander (Swedish)

or Zander (English)
Back to top
View user's profile Send private message Send e-mail
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Mar 27, 2005 6:14 am    Post subject: Reply with quote

Change
 if (var<=4) then 

to
 if (var<<4) then 

and then change the '4' to how ever many times you want the shop to be available.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
bis_senchi




Joined: 08 Jun 2004
Posts: 460
Location: Reims, France

PostPosted: Sun Mar 27, 2005 11:50 pm    Post subject: Ok I think the variable is ok but... Reply with quote

Variable is ok! You talked 4 times to the shop keeper and then another text box appear.
Could somoene give details with the tags ? I don't understand very well. Does such an operation suppose that you should use 4 tags ?

I think it would be a good idea to make it clear!
Thanks in advance!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mike Caron
Technomancer




Joined: 26 Jul 2003
Posts: 889
Location: Why do you keep asking?

PostPosted: Mon Mar 28, 2005 10:42 am    Post subject: Reply with quote

Basically, what you want is this: (I adapted Leo's script)

Code:
global variable (1,shop used)

script,shop,begin
  if (shop used<=4) then
  begin
    increment (shopused,1)
    use shop (shop:my shop) #shop number
  end
  else
  begin
    show text box (667) #shopkeeper: fug off
  end
end


Later, if you want to make the shop available again, use a script like this:

Code:
script,reset shop, begin
  shop used:= 0
end


If you THEN want to make the shop available forever, you need to be more devious:
Code:
 script, perma reset shop, begin
  shop used:= -1
end

#this is the first script, but changed around
#it will not increment "shop used" if it == -1
script,shop,begin
  if (shop used<=4) then
  begin
    if (shop used > -1) then (increment (shopused,1))
    use shop (shop:my shop) #shop number
  end
  else
  begin
    show text box (667) #shopkeeper: fug off
  end
end

_________________
I stand corrected. No rivers ran blood today. At least, none that were caused by us.

Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Mar 30, 2005 2:10 am    Post subject: Reply with quote

There are no tags involved. If you already have other global variables, change the id number of the global 'var' (or in pkmnfrk's version, 'shop used')
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group