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

Lua Script Help REQUEST SOME HELP

Strode

New Member
Joined
Jan 30, 2009
Messages
12
Reaction score
1
Im Looking for a Spell thats for either pallys or knights and it will repel them back like 3 squares and him at the same time.

Also a Script for First login Mssge.
 
data/creaturescripts/scripts/messageonlogin.lua

Lua:
function onLogin(cid)
            local login_status = getPlayerStorageValue(cid, 1337)
    if login_status == -1 then
                 doPlayerPopupFYI(cid, "Welcome to OTs name,have fun,etc..")
                          setPlayerStorageValue(cid,1337,1)
         end
end

creaturescripts.xml add this line:

XML:
<event type="login" name="PlayerLogin" script="messageonlogin.lua"/>

login.lua add this:

Lua:
registerCreatureEvent (cid, "PlayerLogin")



But why make a script when you can change this in config.lua?

Lua:
loginMessage = "Welcome to the Forgotten Server!"
 
Last edited:
Back
Top