• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

talkaction on mod

Krzkru

New Member
Joined
Jan 10, 2013
Messages
89
Reaction score
1
Location
Poland
Hello.
Im sux at this stuff so please help me. Ive got rain event script in talkactions and as a mod. I prefer mod but there is one think i dont like in it. But this think is in talkaction script. I guess i must replace some words but as i said im suex at this....

talkactions:
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)

mod:
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
so again: i want to change talkaction to something like a part of mod (i guess this is globalevent)...

again: in talkaction items show up between some time and with 1 effect, in mod all items show on floor at same time and with 3-4 different effects. i will be happy if someone can change the part of talkaction to part of mod. thx
 
Back
Top