Page 1 of 1

New value

Posted: Mon Feb 24, 2014 2:56 pm
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;
        }

Re: New value

Posted: Mon Feb 24, 2014 3:04 pm
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;
}
 

Re: New value

Posted: Mon Feb 24, 2014 3:47 pm
by stevomitric
works.

Re: New value

Posted: Sun Mar 02, 2014 11:28 pm
by [ZN]Puissant
Problem solved, closing topic