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

Zysens Scripting Thread

Zysen

=)
Joined
Sep 18, 2010
Messages
2,270
Reaction score
170
Location
Bosnia & Herzegovina
Hello.I will release some of my scripts here.I learned LUA before 1 month maybe,so I'm training;Lets start!


Outfiter​
(pull the lever and change your outfit)


Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.actionid == 5888 then
		doPlayerSendTextMessage(cid,21,"Your outfit has been changed!")
                    doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED)
            doCreatureChangeOutfit(cid, {lookType = math.random(2, 333))
 end
    return true
end

XML:
<action itemid="5888" script="outfiter.lua"/>

Broadcasting Message​
(broadcasting message-text you have written)

Lua:
function onThink(interval)
	doBroadcastMessage("Text...")
	return true
end


XML:
<globalevent name="message" interval="6000" event="script" value="message.lua"/>





Regards,
Zysen
 
Last edited:
I think you should practice a bit more before putting your location as 'lua'... Also, wrong section.
 
Back
Top Bottom