Advertisement
EyesOfAHawk

woecreditshop

Jan 16th, 2022 (edited)
772
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //===== Hercules Script ======================================
  2. //= War of Emperium Credit Store
  3. //===== By ===================================================
  4. //= Wolfie
  5. //===== Description ==========================================
  6. //= Shop data to redeem War of Emperium Credits.
  7. //= Shop opened through /npc/blackout/donate/CommonRedeem.txt
  8. //============================================================
  9.  
  10. -   trader  WOE_Credit_Shop FAKE_NPC,{
  11.  
  12. OnMon0000:
  13.     .@i = 2; // change this number to how many items get rotated per week
  14.     .@size[0] = getarraysize(.TwoCred);
  15.     .@size[1] = getarraysize(.TenCred);
  16.  
  17.     if ($WOECREDSHOP[0] + .@i >= .@size[0])
  18.         $WOECREDSHOP[0] = cap_value($WOECREDSHOP[0] + - .@size[0] -1, 0, .@size[0]);
  19.     else
  20.         $WOECREDSHOP[0] += .@i;
  21.  
  22.     if ($WOECREDSHOP[1] + .@i >= .@size[1])
  23.         $WOECREDSHOP[1] = cap_value($WOECREDSHOP[1] + - .@size[1] -1, 0, .@size[1]);
  24.     else
  25.         $WOECREDSHOP[1] = .@i;
  26.  
  27.     globalmes("New items in stock in the WoE Credit Shop!", "Item Redeeming Services");
  28.  
  29. OnTue0000:
  30. OnWed0000:
  31. OnThu0000:
  32. OnFri0000:
  33. OnSat0000:
  34. OnSun0000:
  35. OnInit:
  36.     .Currency = WOE_Credit;
  37.     tradertype(NST_CUSTOM);
  38.  
  39.     .@d = gettime(GETTIME_DAYOFMONTH);
  40.     .@m = gettime(GETTIME_MONTH);
  41.     .@y = gettime(GETTIME_YEAR);
  42.  
  43.     // Temp remove all items
  44.     for (.@i = 0; .@i < getarraysize(.Item); .@i += 2) {
  45.         if (.Item[.@i] > 0)
  46.             stopselling(.Item[.@i]);
  47.     }
  48.  
  49.     //  2 WOE Credits Rotation
  50.     setarray(.TwoCred,
  51.         Aztec_Helm, // Aztec Headdress
  52.         callsub(S_Drooping_Falcon), // Drooping Falcon
  53.         Kitty_Ribbon_Hat,
  54.         Br_Beret, // Banana Beret
  55.         Mosquito_Coil,
  56.         Tongue_Mask_,
  57.         B_Feather_Beret,
  58.         Fallen_Leaves_,
  59.         Engineer_Cap,
  60.         Jaguar_Hat,
  61.         Sinsuncho_Hat,
  62.         Desert_Prince,
  63.         Strawberry_Hat,
  64.         Turtle_Hat,
  65.         Coati_Hat,
  66.         Kettle_Hat,
  67.         Pig_Head_Balloon,
  68.         Rasta_Wig,
  69.         Sapling_Hat,
  70.         Tiger_Mask,
  71.         Saci_Hat, // Luxury Hat
  72.         Fox_Hat_J, // Fox Mask
  73.         24_Bolt // Screw Stuck Head
  74.     );
  75.  
  76.     //  10 WOE Credits Rotation
  77.     setarray(.TenCred,
  78.         Red_Wing_Hat,
  79.         Clock_Tower_Hat,
  80.         Ninja_Helm,
  81.         Cygnus_Helm,
  82.         Schmidt_Helm, // Dip Schmidtz Helm
  83.         C_Dark_Night_Veil,
  84.         C_Undertaker_Hat,
  85.         Trident_Helmet,
  86.         Ancient_Admiral_Helm,
  87.         SS_Bandana, // Secret Society Hood
  88.         Midas_Whispers,
  89.         Heart_Wing_Hairband,
  90.         Humming_Bird,
  91.         Chinese_Knot,
  92.         Moogle_Antenna,
  93.         Owl_Noir,
  94.         Rabbit_Knit_Hat,
  95.         Holy_Egg_Hat, // Sacred Egg Hat
  96.         Cat_of_Doom,
  97.         Golden_Wing,
  98.         Robin_Hands, // Hana Hana no Mi
  99.         Space_Cat,
  100.         Cool_FB_Hat, // Cool Football Hat
  101.         Glory_FB_Hat, // Glorious Football Hat
  102.         Passion_FB_Hat, // Passionate Football Hat
  103.         Victory_FB_Hat, // Football Hat
  104.         Hawk_Eye,
  105.         Shining_Pirate_Dagger,
  106.         Deviruchi_Balloon,
  107.         Piamette_Hood,
  108.         Sleeping_Kitty_Cat,
  109.         C_Bf_Recruiter_Hat,
  110.         C_Friend_Recruiter_Hat,
  111.         C_Gf_Recruiter_Hat,
  112.         C_Guildsman_Recruiter,
  113.         C_Party_Recruiter_Hat,
  114.         B_Dragon_Hat,
  115.         Blue_Pajamas_Hat,
  116.         Pink_Pajamas_Hat,
  117.         Notice_Board, // Afk Hat
  118.         C_Black_Cat_Hood,
  119.         C_Drooping_Eleanor,
  120.         C_Feathered_Top_Hat,
  121.         C_Starry_Night_Beret,
  122.         callsub(S_FlowerBunnyHat),
  123.         callsub(S_FrilledFlowerCollar),
  124.         C_Kittens_In_Basket,
  125.         callsub(S_SweetBalloonHat),
  126.         C_Khalitzburg_KN_Helm,
  127.         C_Gryphon_Hat,
  128.         (rand(2)) ? C_Lamb_Hat1 : C_Lamb_Hat2,
  129.         C_Monkey_Fur_Hat,
  130.         Vagabond_Wolf_Hat,
  131.         C_Soft_Sheep_Hat,
  132.         Puppy_Ears_Hat,
  133.         C_Polar_Bear_Cap
  134.     );
  135.  
  136.     // Collab Shops Revamp Edit - Began from Dec 22, 2020
  137.     setarray(.Item,
  138.         //  2 WOE Credits
  139.         callsub(S_Rotation, 2, 0), 2,
  140.         callsub(S_Rotation, 2, 1), 2,
  141.         callsub(S_Rotation, 2, 2), 2,
  142.         callsub(S_Rotation, 2, 3), 2,
  143.         callsub(S_Rotation, 2, 4), 2,
  144.  
  145.         //  10 WOE Credits
  146.         callsub(S_Rotation, 10, 0), 10,
  147.         callsub(S_Rotation, 10, 1), 10,
  148.         callsub(S_Rotation, 10, 2), 10,
  149.         callsub(S_Rotation, 10, 3), 10,
  150.         callsub(S_Rotation, 10, 4), 10,
  151.  
  152.         //  50 WOE Credits
  153.         Chubby_Chick, 50,
  154.         Glowing_Rose_Eye_Patch, 50,
  155.         Warm_Cat_Muffler_, 50,
  156.         (rand(10) < 7) ? C_Panda_Hood : C_Panda_Hood_Pink, 50, // 30% chance of Pink version
  157.         C_Cute_Baby_Chicks, 50,
  158.         C_Clock_Tower_Manager_Incom, 50,
  159.         C_Wing_Frame_Sunglasses, 50,
  160.         callsub(S_CrazyInLoveAura), 50,
  161.         callsub(S_DaftPunk), 50,    // Choose which Daft Punk Helmet
  162.         callsub(S_IcicleWings), 50,
  163.         callsub(S_MusicRing), 50,
  164.         callsub(S_MythicalWings), 50,
  165.         C_White_Black_Temp, 50,
  166.         callsub(S_EremesScarf), 50,
  167.         Wolf_Masquerade, 50,
  168.         C_Drooping_Dorasuke, 50,
  169.         C_Oliver_Wolf_Hood, 50,
  170.         Wolf_Tail, 50,
  171.        
  172.         // [REMOVE] Classic_Loot_Box, 25,
  173.         // [REMOVE] callsub(S_ClassicLootBox), 45,
  174.         // [REMOVE] Mysterious_Dyestuff, 50,
  175.        
  176.     -1, -1); // End don't edit
  177.  
  178.     for (.@i = 0; .@i < getarraysize(.Item); .@i += 2) {
  179.         if (.Item[.@i] > 0)
  180.             sellitem(.Item[.@i], .Item[.@i + 1]);
  181.     }
  182.     end;
  183.  
  184.  
  185. S_Rotation:
  186.     switch (getarg(0)) {
  187.     case 2:
  188.         .@i = $WOECREDSHOP[0] + getarg(1);
  189.         .@size = getarraysize(.TwoCred) - 1;
  190.         if (.@i > .@size)
  191.             .@i -= .@size + 1;
  192.         return .TwoCred[.@i];
  193.  
  194.     case 10:
  195.         .@i = $WOECREDSHOP[1] + getarg(1);
  196.         .@size = getarraysize(.TenCred) - 1;
  197.         if (.@i > .@size)
  198.             .@i -= .@size + 1;
  199.         return .TenCred[.@i];
  200.  
  201.     default:
  202.         return -1;
  203.     }
  204.  
  205. S_Drooping_Falcon:
  206.     setarray(.@id, Drooping_Falcon, Drooping_Falcon, Drooping_Falcon, Fire_Drooping_Falcon, Ice_Drooping_Falcon);
  207.     return .@id[rand(getarraysize(.@id))];
  208.  
  209. S_FlowerBunnyHat:
  210.     if (rand(10) < 8)
  211.         return C_Flower_Bunny_Hat; // 20% chance of recolour
  212.     return F_ReturnRand(C_Flower_Bunny_Hat_Black, C_Flower_Bunny_Hat_Blue, C_Flower_Bunny_Hat_Green, C_Flower_Bunny_Hat_Purple, C_Flower_Bunny_Hat_White, C_Flower_Bunny_Hat_Yellow);
  213.  
  214. S_FrilledFlowerCollar:
  215.     if (rand(10) < 8)
  216.         return C_Frilled_Flower_Collar; // 20% chance of recolour
  217.     return F_ReturnRand(C_Frilled_Flower_Collar_Aqua, C_Frilled_Flower_Collar_Black, C_Frilled_Flower_Collar_Green, C_Frilled_Flower_Collar_Orange, C_Frilled_Flower_Collar_Pink, C_Frilled_Flower_Collar_Purple, C_Frilled_Flower_Collar_Red, C_Frilled_Flower_Collar_White, C_Frilled_Flower_Collar_Yellow);
  218.  
  219. S_SweetBalloonHat:
  220.     if (rand(10) < 8)
  221.         return C_Sweet_Balloon_Hat; // 20% chance of recolour
  222.     return F_ReturnRand(C_Sweet_Balloon_Hat_Aqua, C_Sweet_Balloon_Hat_Black, C_Sweet_Balloon_Hat_Green, C_Sweet_Balloon_Hat_Grey, C_Sweet_Balloon_Hat_Orange, C_Sweet_Balloon_Hat_Pink, C_Sweet_Balloon_Hat_Purple, C_Sweet_Balloon_Hat_Red, C_Sweet_Balloon_Hat_Yellow);
  223.  
  224. S_CrazyInLoveAura:
  225.     if (rand(10) < 8)
  226.         return C_Crazy_In_Love_Aura; // 20% chance of recolour
  227.     return F_ReturnRand(C_Crazy_In_Love_Aura_Aqua, C_Crazy_In_Love_Aura_Black, C_Crazy_In_Love_Aura_Blue, C_Crazy_In_Love_Aura_Green, C_Crazy_In_Love_Aura_Orange, C_Crazy_In_Love_Aura_Pink, C_Crazy_In_Love_Aura_Purple, C_Crazy_In_Love_Aura_White, C_Crazy_In_Love_Aura_Yellow);
  228.    
  229. // Conditions to sell Daft Punk Helmet
  230. S_DaftPunk:
  231.     switch (gettime(GETTIME_WEEKDAY)) {
  232.     case WEDNESDAY:
  233.     case FRIDAY:
  234.         return C_Daft_Punk_Gold;
  235.     case THURSDAY:
  236.     case SATURDAY:
  237.         return C_Daft_Punk_Silver;
  238.     default:
  239.         return -1;
  240.     }
  241.  
  242. S_MusicRing:
  243.     if (rand(10) < 8)
  244.         return C_Music_Ring; // 20% chance of recolour
  245.     return F_ReturnRand(C_Music_Ring_Black, C_Music_Ring_Blue, C_Music_Ring_Brown, C_Music_Ring_Green, C_Music_Ring_Orange, C_Music_Ring_Pink, C_Music_Ring_Purple, C_Music_Ring_Red, C_Music_Ring_White, C_Music_Ring_Yellow);
  246.  
  247. S_IcicleWings:
  248.     if (rand(10) < 8)
  249.         return C_Icicle_Wings; // 20% chance of recolour
  250.     return F_ReturnRand(C_Icicle_Wings_Green, C_Icicle_Wings_Pink, C_Icicle_Wings_Red, C_Icicle_Wings_White, C_Icicle_Wings_Yellow);
  251.  
  252. S_MythicalWings:
  253.     if (rand(10) < 8)
  254.         return C_Mythical_Wings; // 20% chance of recolour
  255.     return F_ReturnRand(C_Mythical_Wings_Green, C_Mythical_Wings_Red, C_Mythical_Wings_Yellow);
  256.  
  257. S_EremesScarf:
  258.     if (rand(10) < 7)
  259.         return C_Eremes_Scarf; // 30% chance of recolour
  260.     return F_ReturnRand(C_Eremes_Scarf_Aqua, C_Eremes_Scarf_Black, C_Eremes_Scarf_Blue, C_Eremes_Scarf_Cyan, C_Eremes_Scarf_Gold, C_Eremes_Scarf_Green, C_Eremes_Scarf_Pink, C_Eremes_Scarf_Purple, C_Eremes_Scarf_White);
  261.  
  262. OnCountFunds:
  263.     setcurrency(countitem(.Currency));
  264.     end;
  265.  
  266. OnPayFunds:
  267.     if (countitem(.Currency) < @price)
  268.         end;
  269.     delitem(.Currency, @price);
  270.     purchaseok();
  271.     F_LogTrader(.Currency);
  272.     F_DeductCurrency(@price, .Currency);
  273.     end;
  274.  
  275. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement