Jump to content

Muvuka

Campones
  • Posts

    61
  • Joined

  • Last visited

About Muvuka

Perfil

  • Gênero
    Masculino

Informações

  • Char no Tibia
    Samuel on Issobra
  • Forma que conheci o xTibia
    Outros Sites
  • Sou
    Scripter

Recent Profile Visitors

1005 profile views

Muvuka's Achievements

  1. bool Player::canWalkthrough(const Creature* creature) const { if(creature == this || hasCustomFlag(PlayerCustomFlag_CanWalkthrough) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if(!player) return false; if((((g_game.getWorldType() == WORLD_TYPE_NO_PVP && player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess())) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); }
  2. 24 Anos Online! 2000-2024 Copy-Right ---> ! Dedicado 24/7 Sem Site Cria Conta Pelo Account Manager ! <--- So Tem 3 Vocacao de Escolha: 'Mage' 'Knight' 'Paladin' Promotion: [VIP] Mage [VIP] Knight [VIP] Paladin + Bonus +P.A +[VIP] +Fast Attack +Fast Speed Feet +[Promotion] e +%XP: 100000 Patch [2024]: Varias Atualizacoes Feitas. Desde 2000 ate 2024 Nao Tem Cast System Bonus Pra First Itens no Templo. Pra Comeca So Pega Bonus e Digita 'shor' Pras Criaturas Principais. - !spellsall Todas Magias Free. IP: dexsoft.zapto.org Porta: 7171 Versao do Client: 8.60 [PVP]-[4FUN] Fast Attack Comeca Sem Set e BP. De (USE) no Bau Digite !bp e Compre os Itens Pro Set no NPC: [Bem/Barato] no TP ou Indo Pro NPC Completamente Seguro.(a) Nao Entre Com os Mesmo Dados do Servidor Que Voce Tava Jogando Nesse Pra Evita Pessoas Mal-intencionadas. Protocolo do Jogo. / Nivel de Jogabilidade (Very-Expert) Servidor [4FUN] / Endereco de IP Dinamico. Aqui Voce Nao Gasta Nada Pra Obter Algo Seja VIP/DONATE - Se Usa a Moeda do Jogo. Moeda Externa REAL R$ e Untilizavel Aqui Se Gasta Se Quiser. Stamina Nao e Infinita. Servidor Serio Dedicado 24/7 IP: dexsoft.zapto.org / Port: 7171 / Version: 8.60 / Ping: Brazil. Proibido USO de 'MC Client.' Permitido o Uso de 'Fast Attack + BOT Fast Attack' Somente Com [PRMOTION]. Cria a Conta Pelo Client Account Manager (ACCM) Nao Tem Site. Dedicado 24/7 Servidor Serio Online! Info do Host: - https://bit.ly/45LgMIR - Contato ao ADM Dono do Servidor: - https://bit.ly/3Zc0KFn - ZAP do GRUPO Para Admin Privado [UPDATES] Etc: - https://bit.ly/3UaRZcB - ZAP do GRUPO de Players: - https://bit.ly/3WcOZ2c - Discord: - https://discord.gg/wjzmgKku - E-Mail do HOST: - po-ca@hotmail.com - Chat do Servidor: - https://chat.whatsapp.com/KZSO6N3PbbkFn9N5g4tPx0 - Anuncie Seu Servidor: - https://chat.whatsapp.com/DrsxUXDEEah9veM7WLP2Kb - Staff Nao Joga, E Não Tem Vaga. Staff Sempre Online e Dando Suporte. Att ADM. _________________________________________________________________ Download do Client Proprio [FULL-LIGHT]+[MC]+[IP-FIXO]+[OTClientV8]+APK: Pra Celular Android Iphone e Todos Sistemas Operacionais e IOS. 100% Funcional. Tibia 8.60 Para Linux: - https://bit.ly/3QlTK5I - Tibia 8.60 Para MAC So Compila Pra Sua Autoria. Tibia IP Changer 8.60 Para Linux/MAC Pra Sua Autoria Compila. Tibia MC 8.60 Caso Voce Tenha Mais Provedor e Operadora Com 2+ Conexoes de Internet Endereco de IP-Duplo ou Dados Moveis no Celular Só Podera Jogar Com 1 Devido Sistema Proibicao de IPS MC's Mais no Caso se Pode Jogar Com Dados Moveis Celular + IP Maquina-PC+Mobile - https://bit.ly/4bgAG0C - Tibia Client Classico Proprio: - https://bit.ly/3ELouXs - Instalador do Tibia 8.60: - https://bit.ly/3Ufvx2d - OTClientV8 Mini-Map -=[FULL]=- Customizado o Laucher do OTClientV8 Nao Esqueca de Ler o read me. NEW: - OTClientV8: - https://bit.ly/3UGnFYM - -apk- do Servidor: - https://bit.ly/45Kcl14 - Click no Another e Digita IP:PORTA -apk- do Servidor 2_#Editado: - https://bit.ly/3Glffy1 - Click no Another e Digita IP:PORTA - BOT pra -apk- na Demanda do Player ele que Escolhe Pesquisando na Internet - Utilitario: Tibia MULTI-IP CHANGER: - https://bit.ly/3sWCGL1 - BOTS - MageBot + ElfBot NG Link: - https://bit.ly/3QrD3pq - _________________________________________________________________ Servidor Gratis e Sempre Sera. *Reset System [VIP] ate 100 Reset Maximo *Anti-DDos System *Task System *Dodge system e Critical System *Refinamento System *VIP System *Reflect System *Offline Trainer System *Castle War 24Hr/48Hr *Dodge System e Critical System *+BOOSTER Attack System *Salao de BOSS *Lottery System *Minimg System *System Auto-Loot [VIP] *Anti-Push *Anti-Crash *Life Leech *Mana Leech *Promotion System Fast Attack Com BOT *[VIP] System *[DONATE] System *Vocacao Balanceadas *Imortalidade System *Labia System *Infinity System *Casino System - [Personalizado] *Hunted System *Scruptinon System [NPC] *Vocation [VIP] System *Server [MODE] Very Expert E muito mais venha conferi... Nunca Reseto e Nunca Resetara/DexSoft é Gratis e Sempre Sera. Servidor Dedicado 24/7 Info Host: https://cutt.ly/MMwHISZ XP é Rate '99999' Facil Obstencao Pro Level 717217, Sem STAGE. + de 21 Quet's Rate: rateExperience = 99999 rateSkill = 1 rateMagic = 1 rateLoot = 1 rateSpawn = 1 *Sistema de Reset e Outros Sistemas Sem Bugs... Itens Donate Obtido In-Game. Para Suporte Mande E-Mail Para: po-ca@hotmail.com ou Entao Adicione o Telefone Comercial Celular +55 (11) 91230-8360 Operadora: (VIVO) GERENTE DE CONTAS CAPUT: ADM Em Breve AutoMap 100% Completo. OTCLIENT Esta 100% So Segui o Procedimento. Mapa-Principal: Baiak 21 Com Outros Mapa Importados. !spells !spells2 !spells3 !spells4 !magicdnt !spellsall Spells Baiak-Fusion: E Muito Mais Pura Magia. EULA: Nao Esqueca de Digitar Esses Comandos !regras !cookies !notice !privacy policy !terms of service Welcome to World Tibia.
  3. TEM COMO MUDA ID DA MOEDA DE COMPRA PARA ID DE MOEDA 6535 E A QUANTIDADE QUE PLAYER QUISER VENDE CHAR??? <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Characters Market System" version="1.0" author="LuckOake" contact="none" enabled="yes"> ------------------------------------------------------------------------------------ <config name="market"><![CDATA[ price = 27112 owner = 27113 level = 717217 -- Level min of character.-- min_price = 10000000000000 -- Price min of character-- max_price = 10000000000000 -- Price maximum of character-- function doTransferCharacter(cid, accId) local playerGuid = getPlayerGUIDByName(cid) if not playerGuid then return false, "Player GUID not found." end return db.executeQuery("UPDATE `players` SET `account_id` = "..accId.." WHERE `id` = "..playerGuid.."") end function doOfflinePlayerAddMoney(guid, money) local playerGuid = getPlayerGUIDByName(guid) if not playerGuid then return false, "Player GUID not found." end return db.executeQuery("UPDATE `players` SET `balance` = `balance` + '"..money.."' WHERE `id` = '"..playerGuid.."';") end function setOfflinePlayerStorageValue(name, key, value) local playerGuid = getPlayerGUIDByName(name) if not playerGuid then return false, "Player GUID not found." end local result = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = ".. playerGuid .." AND `key` = ".. key ..";") if result:getID() == -1 then return db.executeQuery("INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (".. playerGuid ..", ".. key ..", ".. value ..");") else result:free() return db.executeQuery("UPDATE `player_storage` SET `value` = ".. value .." WHERE `player_id` = ".. playerGuid .." AND `key` = ".. key ..";") end end function getOfflinePlayerStorageValue(name, key) local playerGuid = getPlayerGUIDByName(name) if not playerGuid then return nil end local result = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = '".. playerGuid .."' AND `key` = ".. key ..";") if result:getID() == -1 then return nil end local ret = result:getDataInt("value") result:free() return ret end function getOfflinePlayerValue(name, value) local playerGuid = getPlayerGUIDByName(name) if not playerGuid then return nil end local result = db.getResult("SELECT `"..value.."` FROM `players` WHERE `id` = "..playerGuid..";") if result:getID() == -1 then return nil end local ret = result:getDataInt(value) result:free() return ret end function isCharacterForSale(name) local charPrice = getOfflinePlayerStorageValue(name, price) if not charPrice or charPrice < 1 then return false else return true end end ]]></config> ------------------------------------------------------------------------------------ <talkaction words="!character" event="buffer"><![CDATA[ domodlib('market') local t = string.explode(param, ",") if t[1] == "sell" then if not t[3] or not tonumber(t[3]) or t[4] or tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name and the price.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is already for sale.") return true elseif getPlayerGUIDByName(t[2]) == getPlayerGUID(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You cannot sell yourself.") return true elseif getPlayerByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The character must be offline to be sold.") return true elseif getOfflinePlayerValue(t[2], "level") < level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your character can't be sold until it has level "..level..".") return true elseif tonumber(t[3]) < min_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the minimum price for selling a character is "..min_price..".") return true elseif tonumber(t[3]) > max_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the maximum price for selling a character is "..max_price..".") return true end setOfflinePlayerStorageValue(t[2], price, t[3]) setOfflinePlayerStorageValue(t[2], owner, getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" is now for sale for the price of "'..t[3]..'" gold coins.') elseif t[1] == "buy" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif not playerExists(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character doesn't exist.") return true elseif getPlayerAccountId(cid) == getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't buy your own character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true elseif not doPlayerRemoveMoney(cid, getOfflinePlayerStorageValue(t[2], price)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Not enough money. This character's price is "..getOfflinePlayerStorageValue(t[2], price).." gold coins.") return true end if not getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)) then doOfflinePlayerAddMoney(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) setOfflinePlayerStorageValue(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), 41792, getPlayerGUIDByName(t[2])) else doPlayerAddMoney(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) doPlayerSendTextMessage(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" has been sold for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.') end doTransferCharacter(t[2], getPlayerAccountId(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You bought the character "'..t[2]..'" for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.') setOfflinePlayerStorageValue(t[2], owner, -1) setOfflinePlayerStorageValue(t[2], price, -1) return true elseif t[1] == "remove" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true end setOfflinePlayerStorageValue(t[2], price, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You removed the character "'..t[2]..'" from the Characters Market.') return true elseif t[1] == "list" then local result = db.getResult("SELECT `name` FROM `players`") if result:getID() == -1 then return true end local msg = "Characters For Sale Price 10000000000000:\n\n" while true do local name = result:getDataString("name") if isCharacterForSale(name) then local sex = getOfflinePlayerValue(name, "sex") == 1 and "Male" or "Female" msg = ""..msg.." - ".. name .." (Level: "..getOfflinePlayerValue(name, "level").." / Vocation: "..getVocationInfo(getOfflinePlayerValue(name, "vocation")).name.." / Sex: "..sex.." / Owner: "..getPlayerNameByGUID(getOfflinePlayerStorageValue(name, owner))..") [Price: "..getOfflinePlayerStorageValue(name, price).."] \n" end if not result:next() then break end end doPlayerPopupFYI(cid, msg) return true elseif not t[1] or t[1] ~= "buy" or t[1] ~= "sell" or t[1] ~= "remove" or t[1] ~= "list" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect params. You can only 'buy' or 'sell' a character, 'remove' it from the Characters Market or see the 'list' of characters for sale.") return true end return true ]]></talkaction> ------------------------------------------------------------------------------------ <event type="login" name="MarketLogin" event="script"><![CDATA[ function onLogin(cid) domodlib('market') if getPlayerStorageValue(cid, price) > 0 then return false elseif getPlayerStorageValue(cid, 41792) ~= -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You sold the character "..getPlayerNameByGUID(getPlayerStorageValue(cid, 41792))..". The money is in your bank account.") setPlayerStorageValue(cid, 41792, -1) end return true end ]]></event> </mod>
  4. EU USEI PRINT NO CODIDO UM POR CADA UM E APARECEU ISSO NO CONSOLE [01/07/2024 06:17:50] Error: Could not get player GUID for character Harkaricus [01/07/2024 06:17:51] Error: Could not get player GUID for character Chera Xana [01/07/2024 06:17:51] Error: Could not get player GUID for character Avalost [01/07/2024 06:17:51] Error: Could not get player GUID for character Mirkwin Aki [01/07/2024 06:17:51] Error: Could not get player GUID for character Menezinho foda [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude ate esquentar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fuder ate respawnar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude falando [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude opeitorosado [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude os Nascimento [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude ate raiar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude ate criar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude bugando [01/07/2024 06:17:51] Error: Could not get player GUID for character Yrapuru [01/07/2024 06:17:51] Error: Could not get player GUID for character Xxt'zaao [01/07/2024 06:17:51] Error: Could not get player GUID for character Mc Donalds [01/07/2024 06:17:51] Error: Could not get player GUID for character Otome [01/07/2024 06:17:51] Error: Could not get player GUID for character Linkin Har [01/07/2024 06:17:51] Error: Could not get player GUID for character Morte Pala Pes [01/07/2024 06:17:51] Error: Could not get player GUID for character Rozinx [01/07/2024 06:17:51] Error: Could not get player GUID for character Vibud [01/07/2024 06:17:51] Error: Could not get player GUID for character Maurolkit [01/07/2024 06:17:52] Error: Could not get player GUID for character Lucifer [01/07/2024 06:17:52] Error: Could not get player GUID for character Hammer [01/07/2024 06:17:52] Error: Could not get player GUID for character Aeropostale [01/07/2024 06:17:52] Error: Could not get player GUID for character Vladimir [01/07/2024 06:17:53] Error: Could not get player GUID for character Jivelin'o [01/07/2024 06:17:53] Error: Could not get player GUID for character Queen Of Darkness [01/07/2024 06:17:53] Error: Could not get player GUID for character Female [01/07/2024 06:17:53] Error: Could not get player GUID for character Born [01/07/2024 06:17:54] Error: Could not get player GUID for character Druidzinha [01/07/2024 06:17:54] Error: Could not get player GUID for character Hill [01/07/2024 06:17:54] Error: Could not get player GUID for character Shazam [01/07/2024 06:17:54] Error: Could not get player GUID for character Mage The Hell [01/07/2024 06:17:54] Error: Could not get player GUID for character Lirmex [01/07/2024 06:17:55] Error: Could not get player GUID for character Madrugah [01/07/2024 06:17:55] Error: Could not get player GUID for character Luan [01/07/2024 06:17:55] Error: Could not get player GUID for character Killer Druid [01/07/2024 06:17:55] Error: Could not get player GUID for character Lord'pala [01/07/2024 06:17:56] Error: Could not get player GUID for character Mahogannyy [01/07/2024 06:17:56] Error: Could not get player GUID for character Vickk [01/07/2024 06:17:57] Error: Could not get player GUID for character Jockbk [01/07/2024 06:17:57] Error: Could not get player GUID for character Jocksm [01/07/2024 06:17:58] Error: Could not get player GUID for character Holy [01/07/2024 06:17:59] Error: Could not get player GUID for character Geen Arrow [01/07/2024 06:18:01] Error: Could not get player GUID for character Lerdo [01/07/2024 06:18:01] Error: Could not get player GUID for character Doldorn [01/07/2024 06:18:01] Error: Could not get player GUID for character Nyarix [01/07/2024 06:18:01] Error: Could not get player GUID for character Kirigaya Kazuto [01/07/2024 06:18:01] Error: Could not get player GUID for character Paladin Dislexico [01/07/2024 06:18:01] Error: Could not get player GUID for character Arranha Ceu [01/07/2024 06:18:02] Error: Could not get player GUID for character Pancheri [01/07/2024 06:18:02] Error: Could not get player GUID for character Dieghoul [01/07/2024 06:18:05] Error: Could not get player GUID for character Mage Crrupt [01/07/2024 06:18:05] Error: Could not get player GUID for character Gostoza [01/07/2024 06:18:06] Error: Could not get player GUID for character Home Viu [01/07/2024 06:18:07] Error: Could not get player GUID for character Pepinto function doTransferCharacter(cid, accId) local playerGUID = getPlayerGUIDByName(cid) print("doTransferCharacter - Player GUID for", cid, "is", playerGUID) if playerGUID then return db.executeQuery("UPDATE `players` SET `account_id` = " .. accId .. " WHERE `id` = " .. playerGUID) else print("Error: Player GUID for " .. cid .. " is nil.") return false end end function doOfflinePlayerAddMoney(guid, money) local playerGUID = getPlayerGUIDByName(guid) print("doOfflinePlayerAddMoney - Player GUID for", guid, "is", playerGUID) if playerGUID then return db.executeQuery("UPDATE `players` SET `balance` = `balance` + " .. money .. " WHERE `id` = " .. playerGUID .. ";") else print("Error: Player GUID for " .. guid .. " is nil.") return false end end function setOfflinePlayerStorageValue(name, key, value) local playerGUID = getPlayerGUIDByName(name) print("setOfflinePlayerStorageValue - Player GUID for", name, "is", playerGUID) if playerGUID then local result = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = " .. playerGUID .. " AND `key` = " .. key .. ";") if result:getID() == -1 then print("setOfflinePlayerStorageValue - No existing storage value found, inserting new value") return db.executeQuery("INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (" .. playerGUID .. ", " .. key .. ", " .. value .. ");") else result:free() print("setOfflinePlayerStorageValue - Existing storage value found, updating value") return db.executeQuery("UPDATE `player_storage` SET `value` = " .. value .. " WHERE `player_id` = " .. playerGUID .. " AND `key` = " .. key .. ";") end else print("Error: Player GUID for " .. name .. " is nil.") return false end end function getOfflinePlayerStorageValue(name, key) local playerGUID = getPlayerGUIDByName(name) print("getOfflinePlayerStorageValue - Player GUID for", name, "is", playerGUID) if playerGUID then local result = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = " .. playerGUID .. " AND `key` = " .. key .. ";") if result:getID() == -1 then print("getOfflinePlayerStorageValue - No storage value found for", name, "with key", key) return nil end local ret = result:getDataInt("value") print("getOfflinePlayerStorageValue - Retrieved storage value for", name, "with key", key, "is", ret) result:free() return ret else print("Error: Player GUID for " .. name .. " is nil.") return nil end end function getOfflinePlayerValue(name, value) local playerGUID = getPlayerGUIDByName(name) print("getOfflinePlayerValue - Player GUID for", name, "is", playerGUID) if playerGUID then local result = db.getResult("SELECT `" .. value .. "` FROM `players` WHERE `id` = " .. playerGUID .. ";") if result:getID() == -1 then print("getOfflinePlayerValue - No value found for", name, "with field", value) return nil end local ret = result:getDataInt(value) print("getOfflinePlayerValue - Retrieved value for", name, "with field", value, "is", ret) result:free() return ret else print("Error: Player GUID for " .. name .. " is nil.") return nil end end ai pega market sale
  5. SÓ FUNCIONO QUANDO RESETEI A DATABASE AGORA QUANDO EU VOLTEI COM A MESMA NÃO PEGA APARECE ESSE ERRO AI EU USEI PRINT NO CODIDO UM POR CADA UM E APARECEU ISSO NO CONSOLE [01/07/2024 06:17:50] Error: Could not get player GUID for character Harkaricus [01/07/2024 06:17:51] Error: Could not get player GUID for character Chera Xana [01/07/2024 06:17:51] Error: Could not get player GUID for character Avalost [01/07/2024 06:17:51] Error: Could not get player GUID for character Mirkwin Aki [01/07/2024 06:17:51] Error: Could not get player GUID for character Menezinho foda [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude ate esquentar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fuder ate respawnar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude falando [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude opeitorosado [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude os Nascimento [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude ate raiar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude ate criar [01/07/2024 06:17:51] Error: Could not get player GUID for character Fude bugando [01/07/2024 06:17:51] Error: Could not get player GUID for character Yrapuru [01/07/2024 06:17:51] Error: Could not get player GUID for character Xxt'zaao [01/07/2024 06:17:51] Error: Could not get player GUID for character Mc Donalds [01/07/2024 06:17:51] Error: Could not get player GUID for character Otome [01/07/2024 06:17:51] Error: Could not get player GUID for character Linkin Har [01/07/2024 06:17:51] Error: Could not get player GUID for character Morte Pala Pes [01/07/2024 06:17:51] Error: Could not get player GUID for character Rozinx [01/07/2024 06:17:51] Error: Could not get player GUID for character Vibud [01/07/2024 06:17:51] Error: Could not get player GUID for character Maurolkit [01/07/2024 06:17:52] Error: Could not get player GUID for character Lucifer [01/07/2024 06:17:52] Error: Could not get player GUID for character Hammer [01/07/2024 06:17:52] Error: Could not get player GUID for character Aeropostale [01/07/2024 06:17:52] Error: Could not get player GUID for character Vladimir [01/07/2024 06:17:53] Error: Could not get player GUID for character Jivelin'o [01/07/2024 06:17:53] Error: Could not get player GUID for character Queen Of Darkness [01/07/2024 06:17:53] Error: Could not get player GUID for character Female [01/07/2024 06:17:53] Error: Could not get player GUID for character Born [01/07/2024 06:17:54] Error: Could not get player GUID for character Druidzinha [01/07/2024 06:17:54] Error: Could not get player GUID for character Hill [01/07/2024 06:17:54] Error: Could not get player GUID for character Shazam [01/07/2024 06:17:54] Error: Could not get player GUID for character Mage The Hell [01/07/2024 06:17:54] Error: Could not get player GUID for character Lirmex [01/07/2024 06:17:55] Error: Could not get player GUID for character Madrugah [01/07/2024 06:17:55] Error: Could not get player GUID for character Luan [01/07/2024 06:17:55] Error: Could not get player GUID for character Killer Druid [01/07/2024 06:17:55] Error: Could not get player GUID for character Lord'pala [01/07/2024 06:17:56] Error: Could not get player GUID for character Mahogannyy [01/07/2024 06:17:56] Error: Could not get player GUID for character Vickk [01/07/2024 06:17:57] Error: Could not get player GUID for character Jockbk [01/07/2024 06:17:57] Error: Could not get player GUID for character Jocksm [01/07/2024 06:17:58] Error: Could not get player GUID for character Holy [01/07/2024 06:17:59] Error: Could not get player GUID for character Geen Arrow [01/07/2024 06:18:01] Error: Could not get player GUID for character Lerdo [01/07/2024 06:18:01] Error: Could not get player GUID for character Doldorn [01/07/2024 06:18:01] Error: Could not get player GUID for character Nyarix [01/07/2024 06:18:01] Error: Could not get player GUID for character Kirigaya Kazuto [01/07/2024 06:18:01] Error: Could not get player GUID for character Paladin Dislexico [01/07/2024 06:18:01] Error: Could not get player GUID for character Arranha Ceu [01/07/2024 06:18:02] Error: Could not get player GUID for character Pancheri [01/07/2024 06:18:02] Error: Could not get player GUID for character Dieghoul [01/07/2024 06:18:05] Error: Could not get player GUID for character Mage Crrupt [01/07/2024 06:18:05] Error: Could not get player GUID for character Gostoza [01/07/2024 06:18:06] Error: Could not get player GUID for character Home Viu [01/07/2024 06:18:07] Error: Could not get player GUID for character Pepinto
  6. TO COM PROBLEMA NESSE SCRIPT MOD [01/07/2024 04:46:40] [Error - TalkAction Interface] [01/07/2024 04:46:40] buffer [01/07/2024 04:46:40] Description: [01/07/2024 04:46:40] [string "price = 27112..."]:26: attempt to concatenate a nil value <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Characters Market System" version="1.0" author="LuckOake" contact="none" enabled="yes"> ------------------------------------------------------------------------------------ <config name="market"><![CDATA[ price = 27112 owner = 27113 level = 717217 -- Level min of character.-- min_price = 10000000000000 -- Price min of character-- max_price = 10000000000000 -- Price maximum of character-- function doTransferCharacter(cid, accId) return db.executeQuery("UPDATE `players` SET `account_id` = "..accId.." WHERE `id` = "..getPlayerGUIDByName(cid).."") end function doOfflinePlayerAddMoney(guid, money) return db.executeQuery("UPDATE `players` SET `balance` = `balance` + '"..money.."' WHERE `id` = '"..getPlayerGUIDByName(guid).."';") end function setOfflinePlayerStorageValue(name, key, value) local result = db.getResult("SELECT * FROM `player_storage` WHERE `player_id` = ".. getPlayerGUIDByName(name) .." AND `key` = ".. key ..";") if result:getID() == -1 then return db.executeQuery("INSERT INTO `player_storage` (`player_id`, `key`, `value`) VALUES (".. getPlayerGUIDByName(name) ..", ".. key ..", ".. value ..");") else result:free() return db.executeQuery("UPDATE `player_storage` SET `value` = ".. value .." WHERE `player_id` = ".. getPlayerGUIDByName(name) .." AND `key` = ".. key ..";") end end function getOfflinePlayerStorageValue(name, key) local result, ret = db.getResult("SELECT `value` FROM `player_storage` WHERE `player_id` = '".. getPlayerGUIDByName(name) .."' AND `key` = ".. key ..";") if result:getID() == -1 then return nil end ret = result:getDataInt("value") result:free() return ret end function getOfflinePlayerValue(name, value) local result, ret = db.getResult("SELECT `"..value.."` FROM `players` WHERE `id` = "..getPlayerGUIDByName(name)..";") ret = result:getDataInt(value) result:free() return ret end function isCharacterForSale(name) if not getOfflinePlayerStorageValue(name, price) or getOfflinePlayerStorageValue(name, price) < 1 then return false else return true end end ]]></config> ------------------------------------------------------------------------------------ <talkaction words="!character" event="buffer"><![CDATA[ domodlib('market') local t = string.explode(param, ",") if t[1] == "sell" then if not t[3] or not tonumber(t[3]) or t[4] or tonumber(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name and the price.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is already for sale.") return true elseif getPlayerGUIDByName(t[2]) == getPlayerGUID(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You cannot sell yourself.") return true elseif getPlayerByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The character must be offline to be sold.") return true elseif getOfflinePlayerValue(t[2], "level") < level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your character can't be sold until it has level "..level..".") return true elseif tonumber(t[3]) < min_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the minimum price for selling a character is "..min_price..".") return true elseif tonumber(t[3]) > max_price then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, but the maximum price for selling a character is "..max_price..".") return true end setOfflinePlayerStorageValue(t[2], price, t[3]) setOfflinePlayerStorageValue(t[2], owner, getPlayerGUID(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" is now for sale for the price of "'..t[3]..'" gold coins.') elseif t[1] == "buy" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif not playerExists(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character doesn't exist.") return true elseif getPlayerAccountId(cid) == getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can't buy your own character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true elseif not doPlayerRemoveMoney(cid, getOfflinePlayerStorageValue(t[2], price)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Not enough money. This character's price is "..getOfflinePlayerStorageValue(t[2], price).." gold coins.") return true end if not getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)) then doOfflinePlayerAddMoney(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) setOfflinePlayerStorageValue(getPlayerNameByGUID(getOfflinePlayerStorageValue(t[2], owner)), 41792, getPlayerGUIDByName(t[2])) else doPlayerAddMoney(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), getOfflinePlayerStorageValue(t[2], price)) doPlayerSendTextMessage(getPlayerByGUID(getOfflinePlayerStorageValue(t[2], owner)), MESSAGE_STATUS_CONSOLE_BLUE, 'Your character "'..t[2]..'" has been sold for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.') end doTransferCharacter(t[2], getPlayerAccountId(cid)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You bought the character "'..t[2]..'" for the price of '..getOfflinePlayerStorageValue(t[2], price)..' gold coins.') setOfflinePlayerStorageValue(t[2], owner, -1) setOfflinePlayerStorageValue(t[2], price, -1) return true elseif t[1] == "remove" then if not t[2] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Incorrect Params. Specify the character name.") return true elseif getPlayerAccountId(cid) ~= getAccountIdByName(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This is not your character.") return true elseif not isCharacterForSale(t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "This character is not for sale.") return true end setOfflinePlayerStorageValue(t[2], price, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You removed the character "'..t[2]..'" from the Characters Market.') return true elseif t[1] == "list" then local result = db.getResult("SELECT `name` FROM `players`") if result:getID() == -1 then return true end local msg = "Characters for Sale:\n\n" while true do local name = result:getDataString("name") if isCharacterForSale(name) then local sex = getOfflinePlayerValue(name, "sex") == 1 and "Male" or "Female" msg = ""..msg.." - ".. name .." (Level: "..getOfflinePlayerValue(name, "level").." / Vocation: "..getVocationInfo(getOfflinePlayerValue(name, "vocation")).name.." / Sex: "..sex.." / Owner: "..getPlayerNameByGUID(getOfflinePlayerStorageValue(name, owner))..") [Price: "..getOfflinePlayerStorageValue(name, price).."] \n" end if not result:next() then break end end doPlayerPopupFYI(cid, msg) return true elseif not t[1] or t[1] ~= "buy" or t[1] ~= "sell" or t[1] ~= "remove" or t[1] ~= "list" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Incorrect params. You can only 'buy' or 'sell' a character, 'remove' it from the Characters Market or see the 'list' of characters for sale.") return true end return true ]]></talkaction> ------------------------------------------------------------------------------------ <event type="login" name="MarketLogin" event="script"><![CDATA[ function onLogin(cid) domodlib('market') if getPlayerStorageValue(cid, price) > 0 then return false elseif getPlayerStorageValue(cid, 41792) ~= -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You sold the character "..getPlayerNameByGUID(getPlayerStorageValue(cid, 41792))..". The money is in your bank account.") setPlayerStorageValue(cid, 41792, -1) end return true end ]]></event> </mod>
  7. OK @Holograma SE NÃO APARECE ERRO NO CONSOLE EU APROVO!
  8. EU NÃO SEI SE É REFLECT STONE OU SE ALGO DODGE CRITICAL BOOSTER ATTACK STONE MAIS TA DANDO ERRO NO REVIVE SOMENTE [10/06/2024 00:46:08] [Error - Npc interface] [10/06/2024 00:46:08] data/npc/scripts/reviver.lua:onThink [10/06/2024 00:46:08] Description: [10/06/2024 00:46:08] (luaGetCreatureName) Creature not found [10/06/2024 00:46:08] [Error - Npc interface] [10/06/2024 00:46:08] data/npc/scripts/reviver.lua:onThink [10/06/2024 00:46:08] Description: [10/06/2024 00:46:08] data/npc/lib/npcsystem/npchandler.lua:301: bad argument #3 to 'gsub' (string/function/table expected) [10/06/2024 00:46:08] stack traceback: [10/06/2024 00:46:08] [C]: in function 'gsub' [10/06/2024 00:46:08] data/npc/lib/npcsystem/npchandler.lua:301: in function 'parseMessage' [10/06/2024 00:46:08] data/npc/lib/npcsystem/npchandler.lua:538: in function 'onWalkAway' [10/06/2024 00:46:08] data/npc/lib/npcsystem/npchandler.lua:473: in function 'onThink' [10/06/2024 00:46:08] data/npc/scripts/reviver.lua:16: in function <data/npc/scripts/reviver.lua:16> local MONEY_AMOUNT = 1000000 --Quantidade de dinheiro (em gold coins) que o player necessitará para reviver local MAGIC_EFFECT_TELEPORT = 65 -- Efeito que aparecerá quando o player for teleportado local PLAYER_REBORN_POSITION_X = 66541 local PLAYER_REBORN_POSITION_Y = 66542 local PLAYER_REBORN_POSITION_Z = 66543 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(msgcontains(msg, 'reviver') or msgcontains(msg, 'revive')) then selfSay('Voce precisa de ' .. MONEY_AMOUNT .. ' gold(s) para ressuscitar no local aonde voce morreu recentemente', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if(getPlayerMoney(cid) >= MONEY_AMOUNT) then doPlayerRemoveMoney(cid, MONEY_AMOUNT) if teleportPlayerToPositionReborn(cid) then doTeleportThing(cid, { x=playerRebornPositionX, y=playerRebornPositionY, z=playerRebornPositionZ }) doSendMagicEffect(getThingPos(cid), MAGIC_EFFECT_TELEPORT) selfSay('Ok, voce foi ressuscitado', cid) end else selfSay('Desculpe, mais voce nao possui o dinheiro suficiente.', cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then talkState[talkUser] = 0 selfSay('Ok, ate mais.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) function teleportPlayerToPositionReborn(cid) local playerRebornPositionX = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_X) local playerRebornPositionY = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_Y) local playerRebornPositionZ = getPlayerStorageValue(cid, PLAYER_REBORN_POSITION_Z) if (playerRebornPositionX <= -1 or playerRebornPositionY <= -1 or playerRebornPositionZ <= -1) then selfSay('Voce nao morreu nenhuma vez ainda.', cid) return false end doTeleportThing(cid, { x=playerRebornPositionX, y=playerRebornPositionY, z=playerRebornPositionZ }) return true end
  9. local lvlcrit = 48913 -- storage para criticos normais local lvlcritDanger = 48904 -- storage para criticos perigosos local multiplier = 1.5 -- multiplicador de dano function onCombat(cid, target) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local criticalDangerChance = getPlayerStorageValue(cid, lvlcritDanger) or 0 local chance = math.random(1, 1000) -- Mantém um intervalo razoável -- Verifica se a chance de crítico BOOSTER é atingida if chance <= (criticalChance * 3) then local damage = 100 -- Valor do dano crítico BOOSTER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "+BOOSTER!", 31) doSendMagicEffect(getCreaturePosition(cid), 54) return true end -- Verifica se a chance de crítico DANGER é atingida if chance <= (criticalDangerChance * 3) then ---> Ja tentei por 4 e não resolveu. local damage = 100 -- Valor do dano crítico DANGER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePosition(target), "DANGER!", 190) doSendMagicEffect(getCreaturePosition(cid), 52) return true end end return true end @Holograma
  10. NAO APARECE DANGER! ACTION: local config = { effectonuse = 65, -- efeito que sai levelscrit = 100, --- leveis que terão storagecrit = 48904 -- storage que será verificado } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, config.storagecrit) < config.levelscrit then doRemoveItem(item.uid, 1) doSendMagicEffect(topos,config.effectonuse) doPlayerSendTextMessage(cid,22,"You've Leveled your Critical Skill to ["..(getPlayerStorageValue(cid, config.storagecrit)+1).."/"..config.levelscrit.."].") setPlayerStorageValue(cid, config.storagecrit, getPlayerStorageValue(cid, config.storagecrit)+1) elseif getPlayerStorageValue(cid, config.storagecrit) >= config.levelscrit then doPlayerSendTextMessage(cid,22,"You've already reached the MAX level of Critical Skill.\nCongratulations!!!!") return 0 end return 1 end local config = { effectonuse = 65, -- efeito que sai levelscrit = 100, --- leveis que terão lvlcritDanger = 48913 -- storage que será verificado } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, config.lvlcritDanger) < config.levelscrit then doRemoveItem(item.uid, 1) doSendMagicEffect(topos,config.effectonuse) doPlayerSendTextMessage(cid,22,"You've Leveled your Critical Skill to ["..(getPlayerStorageValue(cid, config.lvlcritDanger)+1).."/"..config.levelscrit.."].") setPlayerStorageValue(cid, config.lvlcritDanger, getPlayerStorageValue(cid, config.lvlcritDanger)+1) elseif getPlayerStorageValue(cid, config.lvlcritDanger) >= config.levelscrit then doPlayerSendTextMessage(cid,22,"You've already reached the MAX level of Critical Skill.\nCongratulations!!!!") return 0 end return 1 end CREATURESCRIPT: local lvlcrit = 48904 local lvlcritDanger = 48913 local multiplier = 1.5 function onCombat(cid, target) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local criticalDangerChance = getPlayerStorageValue(cid, lvlcritDanger) or 0 local chance = math.random(1, 1000) -- Mantém um intervalo razoável if chance <= (criticalChance * 3) then local damage = 100 -- Valor do dano crítico BOOSTER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePos(target), "+BOOSTER!", 31) doSendMagicEffect(getCreaturePosition(cid), 54) elseif chance <= (criticalDangerChance * 3) then local damage = 100 -- Valor do dano crítico DANGER (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePos(target), "DANGER!", 190) doSendMagicEffect(getCreaturePosition(cid), 52) end end return true end
  11. TA DANDO ESSE ERRO ATKBOOST Lua: local lvlcrit = 48904 local multiplier = 1.5 function onCombat(cid, target) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local chance = math.random(1, 1000) -- Alterei para um intervalo mais razoável if chance <= (criticalChance * 3) then local damage = 100 -- Valor do dano crítico (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePos(target), "+BOOSTER!", 31) doSendMagicEffect(getCreaturePosition(cid), 54) return true end end return true end CRITICAL Lua: local lvlcrit = 48913 local multiplier = 1.5 function onCombat(cid, target) if isPlayer(cid) and isCreature(target) then local criticalChance = getPlayerStorageValue(cid, lvlcrit) or 0 local chance = math.random(1, 1000) -- Alterei para um intervalo mais razoável if chance <= (criticalChance * 3) then local damage = 100 -- Valor do dano crítico (ajuste conforme necessário) doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -damage, -damage, 255) doSendAnimatedText(getCreaturePos(target), "DANGER!", 190) doSendMagicEffect(getCreaturePosition(cid), 52) return true end end return true end
  12. local colorMsg = "orange" local tableBoss = { ["[EXP] Statue"] = {seconds = 3600, newBoss = "[EXP] Statue"} } local function timer(position, duration, color) for i = 0, (duration - 1) do addEvent(function() doSendAnimatedText(position, tostring(duration - i), color) end, i * 1000) end end local lastTarget = nil function onKill(cid, target, damage, flags) if lastTarget and lastTarget == target then return true end lastTarget = target if isPlayer(target) then return true end local boss = tableBoss[getCreatureName(target)] if not boss then return true end local position = getThingPos(target) doPlayerSendTextMessage(cid, MESSAGE_TYPES[colorMsg], "The boss will be born in " .. boss.seconds .. " seconds.") timer(position, boss.seconds, COLOR_WHITE) addEvent(doCreateMonster, boss.seconds * 1000, boss.newBoss, position) return true end <?xml version="1.0" encoding="UTF-8"?> <monster name="[EXP] Statue" nameDescription="[EXP] Statue" race="blood" experience="100000000000000" speed="0" manacost="0"> <health now="1000000000" max="1000000000"/> <look typeex="9791" corpse="6364"/> <targetchange interval="60000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="0"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="0"/> <flag staticattack="100"/> <flag lightlevel="0"/> <flag lightcolor="0"/> <flag targetdistance="0"/> <flag runonhealth="0"/> <flag skull="5"/> </flags> <attacks> <attack name="melee" interval="" min="" max=""/> </attacks> <defenses armor="1000000000" defense="1000000000"> <defense name="healing" interval="" chance="1000000000" min="1000000000" max="1000000000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> </defenses> <immunities> <immunity physical="0"/> <immunity energy="0"/> <immunity fire="0"/> <immunity poison="0"/> <immunity lifedrain="0"/> <immunity paralyze="0"/> <immunity outfit="0"/> <immunity drunk="0"/> <immunity invisible="0"/> </immunities> <voices interval="5000" chance="2000"> <voice sentence="Bonús-EXP!"/> </voices> <loot> </loot> </monster>
  13. local config = { itemIds = {2445, 2550, 2436, 6101, 2408, 7435, 7429, 5803}, position = {x = 156, y = 58, z = 7} } local currentIndex = 1 function onThink(cid, interval) local tile = getThingfromPos(config.position) local item = nil for _, id in ipairs(config.itemIds) do item = getTileItemById(config.position, id) if item.uid ~= 0 then doTransformItem(item.uid, config.itemIds[currentIndex]) doSendMagicEffect(config.position, CONST_ME_MAGIC_GREEN) currentIndex = (currentIndex % #config.itemIds) + 1 break end end return true end EU QUERIA QUE FICASSE ASSIM
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...