-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9b5abf9
Showing
12,924 changed files
with
155,577 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{php,css,html,xml,lua,js}] | ||
indent_style = tab | ||
indent_size = 4 |
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,16 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# Declare files that will always have LF line endings on checkout. | ||
*.php text eol=lf | ||
*.lua text eol=lf | ||
*.html text eol=lf | ||
*.css text eol=lf | ||
*.js text eol=lf | ||
*.xml text eol=lf | ||
|
||
*.sql text eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary |
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 @@ | ||
*.cache.php | ||
engine/cache/* | ||
.idea |
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,5 @@ | ||
Options +FollowSymLinks | ||
RewriteEngine On | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule ^(.*)$ /characterprofile.php?name=$1 |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Stefan André Brannfjell | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
4 changes: 4 additions & 0 deletions
4
Lua/TFS_02/creaturescript firstitems/Installation Instructions.txt
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,4 @@ | ||
Step 1: Copy firstitems.lua to /data/creaturescripts/scripts/ folder | ||
-- Edit firstitems.lua with item IDs you want characters to start with on your server. | ||
|
||
Step 2: Restart OT server, and it should work. :) |
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,77 @@ | ||
function onLogin(cid) | ||
local storage = 30055 -- storage value | ||
|
||
local sorcItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2190, -- Wand of vortex | ||
2511, -- Brass shield | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
2050 -- torch | ||
} | ||
local druidItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2511, -- Brass shield | ||
2182, -- Snakebite rod | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
2050 -- torch | ||
} | ||
local pallyItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2456, -- Bow | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
} | ||
local kinaItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2511, -- Brass shield | ||
2412, -- Katana | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
2050 -- torch | ||
} | ||
|
||
if getPlayerStorageValue(cid, storage) == -1 then | ||
setPlayerStorageValue(cid, storage, 1) | ||
if getPlayerVocation(cid) == 1 then | ||
-- Sorcerer | ||
for i = 1, table.getn(sorcItems), 1 do | ||
doPlayerAddItem(cid, sorcItems[i], 1, false) | ||
end | ||
|
||
elseif getPlayerVocation(cid) == 2 then | ||
-- Druid | ||
for i = 1, table.getn(druidItems), 1 do | ||
doPlayerAddItem(cid, druidItems[i], 1, false) | ||
end | ||
|
||
elseif getPlayerVocation(cid) == 3 then | ||
-- Paladin | ||
for i = 1, table.getn(pallyItems), 1 do | ||
doPlayerAddItem(cid, pallyItems[i], 1, false) | ||
end | ||
-- 8 arrows | ||
doPlayerAddItem(cid, 2544, 8, false) | ||
|
||
elseif getPlayerVocation(cid) == 4 then | ||
-- Knight | ||
for i = 1, table.getn(kinaItems), 1 do | ||
doPlayerAddItem(cid, kinaItems[i], 1, false) | ||
end | ||
end | ||
|
||
-- Common for all | ||
doPlayerAddItem(cid, 2674, 5, false) -- 5 apples | ||
doPlayerAddItem(cid, 2120, 1, false) -- 1 rope | ||
end | ||
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 @@ | ||
<talkaction words="!shop" script="znoteshop.lua"/> |
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,103 @@ | ||
-- Znote Shop v1.1 for Znote AAC on TFS 0.2.13+ Mystic Spirit. | ||
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)", | ||
"pending gender change (skip)", | ||
"pending character name change (skip)", | ||
"Outfit and addons", | ||
"Mounts", | ||
"Instant house purchase" | ||
} | ||
print("Player: " .. getCreatureName(cid) .. " triggered !shop talkaction.") | ||
-- Create the query | ||
local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. accid .. ";") | ||
local served = false | ||
|
||
-- Detect if we got any results | ||
if orderQuery ~= false then | ||
-- Fetch order values | ||
local q_id = result.getDataInt(orderQuery, "id") | ||
local q_type = result.getDataInt(orderQuery, "type") | ||
local q_itemid = result.getDataInt(orderQuery, "itemid") | ||
local q_count = result.getDataInt(orderQuery, "count") | ||
|
||
local description = "Unknown or custom type" | ||
if type_desc[q_type] ~= nil then | ||
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 | ||
-- Get weight | ||
local playerCap = getPlayerFreeCap(cid) | ||
local itemweight = getItemWeight(q_itemid, q_count) | ||
if playerCap >= itemweight then | ||
db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") | ||
doPlayerAddItem(cid, q_itemid, q_count) | ||
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received ".. q_count .." "..getItemName(q_itemid).."(s)!") | ||
else | ||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Need more CAP!") | ||
end | ||
end | ||
-- ORDER TYPE 5 (Outfit and addon) | ||
if q_type == 5 then | ||
served = true | ||
|
||
local itemid = q_itemid | ||
local outfits = {} | ||
|
||
if itemid > 1000 then | ||
local first = math.floor(itemid/1000) | ||
table.insert(outfits, first) | ||
itemid = itemid - (first * 1000) | ||
end | ||
table.insert(outfits, itemid) | ||
|
||
for _, outfitId in pairs(outfits) do | ||
-- Make sure player don't already have this outfit and addon | ||
if not canPlayerWearOutfit(cid, outfitId, q_count) then | ||
db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";") | ||
doPlayerAddOutfit(cid,outfitId,q_count) | ||
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations! You have received a new outfit!") | ||
else | ||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You already have this outfit and addon!") | ||
end | ||
end | ||
end | ||
|
||
-- ORDER TYPE 6 (Mounts) | ||
-- Not supported on TFS 0.2 | ||
|
||
-- Add custom order types here | ||
-- Type 1 is for itemids (Already coded here) | ||
-- Type 2 is for premium (Coded on web) | ||
-- Type 3 is for gender change (Coded on web) | ||
-- Type 4 is for character name change (Coded on web) | ||
-- Type 5 is for character outfit and addon (Already coded here) | ||
-- Type 6 is for mounts (Not for TFS 0.2) | ||
-- Type 7 is for Instant house purchase (Not for TFS 0.2) | ||
-- So use type 8+ for custom stuff, like etc packages. | ||
-- if q_type == 8 then | ||
-- end | ||
result.free(orderQuery) | ||
if not served then | ||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have no orders to process in-game.") | ||
end | ||
else | ||
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You have no orders.") | ||
end | ||
else | ||
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 |
10 changes: 10 additions & 0 deletions
10
Lua/TFS_03/creaturescript firstitems/Installation Instructions.txt
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,10 @@ | ||
Step 1: Copy firstitems.lua to /data/creaturescripts/scripts/ folder | ||
-- Edit firstitems.lua with item IDs you want characters to start with on your server. | ||
|
||
Step 2: Edit the /data/creaturescripts/creaturescripts.XML file | ||
- ADD: <event type="login" name="firstItems" event="script" value="firstitems.lua"/> | ||
|
||
Step 3: Edit the /data/creaturescripts/scripts/login.lua file | ||
- ADD: registerCreatureEvent(cid, "firstItems") | ||
|
||
Step 4: Restart OT server, and it should work. :) |
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,77 @@ | ||
function onLogin(cid) | ||
local storage = 30055 -- storage value | ||
|
||
local sorcItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2190, -- Wand of vortex | ||
2511, -- Brass shield | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
2050 -- torch | ||
} | ||
local druidItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2511, -- Brass shield | ||
2182, -- Snakebite rod | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
2050 -- torch | ||
} | ||
local pallyItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2456, -- Bow | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
} | ||
local kinaItems = { | ||
2460, -- Brass helmet | ||
2465, -- Brass armor | ||
2511, -- Brass shield | ||
2412, -- Katana | ||
2478, -- Brass legs | ||
2643, -- Leather boots | ||
1988, -- Brown backpack | ||
2050 -- torch | ||
} | ||
|
||
if getPlayerStorageValue(cid, storage) == -1 then | ||
setPlayerStorageValue(cid, storage, 1) | ||
if getPlayerVocation(cid) == 1 then | ||
-- Sorcerer | ||
for i = 1, table.getn(sorcItems), 1 do | ||
doPlayerAddItem(cid, sorcItems[i], 1, false) | ||
end | ||
|
||
elseif getPlayerVocation(cid) == 2 then | ||
-- Druid | ||
for i = 1, table.getn(druidItems), 1 do | ||
doPlayerAddItem(cid, druidItems[i], 1, false) | ||
end | ||
|
||
elseif getPlayerVocation(cid) == 3 then | ||
-- Paladin | ||
for i = 1, table.getn(pallyItems), 1 do | ||
doPlayerAddItem(cid, pallyItems[i], 1, false) | ||
end | ||
-- 8 arrows | ||
doPlayerAddItem(cid, 2544, 8, false) | ||
|
||
elseif getPlayerVocation(cid) == 4 then | ||
-- Knight | ||
for i = 1, table.getn(kinaItems), 1 do | ||
doPlayerAddItem(cid, kinaItems[i], 1, false) | ||
end | ||
end | ||
|
||
-- Common for all | ||
doPlayerAddItem(cid, 2674, 5, false) -- 5 apples | ||
doPlayerAddItem(cid, 2120, 1, false) -- 1 rope | ||
end | ||
return true | ||
end |
7 changes: 7 additions & 0 deletions
7
Lua/TFS_03/creaturescript sync outfits/Installation Instructions.txt
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,7 @@ | ||
1. Add below line to XML file: data/creaturescripts/creaturescripts.xml | ||
<event type="login" name="znote_syncoutfits" event="script" value="syncoutfit.lua"/> | ||
|
||
2. Register event in login.lua: data/creaturescripts/scripts/login.lua | ||
registerCreatureEvent(cid, "znote_syncoutfits") | ||
|
||
3. Place Lua file syncoutfit.lua in folder: data/creaturescripts/scripts/ |
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,39 @@ | ||
-- Sync outfits that player own with Znote AAC | ||
-- So its possible to see which full sets player | ||
-- has in characterprofile.php | ||
|
||
znote_outfit_list = { | ||
{ -- Female (girl) outfits | ||
136,137,138,139,140,141,142,147,148, | ||
149,150,155,156,157,158,252,269,270, | ||
279,288,324,329,336,366,431,433,464, | ||
466,471,513,514,542,575,578,618,620, | ||
632,635,636,664,666,683,694,696,698, | ||
724,732,745,749,759,845,852,874,885, | ||
900 | ||
}, | ||
{ -- Male (boy) outfits | ||
128,129,130,131,132,133,134,143,144, | ||
145,146,151,152,153,154,251,268,273, | ||
278,289,325,328,335,367,430,432,463, | ||
465,472,512,516,541,574,577,610,619, | ||
633,634,637,665,667,684,695,697,699, | ||
725,733,746,750,760,846,853,873,884, | ||
899 | ||
} | ||
} | ||
|
||
function onLogin(cid) | ||
-- storage_value + 1000 storages (highest outfit id) must not be used in other script. | ||
-- Must be identical to Znote AAC config.php: $config['EQ_shower'] -> storage_value | ||
local storage_value = 10000 | ||
-- Loop through outfits | ||
for _, outfit in pairs(znote_outfit_list[getPlayerSex(cid)+1]) do | ||
if canPlayerWearOutfit(cid,outfit,3) then | ||
if getPlayerStorageValue(cid,storage_value + outfit) ~= 3 then | ||
setPlayerStorageValue(cid,storage_value + outfit, 3) | ||
end | ||
end | ||
end | ||
return true | ||
end |
Oops, something went wrong.