// TMW2: Moubootaur Legends scripts. // Author: // Jesusalva // Description: // Real Estate System // Utils take care of NPCs - Their code, and enable/disable using check_cell // This file is custom to every room // ESTATE_ID → Instance ID of the Estate (required for NPCs, expire) // ESTATE_RENTTIME → When the rent will expire // ESTATE_MOBILIA_2 → Bitmask of mobilia currently purchased on Monster Collision (6) (Use on walls only) // ESTATE_MOBILIA_4 → Bitmask of mobilia currently purchased on Air Collision (2) // ESTATE_MOBILIA_8 → Bitmask of mobilia currently purchased on Water Collision (3) // ESTATE_MOBILIA_32 → Bitmask of mobilia currently purchased on Yellow Collision (4) // ESTATE_MOBILIA_64 → Bitmask of mobilia currently purchased on Player Collision (5) // ESTATE_MOBILIA_128 → Bitmask of mobilia currently purchased on Normal Collision (1) // REAL_ESTATE_CREDITS → Credits equivalent to GP the player have. Will be used first. // The sign is the main controller for rent system // Doorbell is the main controller for indoor // This is the NPC script controller 024-14,0,0,0 script NPCs#RES_PPL NPC_HIDDEN,{ // load_npc ( name , map, x , y{, cell} ) function load_npc { if (checknpccell(getarg(1), getarg(2), getarg(3), getarg(4, cell_chknopass))) { enablenpc instance_npcname(getarg(0), ESTATE_ID); } else { disablenpc instance_npcname(getarg(0), ESTATE_ID); } return; } end; OnInit: // NPC Settings .sex = G_OTHER; .distance = 3; end; // Load or unload accordingly OnReload: //debugmes "[REAL ESTATE] NPC ONRELOAD"; // load_npc ( name , map, x , y{, cell} ) load_npc("Wardrobe#RES_PPL", "ples@"+getcharid(0), 25, 26); load_npc("Cauldron#RES_PPL", "ples@"+getcharid(0), 28, 27); load_npc("Piano#RES_PPL" , "ples@"+getcharid(0), 32, 26); end; } 024-14,25,26,0 script Wardrobe#RES_PPL NPC_NO_SPRITE,{ openstorage; end; OnInit: .distance=3; end; } 024-14,28,27,0 script Cauldron#RES_PPL NPC_NO_SPRITE,{ realestate_cauldron(); close; OnInit: .distance=3; end; } 024-14,32,26,0 script Piano#RES_PPL NPC_NO_SPRITE,{ realestate_piano(); close; OnInit: .distance=3; end; }