ghettobird
LUA newbie
Hello guys, some people have told me highexp ( a known highexp server) has this script that says Hello ghettobird (example) go kill some monsters until level 450 etc... so i decided to make one just like them
PS: edit the doPlayerSendTextMessage line from the 3rd part, "go kill some ~~" and also edit "YOURSERVERNAME"
go to creaturescripts/scripts and make a file called firstmessage.lua
then go to creaturescripts.xml and post this
now we need to register it to login.lua
go to creaturescripts/scripts/login,lua and put this
I hope this helps , tested and works on tfs 0.4
PS: edit the doPlayerSendTextMessage line from the 3rd part, "go kill some ~~" and also edit "YOURSERVERNAME"
go to creaturescripts/scripts and make a file called firstmessage.lua
Lua:
function onLogin(cid)
local storage = 2522
if getPlayerStorageValue(cid, storage) == -1 then
doPlayerSendTextMessage(cid, 22, "Hello "..getPlayerName(cid).." this is your first visit to YOURSERVNAME. go kill some rotworms until level 20 then go to cyclops!")
setPlayerStorageValue(cid, storage, 1)
else
doPlayerSendTextMessage(cid, 22, "Welcome back "..getPlayerName(cid).."!")
end
return true
end
then go to creaturescripts.xml and post this
Lua:
<event type="login" name="firstmessage" script="firstmessage.lua"/>
now we need to register it to login.lua
go to creaturescripts/scripts/login,lua and put this
Lua:
registerCreatureEvent(cid, "firstmessage")
I hope this helps , tested and works on tfs 0.4