@doukxxt
Desculpa pela demora. Os últimos dias foram corridos. Decidi compartilhar isso com vocês
Abra o diretório otc/data/layouts/retro/styles/40-inventory.otui e procure por essa linha.
Panel
id: conditionPanel
layout:
type: horizontalBox
height: 22
padding: 2
anchors.top: slot8.bottom
anchors.left: slot6.left
anchors.right: slot5.right
margin-top: 4
border-width: 1
border-color: #00000077
background-color: #ffffff22
Adicione abaixo disso.
StoreButton
size: 0 20
anchors.top: prev.bottom
anchors.left: parent.left
anchors.right: parent.right
margin-left: 6
margin-top: 4
margin-right: 6
@onClick: modules.store_module.toggle()
Agora, sobre como comprar itens por pontos, vou postar dois tutoriais para Gesior e Znote.
APENAS GESIOR..
Este script serve para trocar itens por pontos. Vou dar um exemplo com a Magic Sword.
data/scripts.
local StoreCustom = TalkAction("!shopMagic Sword")
function StoreCustom.onSay(player, words, param)
local pointsToDeduct = 10
removePoints(player, pointsToDeduct)
local newItemID = 2401 -- Replace with the ID of the item the player will receive
local newItemCount = 1 -- Quantity of the new item to be added to the player's inventory
player:addItem(newItemID, newItemCount)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully purchased a new item in exchange for" .. pointsToDeduct .. " premium points.")
return false
end
function removePoints(player, amount)
local accountId = player:getAccountId()
local query = "UPDATE `accounts` SET `premium_points` = `premium_points` - " .. amount .. " WHERE `id` = " .. accountId
db.query(query)
end
StoreCustom:separator(" ")
StoreCustom:register()
Para saber quantos pontos você tem, digite !points.
local talkaction = TalkAction("!points")
function Player.getPremiumPoints(self)
local query = db.storeQuery("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. self:getAccountId())
if not query then
return false
end
local value = result.getNumber(query, "premium_points")
result.free(query)
return value
end
function talkaction.onSay(player, words, param, type)
if words:lower() == "!points" then
local points = player:getPremiumPoints()
if points > 0 then
local message = "Your premium points balance is: " .. points
player:popupFYI(message)
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You don't have premium points.")
end
return false
end
return true
end
talkaction:separator(" ")
talkaction:register()
Para comprar outfits ou addons.
local outfitsCustom = TalkAction("!shopMage", "!shopCitizen", "!shopHunter", "!shopKnight", "!shopNoblewoman", "!shopNobleman", "!shopSummoner", "!shopWarrior", "!shopBarbarian", "!shopDruid", "!shopWizard", "!shopOriental", "!shopPirate", "!shopAssassin", "!shopBeggar", "!shopShaman", "!shopNorsewoman", "!shopNorseman", "!shopNightmare", "!shopJester", "!shopBrotherhood", "!shopDemon Hunter", "!shopYalaharian", "!shopNewly Wed", "!shopWarmaster", "!shopWayfarer", "!shopRetro Warrior", "!shopRetro Citizen", "!shopRetro Hunter", "!shopRetro Knight", "!shopRetro Mage", "!shopRetro Noblewoman", "!shopRetro Nobleman", "!shopRetro Summoner")
function outfitsCustom.onSay(player, words, param)
if words == "/shop" then
return false
end
if words == "!shopMage" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 138 or 130 -- Mage outfit ID
local outfitCost = 50 -- Cost in premium_points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Mage outfit addons for " .. outfitCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Mage outfit!")
end
----------------
elseif words == "!shopCitizen" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 136 or 128 -- Citizen outfit ID
local outfitCost = 50 -- Cost in premium_points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add Citizen outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Citizen outfit addons for " .. outfitCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Citizen outfit!")
end
----------------
elseif words == "!shopHunter" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 137 or 129 -- Hunter outfit ID
local outfitCost = 50 -- Cost in premium_points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add Hunter outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Hunter outfit addons for " .. outfitCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Hunter outfit!")
end
----------------
elseif words == "!shopKnight" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 139 or 131 -- Knight outfit ID
local outfitCost = 50 -- Cost in premium_points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add Knight outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Knight outfit addons for " .. outfitCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Knight outfit!")
end
-- Add more commands and messages as necessary
end
return false
end
outfitsCustom:separator(" ")
outfitsCustom:register()
Para comprar uma montaria.
local shopsCustom = TalkAction("!shopMidnight Panther", "!shopWidow Queen", "!shopRacing Bird", "!shopWar Bear", "!shopBlack Sheep", "!shopDraptor", "!shopTitanica", "!shopTin Lizzard", "!shopBlazebringer", "!shopRapid Boar", "!shopStampor", "!shopUndead Cavebear", "!shopDonkey", "!shopTiger Slug", "!shopUniwheel", "!shopCrystal Wolf", "!shopWar Horse", "!shopKingly Deer", "!shopTamed Panda", "!shopDromedary", "!shopScorpion King", "!shopDarkbrown Rented Horse", "!shopArmoured War Horse", "!shopShadow Draptor", "!shopGrey Rented Horse", "!shopBrown Rented Horse", "!shopLady Bug", "!shopManta Ray", "!shopIronblight", "!shopMagma Crawler", "!shopDragonling", "!shopGnarlhound", "!shopCrimson Ray", "!shopSteelbeak", "!shopWater Buffalo", "!shopTombstinger", "!shopPlatesaurian", "!shopUrsagrodon", "!shopThe Hellgrip", "!shopNoble Lion", "!shopDesert King", "!shopShock Head", "!shopWalker", "!shopAzudocus", "!shopCarpacosaurus", "!shopDeath Crawler", "!shopFlamesteed", "!shopJade Lion", "!shopJade Pincer", "!shopNethersteed", "!shopTempest", "!shopWinter King", "!shopDoombringer", "!shopWoodland Prince", "!shopHailstorm Fury", "!shopSiegebreaker", "!shopPoisonbane", "!shopBlackpelt", "!shopGolden Dragonfly", "!shopSteel Bee", "!shopCopper Fly", "!shopTundra Rambler", "!shopHighland Yak", "!shopGlacier Vagabond", "!shopShadow Hart", "!shopBlack Stag", "!shopEmperor Deer", "!shopFlying Divan", "!shopMagic Carpet", "!shopFloating Kashmir", "!shopRingtail Waccoon", "!shopNight Waccoon", "!shopEmerald Waccoon", "!shopFlitterkatzen", "!shopVenompaw", "!shopBatcat", "!shopSea Devil", "!shopCoralripper", "!shopPlumfish", "!shopGorongra", "!shopNoctungra", "!shopSilverneck", "!shopSlagsnare", "!shopNightstinger", "!shopRazorcreep", "!shopRift Runner", "!shopNightdweller", "!shopFrostflare", "!shopCinderhoof", "!shopMouldpincer", "!shopBloodcurl", "!shopLeafscuttler", "!shopSparkion", "!shopSwamp Snapper", "!shopMould Shell", "!shopReed Lurker", "!shopNeon Sparkid", "!shopVortexion", "!shopIvory Fang", "!shopShadow Claw", "!shopSnow Pelt", "!shopJackalope", "!shopDreadhare", "!shopWolpertinger", "!shopStone Rhino", "!shopGold Sphinx", "!shopEmerald Sphinx", "!shopShadow Sphinx", "!shopJungle Saurian", "!shopEmber Saurian", "!shopLagoon Saurian", "!shopBlazing Unicorn", "!shopArctic Unicorn", "!shopPrismatic unicorn", "!shopCranium Spider", "!shopCave Tarantula", "!shopGloom Widow", "!shopMole", "!shopMarsh Toad", "!shopSanguine Frog", "!shopToxic Toad", "!shopEbony Tiger", "!shopFeral Tiger", "!shopJungle Tiger", "!shopFleeting Knowledge", "!shopTawny Owl", "!shopSnowy Owl", "!shopBoreal Owl", "!shopLacewing Moth", "!shopHibernal Moth", "!shopCold Percht Sleigh", "!shopBright Percht Sleigh", "!shopDark Percht Sleigh", "!shopFestive Snowman", "!shopMuffled Snowman", "!shopCaped Snowman", "!shopRabbit Rickshaw", "!shopBunny Dray", "!shopCony Cart", "!shopRiver Crocovile", "!shopSwamp Crocovile", "!shopNightmarish Crocovile", "!shopGryphon", "!shopJousting Eagle", "!shopCerberus Champion", "!shopCold Percht Sleigh Variant", "!shopBright Percht Sleigh Variant", "!shopDark Percht Sleigh Variant", "!shopCold Percht Sleigh Final", "!shopBright Percht Sleigh Final", "!shopDark Percht Sleigh Final", "!shopBattle Badger", "!shopEther Badger", "!shopZaoan Badger", "!shopBlue Rolling Barrel", "!shopRed Rolling Barrel", "!shopGreen Rolling Barrel", "!shopFloating Sage", "!shopFloating Scholar", "!shopFloating Augur", "!shopHaze", "!shopAntelope", "!shopSnow Strider", "!shopDusk Pryer", "!shopDawn Strayer", "!shopSpectral Horse", "!shopSavanna Ostrich", "!shopCoral Rhea", "!shopEventide Nandu", "!shopVoracious Hyaena", "!shopCunning Hyaena", "!shopScruffy Hyaena", "!shopWhite Lion", "!shopKrakoloss", "!shopMerry Mammoth", "!shopHoliday Mammoth", "!shopFestive Mammoth", "!shopVoid Watcher", "!shopRune Watcher", "!shopRift Watcher", "!shopPhant", "!shopShellodon", "!shopSingeing Steed", "!shopHyacinth", "!shopPeony", "!shopDandelion", "!shopRustwurm", "!shopBogwurm", "!shopGloomwurm", "!shopEmerald Raven", "!shopMystic Raven", "!shopRadiant Raven", "!shopGloothomotive", "!shopTopaz Shrine", "!shopJade Shrine", "!shopObsidian Shrine", "!shopPoppy Ibex", "!shopMint Ibex", "!shopCinnamon Ibex")
function shopsCustom.onSay(player, words, param)
if words == "/shop" then
return false
end
if words == "!shopMidnight Panther" then
local shopId = 1 -- Mount ID
local shopCost = 20 -- Cost in premium_points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Midnight Panther for " .. shopCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Midnight Panther!")
end
elseif words == "!shopWidow Queen" then
local shopId = 2 -- Mount ID
local shopCost = 20 -- Cost in premium_points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Widow Queen for " .. shopCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Widow Queen!")
end
elseif words == "!shopRacing Bird" then
local shopId = 3 -- Mount ID
local shopCost = 20 -- Cost in premium_points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Racing Bird for " .. shopCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Racing Bird!")
end
elseif words == "!shopWar Bear" then
local shopId = 4 -- Mount ID
local shopCost = 20 -- Cost in premium_points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE accounts SET premium_points = premium_points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the War Bear for " .. shopCost .. " premium_points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the War Bear!")
end
end
end
shopsCustom:separator(" ")
shopsCustom:register()
Clique no item para ganhar pontos e poder comprar na store!
local premiumPointsAction = Action()
local function doPlayerAddPremiumPoints(player, count)
local accountId = player:getAccountId()
db.query('UPDATE accounts SET premium_points = premium_points +' .. count .. ' WHERE id = ' .. db.escapeString(accountId))
end
function premiumPointsAction.onUse(player, item, fromPosition, target, toPosition)
doPlayerAddPremiumPoints(player, 100)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received 100 store point(s) in your account.")
player:getPosition():sendMagicEffect(28)
item:remove(1)
return true
end
premiumPointsAction:id(24774)
premiumPointsAction:register()
AGORA É ZNOTE..
magic sword.
local StoreCustom = TalkAction("!shopteste")
function StoreCustom.onSay(player, words, param)
local pointsToDeduct = 10 -- Replace with the number of points to be deducted
removePoints(player, pointsToDeduct)
local newItemID = 2401 -- Replace with the ID of the item the player will receive
local newItemCount = 1 -- Quantity of the new item to be added to the player's inventory
player:addItem(newItemID, newItemCount)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully purchased a new item in exchange for " .. pointsToDeduct .. " premium points.")
return false
end
function removePoints(player, amount)
local accountId = player:getAccountId()
local query = "UPDATE `znote_accounts` SET `points` = `points` - " .. amount .. " WHERE `id` = " .. accountId
db.query(query)
end
StoreCustom:separator(" ")
StoreCustom:register()
!points
local StoreCustom = TalkAction("!shopteste")
function StoreCustom.onSay(player, words, param)
local pointsToDeduct = 10 -- Replace with the number of points to be deducted
removePoints(player, pointsToDeduct)
local newItemID = 2401 -- Replace with the ID of the item the player will receive
local newItemCount = 1 -- Quantity of the new item to be added to the player's inventory
player:addItem(newItemID, newItemCount)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully purchased a new item in exchange for " .. pointsToDeduct .. " premium points.")
return false
end
function removePoints(player, amount)
local accountId = player:getAccountId()
local query = "UPDATE `znote_accounts` SET `points` = `points` - " .. amount .. " WHERE `id` = " .. accountId
db.query(query)
end
StoreCustom:separator(" ")
StoreCustom:register()
outfits ou addons.
local outfitsCustom = TalkAction("!shopMage", "!shopCitizen", "!shopHunter", "!shopKnight", "!shopNoblewoman", "!shopNobleman", "!shopSummoner", "!shopWarrior", "!shopBarbarian", "!shopDruid", "!shopWizard", "!shopOriental", "!shopPirate", "!shopAssassin", "!shopBeggar", "!shopShaman", "!shopNorsewoman", "!shopNorseman", "!shopNightmare", "!shopJester", "!shopBrotherhood", "!shopDemon Hunter", "!shopYalaharian", "!shopNewly Wed", "!shopWarmaster", "!shopWayfarer", "!shopRetro Warrior", "!shopRetro Citizen", "!shopRetro Hunter", "!shopRetro Knight", "!shopRetro Mage", "!shopRetro Noblewoman", "!shopRetro Nobleman", "!shopRetro Summoner")
function outfitsCustom.onSay(player, words, param)
if words == "/shop" then
return false
end
if words == "!shopMage" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 138 or 130 -- Mage outfit ID
local outfitCost = 50 -- Cost in points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE znote_accounts SET points = points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Mage outfit addons for " .. outfitCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Mage outfit!")
end
----------------
elseif words == "!shopCitizen" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 136 or 128 -- Citizen outfit ID
local outfitCost = 50 -- Cost in points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE znote_accounts SET points = points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add Citizen outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Citizen outfit addons for " .. outfitCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Citizen outfit!")
end
----------------
elseif words == "!shopHunter" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 137 or 129 -- Hunter outfit ID
local outfitCost = 50 -- Cost in points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE znote_accounts SET points = points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add Hunter outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Hunter outfit addons for " .. outfitCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Hunter outfit!")
end
----------------
elseif words == "!shopKnight" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 139 or 131 -- Knight outfit ID
local outfitCost = 50 -- Cost in points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE znote_accounts SET points = points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add Knight outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Knight outfit addons for " .. outfitCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Knight outfit!")
end
----------------
elseif words == "!shopNoblewoman" then
local outfitId = (player:getSex() == PLAYERSEX_FEMALE) and 140 or 132 -- outfit ID
local outfitCost = 50 -- Cost in points to acquire the outfit
if not player:hasOutfit(outfitId) or not player:hasOutfit(outfitId, 3) then
db.query("UPDATE znote_accounts SET points = points - " .. outfitCost .. " WHERE account_id = " .. player:getAccountId())
player:addOutfitAddon(outfitId, 3) -- Add outfit / addons
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Noblewoman outfit addons for " .. outfitCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Noblewoman outfit!")
end
-- Add more commands and messages as necessary
end
return false
end
outfitsCustom:separator(" ")
outfitsCustom:register()
Montaria.
local shopsCustom = TalkAction("!shopMidnight Panther", "!shopWidow Queen", "!shopRacing Bird", "!shopWar Bear", "!shopBlack Sheep", "!shopDraptor", "!shopTitanica", "!shopTin Lizzard", "!shopBlazebringer", "!shopRapid Boar", "!shopStampor", "!shopUndead Cavebear", "!shopDonkey", "!shopTiger Slug", "!shopUniwheel", "!shopCrystal Wolf", "!shopWar Horse", "!shopKingly Deer", "!shopTamed Panda", "!shopDromedary", "!shopScorpion King", "!shopDarkbrown Rented Horse", "!shopArmoured War Horse", "!shopShadow Draptor", "!shopGrey Rented Horse", "!shopBrown Rented Horse", "!shopLady Bug", "!shopManta Ray", "!shopIronblight", "!shopMagma Crawler", "!shopDragonling", "!shopGnarlhound", "!shopCrimson Ray", "!shopSteelbeak", "!shopWater Buffalo", "!shopTombstinger", "!shopPlatesaurian", "!shopUrsagrodon", "!shopThe Hellgrip", "!shopNoble Lion", "!shopDesert King", "!shopShock Head", "!shopWalker", "!shopAzudocus", "!shopCarpacosaurus", "!shopDeath Crawler", "!shopFlamesteed", "!shopJade Lion", "!shopJade Pincer", "!shopNethersteed", "!shopTempest", "!shopWinter King", "!shopDoombringer", "!shopWoodland Prince", "!shopHailstorm Fury", "!shopSiegebreaker", "!shopPoisonbane", "!shopBlackpelt", "!shopGolden Dragonfly", "!shopSteel Bee", "!shopCopper Fly", "!shopTundra Rambler", "!shopHighland Yak", "!shopGlacier Vagabond", "!shopShadow Hart", "!shopBlack Stag", "!shopEmperor Deer", "!shopFlying Divan", "!shopMagic Carpet", "!shopFloating Kashmir", "!shopRingtail Waccoon", "!shopNight Waccoon", "!shopEmerald Waccoon", "!shopFlitterkatzen", "!shopVenompaw", "!shopBatcat", "!shopSea Devil", "!shopCoralripper", "!shopPlumfish", "!shopGorongra", "!shopNoctungra", "!shopSilverneck", "!shopSlagsnare", "!shopNightstinger", "!shopRazorcreep", "!shopRift Runner", "!shopNightdweller", "!shopFrostflare", "!shopCinderhoof", "!shopMouldpincer", "!shopBloodcurl", "!shopLeafscuttler", "!shopSparkion", "!shopSwamp Snapper", "!shopMould Shell", "!shopReed Lurker", "!shopNeon Sparkid", "!shopVortexion", "!shopIvory Fang", "!shopShadow Claw", "!shopSnow Pelt", "!shopJackalope", "!shopDreadhare", "!shopWolpertinger", "!shopStone Rhino", "!shopGold Sphinx", "!shopEmerald Sphinx", "!shopShadow Sphinx", "!shopJungle Saurian", "!shopEmber Saurian", "!shopLagoon Saurian", "!shopBlazing Unicorn", "!shopArctic Unicorn", "!shopPrismatic unicorn", "!shopCranium Spider", "!shopCave Tarantula", "!shopGloom Widow", "!shopMole", "!shopMarsh Toad", "!shopSanguine Frog", "!shopToxic Toad", "!shopEbony Tiger", "!shopFeral Tiger", "!shopJungle Tiger", "!shopFleeting Knowledge", "!shopTawny Owl", "!shopSnowy Owl", "!shopBoreal Owl", "!shopLacewing Moth", "!shopHibernal Moth", "!shopCold Percht Sleigh", "!shopBright Percht Sleigh", "!shopDark Percht Sleigh", "!shopFestive Snowman", "!shopMuffled Snowman", "!shopCaped Snowman", "!shopRabbit Rickshaw", "!shopBunny Dray", "!shopCony Cart", "!shopRiver Crocovile", "!shopSwamp Crocovile", "!shopNightmarish Crocovile", "!shopGryphon", "!shopJousting Eagle", "!shopCerberus Champion", "!shopCold Percht Sleigh Variant", "!shopBright Percht Sleigh Variant", "!shopDark Percht Sleigh Variant", "!shopCold Percht Sleigh Final", "!shopBright Percht Sleigh Final", "!shopDark Percht Sleigh Final", "!shopBattle Badger", "!shopEther Badger", "!shopZaoan Badger", "!shopBlue Rolling Barrel", "!shopRed Rolling Barrel", "!shopGreen Rolling Barrel", "!shopFloating Sage", "!shopFloating Scholar", "!shopFloating Augur", "!shopHaze", "!shopAntelope", "!shopSnow Strider", "!shopDusk Pryer", "!shopDawn Strayer", "!shopSpectral Horse", "!shopSavanna Ostrich", "!shopCoral Rhea", "!shopEventide Nandu", "!shopVoracious Hyaena", "!shopCunning Hyaena", "!shopScruffy Hyaena", "!shopWhite Lion", "!shopKrakoloss", "!shopMerry Mammoth", "!shopHoliday Mammoth", "!shopFestive Mammoth", "!shopVoid Watcher", "!shopRune Watcher", "!shopRift Watcher", "!shopPhant", "!shopShellodon", "!shopSingeing Steed", "!shopHyacinth", "!shopPeony", "!shopDandelion", "!shopRustwurm", "!shopBogwurm", "!shopGloomwurm", "!shopEmerald Raven", "!shopMystic Raven", "!shopRadiant Raven", "!shopGloothomotive", "!shopTopaz Shrine", "!shopJade Shrine", "!shopObsidian Shrine", "!shopPoppy Ibex", "!shopMint Ibex", "!shopCinnamon Ibex")
function shopsCustom.onSay(player, words, param)
if words == "/shop" then
return false
end
if words == "!shopMidnight Panther" then
local shopId = 1 -- Mount ID
local shopCost = 20 -- Cost in points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE znote_accounts SET points = points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Midnight Panther for " .. shopCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Midnight Panther!")
end
elseif words == "!shopWidow Queen" then
local shopId = 2 -- Mount ID
local shopCost = 20 -- Cost in points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE znote_accounts SET points = points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Widow Queen for " .. shopCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Widow Queen!")
end
elseif words == "!shopRacing Bird" then
local shopId = 3 -- Mount ID
local shopCost = 20 -- Cost in points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE znote_accounts SET points = points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the Racing Bird for " .. shopCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the Racing Bird!")
end
elseif words == "!shopWar Bear" then
local shopId = 4 -- Mount ID
local shopCost = 20 -- Cost in points to acquire the shop
if not player:hasMount(shopId) then
db.query("UPDATE znote_accounts SET points = points - " .. shopCost .. " WHERE account_id = " .. player:getAccountId())
player:addMount(shopId) --
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You acquired the War Bear for " .. shopCost .. " points!")
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You already have the War Bear!")
end
end
end
shopsCustom:separator(" ")
shopsCustom:register()
Clique no item para ganhar pontos e poder comprar na store.
local premiumPointsAction = Action()
local function doPlayerAddPremiumPoints(player, count)
local accountId = player:getAccountId()
db.query('UPDATE znote_accounts SET points = points +' .. count .. ' WHERE account_id = ' .. db.escapeString(accountId))
end
function premiumPointsAction.onUse(player, item, fromPosition, target, toPosition)
doPlayerAddPremiumPoints(player, 100)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received 100 store point(s) in your account.")
player:getPosition():sendMagicEffect(28)
item:remove(1)
return true
end
premiumPointsAction:id(24774)
premiumPointsAction:register()
É só baixar o module e colocar no seu OTClient... Pronto! Espero que tenha gostado!
https://drive.google.com/file/d/1Cl06Dx2o1ix2AO7aUXJRe292tLvfgU45/view?usp=sharing