Histórico de Curtidas
-
Alberess recebeu reputação de MasterPokex em Como colocar comando de tecnicas no dbko arena. ajudem por favorcria um arquivo chamado tecnicas.luae adicione isso dentro
function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "Spells for Level " .. spell.level .. "\n" prevLevel = spell.level end text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid,2175,text) return TRUE end vá em talkactions.xml e adicione essa tag <talkaction words="tecnicas" script="tecnicas.lua"/>
mude onde ta escrito a primeira tecnicas xD
-
Alberess recebeu reputação de allan gabriel em [8.54] Tv / Cam SystemOlá galera do Tibia King, baixei o servidor de nosso "querido" [eauheauea -brinkz] brun123 e separei em alguns systems, aqui vai um:
[Postei nessa area pois fikei confuso em qual postar, pois o script envolve creaturescripts/npcs/actions/etc...]
Primeiro Passo:
va em pastadoseuot/data/creaturescripts/scripts e crie um arquivo .lua xamado: tvsys.lua e cole isso dentro:
function onJoinChannel(cid, channelId, users, isTv) if channelId == 10 then doShowPokemonStatistics(cid) return false end if channelId == 11 then doPlayerPopupFYI(cid, getHighscoreString(8)) return false end if channelId == 12 then doPlayerPopupFYI(cid, getHighscoreString(6)) return false end if channelId >= 100 and channelId <= 10000 then local owner = getPlayerByGUID(getChannelOwner(channelId)) if isChannelTv(channelId) then if isCreature(owner) then if owner ~= cid then doPlayerWatchOther(cid, owner) local plural = #users == 2 and "" or "s" doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is now watching your channel (currently '..#users - (1)..' player'..plural..' watching this channel).', 15, channelId) else setPlayerStorageValue(cid, 99284, 1) end end elseif owner == cid then setPlayerStorageValue(cid, 99284, 2) end return true end return true end function onLeaveChannel(cid, channelId, users) if channelId >= 100 and channelId <= 10000 then local owner = getPlayerByGUID(getChannelOwner(channelId)) if isChannelTv(channelId) then if owner ~= cid and getCreatureOutfit(cid).lookType == 814 then doPlayerStopWatching(cid) local plural = #users == 2 and "" or "s" doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is not watching your channel anymore (currently '..#users - (1)..' player'..plural..' watching this channel).', 15, channelId) elseif owner == cid then setPlayerStorageValue(cid, 99284, -1) doSendAnimatedText(getThingPos(cid), "CAM OFF", 180) for stops = 1, #users do if users[stops] ~= owner then doPlayerStopWatching(users[stops]) end end end elseif owner == cid then setPlayerStorageValue(cid, 99284, -1) end return true end return true end function onWalk(cid, fromPosition, toPosition) if getPlayerStorageValue(cid, 99284) <= 0 then return true end local speed = getCreatureSpeed(cid) local a = getWatchingPlayersFromPos(cid, fromPosition) for b = 1, #a do if getCreatureSpeed(a[b]) ~= speed then doChangeSpeed(a[b], - getCreatureSpeed(a[b])) doChangeSpeed(a[b], speed) end doTeleportThing(a[b], toPosition, true) end return true end local permited = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "w", ",", "'", '"', "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ".", "!", "@", "#", "$", "%", "&", "*", "(", ")", "-", "_", "+", "/", ";", ":", "?", "^", "~", "{", "[", "}", "]", ">", "<", "£", "¢", "¬"} function onTextEdit(cid, item, newText) if item.itemid == 12330 then if getPlayerStorageValue(cid, 99284) >= 1 then doPlayerSendCancel(cid, "Voce ja esta no "ar" -") return false end local channelName = getCreatureName(cid).."'s TV Channel" if string.len(newText) <= 0 then doPlayerSendCancel(cid, "Your channel is going to be shown as \""..getCreatureName(cid).."'s TV Channel\".") elseif string.len(newText) > 25 then doPlayerSendCancel(cid, "O nome de seu canal nao pode conter mais de 25 caracteres!") return false else channelName = newText end setPlayerStorageValue(cid, 99284, 1) setPlayerStorageValue(cid, 99285, "") setPlayerStorageValue(cid, 99285, channelName) doPlayerCreatePrivateChannel(cid, channelName) doSendAnimatedText(getThingPos(cid), "NO AR!", COLOR_GRASS) return false end return true end Agora va em pastadoseuot/data/creaturescripts e abra o Creaturescripts.xml e cole isso la: <!-- TV SYSTEM --> <event type="joinchannel" name="WatchTv" event="script" value="tvsys.lua"> <event type="leavechannel" name="StopWatchingTv" event="script" value="tvsys.lua"> <event type="walk" name="WalkTv" event="script" value="tvsys.lua"> <event type="textedit" name="RecordTv" event="script" value="tvsys.lua"> Agora crie um novo npc em pastadoseuot/data/npcs e ponha isso dentro dele: <!--?xml version="1.0" encoding="UTF-8"?--> <npc name="Frenzi " speed="0"> <health now="8150" max="8150"> <look type="614" head="94" body="94" legs="94" feet="94"> <parameters> </parameters> </look></health></npc> Agora va em pastadoseuot/data/lib e crie um novo arquivo .lua xamado: tvsystem.lua e cole isso la: function doPlayerWatchOther(cid, target) if not isCreature(cid) then return true end local hasOutfitCond = getCreatureCondition(cid, CONDITION_OUTFIT) and getCreatureOutfit(cid).lookType or -1 setPlayerStorageValue(cid, 99282, getCreatureSpeed(cid)) setPlayerStorageValue(cid, 99283, hasOutfitCond) setPlayerStorageValue(cid, 99285, target) doCreatureSetNick(cid, " ") local o = getCreatureOutfit(cid) local olddir = getCreatureLookDir(cid) local oldpos = getThingPos(cid) doTeleportThing(cid, getThingPos(target), false) doCreatureSetHideHealth(cid, true) doPlayerLock(cid) local dir = "data/npc/TVNPC.xml" local a = io.open(dir, "a+") local b = a:read("*all") a:close() local npcname = 'name="'..getCreatureName(cid)..' "' local npchealth = 'health now="'..getCreatureHealth(cid)..'" max="'..getCreatureMaxHealth(cid)..'"' local npcoutfit = 'look type="'..o.lookType..'" head="'..o.lookHead..'" body="'..o.lookBody..'" legs="'..o.lookLegs..'" feet="'..o.lookFeet..'"' b = string.gsub(b, 'name="(.-)"', npcname) b = string.gsub(b, 'health now="(.-)" max="(.-)"', npchealth) b = string.gsub(b, 'look type="(.-)" head="(.-)" body="(.-)" legs="(.-)" feet="(.-)"', npcoutfit) local c = io.open(dir, "w") c:write(b) c:close() o.lookType = 814 doCreatureSetOutfit(cid, o, -1) local n = doCreateNpc("TVNPC", oldpos) doCreatureSetLookDir(n, olddir) setPlayerStorageValue(n, 9891, getPlayerSex(cid)) doPlayerSetVocation(cid, 1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, getCreatureSpeed(target)) end function doPlayerStopWatching(cid) if not isCreature(cid) then return true end doPlayerUnlock(cid) doCreatureSetNick(cid, getCreatureName(cid)) local pos = {} local speed = getPlayerStorageValue(cid, 99282) local outfit = getPlayerStorageValue(cid, 99283) if outfit >= 1 then local newOutfit = getCreatureOutfit(cid) newOutfit.lookType = outfit doCreatureSetOutfit(cid, newOutfit, -1) else doCreatureRemoveCondition(cid, CONDITION_OUTFIT) end local npc = getCreatureByName(getCreatureName(cid).." ") local olddir = 0 if isCreature(npc) then olddir = getCreatureLookDir(npc) local pos = getThingPos(npc) doRemoveCreature(npc) doTeleportThing(cid, pos, false) end doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, speed) doCreatureSetHideHealth(cid, false) doCreatureSetLookDir(cid, olddir) doCreatureSetNick(cid, getCreatureName(cid)) setPlayerStorageValue(cid, 99285, -1) end function getWatchingPlayersFromPos(cid, pos) local ret = {} local cp = {} cp.x = pos.x cp.y = pos.y cp.z = pos.z for a = 0, 255 do cp.stackpos = a local b = getTileThingByPos(cp).uid if isCreature(b) and getCreatureOutfit(b).lookType == 814 and getPlayerStorageValue(b, 99285) == cid then table.insert(ret, b) end end return ret end Agora va em pastadoseuot/data/xml e abra o arquivoVocations.xml e mude o que esta la por isso: <!--?xml version="1.0" encoding="UTF-8"?--> <vocations> <vocation id="0" name="Pokemon Trainer" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="1" name="Pokemon Trainer" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="2" name="TV" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="3" name="PC" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="8" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <!-- <vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> --> </vocations> Agora va em pastadoseuot/data/actions/Actions.xml e cole isso la: -- TV / CAM <action itemid="11416-11418;11395-11398;11401-11404" event="script" value="television.lua"> <action itemid="12330" event="script" value="camera.lua"> Agora em pastadoseuot/data/actions/scripts crie um arquivo chamadotelevision.lua e outro chamado camera.lua e cole isso la: TELEVISION: function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 99284) == 1 then doPlayerSendCancel(cid, "Voce nao pode assistir TV pois voce esta com um canal aberto!") return true end local a = getThingPos(cid) if item.itemid >= 11416 and item.itemid <= 11418 then if a.y <= topos.y then doPlayerSendCancel(cid, "Porfavor fique na frente da televisao!") doPlayerSetVocation(cid, 1) return true end end if item.itemid == 11418 then if a.x < topos.x then doPlayerSendCancel(cid, "Porfavor fique na frente da televisao!") doPlayerSetVocation(cid, 1) return true end elseif item.itemid == 11416 then if a.x > topos.x then doPlayerSendCancel(cid, "Porfavor fique na frente da televisao!") doPlayerSetVocation(cid, 1) return true end end doPlayerSetVocation(cid, 2) if not checkChannelsList(cid) then doPlayerSendCancel(cid, "Nao há nenhum canal no ar neste momento!") doPlayerSetVocation(cid, 1) return true end if #getCreatureSummons(cid) >= 1 then doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect) end openChannelDialog(cid) return true end CAMERA: function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 99284) == 2 then doPlayerSendCancel(cid, "voce deve fechar todas suas converças privadas para abrir um "Novo Canal"") return true end if getPlayerStorageValue(cid, 99284) == 1 then doPlayerSendCancel(cid, "Voce ja esta no "ar"! No canal: "..getPlayerStorageValue(cid, 99285).."") return true end if not isPremium(cid) then doPlayerSendCancel(cid, "Somente players VIP podem usar a camera de Tv!") return true end doPlayerPopupFYI(cid, "Escolha o nome do canal:") end
Prontinho! ao fazer a tv cam e clickar nela aparecera uma janela escrita: "Escolha o nome do canal:" e la voce apertara OK e uma nova janela se abrirá, e nessa nova janela devera colocar o "Nome do canal"
players free's que tentarem usar aparecerá isso: Somente players VIP podem usar a camera de Tv!
Demais msgs: Voce ja esta no "ar"! No canal: "nome do canal escolhido" [aparecera quando tentar abrir 2 canais]
voce deve fechar todas suas converças privadas para abrir um "Novo Canal"[aparecera Quando estiver com a janela de converas privates e tentar abrir um canal de tv]
"Porfavor fique na frente da televisao!" [aparecera quando tentar assistir tv de longe]
"Voce nao pode assistir TV pois voce esta com um canal aberto!" [aparecera quando tentar assistir tv com um canal aberto]
"Nao há nenhum canal no ar neste momento!" [aparecera quando tentar assistir TV e nao houver nenhum canal disponivel]
Storages Usados:
99282
99283
99284
Créditos:
Brun123 [Por disponibilizar o system em seu servidor "demo version"]
Brunoo Angel [deu uma traduzida/modificada no script]
MasterCraft [Ajudou o Brun123 com o servidor "demo version"]
-
Alberess recebeu reputação de ManoTobira em [ACTION] Upgrade Systemeae pessoal vim trazer esse script pro Tibia king e nao sei se voces vao gosta mais nao custa nada tenta agrada
um sistema de refinamento usado em muitos ots,porém esse coloquei umas modificações e passei para portugês.
Vamos lah...
primeiro abra o bloco de notas e cole isso:
e pronto seu script esta feito!!!
mudanças:
* Script atualizado para português
* diminuido a chance de sucesso do upgrade(se nao todos no ot vai ter os itens fortes)
* almentado os pontos que ganha quando o upgrade tem sucesso
* almentado os pontos que perde quando o upgrade falha
* em maxlvl = 10 , coloque qualquer numero que voce quizer
espero que vocês gostem do novo script
créditos 98% para Mock
2 % para min pelas mudanças.
atualizado
e antes de posta aki pedi permissao do Mock
__________________________________________
Nao custa nada da +REP xD
-
Alberess recebeu reputação de izaias.araujo em [Mod] Capture The Flag(Ctf)ricardo3 voce cometeu double post pra que isso ja foi duas vezes =/
Owner = 1900 -- Aki e a storage do proprietario
FLAG2_INn = 4000 --a storage da bandeira numero dois na pousada
FLAG_IN = 4001 -- a storage da primeira bandeira na pousada
TEAM1_FLAGS = 3030 -- storage do time com a bandeira
TEAM2_FLAGS = 3031 -- storage do outro time com a bandeira
Event_Start = 3032 -- storage de quando o evento começa
Event_timeend = 3033 --storage de quando acaba o evento
Event_Tile_Close = 3039 -- a storage do piso
joined = 2023 --essa storage eu nao sei
Timer = 1010 --tambem nao sei
_____________________________________________________________________________
-
Alberess deu reputação a Latoy em Pet por talkaction -scriptfunction onSay(cid, words, param) local pet = { ["Orc"] = {10, 20}, ["Dragon"] = {30,40}, ["Cyclops"] = {50,500000} } local a = getCreatureSummons(cid) for k,v in pairs(pet) do if getPlayerLevel(cid) >= v[1] and getPlayerLevel(cid) <= v[2] then if (table.maxn(a) < 1)then x = doSummonCreature(k, getThingPos(cid)) doConvinceCreature(cid,x) doCreatureSay(cid,"Help my "..k.." pet",TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2) elseif words == "!removepet" then doCreatureSay(cid,"Thanks my "..getCreatureName(a[1]).." pet",TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 2) doRemoveCreature(a[1]) else doPlayerSendCancel(cid,"you have pet summoned") return TRUE end end end end <talkaction words="!pet;!removepet" script="nome arquivo.lua"/>
-
Alberess deu reputação a EddyHavoc em [PEDIDO] Comando que compra vipRESPOSTA NESTE Tópico:
Perfect VIP System 2.2
-
Alberess deu reputação a Skyforever em [PEDIDO] Comando que compra vipLembrando o storage da vip e 13700 entao o storage no script do movements devera ser 13700 tbm
SE AJUDE REP+
-
Alberess deu reputação a Skyforever em [PEDIDO] Sistema de noticiaBom esta ai
va em /data/talkactions/scripts cria um arquivo com nome de sua escolha e adcione isso dentro:
e em talkactions.xml adciona essa linha
<talkaction words="!noticias" script="nomedoscript.lua"/>
agora na primeira pasta do seu servidor aonde fica o executavel crie um documento de texto e renomeie pra noticias e coloque as noticias la
-
Alberess deu reputação a Kimoszin em Criminal SystemBom pessoal, mais um script para vocês.
- Qual o motivo desse nome?
Não sei, estou meio sem ideias.
- Oque tem nesse sistema?
Bom, ele da o direito dos players do seu OTServer, serem ladrôes ou policiais,
Tambem tem uma cadeia, para aonde os criminosos vão para.
- Nossa, para oque ele serve?
Para seu servidor ficar com mais diversão,
Creio que ele seja meio inutil.
Vamos começar. !
Crie um arquivo .lua chamado Policial em \data\actions\scripts
function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { minreward = 500, -- Minimo que o policial ira ganhar. maxreward = 2000, -- Maximo que o policial ira ganhar storage = 5569, -- Uma storage qualquer color = math.random(1, 255), prisonPos = {x=1014, y=1034, z=7}, -- Para aonde sera teleportado o ladrão. storagePreso = 5570, -- Uma storage qualquer time = 60, -- Tempo que o ladrão vai ficar preso } local player = getSpectators(getCreaturePosition(cid), 7, 5) local money = math.random(config.minreward, config.maxreward) if player and #player > 0 then for t, pid in pairs(player) do if isPlayer(pid) and pid ~= cid then if getPlayerStorageValue(pid, config.storage) == 1 then setPlayerStorageValue(pid, storagePreso, os.time()+config.time) doTeleportThing(pid, config.prisonPos) doPlayerAddMoney(cid, money) doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "Você acaba de ser preso, por cometer delitos.") doSendAnimatedText(getCreaturePosition(cid), "+"..money.."", config.color) else doPlayerSendCancel(cid, "Esse player nao cometeu delitos.") end end end end return TRUE end Crie um arquivo .lua chamado Ladrao em \data\actions\scripts function onUse(cid, item, itemEx) local config = { minMoneyRemove = 30, -- Minimo que o ladrão ira ganhar maxMoneyRemove = 1400, -- Maximo que o ladrão ira ganhar storage = 5569, -- Uma storage qualquer color = math.random(1, 255), } local player = getSpectators(getCreaturePosition(cid), 7, 5) local money = math.random(config.minMoneyRemove, config.maxMoneyRemove) if player and #player > 0 then for t, pid in pairs(player) do if isPlayer(pid) and pid ~= cid then if doPlayerRemoveMoney(pid, money) then setPlayerStorageValue(cid, config.storage, 1) doPlayerAddMoney(cid, money) doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "Você acaba de ser roubado e perdeu "..money.." gps.") doSendAnimatedText(getCreaturePosition(cid), "+"..money.."", config.color) else doPlayerSendCancel(cid, "O player nao possui "..money.." gps.") end end end end return TRUE end Crie um arquivo .lua chamado Cadeia em \data\actions\scripts function onUse(cid,item) local config = { storagePreso = 5570, -- Uma storage qualquer toPos = {x=1016, y=1022, z=7}, -- Para aonde o player irá quando o tempo acabar } timePreso = getPlayerStorageValue(cid, config.storage) - os.time() if getPlayerStorageValue(cid, config.storagePreso) == -1 then doPlayerSendCancel(cid, "Você nao está preso.") else if timePreso <= 0 then setPlayerStorageValue(cid, config.storagePreso, -1) doTeleportThing(cid, config.toPos) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Espero que você pense bem agora, antes de cometer algum delito") else doPlayerSendCancel(cid, "Você ainda tem que esperar "..timePreso.." segundos, para ser solto.") end return TRUE end end Agora adicione os seguinte codigos em \data\actions\actions.xml <action actionid="1256" event="script" value="Cadeia.lua"/> <action itemid="2556" event="script" value="Policial.lua"/> <action itemid="10153" event="script" value="Ladrao.lua"/>
Adicione a ACTION ID na porta da cadeia, Depois edite os nomes dos items.
Para editar basta ir em \data\items\items.xml use a imaginação.
Até mais.
-
Alberess deu reputação a Guilherme. em Interactive Training MonkIsso aqui vai deixar o Training Monk um pouquinho mais 'interativo' ! Ele vai te falar uma estimativa de quanto dano você está causando por segundo.
Adicione isso em creaturescripts.xml
<event type="statschange" name="DPScounter" event="script" value="dpscounter.lua"/> Agora crie um arquivo .lua na pasta creaturescripts com o nome de dpscounter.lua e adicione isso local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_SUBID, 82936) setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000) function getDamageDone(cid, targetpos) targetpos.x = targetpos.x - 1 if(isPlayer(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Average DPS: ".. getPlayerStorageValue(cid, 82936) / 10 .."") doCreatureSay(cid, "You are currently dealing an average of ".. getPlayerStorageValue(cid, 82936) / 10 .." damage per second.", TALKTYPE_ORANGE_1, false, 0, targetpos) return setPlayerStorageValue(cid, 82936, 0) end return true end function onStatsChange(cid, attacker, type, combat, value) if(type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) then if(not isPlayer(attacker)) then return true end setPlayerStorageValue(attacker, 82936, getPlayerStorageValue(attacker, 82936) + value) if(getCreatureCondition(attacker, CONDITION_EXHAUST, 82936) == false) then setPlayerStorageValue(attacker, 82936, 0) addEvent(getDamageDone, 9900, attacker, getCreaturePosition(cid)) doAddCondition(attacker, exhaust) end end return true end E por último, modifique seu Training Monk, que normalmente fica na pasta monsters <?xml version="1.0" encoding="UTF-8"?> <monster name="Training Monk" nameDescription="a training monk" race="blood" experience="0" speed="210" manacost="0"> <health now="99000" max="99000"/> <look type="57" corpse="3128"/> <targetchange interval="60000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag staticattack="50"/> <flag lightlevel="0"/> <flag lightcolor="0"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <script> <event name="DPScounter"/> </script> <attacks> <attack name="melee" interval="5000" min="0" max="-1"/> </attacks> <defenses armor="0" defense="0"> <defense name="healing" interval="10000" chance="100" min="24000" max="24000"/> </defenses> </monster>
Créditos ao Shawn por todo o script
-
Alberess deu reputação a 1215171 em [PEDIDO] Cartao de credito ou de debito xDlocal 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 local ITEM = aki vc coloca o id do item if(msgcontains(msg, 'bank') or msgcontains(msg, 'help')) then selfSay('Ola amigo oque deseja fazer? {deposit} ou {depositar} para depositar, {withdraw} ou {sacar} para sacar dinheiro ou {balance} para ver seu saldo!', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'balance') or msgcontains(msg, 'BALANCE') and talkState[talkUser] == 1 then local balance = getPlayerBalance(cid) selfSay('Voce possui ' .. balance .. ' gps no banco', cid) elseif msgcontains(msg, 'deposit') or msgcontains(msg, 'depositar') and talkState[talkUser] == 1 then selfSay('Digite o valor que voce deseja depositar.', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then n = getNumber(msg) if(msg == 'all' and doPlayerDepositAllMoney(cid)) then selfSay('Depositado com sucesso!', cid) talkState[talkUser] = 1 end if n <= 0 then selfSay('escolha um valor acima de 0!', cid) talkState[talkUser] = 1 end if(msgcontains(msg, 'withdraw') or msgcontains(msg, 'sacar')) then local withdraw = if (getPlayerItemCount(cid, ITEM) ~= 1) then local sacar = if (getPlayerItemCount(cid, ITEM) ~= 1) then selfSay('Você não tem o cartão de debito para retirar dinheiro!', cid) talkState[talkUser] = 1 end end end if n and doPlayerDepositMoney(cid, n) then selfSay('Depositado com sucesso!', cid) talkState[talkUser] = 1 else selfSay('Voce nao tem o valor informado', cid) talkState[talkUser] = 1 end elseif msgcontains(msg, 'withdraw') or msgcontains(msg, 'sacar') and talkState[talkUser] == 1 then selfSay('Digite o valor que voce deseja retirar.', cid) talkState[talkUser] = 3 elseif talkState[talkUser] == 3 then n = getNumber(msg) local balance = getPlayerBalance(cid) if(msg == 'all' and doPlayerWithdrawAllMoney(cid)) then selfSay('Retirado ' .. balance .. ' gps da sua conta!', cid) talkState[talkUser] = 1 end if (n ~= 0 and doPlayerWithdrawMoney(cid, n)) then selfSay('Retirado ' .. n .. ' gps da sua conta!', cid) talkState[talkUser] = 1 else selfSay('Voce nao pode retirar esse valor!', cid) talkState[talkUser] = 1 end elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) function getNumber(txt) x = string.gsub(txt,"%a","") x = tonumber(x) if x ~= nill and x > 0 then return x else return 0 end end
tive q postar novamente pq o post tava bugado
-
Alberess deu reputação a 1215171 em [PEDIDO] Cartao de credito ou de debito xD<p>o npc vou por em code sem spolier então e pra vc deposita grana na conta do player vc vai no npc hi transfer ou transferir e dps digita a quantia e dis yes
<strong>
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
-
Alberess deu reputação a Garou em [Resolvido] [DUVIDA] Como faço pro meu ot aluga casas?Olá, Alberess
Basta a configuração de alguns parâmetros no arquivo config.lua:
houseRentAsPrice = true -- O preço das casas deve ser o aluguel? housePriceAsRent = false -- O preço do aluguel deve ser o preço da casa? housePriceEachSquare = 1000 -- Preço por cada sqm da casa houseRentPeriod = "monthly" -- Período de cobrança do aluguel. No exemplo acima, configurei para o jogador pagar o preço de aluguel para comprar a casa e o período de aluguel como "monthly", ou seja, um período mensal. Os valores para o parâmetro houseRentPeriod são: houseRentPeriod Values: yearly, monthly, weekly, daily, never -- Anual, Mensal, Semanal, Diário, Nunca
Lembrando que o aluguel deve ser configurado diretamente no mapa.
Abraços
-
Alberess deu reputação a Adriano SwaTT em Anél de Experiência' [Exp Ring]Sim, eu creio que seja isso que explicou...
Só não entendi o "return doPlayerSetRate(cid, SKILL__LEVEL, value)"...
Nem manjo de Script, estou começando agora (meio que sem querer)
eiahieuha
Abraços & valeu por comentar'
-
Alberess deu reputação a Kimoszin em [Resolvido] [DUVIDA] Eu nao consigo arrumar o Name changer do jeito que quero- Creditos a Won Helder, apocarai, MatheusMkalo function onSay(cid, words, param) local maxLen = 15 -- tamanho maximo do [color=red][size=4]no[/size][/color]me local proibido = {"!","@","*"} -- simbolos proibidos for i = 1, #proibido do if string.find(tostring(param), proibido[i]) then doPlayerSendCancel(cid,"Não pode usar símbolos em seu [color=red][size=4]no[/size][/color]me.") return TRUE end end if tostring(param) == "" then -- checkar se não é [color=red][size=4]no[/size][/color]me vazio doPlayerSendCancel(cid, "Você deve informar um [color=red][size=4]no[/size][/color]me.") return TRUE end if string.len(tostring(param)) > maxLen then doPlayerSendCancel(cid, "Você pode usar [color=red][size=4]no[/size][/color] máximo " .. maxLen .. " letras.") return TRUE end if [color=red][size=4]no[/size][/color]t getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendCancel(cid,"So pode ser usado em pz.") return TRUE end db.executeQuery("UPDATE `players` SET `name` = '"..param.."' WHERE `id` = "..getPlayerGUID(cid)..";") doPlayerSendTextMessage(cid,25,"Você será kickado em 5 segundos.") addEvent(doRemoveCreature, 5*1000, cid, true) end return TRUE end <talkaction words="/name" event="script" value="namechange.lua" access="5" />
O acesso pode ser 5 ou 6.
-
Alberess recebeu reputação de Augusto em [8.54] Tv / Cam SystemOlá galera do Tibia King, baixei o servidor de nosso "querido" [eauheauea -brinkz] brun123 e separei em alguns systems, aqui vai um:
[Postei nessa area pois fikei confuso em qual postar, pois o script envolve creaturescripts/npcs/actions/etc...]
Primeiro Passo:
va em pastadoseuot/data/creaturescripts/scripts e crie um arquivo .lua xamado: tvsys.lua e cole isso dentro:
function onJoinChannel(cid, channelId, users, isTv) if channelId == 10 then doShowPokemonStatistics(cid) return false end if channelId == 11 then doPlayerPopupFYI(cid, getHighscoreString(8)) return false end if channelId == 12 then doPlayerPopupFYI(cid, getHighscoreString(6)) return false end if channelId >= 100 and channelId <= 10000 then local owner = getPlayerByGUID(getChannelOwner(channelId)) if isChannelTv(channelId) then if isCreature(owner) then if owner ~= cid then doPlayerWatchOther(cid, owner) local plural = #users == 2 and "" or "s" doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is now watching your channel (currently '..#users - (1)..' player'..plural..' watching this channel).', 15, channelId) else setPlayerStorageValue(cid, 99284, 1) end end elseif owner == cid then setPlayerStorageValue(cid, 99284, 2) end return true end return true end function onLeaveChannel(cid, channelId, users) if channelId >= 100 and channelId <= 10000 then local owner = getPlayerByGUID(getChannelOwner(channelId)) if isChannelTv(channelId) then if owner ~= cid and getCreatureOutfit(cid).lookType == 814 then doPlayerStopWatching(cid) local plural = #users == 2 and "" or "s" doPlayerSendChannelMessage(owner, "TV Channel", getCreatureName(cid)..' is not watching your channel anymore (currently '..#users - (1)..' player'..plural..' watching this channel).', 15, channelId) elseif owner == cid then setPlayerStorageValue(cid, 99284, -1) doSendAnimatedText(getThingPos(cid), "CAM OFF", 180) for stops = 1, #users do if users[stops] ~= owner then doPlayerStopWatching(users[stops]) end end end elseif owner == cid then setPlayerStorageValue(cid, 99284, -1) end return true end return true end function onWalk(cid, fromPosition, toPosition) if getPlayerStorageValue(cid, 99284) <= 0 then return true end local speed = getCreatureSpeed(cid) local a = getWatchingPlayersFromPos(cid, fromPosition) for b = 1, #a do if getCreatureSpeed(a[b]) ~= speed then doChangeSpeed(a[b], - getCreatureSpeed(a[b])) doChangeSpeed(a[b], speed) end doTeleportThing(a[b], toPosition, true) end return true end local permited = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "w", ",", "'", '"', "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ".", "!", "@", "#", "$", "%", "&", "*", "(", ")", "-", "_", "+", "/", ";", ":", "?", "^", "~", "{", "[", "}", "]", ">", "<", "£", "¢", "¬"} function onTextEdit(cid, item, newText) if item.itemid == 12330 then if getPlayerStorageValue(cid, 99284) >= 1 then doPlayerSendCancel(cid, "Voce ja esta no "ar" -") return false end local channelName = getCreatureName(cid).."'s TV Channel" if string.len(newText) <= 0 then doPlayerSendCancel(cid, "Your channel is going to be shown as \""..getCreatureName(cid).."'s TV Channel\".") elseif string.len(newText) > 25 then doPlayerSendCancel(cid, "O nome de seu canal nao pode conter mais de 25 caracteres!") return false else channelName = newText end setPlayerStorageValue(cid, 99284, 1) setPlayerStorageValue(cid, 99285, "") setPlayerStorageValue(cid, 99285, channelName) doPlayerCreatePrivateChannel(cid, channelName) doSendAnimatedText(getThingPos(cid), "NO AR!", COLOR_GRASS) return false end return true end Agora va em pastadoseuot/data/creaturescripts e abra o Creaturescripts.xml e cole isso la: <!-- TV SYSTEM --> <event type="joinchannel" name="WatchTv" event="script" value="tvsys.lua"> <event type="leavechannel" name="StopWatchingTv" event="script" value="tvsys.lua"> <event type="walk" name="WalkTv" event="script" value="tvsys.lua"> <event type="textedit" name="RecordTv" event="script" value="tvsys.lua"> Agora crie um novo npc em pastadoseuot/data/npcs e ponha isso dentro dele: <!--?xml version="1.0" encoding="UTF-8"?--> <npc name="Frenzi " speed="0"> <health now="8150" max="8150"> <look type="614" head="94" body="94" legs="94" feet="94"> <parameters> </parameters> </look></health></npc> Agora va em pastadoseuot/data/lib e crie um novo arquivo .lua xamado: tvsystem.lua e cole isso la: function doPlayerWatchOther(cid, target) if not isCreature(cid) then return true end local hasOutfitCond = getCreatureCondition(cid, CONDITION_OUTFIT) and getCreatureOutfit(cid).lookType or -1 setPlayerStorageValue(cid, 99282, getCreatureSpeed(cid)) setPlayerStorageValue(cid, 99283, hasOutfitCond) setPlayerStorageValue(cid, 99285, target) doCreatureSetNick(cid, " ") local o = getCreatureOutfit(cid) local olddir = getCreatureLookDir(cid) local oldpos = getThingPos(cid) doTeleportThing(cid, getThingPos(target), false) doCreatureSetHideHealth(cid, true) doPlayerLock(cid) local dir = "data/npc/TVNPC.xml" local a = io.open(dir, "a+") local b = a:read("*all") a:close() local npcname = 'name="'..getCreatureName(cid)..' "' local npchealth = 'health now="'..getCreatureHealth(cid)..'" max="'..getCreatureMaxHealth(cid)..'"' local npcoutfit = 'look type="'..o.lookType..'" head="'..o.lookHead..'" body="'..o.lookBody..'" legs="'..o.lookLegs..'" feet="'..o.lookFeet..'"' b = string.gsub(b, 'name="(.-)"', npcname) b = string.gsub(b, 'health now="(.-)" max="(.-)"', npchealth) b = string.gsub(b, 'look type="(.-)" head="(.-)" body="(.-)" legs="(.-)" feet="(.-)"', npcoutfit) local c = io.open(dir, "w") c:write(b) c:close() o.lookType = 814 doCreatureSetOutfit(cid, o, -1) local n = doCreateNpc("TVNPC", oldpos) doCreatureSetLookDir(n, olddir) setPlayerStorageValue(n, 9891, getPlayerSex(cid)) doPlayerSetVocation(cid, 1) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, getCreatureSpeed(target)) end function doPlayerStopWatching(cid) if not isCreature(cid) then return true end doPlayerUnlock(cid) doCreatureSetNick(cid, getCreatureName(cid)) local pos = {} local speed = getPlayerStorageValue(cid, 99282) local outfit = getPlayerStorageValue(cid, 99283) if outfit >= 1 then local newOutfit = getCreatureOutfit(cid) newOutfit.lookType = outfit doCreatureSetOutfit(cid, newOutfit, -1) else doCreatureRemoveCondition(cid, CONDITION_OUTFIT) end local npc = getCreatureByName(getCreatureName(cid).." ") local olddir = 0 if isCreature(npc) then olddir = getCreatureLookDir(npc) local pos = getThingPos(npc) doRemoveCreature(npc) doTeleportThing(cid, pos, false) end doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, speed) doCreatureSetHideHealth(cid, false) doCreatureSetLookDir(cid, olddir) doCreatureSetNick(cid, getCreatureName(cid)) setPlayerStorageValue(cid, 99285, -1) end function getWatchingPlayersFromPos(cid, pos) local ret = {} local cp = {} cp.x = pos.x cp.y = pos.y cp.z = pos.z for a = 0, 255 do cp.stackpos = a local b = getTileThingByPos(cp).uid if isCreature(b) and getCreatureOutfit(b).lookType == 814 and getPlayerStorageValue(b, 99285) == cid then table.insert(ret, b) end end return ret end Agora va em pastadoseuot/data/xml e abra o arquivoVocations.xml e mude o que esta la por isso: <!--?xml version="1.0" encoding="UTF-8"?--> <vocations> <vocation id="0" name="Pokemon Trainer" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="1" name="Pokemon Trainer" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="2" name="TV" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="3" name="PC" description="a pokemon trainer" needpremium="0" gaincap="0" gainhp="40" gainmana="0" gainhpticks="0" gainhpamount="0" gainmanaticks="0" gainmanaamount="0" manamultiplier="1.1" attackspeed="-1" soulmax="251" gainsoulticks="-1" fromvoc="1" lessloss="0"> <formula meleedamage="0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="0" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="4"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="30"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"> </skill></formula></vocation> <vocation id="8" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="6" gainhpamount="5" gainmanaticks="3" gainmanaamount="5" manamultiplier="1.1" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="2"> <formula meleedamage="1.0" distdamage="1.0" wanddamage="1.0" magdamage="1.0" maghealingdamage="1.0" defense="1.0" magdefense="1.0" armor="1.0"> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"> </skill></formula></vocation> <!-- <vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="10" manamultiplier="1.1" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/> </vocation> <vocation id="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="10" gainmanaticks="3" gainmanaamount="10" manamultiplier="1.4" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> <vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="10" gainmanaticks="4" gainmanaamount="10" manamultiplier="3.0" attackspeed="2000" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="50"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> --> </vocations> Agora va em pastadoseuot/data/actions/Actions.xml e cole isso la: -- TV / CAM <action itemid="11416-11418;11395-11398;11401-11404" event="script" value="television.lua"> <action itemid="12330" event="script" value="camera.lua"> Agora em pastadoseuot/data/actions/scripts crie um arquivo chamadotelevision.lua e outro chamado camera.lua e cole isso la: TELEVISION: function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 99284) == 1 then doPlayerSendCancel(cid, "Voce nao pode assistir TV pois voce esta com um canal aberto!") return true end local a = getThingPos(cid) if item.itemid >= 11416 and item.itemid <= 11418 then if a.y <= topos.y then doPlayerSendCancel(cid, "Porfavor fique na frente da televisao!") doPlayerSetVocation(cid, 1) return true end end if item.itemid == 11418 then if a.x < topos.x then doPlayerSendCancel(cid, "Porfavor fique na frente da televisao!") doPlayerSetVocation(cid, 1) return true end elseif item.itemid == 11416 then if a.x > topos.x then doPlayerSendCancel(cid, "Porfavor fique na frente da televisao!") doPlayerSetVocation(cid, 1) return true end end doPlayerSetVocation(cid, 2) if not checkChannelsList(cid) then doPlayerSendCancel(cid, "Nao há nenhum canal no ar neste momento!") doPlayerSetVocation(cid, 1) return true end if #getCreatureSummons(cid) >= 1 then doReturnPokemon(cid, getCreatureSummons(cid)[1], getPlayerSlotItem(cid, 8), pokeballs[getPokeballType(getPlayerSlotItem(cid, 8).itemid)].effect) end openChannelDialog(cid) return true end CAMERA: function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 99284) == 2 then doPlayerSendCancel(cid, "voce deve fechar todas suas converças privadas para abrir um "Novo Canal"") return true end if getPlayerStorageValue(cid, 99284) == 1 then doPlayerSendCancel(cid, "Voce ja esta no "ar"! No canal: "..getPlayerStorageValue(cid, 99285).."") return true end if not isPremium(cid) then doPlayerSendCancel(cid, "Somente players VIP podem usar a camera de Tv!") return true end doPlayerPopupFYI(cid, "Escolha o nome do canal:") end
Prontinho! ao fazer a tv cam e clickar nela aparecera uma janela escrita: "Escolha o nome do canal:" e la voce apertara OK e uma nova janela se abrirá, e nessa nova janela devera colocar o "Nome do canal"
players free's que tentarem usar aparecerá isso: Somente players VIP podem usar a camera de Tv!
Demais msgs: Voce ja esta no "ar"! No canal: "nome do canal escolhido" [aparecera quando tentar abrir 2 canais]
voce deve fechar todas suas converças privadas para abrir um "Novo Canal"[aparecera Quando estiver com a janela de converas privates e tentar abrir um canal de tv]
"Porfavor fique na frente da televisao!" [aparecera quando tentar assistir tv de longe]
"Voce nao pode assistir TV pois voce esta com um canal aberto!" [aparecera quando tentar assistir tv com um canal aberto]
"Nao há nenhum canal no ar neste momento!" [aparecera quando tentar assistir TV e nao houver nenhum canal disponivel]
Storages Usados:
99282
99283
99284
Créditos:
Brun123 [Por disponibilizar o system em seu servidor "demo version"]
Brunoo Angel [deu uma traduzida/modificada no script]
MasterCraft [Ajudou o Brun123 com o servidor "demo version"]
-
Alberess deu reputação a Adriano SwaTT em Anél de Experiência' [Exp Ring]Eu tentei achar aqui no TibiaKing o Anél de Experiência (Ring of Experience ou Exp Ring), e só achei um tutorial, mas está meio imcompleto e confuso...
No entanto decidi postar este que criei há alguns meses.
Como o nome diz, é um anél que aumenta a experiência de sua caçada' (configurável)
\o/
Vamos lá...
1º Passo
Se quer um Anel de Experiencia Recarregável (como soft boots), clique no Spoiler abaixo.
Configurações do NPC:
Recolhe: "broken experience ring"
Custo: "50k"
Devolte: "Brand-New Experience Ring"
5º Passo
É, acho que é isso...
Qualquer coisa postem aqui para resolvermos juntos.
Eu editei o Script, criei o NPC e criei o Tutorial.
Créditos pelo tutorial: AdrianoSwaTT
Créditos pelo Exp Ring Stages: Vodkart
Créditos pelo Script: OTLand
Abraços, espero que seja útil'
-
Alberess deu reputação a Adriano SwaTT em [PEDIDO] Tibia.dat ou uma spellQual Dat Editor estás a usar?
Se for o que abre esta janela na hora de selecionar os arquivos "Tibia.dat" e "Tibia.spr"...
Faça assim, selecione os arquivos referentes e ao invés de deixar selecionado o "780" (como mostra na imagem acima), você seleciona a versão 760'
Explicação:
A opção 760: É para editar Tibia.dat de versões 8.60 para cima.
A opção 780: É para editar Tibia.dat de versões abaixo de 8.5x.
Espero ter ajudado...
Abraços & boa sorte.
-
Alberess deu reputação a Skydangerous em [Programação] Magias Requerindo SkillTutorial: Soltando magia se tiver tanto de skill.
Nivél: Expert Avançado.
Esse sistema é perfeito para quem gosta de Dragon Ball, Naruto, Bleach e etc. Aplicação após a implementação do sistema na spells.xml: instant name="XXX" words="xxxx" clubpoints="XX" lvl="XX" mana="XX" aggressive=XX" selftarget="XX" exhaustion="XXX" event="script" value="XXX.lua"/> 1) Procure por player.cpp case RET_TILEISFULL: sendCancel("You cannot add more items on this tile."); break; e cola em cima do código case RET_NOTENOUGHSKILL: sendCancel("You do not have enough club fighting."); break; 2) Declare na linha (o qual será vericado) no spells.xml Procure por spells.cpp if(readXMLInteger(p, "maglv", intValue) || readXMLInteger(p, "magiclevel", intValue)) magLevel = intValue; e cola em cima do código if(readXMLInteger(p, "club", intValue) || readXMLInteger(p, "clubpoints", intValue)) clubpoints = intValue; 3) Adiciona na função principal Procure novamente spells.cpp if((int32_t)player->getMagicLevel() < magLevel) { player->sendCancelMessage(RET_NOTENOUGHMAGICLEVEL); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); return false; } e cola em cima if((int32_t)player->getSkill(SKILL_CLUB, SKILL_LEVEL) < clubpoints) { player->sendCancelMessage(RET_NOTENOUGHSKILL); g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF); return false; } 4) Procure spells.h Procure essa linha int32_t getMagicLevel() const {return magLevel;} cola em cima uint32_t getSkill() const {return clubpoints;} Procure novamente essa linha int32_t magLevel; cola em cima int32_t clubpoints; 5) Procure things.h E procure essa linha RET_TILEISFULL = 64, e cola em cima RET_NOTENOUGHTRAINPOINTS = 65 Para Configurar: Formula do spells: (ex. level*2 + clubpoints*2) Créditos SkyDangerous Fresh
-
Alberess deu reputação a Adriano SwaTT em [Resolvido] [DUVIDA] Tem como fazer a arma so pode usar uma vocaçao ?Tem sim'
Em movements.xml' adicione esta tag'
<movevent type="DeEquip" itemid="5410" slot="shield" event="function" value="onDeEquipItem"/> <movevent type="Equip" itemid="5410" slot="shield" event="function" value="onEquipItem"> <vocation id="8" showInDescription="1"/> </movevent>
Lembrando, mude o Vocation id="8", onde está o 8 (em vermelho) para o ID da vocação que queira que use o item'
@@EDIT'
Para os demais que quiserem aproveitar o tópico...
Lembre-se de mudar também o "itemid="5410" para a ID do item que deseja receber essa função'
Abraços'
-
Alberess deu reputação a itroxz em [AJUDA] Preciso dos ids dos itens que parecem wandsAlgumas que Achei
2163: Magic Lightwand
7424: Lunar Staff
7410: Queen's Sceptre
2453: Arcane Staff
7429: Blessed Sceptre
7379: Brutetamer's Staff
----------
Existe outras apenas vou colocar os nomes:
Enchanted Staff
Dragonbone Staff
Banana Staff
Lich Staff
Amber Staff
Se lhe te ajudei Rep+
-
Alberess deu reputação a GuuhTorres em [Resolvido] [AJUDA] meu rme nao importa nadaBaixa a nova versão do remere.
Clique Aqui para entrar diretamente no site do remere, na pagina de downloads...
Baixa o 2.1
-
Alberess deu reputação a Vivi em (Resolvido) [PEDIDO] Sprites do motoqueiro fantasmaBom tem fórum que posto a outfit: http://74.54.222.7/showthread.php?t=247333&langid=2
Não são de minha autoria e espero que ajude
-
Alberess deu reputação a Adriano SwaTT em [DUVIDA] Como faço pro corpo do jogador sair rapido?A Sprite não vai alterar em nada na função do Item... só a imagem'
Ou seja, pode mudar a Sprite do corpse que funcionará normalmente...
Mas você tem que saber qual é a Sprite exata do corpse para não mudar errada por ter vários tipos.
Abraços' & valeu pelo REP+'
-
Alberess deu reputação a Adriano SwaTT em [DUVIDA] Como faço pro corpo do jogador sair rapido?É só você pegar a ID do Corpse de um Player, abrir o arquivo "items.xml" (localizado em "Data / Items / Items.xml")...
Procure pela ID do corpse e edite seu tempo como está sendo explicado abaixo...
O que está em vermelho é o tempo que leva para o corpse transformar no item ID que está em azul (no caso, para dar o efeito de apodrescendo)'
<item id="2940" article="a" name="dead human">
<attribute key="weight" value="4000" />
<attribute key="containerSize" value="10" />
<attribute key="decayTo" value="2941" />
<attribute key="duration" value="400" />
<attribute key="corpseType" value="blood" />
<attribute key="fluidSource" value="blood" />
</item>
Dependendo do que pretende fazer... pode por o "value" de "decayTo" que está "2941", você pode por o valor numérico "0" (zero)...
Ou seja, o corpse sumirá depois do tempo programado'
Obs: Vale lembrar que a ID dos items de seu OTServ pode variar, aqui foi usado apenas um exemplo'
Obs²: Mals não conseguir organizar melhor a resposta, mas é que o sistema de "QUOTE" está bugado'
Abraços, espero que funcione.
Poste o resultado'