Ir para conteúdo
  • Cadastre-se

Gesior ACC Novo Shop System v1.1


Posts Recomendados

  • 3 months later...
  • 3 weeks later...

funciona moden aCc ?

NTO PANZER SERVIDOR 24H 

1554689_1.png

http://narutopanzer.blogspot.com.br/

RATE  EXP 999

 

DBO SERVIDOR 24H 

1549171_1.png

http://dbowtf.ddns.net/

RATE EXP 400

 

 

Link para o post
Compartilhar em outros sites
  • 1 month later...
1 hora atrás, sirarcken disse:

Desculpa ressuscitar ,mais porque quando compra algo o item não vem??

Tem algum outro comando pra por in game?

 

Você tem que adicionar o seguinte em globalevents

serv\data\globalevents\scripts e adicione um arquivo com extensão .lua

( Shop.lua ) e coloque isso dentro dele e salve '-'

function onThink(interval, lastExecution, thinkInterval)
 
local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;")
 
if(result:getID() ~= -1) then
while(true) do
cid = getCreatureByName(tostring(result:getDataString("player")))
product = tonumber(result:getDataInt("product"))
itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";")
if isPlayer(cid) then
local id = tonumber(itemr:getDataInt("item"))
local tid = tonumber(result:getDataInt("id"))
local count = tonumber(itemr:getDataInt("count"))
local tipe = tonumber(itemr:getDataInt("type"))
local productn = tostring(itemr:getDataString("name"))
if isInArray({5,8},tipe) then
if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then
if isContainer(getPlayerSlotItem(cid, 3).uid) then
received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count)
if received then
doPlayerSendTextMessage(cid,19, "You recived >> "..productn.." << from Dream Shop")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Desculpe, você não tem espaço suficiente no recipiente para receber >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Desculpe, você não tem um recipiente para receber >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Desculpe, você não tem capacidade suficiente para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
elseif isInArray({6,7},tipe) then
if tipe == 6 then
bcap = 8
bid = 1987
elseif tipe == 7 then
bcap = 20
bid = 1988
end
if isItemRune(id) then
count = 1
end
if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then
local bag = doCreateItemEx(bid, 1)
for i = 1,bcap do
doAddContainerItem(bag, id, count)
end
received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag)
if received == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,19, "You reicived  >> "..productn.." << from shop")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Desculpe, você não tem espaço suficiente para receber >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Desculpe, você não tem capacidade suficiente para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
end
end
itemr:free()
if not(result:next()) then
break
end
end
result:free()
end
return true
end

e em serv\data\globalevents\

Vá até lá e abra o globalevents.xml

e coloque a seguinte tag lá

	<globalevent name="website_shop_item_delivery" interval="5" event="script" value="shop.lua"/>

 Se ajudei REP ai não cai o dedo amigo !

Link para o post
Compartilhar em outros sites
13 minutos atrás, Sekk disse:

Lembrando que se você usa TFS 0.4, coloque 5000 ao invés de 5 na tag do globalevents.xml

Esqueci de falar isso kkk

Link para o post
Compartilhar em outros sites

Fico muito agradecido ,mais ainda assim o item não vem .

Teria que ter algum outro comando ou registrar outra tabela no gesior??

O tfs é o 1.2 e o gesior 2012 ,não sei tbm se o erro seja por causa disso ,mais na distro não aparece erro nenhum.

 

568ef592de56c_Semttulo.thumb.jpg.9efebbb

 

