Page 1 of 1

Curiosity (scissors related)

Posted: 20 Nov 2011, 17:26
by Piateluca
Why after using 1 it dissapears from inventory??

(also happens with Purification potion if you use it in the wrong map)


I know is not bugs, im just curious if there is a reason for that to happen :oops: :oops: :oops:

Re: Curiosity (scissors related)

Posted: 20 Nov 2011, 23:19
by Nard
it is normal, they reappear when you change map.
You can also notice that towels disappear and reappear too after using them :)

Re: Curiosity (scissors related)

Posted: 21 Nov 2011, 15:39
by Jenalya
Items that can be used are consumed when using them. The scripts for items like the scissors or purification potion give you back a new item (see the getitem command).

Code: Select all

function|script|useScissors|{
    if (rand(3))
        goto L_Change;
    message strcharinfo(0), "Whoops!";
    itemheal -20 - rand(Hp >> 1), 0;
    getitem "Scissors", 1;
    end;

L_Change:
    setlook LOOK_HAIR_STYLE, rand(20);
    getitem "Scissors", 1;
    end;
}

Code: Select all

function|script|usePurificationPotion|{
    if (isat("011-1.gat", 88,67))
        goto L_Wyara_Pond;

L_NoUse:
    message strcharinfo(0), "You don't know what to do with this.";
    getitem "PurificationPotion", 1;
    return;

L_Wyara_Pond:
[...]
You can find the scripts here: https://gitorious.org/tmw/tmwa-server-d ... /npc/items

Re: Curiosity (scissors related)

Posted: 21 Nov 2011, 16:26
by Piateluca
thanks to both