Tudo que Ed.Specter postou
-
(Resolvido)Spell que hita a vida do alvo em %.
Só temos uma lista em onDeath, e isso é quando o cid já morreu. é pra esse tipo de coisa que temos statusCombat(cid, attacker, combat, value) if value == (getCreatureMaxHealth(cid)*0.20) then ... end
-
Erro Creaturescripts Impede O Login
o erro ta aqui: -- Rewards local rewards = #player:getRewardList() if(rewards > 0) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have %d %s in your reward chest.", rewards, rewards > 1 and "rewards" or "reward")) end n tem a função getRewardList.. testa assim:
-
Que bagunça virou esses foruns de ot
A comunidade open tíbia já não é mais a mesma, e nunca mais será! Os que realmente sabiam lua já não participam mais, tem uns que até tentam, mas esses fóruns (não só o tk) estão desanimador. Só quem pode mudar isso é a equipe responsável, se os mesmo ficam mordidos e não são capazes de admitir a zona que está, os membros não vão "fazer melhor".
-
PEDIDO ITEM QUE TIRA PK RED
ops erro meu rsrs.. function onUse(cid, item) if getCreatureSkullType(cid) == SKULL_RED then if not getTileInfo(getThingPos(cid)).protection then local pid = getPlayerGUID(cid) doPlayerSetSkullEnd(cid, 0, skull) doRemoveItem(item.uid, 1) doRemoveCreature(cid) db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";") db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red skull!") end return true end prontinho.
-
Spells atk + paralizy
testa isso aqui: faz tempo q não mexo em spells :S. mas acredito que và funcionar
-
PEDIDO ITEM QUE TIRA PK RED
testa assim : function onUse(cid, item) if getCreatureSkullType(cid) == SKULL_RED then if not getTileInfo(getThingPos(cid)).protection then local pid = getPlayerGUID(cid) doPlayerSetSkullEnd(cid, 0, skull) doRemoveItem(item.uid, 1) doRemoveCreature(cid) doRemoveConditions(cid, CONDITION_INFIGHT) db.executeQuery("UPDATE players SET skulltime = 0 WHERE id = ".. pid ..";") db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. pid .. ");") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red skull!") end return true end
-
[TFS 0.4] Editar script para tais effect ter como configurar
o script é onThink, acada tempo configurável no xml, o script vai rodar, fazendo um effect na posição dos players online, de acordo com a vocation. sim, testa ae..
-
[TFS 0.4] Editar script para tais effect ter como configurar
usa esse e testa. não precisa mexer em nada. local effects = { --_GOKU_-- [4] = 106, [5] = 85, [6] = 106, [8] = 87, [13] = 84, [14] = 84, [15] = 89, [16] = 244, [473] = 115, --_VEGETA_-- [21] = 85, [22] = 106, [23] = 106, [28] = 84, [29] = 84, [30] = 89, [31] = 244, [474] = 41, --_PICCOLO_-- [34] = 109, [39] = 104, [41] = 88, [43] = 88, [44] = 104, --_C17_-- [49] = 87, [51] = 84, [52] = 93, [54] = 87, [55] = 90, [56] = 96, --_GOHAN_-- [60] = 106, [68] = 84, [69] = 89, [70] = 90, --_TRUNKS_-- [75] = 85, [79] = 85, [80] = 84, [81] = 89, [82] = 90, [490] = 244, --_CELL_-- [88] = 107, [89] = 104, [90] = 104, [91] = 106, [92] = 104, [93] = 89, [94] = 71, --_FREEZA_-- [102] = 84, [103] = 84, [104] = 84, [105] = 84, [106] = 84, [107] = 84, [108] = 84, [109] = 89, [110] = 113, --_MAJIN BOO_-- [118] = 109, [119] = 92, [120] = 92, [121] = 105, [122] = 92, [123] = 92, [124] = 91, [125] = 91, [126] = 101, [475] = 89, --_BROLY_-- [131] = 85, [135] = 98, [136] = 84, [137] = 84, [138] = 89, [139] = 244, --_C18_-- [144] = 87, [146] = 87, [147] = 93, [149] = 87, [150] = 86, [151] = 90, --_UUB_-- [156] = 84, [157] = 84, [158] = 84, [159] = 84, [160] = 84, [161] = 96, [162] = 89, [163] = 90, --_GOTEN_-- [169] = 106, [170] = 85, [174] = 85, [175] = 85, [176] = 90, [177] = 84, --_CHIBI TRUNKS_-- [183] = 106, [184] = 85, [188] = 85, [189] = 85, [190] = 90, [191] = 84, --_COOLER_-- [198] = 86, [199] = 86, [200] = 86, [201] = 87, [202] = 89, [203] = 86, [204] = 85, [493] = 90, [205] = 96, --_DENDE_-- [215] = 88, [216] = 102, [217] = 240, --_TSUFUL_-- [219] = 84, [220] = 87, [221] = 84, [222] = 84, [223] = 84, [224] = 84, [227] = 96, [228] = 89, [229] = 96, --_BARDOCK_-- [235] = 85, [237] = 109, [238] = 106, [239] = 85, [240] = 84, [241] = 84, [242] = 89, [243] = 90, --_KURIRIN_-- [250] = 107, [252] = 107, [253] = 84, [254] = 89, [255] = 89, --_PAN_-- [260] = 87, [261] = 107, [262] = 106, [263] = 106, [264] = 84, [265] = 84, [266] = 89, [267] = 90, --_KAIO_-- [272] = 86, [273] = 91, [274] = 86, [276] = 86, [277] = 86, [278] = 86, [279] = 90, --_VIDEL_-- [285] = 106, [286] = 106, [287] = 106, [288] = 106, [289] = 87, [290] = 87, [291] = 41, --_JANEMBA_-- [297] = 84, [298] = 84, [299] = 110, [300] = 84, [301] = 84, [302] = 86, [303] = 90, [491] = 89, --_TENSHINHAN_-- [307] = 107, [308] = 107, [310] = 107, [312] = 85, [313] = 84, [314] = 108, [315] = 108, --_JENK_-- [322] = 109, [325] = 84, [326] = 87, [327] = 98, --_RADITZ_-- [332] = 85, [333] = 106, [334] = 106, [335] = 106, [336] = 85, [337] = 84, [338] = 89, [339] = 90, --_C16_-- [344] = 106, [346] = 88, [347] = 95, [348] = 106, [349] = 97, [350] = 98, [351] = 96, --_TURLES_-- [355] = 106, [356] = 87, [358] = 94, [360] = 106, [361] = 84, [362] = 89, [363] = 90, --_BULMA_-- [368] = 87, [371] = 106, [372] = 87, [373] = 84, [374] = 87, [375] = 89, --_SHENRON_-- [380] = 89, [381] = 89, [382] = 87, [383] = 85, [384] = 89, [385] = 90, [386] = 84, [387] = 84, --_VEGETTO_-- [390] = 106, [392] = 85, [393] = 106, [394] = 106, [395] = 85, [396] = 85, [397] = 84, [398] = 89, [399] = 244, --_TAPION_-- [404] = 84, [405] = 96, [406] = 96, [409] = 87, [410] = 87, [411] = 84, [412] = 90, [476] = 89, --_KAME_-- [423] = 89, [424] = 85, --_KING VEGETA_-- [429] = 85, [432] = 85, [434] = 89, [435] = 84, [436] = 84, --_KAGOME_-- [440] = 106, [441] = 85, [445] = 106, [446] = 244, [447] = 84, [448] = 115, --_ZAIKO_-- [451] = 106, [452] = 106, [453] = 98, [455] = 85, [456] = 85, [457] = 106, [458] = 88, [459] = 96, [460] = 96, [477] = 90, --_CHILLED_-- [466] = 84, [467] = 84, [468] = 84, [469] = 84, [470] = 105, [471] = 96, [472] = 86, [492] = 89, --_C8_-- [480] = 106, [481] = 106, [482] = 89, [483] = 106, [545] = 105, [557] = 114, [486] = 97, [487] = 244, [488] = 98, [489] = 96, [569] = 102, [581] = 101, [593] = 99, [606] = 90, [607] = 90, [633] = 90, [608] = 90, [633] = 102, [645] = 90, [657] = 90, [669] = 41, [670] = 90, [671] = 90, [673] = 115, [699] = 104, [712] = 90, [713] = 90, [711] = 90, [687] = 115, [674] = 116, [675] = 108, [672] = 90, [726] = 90, [738] = 90, [750] = 113, [751] = 90, [752] = 90, [754] = 24, [753] = 100, [766] = 90, [767] = 115, [768] = 115, [769] = 115, [770] = 115, [806] = 98, [794] = 102, [782] = 93, [818] = 105, [830] = 105, [842] = 104, [847] = 90, [849] = 90, [850] = 90, [848] = 90, [851] = 98, [852] = 104, [854] = 98, [855] = 101, [856] = 108, [853] = 100, [868] = 107, [880] = 98, [846] = 90, [881] = 90, [882] = 90, [883] = 90, [884] = 90, [885] = 90, [886] = 90, [887] = 90, [888] = 90, [889] = 90, [890] = 90, [891] = 90, [892] = 90, [893] = 90, [894] = 90, [895] = 90, [896] = 90, [897] = 90, [898] = 90, [899] = 41, [900] = 41, [913] = 90, [914] = 41, [915] = 41, [916] = 41, [917] = 41, --_Goku God_-- [521] = 24 } function onThink(interval) for _, pid in ipairs(getPlayersOnline()) do local effect = effects[getPlayerVocation(pid)] local position = getCreaturePosition(pid) if (position) then if(effect) then doSendMagicEffect(position, effect) end end end return true end
-
PEDIDO ITEM QUE TIRA PK RED
function onUse(cid, item) if getCreatureSkullType(cid) == SKULL_RED then if not getTileInfo(getThingPos(cid)).protection then doPlayerSetSkullEnd(cid, 0, skull) doRemoveItem(item.uid, 1) db.executeQuery('UPDATE `killers`, `player_killers` SET `killers`.`unjustified` = 0 WHERE `killers`.`unjustified` = 1 AND `player_killers`.`player_id` = ' .. getPlayerGUID(cid) .. ' AND `killers`.`id` = `player_killers`.`kill_id`') doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your skull has been removed!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have red skull!") end return true end
-
Não consigo editar meu Perifl, está acusando erro
aqui também
-
SQM emite msg em posX
Acredito que o mais adequado seja usar addEvent já que ele quer que a msg se repita por 5 ou 10 segundos.
-
Erro no creaturesripts
testa assim : local uniqueids = {8049, 8050} local passwords = { ["deus do mal e do caos"] = {doorpos = {x = 16740, y = 16431, z = 7}, doorid = 5128, uniqueid = 8049, doorclosetime = 2}, ----------------------------------------------------------------------------------------------------------------------------------- ["TK"] = {doorpos = {x = 1000, y = 1000, z = 7}, doorid = 1213, uniqueid = 8050, doorclosetime = 10} } function onTextEdit(cid, item, newText) local x = passwords[newText] if x then local function onCloseDoor() if(getTileItemById(x.doorpos,x.doorid+1).uid) > 0 then doTransformItem(getTileItemById(x.doorpos,x.doorid+1).uid, x.doorid) doSendMagicEffect(x.doorpos, CONST_ME_MAGIC_RED) end end for i = 1, #uniqueids do if item.uid == uniqueids[i] then if item.uid == x.uniqueid then if(getTileItemById(x.doorpos,x.doorid).uid) > 0 then doTransformItem(getTileItemById(x.doorpos,x.doorid).uid, x.doorid + 1) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Sua Senha "'..newText..'" esta correta, voce pode entrar.') addEvent(onCloseDoor,x.doorclosetime*1000) elseif (getTileItemById(x.doorpos, x.doorid+1).uid) > 0 then doTransformItem(getTileItemById(x.doorpos,x.doorid+1).uid, x.doorid) doPlayerSendCancel(cid, 'Você fechou a porta.') end else doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) doPlayerSendCancel(cid, 'Sua senha "'..newText..'" esta incorreta.') end end end end return true end
-
Erro no creaturesripts
a tag ta dentro do comentário ? deixa como o amigo acima falou, e tira a tag que ta no onlogin, do comentario editei#
-
(Resolvido)Item que da Storage
vai dá a storage ao usar, ou a da use ?
-
Suporte criar script.
não entendi, só vai conseguir usar a cada x tempo, e se o magic level for maior que 20 ? pra ser sincero não lembro se tem uma função pra usar uma spell automática, mas tenta usar um : doCreatureSay(cid, "exura vita", 3) testa pra vê se funciona. não me recordo.
-
Suporte criar script.
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)*0.20)
-
[BUG] Script Premium Days
tenta usar esse: function onLogin(cid) local storage = getPlayerAccountId(cid)+550 local days = 7 if getGlobalStorageValue(storage) < 1 then setGlobalStorageValue(storage, 1) doPlayerAddPremiumDays(cid, days) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu "..days.." dias de VIP, bom jogo!") end return true end
-
Suporte criar script.
matemática, não tem função que checa por %. faz tipo: if (getCreatureHealth(cid)) <= (getCreatureMaxHealth(cid)*0.10) then ... end
-
Suporte criar script.
sim, pode fazer por onStatsChange. vai tentando e usa esse tópico, para suporte, que te ajudaremos
-
Peca sua script !!
tem que mudar tudo ai no script pra rodar em 1.2 local pos = { [1] = {playerpos = {x = 1211, y = 1162, z = 6}, nplayerpos = {x=1211, y=1162, z=7}}, [2] = {playerpos = {x = 1210, y = 1162, z = 6}, nplayerpos = {x=1210, y=1162, z=7}}, [3] = {playerpos = {x = 1209, y = 1162, z = 6}, nplayerpos = {x=1209, y=1162, z=7}}, [4] = {playerpos = {x = 1207, y = 1162, z = 6}, nplayerpos = {x=1208, y=1162, z=7}} } local questLevel = 100 function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.uid == 7000 then if item.itemid == 1946 then for _, pid in pairs(pos) do local topPlayer = Tile(pid.playerpos):getTopCreature() if topPlayer:isPlayer() then if topPlayer:getLevel() >= questLevel then pid.playerpos:sendMagicEffect(2) topPlayer:teleportTo(pid.nplayerpos) pid.nplayerpos:sendMagicEffect(2) else topPlayer:sendTextMessage(MESSAGE_STATUS_SMALL,"Você precisa estar no level "..questLevel.."+.") end item:transform(1945) end end elseif item.itemid == 1945 then item:transform(1946) end end end tenta assim.. @PedroSTT funções : http://pastebin.com/wrnD8jHH
-
For com if?
vê se entende: local position = { [1] = {pos = {x=1170,y=965,z=7}, item = "1"}, [2] = {pos = {x=1171,y=968,z=7}, item = "2"}, [3] = {pos = {x=1171,y=969,z=7}, item = "3"} } local check = 0 for i = 1, #position do if getTileItemById(position[i].pos, item).uid then check = check + 1 doPlayerSendTextMessage(cid, 22, "Confirmado item "..position[i].item..".") end end if check == #position then todos os items estão no lugar, então fazer... else algum item não está no lugar, então fazer... end bom, vi agr que o vod respondeu :S
-
Paralyze Condition/math.random
if getCreatureCondition(cid, CONDITION_PARALYZE ) then ... else ... end math: coloca em uma tabela, e usa o math pra chamar um valor da tabela.. local tabela = {17, 26, 31, 35, 36, 39, 61, 65} print(tabela[math.random(#tabela)])
-
(Resolvido)Trocar premium points no trade
testa se funcionar, pode postar.
-
(Resolvido)Trocar premium points no trade
@wedyhiu2, @Digoshow.. alguém testou? esse segundo que mandei, que transfere pro item.
-
ERRO NA CREATUREEVENTS
nossa velho, vai em data/creaturescripts/scripts e acha o arquivo firstitems.lua e posta aqui!