Editado por sirarcken (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Comando para poder comprar.

 

Add database.

CREATE TABLE IF NOT EXISTS `znote_shop_orders` (


`id` int(11) NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`type` int(11) NOT NULL,
`itemid` int(11) NOT NULL,
`count` int(11) NOT NULL,
`time` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

 

Agora em TalkActions

 

<talkaction words="!shop" script="shop.lua"/>

 

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 = 5 -- in seconds.
local player = Player(cid)
if player:getStorageValue(storage) <= os.time() then
player:setStorageValue(storage, os.time() + cooldown)
-- Create the query
local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `znote_shop_orders` WHERE `account_id` = " .. player:getAccountId() .. " LIMIT 1;")
-- 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")
result.free(orderQuery)
-- ORDER TYPE 1 (Regular item shop products)
if q_type == 1 then
-- Get wheight
if player:getFreeCapacity() >= ItemType(q_itemid):getWeight(q_count) then
db.query("DELETE FROM `znote_shop_orders` WHERE `id` = " .. q_id .. ";")
player:addItem(q_itemid, q_count)
player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. q_count .. " x " .. ItemType(q_itemid):getName() .. "!")
else
player:sendTextMessage(MESSAGE_STATUS_WARNING, "Need more CAP!")
end
end
-- Add custom order types here
-- Type 2 is reserved for premium days and is handled on website, not needed here.
-- Type 3 is reserved for character gender(sex) change and is handled on website as well.
-- So use type 4+ for custom stuff, like etc packages.
-- if q_type == 4 then
-- end
else
player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have no orders.")
end
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. player:getStorageValue(storage) - os.time())
end
return false
end 

 

