Ir para conteúdo

Helflin

Artesão
  • Total de itens

    142
  • Registro em

  • Última visita

Tudo que Helflin postou

  1. Gostaria do código que fizesse com que os players pudessem passar um dentro do outro... dentro da protection zone... Podem fechar, eu mesmo resolvi...
  2. Helflin

    Spells Visuals

    Resolvido !!! Tive que compilar ... -- Criei um outro tópico... \/ alguem ai sabe me dizer como colocar para os players passarem um dentro do outro, quando dentro da protection zone? obg... http://www.xtibia.com/forum/topic/219579-player-pz/
  3. Helflin

    Spells Visuals

    eu não consigo compilar distro nessa ***** .... ta dificil demais.. http://www.xtibia.com/forum/topic/145300-c-compilando-um-otserv/ ja tentei isso mas a source que vem... tem 502 erros... mto erro ta doido...
  4. Alguém pode me dizer como alterar a cor que aparece quando o player heala? por exemplo, em OT 8.60 normalmente quando mostra aparece ex: +790 verde quando usa um exura vita... Já na versão do global aparece em azul claro... Alguém me diz como colocar em azul? uso um servidor global 8.60.... Coloquei na foto um exemplo... as duas prints são de servidores 8.60 !!!
  5. Helflin

    Account Management

    Bom, eu editei aqui e melhorou... The character Aindacria'assim has been created. mas ainda esta criando character quando poe o ' junto... meu check_name.php .. <?PHP echo '<?xml version="1.0" encoding="utf-8" standalone="yes"?>'; $config_ini = parse_ini_file('../config/config.ini'); include('../config/config.php'); $name = strtolower(stripslashes(trim($_REQUEST['name']))); if(empty($name)) { echo '<font color="red">Please enter new character name.</font>'; exit; } //first word can't be: $first_words_blocked = array('gm ','cm ', 'god ','tutor ', "'", '-'); //names blocked: $names_blocked = array('gm','cm', 'god', 'tutor'); //name can't contain: $words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", ' ',"'","' "," '", '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor'); $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM "); if($temp != strlen($name)) { echo '<font color="red">Name contains illegal letters. Use only: <b>A to Z.</b></font>'; exit; } if(strlen($name) > 16) { echo '<font color="red">Too long name. Max. lenght <b>16</b> letters.</font>'; exit; } foreach($names_blocked as $word) if($word == $name) { echo '<font color="red">Blocked names:<b> '.$names_blocked[0]; if(count($names_blocked) > 1) foreach($names_blocked as $word) if($word != $names_blocked[0]) echo ','.$word; echo '</b></font>'; exit; } foreach($config['site']['monsters'] as $word) if($word == $name) { echo '<font color="red"><b>You can not use monster name.</b></font>'; exit; } foreach($config['site']['npc'] as $word) if($word == $name) { echo '<font color="red"><b>You can not use NPC name.</b></font>'; exit; } foreach($first_words_blocked as $word) if($word == substr($name, 0, strlen($word))) { echo '<font color="red">First letters in name can\'t be:<b> '.$first_words_blocked[0]; if(count($first_words_blocked) > 1) foreach($first_words_blocked as $word) if($word != $first_words_blocked[0]) echo ','.$word; echo '</b></font>'; exit; } if(substr($name, -1) == "'" || substr($name, -1) == "-") { echo '<font color="red">Last letter can\'t be <b>\'</b> and <b>-</b></font>'; exit; } foreach($words_blocked as $word) if (!(strpos($name, $word) === false)) { echo '<font color="red">Name can\'t cointain words:<b> '.$words_blocked[0]; if(count($words_blocked) > 1) foreach($words_blocked as $word) if($word != $words_blocked[0]) echo ','.$word; echo '</b></font>'; exit; } for($i = 0; $i < strlen($name); $i++) if($name[$i] == $name[($i+1)] && $name[$i] == $name[($i+2)]) { echo '<font color="red">Name can\'t contain 3 same letters one by one.</font><br /><font color="green"><u>Good:</u> M<b>oo</b>nster</font><font color="red"><br />Wrong: M<b>ooo</b>nster</font>'; exit; } for($i = 0; $i < strlen($name); $i++) if($name[$i-1] == ' ' && $name[$i+1] == ' ') { echo '<font color="red">Use normal name format.</font><br /><font color="green"><u>Good:</u> <b>Gesior</b></font><font color="red"><br />Wrong: <b>G e s ior</b></font>'; exit; } if(substr($name, 1, 1) == ' ') { echo '<font color="red">Use normal name format.</font><br /><font color="green"><u>Good:</u> <b>Gesior</b></font><font color="red"><br />Wrong: <b>G esior</b></font>'; exit; } if(substr($name, -2, 1) == " ") { echo '<font color="red">Use normal name format.</font><br /><font color="green"><u>Good:</u> <b>Gesior</b></font><font color="red"><br />Wrong: <b>Gesio r</b></font>'; exit; } else //connect to DB $server_config = parse_ini_file($config_ini['server_path'].'config.lua'); if(isset($server_config['mysqlHost'])) { //new (0.2.6+) ots config.lua file $mysqlhost = $server_config['mysqlHost']; $mysqluser = $server_config['mysqlUser']; $mysqlpass = $server_config['mysqlPass']; $mysqldatabase = $server_config['mysqlDatabase']; $sqlitefile = $server_config['sqliteDatabase']; } elseif(isset($server_config['sqlHost'])) { //old (0.2.4) ots config.lua file $mysqlhost = $server_config['sqlHost']; $mysqluser = $server_config['sqlUser']; $mysqlpass = $server_config['sqlPass']; $mysqldatabase = $server_config['sqlDatabase']; $sqlitefile = $server_config['sqliteDatabase']; } // loads #####POT mainfile##### include('../pot/OTS.php'); // PDO and POT connects to database $ots = POT::getInstance(); if($server_config['sqlType'] == "mysql") $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); elseif($server_config['sqlType'] == "sqlite") $ots->connect(POT::DB_SQLITE, array('database' => $config_ini['server_path'].$sqlitefile)); $name_db = new OTS_Player(); $name_db->find($name); if($name_db->isLoaded()) echo '<font color="red"><b>Player with this name already exist.</b></font>'; else echo '<font color="green">Good. Your name will be:<br />"<b>'.ucwords($name).'</b>"</font>'; ?>
  6. Helflin

    Account Management

    Acho que o problema não é do account management... - Acho que fica na pasta AJAX / check_name.php - Aqui esta o arquivo, é nele... alguem me ajuda ae? <?PHP echo '<?xml version="1.0" encoding="utf-8" standalone="yes"?>'; $config_ini = parse_ini_file('../config/config.ini'); include('../config/config.php'); $name = strtolower(stripslashes(trim($_REQUEST['name']))); if(empty($name)) { echo '<font color="red">Please enter new character name.</font>'; exit; } //first word can't be: $first_words_blocked = array('gm ','cm ', 'god ','tutor ', "'", '-'); //names blocked: $names_blocked = array('gm','cm', 'god', 'tutor'); //name can't contain: $words_blocked = array('gamemaster', 'game master', 'game-master', "game'master", ' ', '--', "''","' ", " '", '- ', ' -', "-'", "'-", 'fuck', 'sux', 'suck', 'noob', 'tutor'); $temp = strspn("$name", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- '"); if($temp != strlen($name)) { echo '<font color="red">Name contains illegal letters. Use only: <b>qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- \'</b></font>'; exit; } if(strlen($name) > 25) { echo '<font color="red">Too long name. Max. lenght <b>25</b> letters.</font>'; exit; } foreach($names_blocked as $word) if($word == $name) { echo '<font color="red">Blocked names:<b> '.$names_blocked[0]; if(count($names_blocked) > 1) foreach($names_blocked as $word) if($word != $names_blocked[0]) echo ','.$word; echo '</b></font>'; exit; } foreach($config['site']['monsters'] as $word) if($word == $name) { echo '<font color="red"><b>You can not use monster name.</b></font>'; exit; } foreach($config['site']['npc'] as $word) if($word == $name) { echo '<font color="red"><b>You can not use NPC name.</b></font>'; exit; } foreach($first_words_blocked as $word) if($word == substr($name, 0, strlen($word))) { echo '<font color="red">First letters in name can\'t be:<b> '.$first_words_blocked[0]; if(count($first_words_blocked) > 1) foreach($first_words_blocked as $word) if($word != $first_words_blocked[0]) echo ','.$word; echo '</b></font>'; exit; } if(substr($name, -1) == "'" || substr($name, -1) == "-") { echo '<font color="red">Last letter can\'t be <b>\'</b> and <b>-</b></font>'; exit; } foreach($words_blocked as $word) if (!(strpos($name, $word) === false)) { echo '<font color="red">Name can\'t cointain words:<b> '.$words_blocked[0]; if(count($words_blocked) > 1) foreach($words_blocked as $word) if($word != $words_blocked[0]) echo ','.$word; echo '</b></font>'; exit; } for($i = 0; $i < strlen($name); $i++) if($name[$i] == $name[($i+1)] && $name[$i] == $name[($i+2)]) { echo '<font color="red">Name can\'t contain 3 same letters one by one.</font><br /><font color="green"><u>Good:</u> M<b>oo</b>nster</font><font color="red"><br />Wrong: M<b>ooo</b>nster</font>'; exit; } for($i = 0; $i < strlen($name); $i++) if($name[$i-1] == ' ' && $name[$i+1] == ' ') { echo '<font color="red">Use normal name format.</font><br /><font color="green"><u>Good:</u> <b>Gesior</b></font><font color="red"><br />Wrong: <b>G e s ior</b></font>'; exit; } if(substr($name, 1, 1) == ' ') { echo '<font color="red">Use normal name format.</font><br /><font color="green"><u>Good:</u> <b>Gesior</b></font><font color="red"><br />Wrong: <b>G esior</b></font>'; exit; } if(substr($name, -2, 1) == " ") { echo '<font color="red">Use normal name format.</font><br /><font color="green"><u>Good:</u> <b>Gesior</b></font><font color="red"><br />Wrong: <b>Gesio r</b></font>'; exit; } else //connect to DB $server_config = parse_ini_file($config_ini['server_path'].'config.lua'); if(isset($server_config['mysqlHost'])) { //new (0.2.6+) ots config.lua file $mysqlhost = $server_config['mysqlHost']; $mysqluser = $server_config['mysqlUser']; $mysqlpass = $server_config['mysqlPass']; $mysqldatabase = $server_config['mysqlDatabase']; $sqlitefile = $server_config['sqliteDatabase']; } elseif(isset($server_config['sqlHost'])) { //old (0.2.4) ots config.lua file $mysqlhost = $server_config['sqlHost']; $mysqluser = $server_config['sqlUser']; $mysqlpass = $server_config['sqlPass']; $mysqldatabase = $server_config['sqlDatabase']; $sqlitefile = $server_config['sqliteDatabase']; } // loads #####POT mainfile##### include('../pot/OTS.php'); // PDO and POT connects to database $ots = POT::getInstance(); if($server_config['sqlType'] == "mysql") $ots->connect(POT::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); elseif($server_config['sqlType'] == "sqlite") $ots->connect(POT::DB_SQLITE, array('database' => $config_ini['server_path'].$sqlitefile)); $name_db = new OTS_Player(); $name_db->find($name); if($name_db->isLoaded()) echo '<font color="red"><b>Player with this name already exist.</b></font>'; else echo '<font color="green">Good. Your name will be:<br />"<b>'.ucwords($name).'</b>"</font>'; ?>
  7. Helflin

    Account Management

    Não funfou, ainda persiste com o problema... não é lá essas coisas, eu posso dar name lock em quem tiver esses caracteres no nome...
  8. Helflin

    Account Management

    The character Test-name has been created. The character Test'name has been created. ainda esta com esse problema, quando eu coloco em create account, ja cria um character por lá, lá não da pra criar com ' ou - .... só no account management que consegue criar com esses caracteres.
  9. Irei postar aqui o meu accountmanagement.php, se alguem pudesse ajeitar ele para mim... O problema é em create characters... Quando uma pessoa cria character com ( ' ) ou ( - ), esses caracteres ilegais, buga quando puxa item do shop. accountmanagement.php
  10. Adiciona em quem está offline também?? E se os caras criarem varios MCs ai vai poder pegar pois estara offline... Me explique sobre isso? vlw ae.
  11. Helflin

    Acc manger

    vá pelo SQL na sua database e altere a posição do acc manager, se nao for pela database tenta ver no config.lua.
  12. Bom, o motivo do banimento é por deixar players ficarem de exit no treiner, e assim o numero de players só crescem, isso gera banimento, vou ensinar como retirar esse exit. 1º = vá na pasta do seu ot, em data\creaturescripts\scripts e crie um bloco de notas, renomeie-o para idle.lua e cole isso abaixo dentro: 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 2º = vá em data\creaturescripts\scripts abra o arquivo login.lua e adicione esta linha abaixo: registerCreatureEvent(cid, "Idle") 3º = em data\creaturescripts abra o creaturescripts.xml e adicione: <event type="think" name="Idle" event="script" value="idle.lua"/> 4º = na pasta do seu ot, em config.lua, confira esta linha: idleWarningTime = 14 * 60 * 1000 idleKickTime = 15 * 60 * 1000
  13. Acho que é porque você criou com o character online, coloque para criar somente pelo site... vá em CONFIG.LUA e coloque assim. Se tiver TRUE altere pra FALSE. ingameGuildManagement = false
  14. Se o seu GESIOR tiver os SAMPLES, "sorcerer sample", "knight sample".... você terá que alterar na database a TOWNID para 1.
  15. kkkkk eu ri com ele "AL" é em htdocs/config/config.php : Só alterar lá. $config['site']['newaccount_premdays'] = 20; // how many days receive new account
  16. na pasta CONFIG de seu site, abra CONFIG.PHP com bloco de notas e altere: $config['site']['newaccount_premdays'] = 999; // how many days receive new account Bem no começo do arquivo. Altere o 999 dias de premium para quantos voce quiser.
  17. Retirado.
  18. poe tipo alavancas .... que ai n tem como bugar ou entao altera o npc.ccp do distro
  19. aí ja n lembro mais... tenta achar ot 8.1 q acho que éra assim... mas pq vc n usa o hi, trade? eu acho até melhor cara.
  20. Script: Obs: altere o "PREÇO". local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItemContainer({'Event I'},2270, PREÇO, 1) shopModule:addBuyableItemContainer({'Event II'},2296, PREÇO, 1) shopModule:addBuyableItemContainer({'Event III'},2290, PREÇO, 1) shopModule:addBuyableItemContainer({'Event Castle'},2280, PREÇO, 1) function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182} if(msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand')) then if(isSorcerer(cid) or isDruid(cid)) then if(getPlayerStorageValue(cid, 30002) == -1) then selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid) talkState[talkUser] = 1 else selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid) end else selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid) end elseif(msgcontains(msg, 'yes')) then if(talkState[talkUser] == 1) then doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1) selfSay('Here you are young adept, take care yourself.', cid) setPlayerStorageValue(cid, 30002, 1) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then selfSay('Ok then.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) NPC: <?xml version="1.0" encoding="UTF-8"?> <npc name="Xodet" script="data/npc/scripts/xodetrunes.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="130" head="19" body="86" legs="87" feet="95" addons="0"/> <parameters> <parameter key="message_greet" value="Oh, please come in, |PLAYERNAME|. Just ask me for sell {Event I}, {Event II}, {Event III}, {Event Castle}."/> <parameter key="message_farewell" value="Good bye and come again."/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="job;" /> <parameter key="keyword_reply1" value="I'm sorcerer and selling magic items." /> </parameters> </npc>
  21. tenta esse script. é o seguinte: vc tem que falar, hi, bp uh, yes. caso não queira backpacks, tire os ids das bps abaixo. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItemContainer({'bp blank'}, 1998, 2260, 220, 1, 'bp blank rune') shopModule:addBuyableItemContainer({'bp animate dead'}, 1998, 2316, 7520, 1, 'bp animate dead rune') shopModule:addBuyableItemContainer({'bp antidote'}, 2003, 2266, 1320, 1, 'bp antidote rune') shopModule:addBuyableItemContainer({'bp avalanche'}, 2002, 2274, 3600,4, 'bp avalanche rune') shopModule:addBuyableItemContainer({'bp chameleon'}, 1998, 2291, 4220,1, 'bp chameleon rune') shopModule:addBuyableItemContainer({'bp convince creature'}, 1998, 2290, 1620,1, 'bp convince creature rune') shopModule:addBuyableItemContainer({'bp desintegrate'}, 2001, 2310, 1620,3, 'bp desintegrate rune') shopModule:addBuyableItemContainer({'bp destroy field'}, 2003, 2261, 920,3, 'bp destroy field') shopModule:addBuyableItemContainer({'bp energy bomb'}, 2003, 2262, 6520,2, 'bp energy bomb rune') shopModule:addBuyableItemContainer({'bp energy field'}, 1998, 2277, 2320,3, 'bp energy field') shopModule:addBuyableItemContainer({'bp energy wall'}, 2002, 2279, 6820,4, 'bp energy wall rune') shopModule:addBuyableItemContainer({'bp explosion'}, 2001, 2313, 3820,6, 'bp explosion rune') shopModule:addBuyableItemContainer({'bp fire bomb'}, 2000, 2305, 4720,2, 'bp fire bomb rune') shopModule:addBuyableItemContainer({'bp fire field'}, 2000, 2301, 1720,3, 'bp fire field rune') shopModule:addBuyableItemContainer({'bp fireball'}, 2000, 2302, 3020,5, 'bp fire ball') shopModule:addBuyableItemContainer({'bp gfb'}, 2000, 2304, 3620,4, 'bp gfb') shopModule:addBuyableItemContainer({'bp hmm'}, 2001, 2311, 2420,10, 'bp hmm') shopModule:addBuyableItemContainer({'bp icicle'}, 2002, 2271, 3020,5, 'bp icicle') shopModule:addBuyableItemContainer({'bp ih'}, 2003, 2265, 1920,1, 'bp ih') shopModule:addBuyableItemContainer({'bp lmm'}, 1998, 2287, 820,10, 'bp lmm') shopModule:addBuyableItemContainer({'bp poison field'}, 1998, 2285, 1320,3, 'bp poison field') shopModule:addBuyableItemContainer({'bp poison wall'}, 1998, 2289, 4220,4, 'bp poison wall rune') shopModule:addBuyableItemContainer({'bp sd'}, 2003, 2268, 6500 ,3, 'bp sd') shopModule:addBuyableItemContainer({'bp uh'}, 2002, 2273, 3520,3, 'bp uh') function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182} if(msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand')) then if(isSorcerer(cid) or isDruid(cid)) then if(getPlayerStorageValue(cid, 30002) == -1) then selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid) talkState[talkUser] = 1 else selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid) end else selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid) end elseif(msgcontains(msg, 'yes')) then if(talkState[talkUser] == 1) then doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1) selfSay('Here you are young adept, take care yourself.', cid) setPlayerStorageValue(cid, 30002, 1) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then selfSay('Ok then.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) E caso queira trocar a fala do npc é no xodet.xml...
  22. Fica na pasta do executavel do seu server. Que eu saiba não, tem que ser o MYSQL. Tem que executar no seu OT: /woe setup ou entao criar a tabela no MYSQL. E caso não queira automatico, /woe on para iniciar, para cancelar o evento /woe off.
  23. Só uma pergunta. Ao remover os itens, estes itens vão pro depot do jogador que éra o dono da casa? e casa tambem fica livre?
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...