Postado Setembro 5, 2013 11 anos Bom gelera é o seguinte, quero arruma esses script, um para ao usar !removeskull tira o skull e limpa todos os frags por 5kk, porque a que eu tenho, tão falando que não ta gastando nada e não remove os frags, e outra é que os player não consegue usar mais de uma doubleexp, tipo depois que acaba o efeito do DoubleExp não da para usar mais quando o player clika para usar novamente uma msg diz assim "you are already taking effect from this item".. a seguir vo posta meus script, queria que vcis editava eles para essas função. A so mais uma coisinha, os players morre não perde skill, bom eu acho que não tão perdendo nada, onde configuro isso? na arquivo das vocação não tem aquela linha que edita essas coisas, OBG! 1°-SCRIPT (REMOVE SKULL) --- skull remover by kakilo - quinto script function onSay(cid, words, param, channel) if (getCreatureSkullType(cid) == SKULL_BLACK) then if doPlayerRemoveMoney(cid, 5000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua black skull") end end if (getCreatureSkullType(cid) == SKULL_RED) then if doPlayerRemoveMoney(cid, 5000000) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.") else doPlayerSendTextMessage(cid, 22, "Voce precisa de 5kk para remover a sua red skull") end end if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendTextMessage(cid, 22, "Sua Skull foi retirada com Sucesso!") end return TRUE end ESTE É O SCRIP PARA REMOVER SKULL, QUE JÁ VEIO COM O OT, E PARECE NÃO ESTAR COBRANDO O VALOR ALI, E NAO REMOVE OS FRAGS SO A SKULL. 2°- Scrip (DOUBLE EXP) <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="tibiaking.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 8}, costmana = {TRUE, mana = 100}, addrate = 20, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="8976" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= 1 then return doPlayerSendCancel(cid, "You are already taking effect from this item.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "You need to be a premmium account to use this item.") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "You need to be level " .. configs.needlvl.level .. " to use this item.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "You need " .. configs.costmana.mana .. " mana to use this item.") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "The effect of the exp potion end.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "The effect of the exp potion will end in "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora voce ira receber mais exp por matar os mosntros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "The effect of the exp potion end.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "The effect of the exp potion will end in "..a..".") end end return TRUE ]]></creaturescript> </mod> Esse, parece ser o mais complicado, porque até agr so um player esta reclamando um lv 700+, não sei se ele morreu com double exp, não sei se ele logo o que houve, pois em todos outros player que eu testei, apos acaba o double exp, da pra usa novamente, mais enfim, queria que ao acaba o double exp sempre de para o player contia a usar, e se der tambem para configurar ele, que se o player logar, ou morrer o efeito acaba! --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Bom galera é isso mais uma vez precisando de voces para resolve esse erro, que vo tenta faze isso de madrugada para não prejudica ao players, que o server esta dedicado, se é que me entende ?!?! Mais é isso ae, prometo a dar Rep+ ...pra quem tentar me ajudar, Obg. Att, Rodrigo.
Postado Setembro 5, 2013 11 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → OTServ Geral" Para: "OTServ → Suporte OTServ" Ot Design: https://discord.gg/VgtVRNmCD7
Postado Setembro 5, 2013 11 anos Só tenho o remove skull, aqui está (script por item, ou seja, action) : function onUse(cid, item, frompos, item2, topos) local skull = getCreatureSkullType(cid) local bad_skulls = {SKULL_RED,SKULL_BLACK} if getTileInfo(getThingPos(cid)).protection == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.") return false elseif isInArray(bad_skulls, skull) == true 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 do not have red/black skull!") end return true end Editado Setembro 5, 2013 11 anos por Jamison Collins (veja o histórico de edições) 愛"A alma permanece em suas criações" 平(Não dou suporte por mensagem privada.)
Postado Setembro 6, 2013 11 anos Autor O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → OTServ Geral" Para: "OTServ → Suporte OTServ" Nossa, era pra mim ter postado no Suporte OTServ, bom de qualquer forma agradeço! Só tenho o remove skull, aqui está (script por item, ou seja, action) : function onUse(cid, item, frompos, item2, topos) local skull = getCreatureSkullType(cid) local bad_skulls = {SKULL_RED,SKULL_BLACK} if getTileInfo(getThingPos(cid)).protection == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"You can't remove your skull in this area.") return false elseif isInArray(bad_skulls, skull) == true 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 do not have red/black skull!") end return true end Bom, esse script que so remove skul eu já tenho queria que alguem ajustaçe esses para melhor funcionamento dos q falei, mais vlw pela ajuda msm assim.
Postado Setembro 6, 2013 11 anos Dúvida sanada, tag adicionada. Tópico movido! "O fracasso é a oportunidade de se começar de novo inteligentemente" Minhas Redes Sociais: Youtube | Página & Grupo | Steam | Discord TibiaKing
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.