Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LocId = GetLocationId(player) -- just need to probe for the table entry
- if(LocId == nil)then -- GWCOMM[player:GetGuildName()].xxx_xxx is how this should pull together
- LocId = CreateLocation(player:GetMapId(), player:GetAreaId(), player:GetZoneId())
- end
- local Gcommands = GetGuildCommand(player:GetGuildName())
- if(Gcommands == nil)then
- Gcommands = CreateGcommands(player:GetGuildName())
- end
- local function GetGcommands(guild)
- for i = 1, #GCOMM do
- if(GWARZ[i].guild == guild) then
- return i;
- end
- end
- end
- function CreateLocation(guild)
- local CLentry = guild --(#GWCOMM+1) -- should create varchar entry of guild name
- WorldDBQuery("INSERT INTO guild_warz.commands SET `guild` = '"..guild.."';");
- LoadGWtable()
- print("commands for: "..CLentry.." : created.")
- -- Push values to Table Update after creation
- PreparedStatements(3, "commands", "commands", CLentry)
- PreparedStatements(3, "info_loc", "info", CLentry)
- PreparedStatements(3, "list_loc", "list", CLentry)
- PreparedStatements(3, "Buy_loc", "buy area", CLentry)
- PreparedStatements(3, "buy_house", "buy house", CLentry)
- PreparedStatements(3, "buy_pig", "buy pig", CLentry)
- PreparedStatements(3, "buy_guard", "buy guard", CLentry)
- PreparedStatements(3, "sell_loc", "sell area", CLentry)
- PreparedStatements(3, "sell_house", "sell house", CLentry)
- PreparedStatements(3, "sell_pig", "sell pig", CLentry)
- PreparedStatements(3, "sell_guard", "fire guard", CLentry)
- PreparedStatements(3, "version", "ver", CLentry)
- PreparedStatements(3, "GLD_lvlb", 0, CLentry)
- PreparedStatements(3, "GLD_lvls", 0, CLentry)
- PreparedStatements(3, "tele", "gtele", CLentry)
- return CLentry;
- end
- --[[
- local function PreparedStatements(key, ...)
- [3] = "UPDATE guild_warz.commands SET `%s` = '%s' WHERE `entry` = '%s';",
- ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement