Well, this script was created by Haxy in OtServ Networks and i fix and post it ;D
Go to talkactions/scripts and create a file.lua called event and add this:
and in talkactions.xml add
Usage:
If you like create a event say:
/eventx "the coordinates x
/eventy "the coordinates y
/eventz "the coordinates z
/event "on - for start the event
/event "off - for finish the event
The players need say !participate and will be teleporting (only if you have a event)
Ok, iam noob in english xd and Iam noob in scripts but i like learn
Rate it ;D
Go to talkactions/scripts and create a file.lua called event and add this:
Code:
function onSay(cid, words, param)
local posx = getGlobalStorageValue(75311)
local posy = getGlobalStorageValue(75312)
local posz = getGlobalStorageValue(75313)
local evtpos = {x=posx, y=posy, z=posz}
if words == '!participate' then
if getGlobalStorageValue(75310) ~= 9 then
doPlayerSendCancel(cid,'No events.')
else
doTeleportThing(cid,evtpos)
end
elseif words == '/eventx' then
if getPlayerAccess(cid) >= 3 then
setGlobalStorageValue(75311, param)
else
doPlayerSendCancel(cid,'You not have access for use this command.')
end
elseif words == '/eventy' then
if getPlayerAccess(cid) >= 3 then
setGlobalStorageValue(75312, param)
else
doPlayerSendCancel(cid,'You not have access for use this command.')
end
elseif words == '/eventz' then
if getPlayerAccess(cid) >= 3 then
setGlobalStorageValue(75313, param)
else
doPlayerSendCancel(cid,'You not have access for use this command.')
end
elseif words == '/event' then
if param == 'on' then
if getPlayerAccess(cid) >= 3 then
setGlobalStorageValue(75310, 9)
doBroadcastMessage("An event, say !participate and be transported automatically", MESSAGE_EVENT_ADVANCE)
else
doPlayerSendCancel(cid,'You not have access for use this command.')
end
elseif param == 'off' then
if getPlayerAccess(cid) >= 3 then
setGlobalStorageValue(75310, 0)
doBroadcastMessage("The event finish", MESSAGE_EVENT_ADVANCE)
else
doPlayerSendCancel(cid,'You not have access for use this command.')
end
end
end
end
and in talkactions.xml add
Code:
<talkaction words="/eventx" log="no" access="3" script="event.lua" />
<talkaction words="/eventy" log="no" access="3" script="event.lua" />
<talkaction words="/eventz" log="no" access="3" script="event.lua" />
<talkaction words="/event" log="yes" access="3" script="event.lua" />
<talkaction words="!participate" script="event.lua" />
Usage:
If you like create a event say:
/eventx "the coordinates x
/eventy "the coordinates y
/eventz "the coordinates z
/event "on - for start the event
/event "off - for finish the event
The players need say !participate and will be teleporting (only if you have a event)
Ok, iam noob in english xd and Iam noob in scripts but i like learn
Rate it ;D
Last edited: