
Tudo que xWhiteWolf postou
-
[ERRO] Não aparece corpo ao morrer
o problema é nesse script mesmo... deixa ele assim: local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return true end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end return true end
-
Spell Atravessar a Parede
cogitando que isso fosse possível vc teria que mudar todas as sources, oque não é viável. Detesto estragar o seu barato mas isso não é possível
-
(Resolvido)[PEDIDO] Item que da HP
Testa assim function onEquip(cid, item, slot) local health = 100 if setCreatureMaxHealth(cid,getCreatureMaxHealth(cid)+health) then doSendMagicEffect(getPlayerPosition(cid), 12) doCreatureAddHealth(cid, 1) doCreatureAddHealth(cid, -1) return true end end function onDeEquip(cid, item, slot) local health = 100 if setCreatureMaxHealth(cid,getCreatureMaxHealth(cid)-health) then doSendMagicEffect(getPlayerPosition(cid), 13) return true end end
-
(Resolvido)[PEDIDO] Item que da HP
function onDeEquip(cid, item, slot) local hp = 100 doSendMagicEffect(getPlayerPosition(cid), 13) setCreatureMaxHealth(cid,getCreatureMaxHealth(cid)+hp) << tá + hp.. então ele tá adicionando HP tanto ao equipar quanto ao desequipar. coloca um - aqui e seja feliz.
- [PEDIDO] npc de task diferente/simples/ para serve com rpg
-
[Pedido] Script
isso é praticamente impossivel cara porque não tem como configurar uma spell que crie uma barreira e essa barreira funcione só pro kamehameha.. a menos que vc mude todo o script do kamehameha e coloque pra checar as coisas que estão na frente do player. Daí se tivesse a barreira cancelaria a magia, mesmo assim é muito dificil e duvido muito que alguém vá conseguir fazer pra você
-
script de spell que teleporta
seriam duas talkactions, uma pra criar um item imóvel no chão e outra pra ser teleportado para a posição do item. O player fala !criar e cria o item no chão, dps ele fala !tp e vai pra localização do item. Parece ser bem fácil mas não sei ao certo como fazer pra teleportar pra posição do item.. Tem certas coisas que precisam ser testadas como salvar a posição no storage e ir adicionando posições numa table. Se qualquer uma dessas coisas forem possíveis então dá pra fazer o script sim
- [Pedido] Red/black skull ao morrer, não perde arma donate. ajuda pf
-
doItemSetAttribute
isso varia de versão pra versão... tenta 'armor', tenta colocar entre aspas "arm" e tenta usar sem aspas: arm. Dps tenta dnv usando "armor" e armor.
-
premiação para os 5 tops ranks
o ruim é que não dá pra adicionar premios pra players offlines (pelo menos eu não sei como)
-
doItemSetAttribute
aqui tá a lista completa: int32_t LuaScriptInterface::luaGetItemAttribute(lua_State *L) //by Kratos { //getItemAttr(uid, val) std::string attr = popString(L); uint32_t uid = popNumber(L); ScriptEnviroment* env = getScriptEnv(); Item* item = env->getItemByUID(uid); if(!item) { reportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND)); lua_pushboolean(L, false); return 1; } ///////////////////////////////////// string: if(attr == "name") { lua_pushstring(L, item->getName().c_str()); return 1; } if(attr == "pluralname") { lua_pushstring(L, item->getPluralName().c_str()); return 1; } if(attr == "specialdescr") { lua_pushstring(L, item->getSpecialDescription().c_str()); return 1; } if(attr == "text") { lua_pushstring(L, item->getText().c_str()); return 1; } if(attr == "writer") { lua_pushstring(L, item->getWriter().c_str()); return 1; } ///////////////////////////////////// int: if(attr == "itemid") { lua_pushnumber(L, item->getID()); return 1; } if(attr == "aid") { lua_pushnumber(L, item->getActionId()); return 1; } if(attr == "uid") { lua_pushnumber(L, item->getUniqueId()); return 1; } if(attr == "charges") { lua_pushnumber(L, item->getCharges()); return 1; } if(attr == "fluidtype") { lua_pushnumber(L, item->getFluidType()); return 1; } if(attr == "duration") { lua_pushnumber(L, item->getDuration()); return 1; } if(attr == "dduration") { lua_pushnumber(L, item->getDefaultDuration()); return 1; } if(attr == "throw_range") { lua_pushnumber(L, item->getThrowRange()); return 1; } if(attr == "shoot_range") { lua_pushnumber(L, item->getShootRange()); return 1; } if(attr == "atk") { lua_pushnumber(L, item->getAttack()); return 1; } if(attr == "arm") { lua_pushnumber(L, item->getArmor()); return 1; } if(attr == "def") { lua_pushnumber(L, item->getDefense()); return 1; } if(attr == "slot_position") { if(item->getSlotPosition() & SLOTP_NECKLACE) lua_pushnumber(L,1); if(item->getSlotPosition() & SLOTP_HEAD) lua_pushnumber(L,2); if(item->getSlotPosition() & SLOTP_BACKPACK) lua_pushnumber(L,3); if(item->getSlotPosition() & SLOTP_LEFT) lua_pushnumber(L,4); if(item->getSlotPosition() & SLOTP_ARMOR) lua_pushnumber(L,5); if(item->getSlotPosition() & SLOTP_RIGHT) lua_pushnumber(L,6); if(item->getSlotPosition() & SLOTP_RING) lua_pushnumber(L,7); if(item->getSlotPosition() & SLOTP_LEGS) lua_pushnumber(L,8); if(item->getSlotPosition() & SLOTP_AMMO) lua_pushnumber(L,9); if(item->getSlotPosition() & SLOTP_FEET) lua_pushnumber(L,10); return 1; } if(attr == "hitchance") { lua_pushnumber(L, item->getHitChance()); return 1; } if(attr == "maxwritelen") { lua_pushnumber(L, item->getMaxWriteLength()); return 1; } if(attr == "count") { lua_pushnumber(L, item->getItemCount()); return 1; } ///////////////////////////////////////////// boolean: if(attr == "ispushable") { lua_pushboolean(L, item->isPushable()); return 1; } if(attr == "isreadable") { lua_pushboolean(L, item->isReadable()); return 1; } if(attr == "iscanwritetext") { lua_pushboolean(L, item->canWriteText()); return 1; } if(attr == "isblocking") { lua_pushboolean(L, item->isBlocking()); return 1; } if(attr == "isstackable") { lua_pushboolean(L, item->isStackable()); return 1; } if(attr == "isrune") { lua_pushboolean(L, item->isRune()); return 1; } if(attr == "isfluidcont") { lua_pushboolean(L, item->isFluidContainer()); return 1; } if(attr == "isalwaysontop") { lua_pushboolean(L, item->isAlwaysOnTop()); return 1; } if(attr == "isgroundtile") { lua_pushboolean(L, item->isGroundTile()); return 1; } if(attr == "issplash") { lua_pushboolean(L, item->isSplash()); return 1; } if(attr == "ismagicfield") { lua_pushboolean(L, item->isMagicField()); return 1; } if(attr == "isnotmoveable") { lua_pushboolean(L, item->isNotMoveable()); return 1; } if(attr == "ispickupable") { lua_pushboolean(L, item->isPickupable()); return 1; } if(attr == "isweapon") { lua_pushboolean(L, item->isWeapon()); return 1; } if(attr == "isrotateable") { lua_pushboolean(L, item->isRoteable()); return 1; } if(attr == "isdoor") { lua_pushboolean(L, item->isDoor()); return 1; } if(attr == "isbed") { lua_pushboolean(L, item->isBed()); return 1; } if(attr == "iskey") { lua_pushboolean(L, item->isKey()); return 1; } std::cout << "[LuaScriptInterface::luaGetItemAttribute]: invalid item attribute." << std::endl; } int32_t LuaScriptInterface::luaSetItemAttribute(lua_State *L) //by Kratos { //setItemAttr(uid, "attr", val) uint32_t intval = popNumber(L); std::string attr = popString(L); ScriptEnviroment* env = getScriptEnv(); Item* item = env->getItemByUID(popNumber(L)); if(!item) { reportErrorFunc(getErrorDesc(LUA_ERROR_ITEM_NOT_FOUND)); lua_pushboolean(L, false); return 1; } //////////////////////////////////// int: if(attr == "aid") { item->setActionId(intval); return 1; } if(attr == "uid") { item->setUniqueId(intval); return 1; } if(attr == "fluidtype") { item->setFluidType(intval); return 1; } if(attr == "duration") { item->setDuration(intval); return 1; } if(attr == "dduration") { item->setDefaultDuration(); return 1; } if(attr == "itemcount") { item->setItemCount(intval); return 1; } std::cout << "[LuaScriptInterface::luaSetItemAttribute]: invalid item attribute." << std::endl; return 1; }
-
Nao perder skill
q versão q é o seu server?
-
[PEDIDO] Script que dá acesso para quem tem pelo menos 1 reset
@llucas75. function onStepIn(cid, item, position, fromPosition) ------------- <<< fromPosition if getPlayerStorageValue(cid, 2310) <= 0 then doTeleportThing(cid, frompos) ------ <<<< frompos? doPlayerSendCancel(cid, "Precisa ter no mínimo 1 reset para passar") return true ----- return true?? end return true end o certo seria: function onStepIn(cid, item, position, fromPosition) if getPlayerStorageValue(cid, 2310) < 1 then doTeleportThing(cid, fromPosition) doPlayerSendCancel(cid, "Precisa ter no mínimo 1 reset para passar") return false end return true end
-
doItemSetAttribute
te mando hj sem falta, assim q eu chegar em casa eu te explico tudo certinho.. me manda um pm pra me lembrar!
-
[pedido] Spell que muda vocação e lokotype por 2 minutos
cara, vc e os outros iniciantes tem que entender que suporte não é um lâmpada mágica que vc esfrega e pede os seus 3 desejos. Nem todo mundo sabe scriptar, nem todo mundo entende oque vc quer dizer, nem todo mundo sabe fazer oque vc quer do jeito que vc quer. Paciência e educação.
-
(Resolvido)[AJUDA] Checar o slotType do item
não existe essa função (que eu saiba) mas dependendo do script que vc tiver em mente dá pra fazer umas gambiarras
-
Npc Reset
ta na minha assinatura, se vc tiver quaisquer problemas com ele me avisa
-
[PEDIDO] Script que dá acesso para quem tem pelo menos 1 reset
os resets ficam salvos aqui: getPlayerStorageValue(cid, 2310) só fazer um piso que "onStepIn(frompos, topos)" if getPlayerStorageValue(cid, 2310) >= 1 then return true else doTeleportThing(cid, frompos) doPlayerSendCancel(cid, "Precisa ter no mínimo 1 reset para passar") return false end obs: isso é um esboço
-
Rep+ o3o (Script para Casal).
é bem complexo isso.. vou salvar o tópico como favorito e tentar mas não prometo nada. Acho que isso tá acima das minhas capacidades kkk
-
(Resolvido)Ajuda Editando Lvl Maximo
preciso testar pra ver se isso funciona mas acho q é só fazer um creaturescripts onAdvance, chegar se a skill for level e se for igual a 80 retornar false.
-
[Pedido] Distance effect arrudiando o player com full addon (cada addon com 1 distance effect diferente do outro)
http://www.tibiaking.com/forum/topic/12115-creaturescripts-walking-effect-on-outfit/ é isso q vc quer?
-
doItemSetAttribute
eu tenho uma lista em casa mas eu só volto pra casa segunda a noite :/ são as mesmas funções do comando /attr set
-
[ERRO] Não aparece corpo ao morrer
posta seu creaturescripts.xml aqui.. é algum função Death que tá com return false no script.
- Callbacks de creaturescripts
-
[BUG] no fast atk, ajuda =\
?????? explica melhor