Advertisement
Guest User

Untitled

a guest
Oct 25th, 2021
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.65 KB | None | 0 0
  1. //_______________________________________________________________________________________________________________________________
  2. // DescX Notes:
  3. //      Sample code
  4. //      How to make array.cs do something!
  5. //_______________________________________________________________________________________________________________________________
  6. $WeatherDevices = Array::New("", "WeatherDeviceRequirements");
  7. Array::Fill($WeatherDevices,
  8.             "WeatherDevice EnchantedStone Quartz Opal,"         @
  9.             "WeatherDevice ControlCrystal Granite Diamond,"     @
  10.             "WeatherDevice EnergyCrystal Turquoise Sapphire,"   @
  11.             "WeatherDevice MagicDust Topaz Gold,"               @
  12.             "WeatherDevice GreenSkin Jade Emerald,"             @
  13.             "WeatherDevice VigorousVial Ruby Keldrinite",       ",");
  14. Array::Fill(Array::New("", $WeatherDevices @ "Enable0"), "5000,50000,25000", ",");
  15. Array::Fill(Array::New("", $WeatherDevices @ "Enable1"), "1000,50000,5000", ",");
  16. Array::Fill(Array::New("", $WeatherDevices @ "Enable2"), "5000,40000,10000", ",");
  17. Array::Fill(Array::New("", $WeatherDevices @ "Enable3"), "250000,10000,5000", ",");
  18. Array::Fill(Array::New("", $WeatherDevices @ "Enable4"), "7500,75000,3000", ",");
  19. Array::Fill(Array::New("", $WeatherDevices @ "Enable5"), "75000,75000,500", ",");
  20.  
  21. function rpg::WeatherDeviceEnable(%clientId, %device, %response, %keyword, %index) {
  22.     Array::Copy($WeatherDevices @ "Enable" @ %index, $WeatherDevices @ %index);
  23. }
  24.  
  25. function DisableAllWeatherDevices() {
  26.     for(%x=0;%x<$Array::Size[$WeatherDevices];%x++)
  27.         Array::Insert(Array::New("", $WeatherDevices @ %x), 999999, 0, 2);
  28. }
  29. DisableAllWeatherDevices(); // Start disabled. LoadWorld and SaveWorld take care of things from here.
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement