Krzkru
Advanced User
- Joined
- Jan 18, 2012
- Messages
- 253
- Reaction score
- 18
- Age
- 31
Potrzebuj? zamieni? takie cu? ni?ej (talkaction) w globalevent (cz??? moda):
na chwil? obecn? jest takie cu? (globalevent):
Chcia?bym mie? efekty jak i czas pojawiania si? itemek (zapewnie ju? skumali?cie, ?e to rain items) tak jak w kawa?ku z talkaction.
Z g?ry dzi?ki
PHP:
local itemPos, itemInf = checkPositions(1), math.random(#items)
doCreateItem(items[itemInf][1], items[itemInf][2], itemPos)
doSendMagicEffect(itemPos, CONST_ME_LOSEENERGY)
return addEvent(spawnItem, 5000, created+1)
na chwil? obecn? jest takie cu? (globalevent):
PHP:
function onThink(interval)
if isInArray(daysOpen, os.date('%A')) then
if isInArray(configRainItem.days[os.date('%A')], os.date('%X', os.time())) then
if getStorage(configRainItem.storage) ~= 1 then
doBroadcastMessage('Rain Items will start in '..configRainItem.delayTime..' min. Go to temple or depot!')
doSetStorage(configRainItem.storage, 1)
addEvent(throwItem, configRainItem.delayTime * 60 * 1000)
end
end
end
return true
end
Chcia?bym mie? efekty jak i czas pojawiania si? itemek (zapewnie ju? skumali?cie, ?e to rain items) tak jak w kawa?ku z talkaction.
Z g?ry dzi?ki