This is a Simple script, And can be used for many other things beside this, This is basically showing players how they can record log files...
This script basically just records that a player has donated for a Custom Spawn of Dragon Lords, They will use the Item they got through the shop system or what not, Click it and it will record for you to read later who purchased a custom spawn.
customSpawns.txt
Etc~
Simple but i guess helpfull in a way for other possibilitys.
This script basically just records that a player has donated for a Custom Spawn of Dragon Lords, They will use the Item they got through the shop system or what not, Click it and it will record for you to read later who purchased a custom spawn.
Lua:
function onUse(cid, item, frompos, item2, topos)
file = getDataDir() .. "/logs/customSpawns.txt"
doWriteLogFile(file, "[Name: " .. getCreatureName(cid) .. "] [Vocation: " .. getPlayerVocationName(cid) .. "] [Level: " .. getPlayerLevel(cid) .. "] - purchased a custom DRAGON LORD Spawn.")
doPlayerSendTextMessage(cid, 25, "The staff has now been notified that you have made the Custom Spawn Donation for Dragon Lords.")
doRemoveItem(item.uid)
return true
end
customSpawns.txt
Code:
[28/03/2010 12:34:19] [Name: Fear] [Vocation: Super Druid] [Level: 150] - purchased a custom DRAGON LORD Spawn.
[04/04/2010 13:31:04] [Name: Chris] [Vocation: Super Druid] [Level: 8] - purchased a custom TRAINER spawn.
[08/05/2010 14:06:15] [Name: Fluffers] [Vocation: Knight] [Level: 84] - purchased a custom HYDRA spawn.
[30/05/2010 20:17:02] [Name: Himon] [Vocation: Super Paladin] [Level: 140] - purchased a custom DEMON spawn.
Simple but i guess helpfull in a way for other possibilitys.