New value

Locked
User avatar
stevomitric
Posts: 52
Joined: Mon Apr 01, 2013 6:35 pm
Location: Bosnia And Herzegovina ( bosna i hercegovina ( BIH ))

New value

Post by stevomitric »

again..problems..

i am using _menus.gsc ( called from quickmessage )

Code: Select all

		if(menu == -1 && response == "stevoinv")
		{
		
		self.stevo_invisible = self.stevo_invisible + 1; //self.stevo_invisible is new value ( 0 i  think) and it shoud add + 1 whenever player use this action and when it reaches  2 or 2 > then it shoud iprint message ^1Max limit reached, as u can see in line 29.
		
		if(self.stevo_invisible < 3)
		{
			self iprintlnbold("^2INVISEBLE");
			self.money-=5000;
			self.pers["money"]-=5000;
			self iprintlnbold("^1-5000");
			self hide();
			self iprintlnbold("^25");
			wait 1;
			self iprintlnbold("^24");
			wait 1;
			self iprintlnbold("^23");
			wait 1;
			self iprintlnbold("^22");
			wait 1;
			self iprintlnbold("^21");
			wait 1;
			self iprintlnbold("^2VISIBLE");
			self show();
		}
		else
		{
			self iprintlnbold("^1Max limit reached");
		}
        continue;
        }
Image
User avatar
Mitch
Site Admin
Posts: 195
Joined: Sat Mar 02, 2013 10:45 pm

Re: New value

Post by Mitch »

Code: Select all

if(menu == -1 && response == "stevoinv")
{
    if(!isDefined(self.stevo_invisible))
        self.stevo_invisible = 0;

    self.stevo_invisible++; 
    //self.stevo_invisible is new value ( 0 i  think) and it shoud add + 1 
    //whenever player use this action and when it reaches  2 or 2 > 
    //then it shoud iprint message ^1Max limit reached, as u can see in line 29.
    
    if(self.stevo_invisible < 3)
    {
        price = 5000;
        self iprintlnbold("^2INVISIBLE");
        self.money-=price; // why 2 times?
        self.pers["money"]-=price; // which one do you use?
        self iprintlnbold("^1-" + price);
        self hide();
        self iprintlnbold("^25");
        wait 1;
        self iprintlnbold("^24");
        wait 1;
        self iprintlnbold("^23");
        wait 1;
        self iprintlnbold("^22");
        wait 1;
        self iprintlnbold("^21");
        wait 1;
        self iprintlnbold("^2VISIBLE");
        self show();
    }
    else
    {
        self iprintlnbold("^1Max limit reached");
    }

    continue;
}
 
Image
User avatar
stevomitric
Posts: 52
Joined: Mon Apr 01, 2013 6:35 pm
Location: Bosnia And Herzegovina ( bosna i hercegovina ( BIH ))

Re: New value

Post by stevomitric »

works.
Image
User avatar
[ZN]Puissant
Moderator
Posts: 72
Joined: Mon Mar 04, 2013 3:10 pm

Re: New value

Post by [ZN]Puissant »

Problem solved, closing topic
Image

~ Always here to help ~
~ Good joker ~
Locked