Full Distribution

This commit is contained in:
rasanpedromujica
2019-01-16 17:16:38 -05:00
commit 009a571331
1258 changed files with 185603 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
function onSay(player, words, param)
if player:getAccountType() <= ACCOUNT_TYPE_TUTOR then
return true
end
local target = Player(param)
if target == nil then
player:sendCancelMessage("A player with that name is not online.")
return false
end
if target:getAccountType() ~= ACCOUNT_TYPE_NORMAL then
player:sendCancelMessage("You can only promote a normal player to a tutor.")
return false
end
target:setAccountType(ACCOUNT_TYPE_TUTOR)
target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been promoted to a tutor by " .. player:getName() .. ".")
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have promoted " .. target:getName() .. " to a tutor.")
return false
end