viewing paste Vach_Shop_Edit | 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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
prt_in,172,140,3    script  Weapon Shop 951,{
function SetShop;
 
    switch (BaseJob) {
        case Job_Priest: SetShop(4,5,10,7);
        case Job_Assassin: SetShop(0,13,1);
        case Job_Monk: SetShop(4,7);
        case Job_Sage: SetShop(5,10);
        case Job_Rogue: SetShop(0,1,6);
        case Job_Bard: SetShop(6,8,0);
        case Job_Dancer: SetShop(6,9,0);
        case Job_Gunslinger: SetShop(11);
        case Job_Ninja: SetShop(12);
        default: break;
    }
    switch (BaseClass) {
        case Job_Novice: SetShop(0,1);
        case Job_Swordman: SetShop(1,2);
        case Job_Mage: SetShop(5);
        case Job_Archer: SetShop(6);
        case Job_Acolyte: SetShop(4,5);
        case Job_Merchant: SetShop(3,0,4,1);
        case Job_Thief: SetShop(0,6);
        default: SetShop();
    }
 
function SetShop {
    for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) {
        set .@menu$, .@menu$+"( ^FF0000"+.Shops$[getarg(.@i)]+"^000000 ):";
        set .@j[getarraysize(.@j)], getarg(.@i)+1;
        set .@k, .@k | (1<<getarg(.@i));
    }
    for(set .@i,0; .@i<getarraysize(.Shops$); set .@i,.@i+1)
        if (!(.@k & (1<<.@i))) {
            set .@menu$, .@menu$+"( ^0000FF"+.Shops$[.@i]+"^000000 ):";
            set .@j[getarraysize(.@j)], .@i+1;
        }
    mes "[ ^0000FFWeapon Shop^000000 ]";
    mes "Please choose your desired shop.";
    next;
    callshop .Shops$[.@j[select(.@menu$)-1]-1],1;
    close;
}
 
OnInit:
    setarray .Shops$[0],
      "Daggers",        // 0
      "Swords",     // 1
      "Spears",     // 2
      "Axes",       // 3
      "Maces",      // 4
      "Wands",      // 5
      "Bows",       // 6
      "Knuckles",       // 7
      "Instruments",    // 8
      "Whips",      // 9
      "Books",      // 10
      "Guns",       // 11
      "Huuma and Kunai",// 12
      "Katars";     // 13
    end;
}
-   shop    Daggers -1,1203:-1,1201:-1,1202:-1,1206:-1,1204:-1,1205:-1,1209:-1,1207:-1,1208:-1,1212:-1,1210:-1,1211:-1,1215:-1,1213:-1,1214:-1,1218:-1,1216:-1,1217:-1,1221:-1,1219:-1,1220:-1,1222:-1,1226:-1,1245:-1,1246:-1,1247:-1,1248:-1,1249:-1,13000:-1,13003:-1,13004:-1
-   shop    Swords  -1,1103:-1,1101:-1,1102:-1,1106:-1,1104:-1,1105:-1,1109:-1,1107:-1,1108:-1,1112:-1,1110:-1,1111:-1,1113:-1,1114:-1,1121:-1,1119:-1,1120:-1,1122:-1,1125:-1,1123:-1,1128:-1,1126:-1,1127:-1,1129:-1,1149:-1,1146:-1,1147:-1,1118:-1,1116:-1,1117:-1,1153:-1,1151:-1,1152:-1,1156:-1,1154:-1,1155:-1,1159:-1,1157:-1,1158:-1,1160:-1,1162:-1,1163:-1,31172:-1,1172:-1
-   shop    Spears  -1,1403:-1,1401:-1,1402:-1,1406:-1,1404:-1,1405:-1,1409:-1,1407:-1,1408:-1,1411:-1,1453:-1,1451:-1,1452:-1,1456:-1,1454:-1,1455:-1,1459:-1,1457:-1,1458:-1,1462:-1,1460:-1,1461:-1,1465:-1,1463:-1,1464:-1
-   shop    Axes    -1,1303:-1,1301:-1,1302:-1,1353:-1,1351:-1,1352:-1,1356:-1,1354:-1,1355:-1,1359:-1,1357:-1,1358:-1,1362:-1,1360:-1,1361:-1
-   shop    Maces   -1,1503:-1,1501:-1,1502:-1,1506:-1,1504:-1,1505:-1,1509:-1,1507:-1,1508:-1,1512:-1,1510:-1,1511:-1,1519:-1,1520:-1,1521:-1,1513:-1,1514:-1,1515:-1,1516:-1,1517:-1,1518:-1,1522:-1,1532:-1
-   shop    Wands   -1,1603:-1,1601:-1,1602:-1,1606:-1,1604:-1,1605:-1,1609:-1,1607:-1,1608:-1,1612:-1,1610:-1,1611:-1,1617:-1,1618:-1,1619:-1,1620:-1
-   shop    Bows    -1,1703:-1,1701:-1,1702:-1,1706:-1,1704:-1,1705:-1,1709:-1,1707:-1,1708:-1,1712:-1,1710:-1,1711:-1,1713:-1,1715:-1,1714:-1,1716:-1,1726:-1,1721:-1
-   shop    Knuckles    -1,1801:-1,1802:-1,1803:-1,1804:-1,1805:-1,1806:-1,1807:-1,1808:-1,1809:-1,1810:-1,1811:-1,1812:-1
-   shop    Instruments -1,1901:-1,1902:-1,1903:-1,1904:-1,1905:-1,1906:-1,1907:-1,1908:-1,1909:-1,1910:-1,1921:-1,1911:-1,1912:-1,1913:-1
-   shop    Whips   -1,1950:-1,1951:-1,1952:-1,1953:-1,1954:-1,1955:-1,1956:-1,1957:-1,1958:-1,1959:-1,1960:-1,1961:-1,1963:-1
-   shop    Books   -1,1550:-1,1551:-1,1552:-1,1553:-1,1568:-1,1554:-1,1569:-1,1570:-1,1556:-1,1571:-1,1557:-1,1578:-1
-   shop    Guns    -1,13102:-1,13103:-1,13150:-1,13151:-1,13152:-1,13163:-1,13164:-1,13165:-1,13166:-1,13154:-1,13155:-1,13168:-1,13169:-1
-   shop    Huuma and Kunai -1,13010:-1,13011:-1,13007:-1,13008:-1,13012:-1,13013:-1,13006:-1,13300:-1,13301:-1,13302:-1,13303:-1,13311:-1,13313:-1,13314:-1,13315:-1,13312:-1
-   shop    Katars  -1,1250:-1,1251:-1,1252:-1,1253:-1,1254:-1,1255:-1
Viewed 711 times, submitted by Guest.