-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slavidodo:casting-system and Remove Shaders, Auras, Wings, Fix ProtocolGameBase according OTCv8 Features Co-Authored-By: slavi <[email protected]>
- Loading branch information
Showing
32 changed files
with
3,845 additions
and
2,085 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
function onUpdateDatabase() | ||
return false | ||
print("> Updating database to version 25 (live casting support)") | ||
db.query("ALTER TABLE `players_online` ADD COLUMN `cast_on` tinyint(1) default '0' NOT NULL, ADD COLUMN `cast_password` varchar(40) default NULL, ADD COLUMN `cast_spectators` int(5) default '0' NOT NULL;") | ||
return true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function onUpdateDatabase() | ||
return false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function onSay(player, words, param) | ||
local defaultParam = param | ||
|
||
param = param:lower() | ||
if param == '' or param == "on" then | ||
if not player:isLiveCasting() then | ||
player:startLiveCasting() | ||
end | ||
elseif param == "off" then | ||
if player:isLiveCasting() then | ||
player:stopLiveCasting() | ||
end | ||
else -- a password | ||
if not player:isLiveCasting() then | ||
player:startLiveCasting(defaultParam) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
function onSay(player, words, param) | ||
if not player:isLiveCasting() then | ||
return true | ||
end | ||
|
||
if words == "!start" then | ||
player:startLiveCasting(param) | ||
elseif words == "!pause" then | ||
player:pauseLiveCasting(param) -- param is reason | ||
elseif words == "!kick" then -- where param is spectator name | ||
player:kickCastSpectator(param) | ||
elseif words == "!ban" then | ||
player:banCastSpectator(param) | ||
elseif words == "!unban" then | ||
player:unBanCastSpectator(param) | ||
elseif words == "!mute" then | ||
player:muteCastSpectator(param) | ||
elseif words == "!unmute" then | ||
player:unMuteCastSpectator(param) | ||
end | ||
|
||
return false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.