Script runs twice
Posted: Wed Jul 22, 2015 6:26 am
!
Code: Select all
function onGameHour()
local monk=GetMobAction(17682442);
local horror=GetMobAction(17682446);
local rough = math.random(1,50);
print("Random Number = "..rough);
print("Is Spawned Monk = "..monk);
print("Is Spawned Horror = "..horror);
if(monk ==0) and (rough <=3) and (horror ==0) then
SpawnMob(17682442);
elseif (monk ==0) and (horror ==0) and (rough >=49) then
SpawnMob(17682446);
elseif (monk ~=0) and (horror ==0) and (rough >=49) then
DespawnMob(17682442);
SpawnMob(17682446);
end
end;
Code: Select all
function onGameHour()
local monk = GetMobAction(17682442);
local horror = GetMobAction(17682446);
local rough = math.random(1,50);
print("Random Number = "..rough);
print("Is Spawned Monk = "..monk);
print("Is Spawned Horror = "..horror);
if (monk == 0 and rough <=3 and horror == 0) then
SpawnMob(17682442);
elseif (monk == 0 and horror == 0 and rough >= 49) then
SpawnMob(17682446);
elseif (monk ~= 0 and horror == 0 and rough >= 49) then
DespawnMob(17682442);
SpawnMob(17682446);
end
end;