mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-19 20:33:26 +02:00
Various optimization to config.php and LUA scripts
* Update config.php * spaces to tabs and new line at eof * updated playerdeath.lua to match latest one from master
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
function onSay(cid, words, param)
|
||||
local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks.
|
||||
local cooldown = 15 -- in seconds.
|
||||
|
||||
|
||||
if getPlayerStorageValue(cid, storage) <= os.time() then
|
||||
setPlayerStorageValue(cid, storage, os.time() + cooldown)
|
||||
local accid = getAccountNumberByPlayerName(getCreatureName(cid))
|
||||
|
||||
|
||||
local type_desc = {
|
||||
"itemids",
|
||||
"pending premium (skip)",
|
||||
@@ -35,7 +35,7 @@ function onSay(cid, words, param)
|
||||
description = type_desc[q_type]
|
||||
end
|
||||
print("Processing type "..q_type..": ".. description)
|
||||
|
||||
|
||||
-- ORDER TYPE 1 (Regular item shop products)
|
||||
if q_type == 1 then
|
||||
served = true
|
||||
@@ -91,7 +91,7 @@ function onSay(cid, words, param)
|
||||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this mount!")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Add custom order types here
|
||||
-- Type 1 is for itemids (Already coded here)
|
||||
-- Type 2 is for premium (Coded on web)
|
||||
@@ -115,4 +115,4 @@ function onSay(cid, words, param)
|
||||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every "..cooldown.." seconds. Remaining cooldown: ".. getPlayerStorageValue(cid, storage) - os.time())
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user