Editado por sirarcken
:D (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 2 months later...
  • 1 month later...
  • 2 years later...

Funcioando perfeitamente!

 

para quem nao conseguiu, siga esta etapa:

 

adicione database SQL:

 

CREATE TABLE IF NOT EXISTS `shop_orders` (


`id` int(11) NOT NULL AUTO_INCREMENT,
`account_id` int(11) NOT NULL,
`type` int(11) NOT NULL,
`itemid` int(11) NOT NULL,
`count` int(11) NOT NULL,
`time` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

Crie um arquivo shop.Lua em talkaction e adicione isso:

 

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.
local player = Player(cid)
if player:getStorageValue(storage) <= os.time() then
player:setStorageValue(storage, os.time() + cooldown)
-- Create the query
local orderQuery = db.storeQuery("SELECT `id`, `type`, `itemid`, `count` FROM `shop_orders` WHERE `account_id` = " .. player:getAccountId() .. " LIMIT 1;")
-- 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")
result.free(orderQuery)
-- ORDER TYPE 1 (Regular item shop products)
if q_type == 1 then
-- Get wheight
if player:getFreeCapacity() >= ItemType(q_itemid):getWeight(q_count) then
db.query("DELETE FROM `shop_orders` WHERE `id` = " .. q_id .. ";")
player:addItem(q_itemid, q_count)
player:sendTextMessage(MESSAGE_INFO_DESCR, "Congratulations! You have received " .. q_count .. " x " .. ItemType(q_itemid):getName() .. "!")
else
player:sendTextMessage(MESSAGE_STATUS_WARNING, "Need more CAP!")
end
end
-- Add custom order types here
-- Type 2 is reserved for premium days and is handled on website, not needed here.
-- Type 3 is reserved for character gender(sex) change and is handled on website as well.
-- So use type 4+ for custom stuff, like etc packages.
-- if q_type == 4 then
-- end
else
player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have no orders.")
end
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Can only be executed once every " .. cooldown .. " seconds. Remaining cooldown: " .. player:getStorageValue(storage) - os.time())
end
return false
end

 

 

e adicione a tag em talkactions.xml

<talkaction words="!shop" script="shop.lua"/>

 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Tomaxx
      Olá Pessoal Eu aqui de novo Estou precisando de ajuda
       
       
      Adiciono Normal A Pagina De Cast System Lembrando Que O Meu é o gesior 2012 que não precisa adicionar a pagina no Index.php
       
      ai tento entrar na pagina segue código de erro
       
       
       
       
      Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\pages\cast.php on line 158
       
       
       
      Segue minha pagina de cast Clique Aqui
       
       
       
      Lembrando que não é necessária mente esta pagina se alguém tiver uma que esta funcionando ok p:
       
       
      Valendo REP ><
    • Por Tomaxx
      Olá Gostaria de fazer um pedido
       
      Meu Gesior é esse dos novo da mesma plataforma do GESIOR VICTORWEBMASTER 1.0 V2
      tenho uma pagina de cast system aqui mas é do gesior antigo e não consigo adicionar neste novo gesior e gostaria de estar pedindo uma pagina de cast compatível com o novo gesior 
       
      Valendo REP ><
    • Por Tomaxx
      Olá eu aqui novamente rs bom amigos estou com o seguinte problema posso tentar por diversos nomes emails e etc... mas não fica verdinho segue imagens ressaltando que uso Gesior 2012 TFS 1.0
       
       
       
      Account
       
       

       
      Character
       

       
       
      Valendo REP
       
      ><
    • Por Helliab
      Compra e venda de personagens por pontos para Gesior ACC.
      Vamos lá..
       
      FOTOS:
       
      Venda:

       
       
      Compra:

       

       
       
      Crie um arquivo dentro do htdocs, chamado buychar.php e dentro dele coloque:
       
      <?PHP if($logged) { if ($action == '') { $main_content .= '<center>Here is the list of the current characters that are in the shop!</center>'; $main_content .= '<BR>'; $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Name</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Vocation</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Level</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Price</B></CENTER></TD><TD CLASS=white width="64px"><CENTER><B>Buy it</B></CENTER></TD></TR>'; $getall = $SQL->query('SELECT `id`, `name`, `price`, `status` FROM `sellchar` ORDER BY `id`')or die(mysql_error()); foreach ($getall as $tt) { $namer = $tt['name']; $queryt = $SQL->query("SELECT `name`, `vocation`, `level` FROM `players` WHERE `name` = '$namer'"); foreach ($queryt as $ty) { if ($ty['vocation'] == 1) { $tu = 'Sorcerer'; } else if ($ty['vocation'] == 2) { $tu = 'Druid'; } else if ($ty['vocation'] == 3) { $tu = 'Paladin'; } else if ($ty['vocation'] == 4) { $tu = 'Knight'; } else if ($ty['vocation'] == 5) { $tu = 'Sorcerer'; } else if ($ty['vocation'] == 6) { $tu = 'Druid'; } else if ($ty['vocation'] == 7) { $tu = 'Paladin'; } else if ($ty['vocation'] == 8) { $tu = 'Knight'; } $ee = $tt['name']; $ii = $tt['price']; $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><CENTER><B><a href="index.php?subtopic=characters&name='.$tt['name'].'">'.$tt['name'].'</a></B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tu.'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$ty['level'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B>'.$tt['price'].'</B></CENTER></TD><TD CLASS=black width="64px"><CENTER><B> <form action="?subtopic=buychar&action=buy" method="POST"> <input type="hidden" name="char" value="'.$ee.'"> <input type="hidden" name="price" value="'.$ii.'"> <input type="submit" name="submit" value="Buy it"></B></CENTER></TD></TR></form>'; } } $main_content .= '</TABLE>'; } if ($action == 'buy') { $name = $_POST['char']; $price = $_POST['price']; $ceh = $SQL->query("SELECT `name` FROM `sellchar` WHERE `name` = '$name'"); if ($ceh) { if ($name == '') { $main_content .= '<b><center>Select a character to buy first/b>'; } else { $user_premium_points = $account_logged->getCustomField('premium_points'); $user_id = $account_logged->getCustomField('id'); if ($user_premium_points >= $price) { $check = $SQL->query("SELECT * FROM `sellchar` WHERE `name` = '$name'") or die(mysql_error()); $check1 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$name'") or die(mysql_error()); $check2 = $SQL->query("SELECT `oldid` FROM `sellchar` WHERE `name` = '$name'"); foreach ($check as $result) { foreach($check1 as $res) { foreach($check2 as $ress) { $oid = $ress['oldid']; $main_content .= '<center>You bought<b> '.$name.' ( '.$res['level'].' ) </b>for <b>'.$result['price'].' points.</b><br></center>'; $main_content .= '<br>'; $main_content .= '<center><b>The character is in your account, have fun!</b></center>'; $execute1 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` - '$price' WHERE `id` = '$user_id'"); $execute2 = $SQL->query("UPDATE `players` SET `account_id` = '$user_id' WHERE `name` = '$name'"); $execute2 = $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '$price' WHERE `id` = '$oid'"); $execute3 = $SQL->query("DELETE FROM `sellchar` WHERE `name` = '$name'"); } } } } else { $main_content .= '<center><b>You dont have enought premium points</b></center>'; } } } else { $main_content .= '<center><b>Character cannot be buyed</b></center>'; } } } else { $main_content .= '<center>Please log in first!</center>'; } ?>  
      depois crie um chamado sellchar.php e coloque isso:
      <?PHP if($logged) { $main_content .= '<center><b>Here you can put your character on sale!</center></b><br>'; $main_content .= 'If you put your character on sale anyone can buy it, you will lose acces to that character and you wont be able to log in with that character until someone buys it, you can also delete your offer by talking to an admin!<br><b>when someone buys your character you will get the price in points!</b>'; $main_content .= '<br>'; $main_content .= '<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD CLASS=white width="64px"><CENTER><B>Sell your characters</B></CENTER></TD></TR>'; $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD CLASS=black width="64px"><B></B>'; $players_from_logged_acc = $account_logged->getPlayersList(); $players_from_logged_acc->orderBy('name'); $main_content .= '<form action="" method="post"><select name="char">'; foreach($players_from_logged_acc as $player) { $main_content .= '<option>'.$player->getName().'</option>'; } $main_content .= '</select>Select a character to sell<br>'; $main_content .= '<input type="text" name="price" maxlength="10" size="4" >Select the price of the character<br>'; $main_content .= '<input type="submit" name="submit" value="Sell character"></TD></TR>'; $main_content .= '</form></table>'; if (isset($_POST['submit'])) { $char = stripslashes($_POST['char']); $price = stripslashes($_POST['price']); if ($char && $price) { if(is_numeric(trim($_POST['price']))) { $check2 = $SQL->query("SELECT * FROM `players` WHERE `name` = '$char'") or die(mysql_error()); foreach ($check2 as $re) { $voc = $re['vocation']; $oid = $re['account_id']; } $check1 = $SQL->query("UPDATE `players` SET `account_id` = 1 WHERE `name` = '$char'") or die(mysql_error()); $check3 = $SQL->query("INSERT INTO `sellchar` VALUES ('','$char','$voc','$price','1','$oid')"); $main_content .= '<b><center>You added your character correctly, thanks!</b></center>'; header("Location: index.php?subtopic=buychar"); } else { $main_content .= '<b><center>Set a numeric price!!</b></center>'; } } else { $main_content .= '<b><center>Fill out all fields!</b></center>'; } } } else { $main_content .= '<b><center>Please log in first!</b></center>'; } ?>  
      depois disso vá em htdocs/layouts/layout que você usa/layouts e insira as duas páginas aonde você bem querer(sugiro que seja na aba shop, pois é venda e compra).. caso alguém não saiba posta aqui no tópico que eu ensino.
       
      Agora adicione isso no index.php
      case "sellchar";                 $topic = "Sell Char";                 $subtopic = "sellchar";                 include("sellchar.php");     break;          case "buychar";                 $topic = "Buy Char";                 $subtopic = "buychar";                 include("buychar.php");     break;  
      Agora acesse a database do OT e insira este comando SQL
      CREATE TABLE IF NOT EXISTS `sellchar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(40) NOT NULL, `vocation` int(11) NOT NULL, `price` int(11) NOT NULL, `status` varchar(40) NOT NULL, `oldid` varchar(40) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Pronto para ser usado!!
       
       
       
       
      obs1: Caso você não adicionou a página no layouts acesse assim:
       
      127.0.0.1/?subtopic=sellchar
      127.0.0.1/?subtopic=buychar
       
      obs2: não tem como a pessoa que colocou a venda tirá-lo depois, se algum programador se habilitar a fazer o esquema aí para nós, fico grato.
       
       
       
       
      --- Créditos ---
      Raggaer
      Helliab por trazer ao TK.
       
      REP++
       
      @helliabsantana
    • Por Swiruseq69
      Preview

       
      ___________________________________________________
       
      Créditos
      Azuu
      TenTypSwir
      ___________________________________________________
       
      Scan
      https://www.virustotal.com/#/file/580c501a5e3b2aa8f29888873a92660d7b6bdb94f99893cbf1eb73e17b9ade52/detection
       
      Download
      nrtn_layout.tgz
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo