• 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!

!event & /startevent - the command.

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,839
Solutions
18
Reaction score
618
Location
Poland
Hello.
Anyone can make an command for me ?

!startevent - When GM active event with command /startevent, then player can use !event command, the msg broadcast to everyone:
Event has been begun! Please type: !event, command to enter in. Enter is allowed within 5 minutes after event starts. Hurry Up!

!event - It's a command for players. You can use this command only when event is activated (GM must active it with /startevent). Player can only enter within 5 minutes, after start event (5 minutes is out from /startevent, when player trying use !event command msg displays: You cannot enter the event place now, the event has been begun.)
The !event command teleports player to X,Y,Z after succesfully use.

Cannot be used when player got Skull (without RedSkull [RS can enter]), in PZ-zone, fight
 
XML:
<?xml version='1.0' encoding='UTF-8'?>
<mod name='Event' version='1.0' author='VirrageS' contact='otland.net' enabled='yes'>
	<config name='event_config'>
		<![CDATA[
			eventConfig = {
				event = 542887, -- free storage
				joinEvent = 456868, -- free storage
				timeToStartEvent = 5, -- when player can join
				pos = {x=0, y=0, z=0}
			}
		]]>
	</config>

	<talkaction words='!event' event='script'>
		<![CDATA[
			domodlib('event_config')

			function onSay(cid, words, param)
				if eventConfig.event == 1 then
					if getStorage(eventConfig.joinEvent) == 1 then
						doTeleportThing(cid, eventConfig.pos)
					else
						doPlayerSendCancel(cid, 'You cannot enter the event place now, the event has been begun.')
					end
				else
					doPlayerSendCancel(cid, 'It is not time yet!')
				end
				return true
			end
		]]>
	</talkaction>

	<talkaction words='!startevent' access='5' event='script'>
		<![CDATA[
			domodlib('event_config')

			function onSay(cid, words, param)
				if getStorage(eventConfig.event) ~= 1 then
					doSetStorage(eventConfig.event, 1)
					doSetStorage(eventConfig.joinEvent, 1)
					addEvent(doSetStorage, eventConfig.timeToStartEvent * 60 * 1000, eventConfig.joinEvent, -1)
					doBroadcastMessage('Event has been begun! Please type: !event, command to enter in. Enter is allowed within ' .. eventConfig.timeToStartEvent .. ' minutes after event starts. Hurry Up!', MESSAGE_EVENT_ADVANCE)
				else
					doPlayerSendCancel(cid, 'You can not do it if "event" is enabled yet.')
				end
				return true
			end
		]]>
	</talkaction>
</mod>
 
Last edited:
Back
Top