Ir para conteúdo

yoh

Campones
  • Total de itens

    58
  • Registro em

  • Última visita

Tudo que yoh postou

  1. Fundo rosa seria muito melhor né ?
  2. E "ACIMA" voce adiciona void setSkillLevel(skills_t skill, uint32_t value); Ta errado é : void setMagicLevel(uint64_t value)
  3. Ta otimo a configuração, porem concerteza você terá que ter 1 proteçao DDOS, sem isso nem o melhor pc suportaria os atks atuais
  4. function restore(cid, pos, seconds) if not isCreature(cid) then return true end if seconds == 0 then doTeleportThing(cid, pos) doCreatureSay(cid, "Imortaly", TALKTYPE_ORANGE_1) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) mayNotMove(cid, false) setPlayerStorageValue(cid, 56982, 0) end addEvent(restore, 1000, cid, pos, seconds -1) end function onPrepareDeath(cid, deathList) local um = math.random(130, 212) -- Posição X local dois = math.random(587, 660) -- Posição Y local positions = --Areas onde os monstros nascerão randomicamente.. { {x = um, y = dois, z = 8}, {x = um, y = dois, z = 8}, {x = um, y = dois, z = 8} } local pos = positions[math.random(1, #positions)] local posArena = {x=pos.x, y=pos.y, z=pos.z} -- Posição randomizada que o player será teleportado if getPlayerStorageValue(cid, 56982) == 1 and getPlayerLevel(cid) >= 600 then if getTileArena(getCreaturePosition(cid)) == true then return true end restore(cid, getThingPos(cid), 5) addEvent(doCreatureAddHealth, 100, cid, getCreatureMaxHealth(cid)) doTeleportThing(cid, posArena) mayNotMove(cid, true) return false end return true end
  5. CREATE TABLE IF NOT EXISTS `guild_ranks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `guild_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `level` int(11) NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member', PRIMARY KEY (`id`), KEY `guild_id` (`guild_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1777 ; ALTER TABLE `guild_ranks` ADD CONSTRAINT `guild_ranks_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;
  6. else setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..' +'..(level-1)) doPlayerSendTextMessage(cid, 24,"Your item back to +"..(level-1)..".") doRemoveItem(itemEx.uid,1) end if isArmor(itemEx) == TRUE then setItemArmor(itemEx.uid,doTransform(gain.loseArmor ,itemEx)) doRemoveItem(itemEx.uid,1) elseif isWeapon(itemEx.uid) == TRUE then setItemAttack(itemEx.uid, doTransform(gain.loseAttack,itemEx)) setItemDefense(itemEx.uid, doTransform(gain.loseDefense,itemEx)) doRemoveItem(itemEx.uid,1) elseif isShield(itemEx.uid) == TRUE then setItemDefense(itemEx.uid, doTransform(gain.loseShield,itemEx)) doRemoveItem(itemEx.uid,1) end
  7. yoh

    Player anda Travando!

    Boa Tarde Galerinha, estou com um problema e não sei se vou conseguir explica mas vamos la. Tenho um Servidor de WODBO quando os player estão online, mesmo o servidor sem lag algum e com o player com 1k5 de speed o player ainda anda travando ! não sei oq poder ser, poderiam me ajudaR?
  8. yoh

    Math.random Posição

    Ja Arrumei para quem tiver a msm duvida ! local um = math.random(130, 212) -- ele vareia de 130 a 212 em x local dois = math.random(587, 660) -- ele vareia de 587 a 660 em y local positions = --Areas onde os monstros nascerão randomicamente.. { {x = um, y = dois, z = 8}, } local pos = positions[math.random(1, #positions)] local posArena = {x=pos.x, y=pos.y, z=pos.z} doTeleportThing(cid, posArena) Podem fechar o Topico
  9. yoh

    Math.random Posição

    não to falando que da bug to pedindo outro tipo de random, pois tenho que fazer 1 variação de 82 posição diferente tem como simplifica?
  10. yoh

    Math.random Posição

    Teria como varias as posição ex : x=pos.x, y=pos,y, z=pos.z poq eu tenho que fazer um random de 82 posição diferente tem como fazer ?
  11. Boa tarde galera preciso de um script simples, porem não estou conseguindo ! Kero um scrip que teleport o Player, porem varie a possição que ele irá cair ! ex : o player cai na pos : x=111, y=111, z=1 pos : x=222, y=222, z=2
  12. é mais facil usando a source e modificando nela
  13. Chatinho fazer mais é simples : Na Spells de Travar o Player Coloque : Não testei porem axo q vai funcionar Travar o Target function onCastSpell(cid, var) local target = getCreatureTarget(cid) local waittime = 60 - tempo para poder travar o player dnv ( em segundos ) local storage = 2521 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Você tem que espera " .. exhaustion.get(cid, storage) .. " segundos.") return false end exhaustion.set(cid, storage, waittime) mayNotMove(target, true) return true end Destravar o Player : function onCastSpell(cid, var) local target = getCreatureTarget(cid) local waittime = 5 - tempo para o player poder destravrar a si mesmo ! em segundos local storage = 2521 if exhaustion.check(cid, storage) then doPlayerSendCancel(cid, "Você tem que espera " .. exhaustion.get(cid, storage) .. " segundos.") return false end exhaustion.set(cid, storage, waittime) mayNotMove(cid, false) return true end
  14. Eu Sei, porem achei melhor em source, pois roda direto no servidor ^^
  15. Bom dia Galera do Xtibia, hoje brincando de Scripter C++ resolvi modificar o Fishing para Fishing Fighting que no caso seria uma arma com attack que upa fishing em vez das padrões ( Axe , Sword , Club, Distance ). Não sei se vai ser util para alguma coisa, para mim vai me ajuda em 1 sistema que verifica esse skill, a versão é 0.4... não sei fazer em outra e acredito que é bem simples porem para mim foi emocionante conseguir ! Vamos la ! em Combat.cpp : Procure : switch(caster->getWeaponType()) Abaixo de : case WEAPON_FIST: effect = SHOOT_EFFECT_LARGEROCK; break; Adicione : case WEAPON_FISH: effect = SHOOT_EFFECT_WHIRLWINDCLUB; break; Salve e Feche em Const.h : Procure enum WeaponType_t Abaixo de: WEAPON_WAND, Adicione : WEAPON_FISH, Salva e Feche. Em Items.cpp Procure : if(readXMLString(itemAttributesNode, "value", strValue)) Abaixo de : else if(tmpStrValue == "fist") it.weaponType = WEAPON_FIST; Adicione : else if(tmpStrValue == "fish") it.weaponType = WEAPON_FISH; Salva e Feche. Em Outfit.cpp Procure : if(readXMLInteger(configNode, "melee", intValue)) Abaixo de : utfit.skills[SKILL_AXE] += intValue; Adicione : outfit.skills[SKILL_FISH] += intValue; Procure : if(readXMLInteger(configNode, "weapon", intValue) || readXMLInteger(configNode, "weapons", intValue)) Abaixo de : outfit.skills[SKILL_DIST] += intValue; Adicione : outfit.skills[SKILL_FISH] += intValue; Procure : if(readXMLInteger(configNode, "meleePercent", intValue)) Abaixo de : outfit.skillsPercent[SKILL_AXE] += intValue; Adicione : outfit.skillsPercent[SKILL_FISH] += intValue; Procure : if(readXMLInteger(configNode, "weaponPercent", intValue) || readXMLInteger(configNode, "weaponsPercent", intValue)) Abaixo de : outfit.skillsPercent[SKILL_DIST] += intValue; Adicione : utfit.skillsPercent[SKILL_FISH] += intValue; Salve e Feche. Em Player.cpp Procure: witch(item->getWeaponType()) { case WEAPON_DIST: if(item->getAmmoType() != AMMO_NONE) break; Abaixo de : case WEAPON_WAND: Adicione : case WEAPON_FISH: Procure : int32_t Player::getWeaponSkill(const Item* item) const { if(!item) return getSkill(SKILL_FIST, SKILL_LEVEL); switch(item->getWeaponType()) { Abaixo de : ase WEAPON_DIST: return getSkill(SKILL_DIST, SKILL_LEVEL); Adicione : case WEAPON_FISH: return getSkill(SKILL_FISH, SKILL_LEVEL); Salve e Feche. Em Spells.cpp Procure por : if(needWeapon) { switch(player->getWeaponType()) { Abaixo de : case WEAPON_FIST: Adicione : case WEAPON_FISH: Salve e Feche. em Tools.cpp Procure por : SkillIdNames skillIdNames[] = { Caso quizer mudar o nome só renomear : ou Deixa como esta {"fishing", SKILL_FISH}, {"fishing", SKILL_FISH}, Procure por : case SKILL_SHIELD: Você Irá ver o Skill Fishing, Caso quizer mudar o nome só renomear : ou Deixa como esta. Salve e Feche. Em Weapons.cpp Procure por : if(it->weaponType != WEAPON_NONE) { switch(it->weaponType) { Abaixo de : case WEAPON_FIST: Adicione : case WEAPON_FISH: Procure : switch(item->getWeaponType()) Abaixo de : case WEAPON_FIST: { skill = SKILL_FIST; return true; } Adicione : case WEAPON_FISH: { skill = SKILL_FISH; return true; } Em Condition.cpp Procure Por : case CONDITIONPARAM_SKILL_MELEE: skills[SKILL_CLUB] = skills[SKILL_AXE] = skills[SKILL_SWORD] = value; return true; Modifique para : case CONDITIONPARAM_SKILL_MELEE: skills[SKILL_CLUB] = skills[SKILL_AXE] = skills[SKILL_SWORD] = skills[SKILL_FISH] = value; return true; Procure por : case CONDITIONPARAM_SKILL_MELEEPERCENT: skillsPercent[SKILL_CLUB] = skillsPercent[SKILL_AXE] = skillsPercent[SKILL_SWORD] = std::max((int32_t)0, value); return true; Modifique Para : case CONDITIONPARAM_SKILL_MELEEPERCENT: skillsPercent[SKILL_CLUB] = skillsPercent[SKILL_AXE] = skillsPercent[SKILL_SWORD] = skillsPercent[SKILL_FISH] = std::max((int32_t)0, value); return true; É isso ae Galera varias modificações porem Funciona Perfeitamente Em /data/Items/Items.xml Só modificar para fish a arma que você preferir e assim será treinado fishing em vez de qualquer outro. ex : em id="7744" article="a" name="spike sword"> <attribute key="weight" value="5000" /> <attribute key="defense" value="21" /> <attribute key="attack" value="24" /> <attribute key="weaponType" value="fish" /> <attribute key="extradef" value="2" /> <attribute key="elementFire" value="4" /> <attribute key="decayTo" value="2383" /> <attribute key="showcharges" value="1" /> </item> Alguem Testo ? aqui funciono Perfeito ! Se Funciona da Rm REP+ ae Tio !
  16. yoh

    Izanagi - Naruto Online

    [0:41:54.560] mysql_real_query(): SELECT value FROM player_storage WHERE player_id = 5223 AND key = 91832 - MYSQL ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key = 91832' at line 1 (1064) [0:42:57.127] [Error - Action Interface] [0:42:57.127] (Unknown script file) [0:42:57.127] Description: [0:42:57.127] attempt to call a nil value [0:42:57.127] stack traceback: Consegui Fazer a Tecnica. Segue: Creaturescripts. function restore(cid, pos, seconds) if not isCreature(cid) then return true end if seconds == 0 then doTeleportThing(cid, pos) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) end addEvent(setPlayerStorageValue, 6000, cid, 56982, 0) addEvent(mayNotMove, 5000, cid, false) addEvent(restore, 1000, cid, pos, seconds -1) end function onPrepareDeath(cid, deathList) local posArena = {x = 302, y = 45, z = 5} --´posição da area la q vc falo if getPlayerStorageValue(cid, 56982) == 1 then restore(cid, getThingPos(cid), 5) doTeleportThing(cid, posArena) mayNotMove(cid, true) return false end return true end Spell : function onCastSpell(cid, var) setPlayerStorageValue(cid, 56982, 1) return true end Simples! Funciona 1 x e depois precisa usa-la dnv ! quando o player morrer ele remove a storage e fica normal !
  17. yoh

    Izanagi - Naruto Online

    é +/- isso no caso seria 1 PrepareonDeath e em creaturescripts para só ativar quando o player tve-se usado a magia e na hr de ele morrer n perde nd Alguem ?
  18. Adicione em 050-function function getPlayerVipPoints(cid) local Info = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. "") if Info:getID() ~= LUA_ERROR then local Points= Info:getDataInt("premium_points") Info:free() return Points end return LUA_ERROR end function doPlayerAddVipPoints(cid, points) local dif = getPlayerVipPoints(cid) + points if dif >= 0 then db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") return TRUE end return FALSE end function doPlayerRemoveVipPoints(cid, points) local dif = getPlayerVipPoints(cid) - points if dif >= 0 then db.query("UPDATE `accounts` SET `premium_points` = `premium_points` - " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") return TRUE end return FALSE end Adione em Talkactions/scripts transfer.lua function onSay(cid, words, param, channel) local t = param:explode(",") local player = getPlayerByName(t[1]) local m = tonumber(t[2]) if param == "" then return doPlayerSendCancel(cid, "Command requires param.") elseif not isPlayer(player) then return doPlayerSendCancel(cid, "Sorry, not possible.") end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Valor nao Digitado.\n Ex: /transfer "..getPlayerName(cid)..", 20") return TRUE end if getPlayerVipPoints(cid) < m then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce nao tem pontos suficiente!!") end doPlayerRemoveVipPoints(cid, m) doPlayerAddVipPoints(player, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce Transferiu "..m.." pontos para "..getPlayerName(player)..".") f = io.open("data/logs/Pontos.txt", "a+") f:write("Player: "..getPlayerName(cid).." transferiu "..m.." pontos para "..getPlayerName(player).."\n\n----------------------------------------------------------\n") f:close() return true end XML : <talkaction words="/transfer" event="script" value="transfer.lua"/> Eu Utilizo isso no meu Servidor Funciona 100% e sem nenhum Bug !
  19. Bom dia Galera Prcso de 1 Scritp um pouco complexo ! Seguinte o Player Usa 1 magia e se ele dentro de 30 segundo ele morrer, o player não morre ele é teleportado para 1 area e volta pra onde ele tinha morrido e só pode usar 1 x a cada 2 min
  20. yoh

    For _, pid

    Salva o nome da guild. Muito Obrigado ja vi oq posso melhorar ! Podem Fechar o Topico
  21. PqP é sacanagem né ? o mlk vem pede o script os cara ajuda e o mlk n posta poq o autor pediu ? no min vc comprou o script e por isso não vai posta ! bando de mercenario do krl --'
  22. Venho Disponibilizar 3 Vagar para Staff do Server - Função : "Consultores". Requisitos : Pessoa com experiencia em Otserv, Dinâmica com ideias que possa melhorar o servidor. Poderá ou não ter Acess Dentro do Game. Contato : Skype : emersonaaron E-mail : dboinfinity@hotmail.com [ADM]Aaronzinho http://otsbrasil.com/dbo
  23. yoh

    For _, pid

    Galera estou estudando .lua e estou em duvida se esse script irá Funcionar, teria como verificar para mim ? function doPointsBills() for _, pid in ipairs(getPlayersOnline()) do local GetStorage = getPlayerStorageValue(pid, 215548) if (getPlayerGuildName(pid) == getGlobalStorageValue(COH_STATUS)) and getPlayerLevel(pid) >= 500 then setPlayerStorageValue(pid, 215548, GetStorage + 50) doPlayerPopupFYI(pid,"[Bills] Voce Acaba de Ganhar 50 Pontos de Destruicao.\n[Bills] Fale /ptbills para ver Seus Pontos") end end return true end Ele da 50 de Storage para todos os player que tiverem online e que forem da guild que tem a Storage COH_Status, esse script esta certo ?
  • Quem Está Navegando   0 membros estão online

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