viewing paste Unknown #15909 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
athlum_in,94,157,3              script  Branch Manager  865,{
        set @npc$, "[^0000FFBranch Manager^000000]";
       
 
        mes @npc$;
        mes "Hi!";
        mes "I can convert your Dead Branch to Bloody Branch, and your Bloody Branch to Dead Branch.";
        next;
 
        set .@makestr$, "Make "+getitemname(.@items[0])+":Make "+getitemname(.@items[1]);
       
        set .@i, select(.@makestr$)-1;
       
        setarray @items[0], 604, 12103;
        set .@converts_from, @items[.@i];
        set .@converts_to, @items[.@i^1];
       
        // this check is technically duplicate. keep ?
        if (countitem(.@converts_from))
        {
                mes @npc$;
                mes "You don't even have enough "+getitemname(.@converts_from)+" to convert to "+getitemname(.@converts_to)+"!";
                close;
        }
       
       
        mes @npc$;
        mes "Input how many "+getitemname(.@converts_from)+" you want to exchange.";
       
        input(.@amount);
       
        if (.@amount == 0)
        {
                mes "..That's not enough!";
                close;
        }
        if (.@amount > countitem(.@converts_from))
        {
                mes "You don't have that many "+getitemname(.@converts_from)+"!";
                close;
        }
        if (!checkweight(.@converts_to, .@amount))
        {
                mes "You can't hold that many "+getitemname(.@converts_from)+"!";
                close;
        }
       
        delitem(.@converts_from, .@amount);
        getitem(.@converts_to, .@amount);
       
        close;
 
}
Viewed 292 times, submitted by unknown.