TekaZudo
seuserver.com.br
DESCRIÇÃO
Anuncie aqui neste countdown e dê maior visibilidade ao seu lançamento |
Full Global • Custom Quests • Custom Outfits • Lottery System • Version 15x
Inicia em:
--
Participar
-
Npc troca de item
Não deu, npc nem responde o hi mais @ernaix69 Eu tinha feito assim: elseif talkState[talkUser] == 8 then if msgcontains (msg, 'yes') then if doPlayerTakeItem(cid, 12739, 1) == true then doPlayerTakeItem(cid, 2160, 10) doPlayerAddItem(cid, 12748, 1) selfSay(cycmsg, cid) talkState[talkUser] = 0 else selfSay(noimsg, cid) end else selfSay(deny, cid) end Ele remove só de quem tem dinheiro na bag, se a pessoa não tiver dinheiro ele entrega o item da mesma maneira. Consegui assim galera: elseif talkState[talkUser] == 7 then if msgcontains (msg, 'yes') then if doPlayerTakeItem(cid, 2160, 50) and doPlayerTakeItem(cid, 12662, 1) == true then doPlayerAddItem(cid, 12677, 1) selfSay(cycmsg, cid) talkState[talkUser] = 0 else selfSay(noimsg, cid) end else selfSay(deny, cid) end valeu pelo suporte galera!
-
Npc troca de item
.Qual servidor ou website você utiliza como base? OTX 2 Qual o motivo deste tópico? NPC Trocar 2 itens por 1 item. Ele está trocando o item 12686 pelo item 12688, mas queria que também que retirasse do player o item 2160, quantidade 10. Você tem o código disponível? Se tiver publique-o aqui: elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') then if doPlayerTakeItem(cid, 12686, 1) == true then doPlayerAddItem(cid, 12688, 1) selfSay(cycmsg, cid) talkState[talkUser] = 0 else selfSay(noimsg, cid) end else selfSay(deny, cid) end talkState[talkUser] = 0
- [OTX3] Trade Offline / Auction System
-
Gesior - Layout.php não atualiza.
.Qual servidor ou website você utiliza como base? Gesior e TFS 0.4 Qual o motivo deste tópico? Estou tentando adicionar e remover algumas paginas do layout.php, porém eu realizo a modificação, mas não tem atualização quando eu acesso. Eu já consegui fazer algumas modificações, mas de dois dias pra cá não consigo mais. Já coloquei outro layout.php mas tbm nao muda nada no site... Layout.php
-
Reward Level [Montaria, Level e Addons]
TFS 0.4 N FUNCIONA
-
Erro Script Promotion e Idle
Não funcionou! Os players não conseguem logar após ativação desse script. Fica no connecting...
-
O servidor está dando premmy quando o char loga quero tirar
Se vc usar gesior, dê uma olhada no config.php
-
Erro Script Promotion e Idle
o elseif é caso eles não seja premium volte para vocação "free"...
-
Erro Script Promotion e Idle
bump
-
Erro Script Promotion e Idle
Não, o server fica online, mas a função do script não funciona.
-
Erro Script Promotion e Idle
Antes de trocar as sources do OT (agora eu uso, rev 3777 do fir3element), eu usava o seguinte code para ver quem era p.a e trocar de vocação: Mas agora não está mais funcionando... Este eu uso no login do creaturescripts/scripts/login.lua if isPremium(cid) then if getPlayerVocation(cid) == 1 then doPlayerSetVocation(cid, 5) elseif getPlayerVocation(cid) == 2 then doPlayerSetVocation(cid, 6) elseif getPlayerVocation(cid) == 3 then doPlayerSetVocation(cid, 7) elseif getPlayerVocation(cid) == 4 then doPlayerSetVocation(cid, 8) end else if getPlayerVocation(cid) == 5 then doPlayerSetVocation(cid, 1) elseif getPlayerVocation(cid) == 6 then doPlayerSetVocation(cid, 2) elseif getPlayerVocation(cid) == 7 then doPlayerSetVocation(cid, 3) elseif getPlayerVocation(cid) == 8 then doPlayerSetVocation(cid, 4) end end Também tem um erro do idle, ele não kick player. creature/scripts/idle.lua local config = { idleWarning = getConfigValue('idleWarningTime'), idleKick = getConfigValue('idleKickTime') } function onThink(cid, interval) if(getTileInfo(getCreaturePosition(cid)).nologout or getCreatureNoMove(cid) or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then return true end local idleTime = getPlayerIdleTime(cid) + interval doPlayerSetIdleTime(cid, idleTime) if(config.idleKick > 0 and idleTime > config.idleKick) then doRemoveCreature(cid) elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then local message = "You have been idle for " .. math.ceil(config.idleWarning / 60000) .. " minutes" if(config.idleKick > 0) then message = message .. ", you will be disconnected in " local diff = math.ceil((config.idleWarning - config.idleKick) / 60000) if(diff > 1) then message = message .. diff .. " minutes" else message = message .. "one minute" end message = message .. " if you are still idle" end doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".") end return true end Poderiam me ajudar?
-
-
Rollback
LINUX BBHOST Linux
-
Rollback
Opa, estou enfrentando alguns problemas com meu servidor. O servidor começa a dar lag, alguns player recebem kick e por consequência disso, não recebem save. Alguns dos players receberam kick e chegaram a perder 15 level. Atualmente, estou com uma vps de 4gb ram, 2vcore, 50gb ssd, 1gbps uplink, para um mapa de 45mb, uma vps que suporta tranquilamente o servidor com os player atual, média de 30~45 online. Os players tbm estão com problemas para entrar no servidor, alguns demoram para se conectar, após informar acc/pw... Vocês acham que pode ser problema do OT/distro~, problema da rede do vps ou algum outro problema? Problema de rollback, já resolvi. - coloquei pro save acontecer mais rápido. Mas o lag ainda continua.
- [Gesior ACC] Compra e Venda de personagens por pontos
-
[Gesior ACC] Compra e Venda de personagens por pontos
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