![](https://xtibia.com/forum/uploads/set_resources_46/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://xtibia.com/forum/uploads/set_resources_46/84c1e40ea0e759e3f1505eb1788ddf3c_default_photo.png)
Mulizeu
Barão-
Total de itens
218 -
Registro em
-
Última visita
-
Dias Ganhos
4
Tudo que Mulizeu postou
-
Que param Caotic?? nao esta faltando param algum! Ta arrumado! function onSay(cid, words, param) if doPlayerRemoveItem(cid,2157,35) then local items = {11393,2505,2507,2358,8909,10719,7405,7433,7450,12288,2111,10047,8868,11349,12608} for _, x in pairs(items) do doPlayerAddItem(cid, x, 1) end doPlayerSendTextMessage(cid,27,"Parabens Voce Comprous Os Itens") end doPlayerSendCancel(cid,"Desculpe Voce Nao Tem 35 Gold Nugget") end n arrumei antes pq tava fora, agr ta ai bom uso e qualquer defeito poste
-
Pronto! function onUse(cid, item, item2,item3, frompos, topos, pos) local config = { ["Magic Plate Armor"] = {t1=2476,t2=2464,t3=2472,t4=2492}, ["Dragon Scale Mail"] = {t1=2489,t2=2487,t3=2468,t4=2493} } local r1 = {x = 722, y = 1014, z = 7, stackpos= 2} -- Posição 1 ( NÃO MEXA NO stackpos= 2 ) local r2 = {x = 724, y = 1014, z = 7, stackpos= 2} -- Posição 2 ( NÃO MEXA NO stackpos= 2 ) local r3 = {x = 723, y = 1013, z = 7, stackpos= 2} -- Posição 3 ( NÃO MEXA NO stackpos= 2 ) local r4 = {x = 723, y = 1014, z = 7} -- Posição do Item a Ser Criado local q1 = getThingfromPos(r1) local q2 = getThingfromPos(r2) local q3 = getThingfromPos(r3) for i, x in pairs(config) do if (q1.itemid == x.t1 and q2.itemid == x.t2 and q3.itemid == x.t3) then doRemoveItem(q1.uid, 1) doRemoveItem(q2.uid, 1) doRemoveItem(q3.uid, 1) addEvent(doCreateItem, 1000, x.t4, 1, r4) doSendMagicEffect(r4, 47) addEvent(doSendMagicEffect, 900, r3, 39) doPlayerSendTextMessage(cid, 22, "Parabéns, Você Forjou Um " .. i .. ".") break end end return TRUE end
-
seria mais facil usar FOR nesse script pq assim iminuiria o tamanho dele! Fiz aki --By Mulizeu function onSay(cid, words, param) local itens = {{11393,1},{2505,1},{2507,1},{2358,1},{8909,1},{10719,1},{7405,1},{7433,1},{7450,1},{12288,1},{2111,1},{10047,1},{8868,1},{11349,1},{12608,1}} for _, b in pairs(itens) do if doPlayerRemoveItem(cid,2157,35) then doPlayerAddItem(cid,b[1],b[2]) doPlayerSendTextMessage(cid,27,"Parabens Voce Comprous Os Itens") else doPlayerSendCancel(cid,"Desculpe Voce Nao Tem 35 Gold Nugget") end return TRUE end end Vou explica em itens = {{1010,1}} --1010 e id do item e 1 e quantidade basta vc alterar!
-
em creaturescripts crie um arquivo chamado entrou coloque isso function onLogin(cid) doPlayerSendTextMessage(cid,22,"o "..getCreatureName(cid).." Entrou no Servidor") end em creaturescripts.xml coloque <event type="login" name="entrou" script="entrou.lua"/>
-
Havia um erro no script eu arrumei e coloquei a msg! function onThink(interval, lastExecution) local pos = {x = 155, y = 50, z = 7} --posição que surge o tp local topos = {x=794, y=228, z=7} -- o player é teletransportado pra essa posição local timer = 7 -- tempo em minutos pro tp sumir pid = doCreateTeleport(1387, topos, pos) addEvent(deleteTp, timer*60*1000, pid) broadcastMessage("Evento Aberto",22) return true end function deleteTp(pos) local pos = {x = 155, y = 50, z = 7, stackpos = 1} doRemoveItem(getThingfromPos(pos).uid,1) end
-
function onLogin(cid) if not isVip(cid) and getPlayerStorageValue(cid, 15000) < = 0 then doPlayerSetVocation(cid,getPlayerVocation(cid)-4) doPlayerSendTextMessage(cid,27,"Sua vocação retornou pois acabou sua vip") end registerCreatureEvent(cid,"Voc") return TRUE end
-
nao pra isso tem que fazer uma função onLogin para quando acabar vip eles voltarem a vocação de antes faz isso crie um arquivo em creaturescript chamad Voc coloque isso function onLogin(cid) if isVip(cid) == FALSE then doPlayerSetVocation(cid,getPlayerVocation(cid)-4) doPlayerSendTextMessage(cid,27,"Sua vocação retornou pois acabou sua vip") end registerCreatureEvent(cid,"Voc") return TRUE end creaturescripts.xml coloque <event type="login" name="Voc" script="Voc.lua"/>
-
function onSay(cid, words, param, channel) local voc = {5,6,7,8} if isInArray(voc,getPlayerVocation(cid)) and isVip(cid) and doPlayerRemoveItem(cid,2160,2) then doPlayerSetVocation(cid,getPlayerVocation(cid)+4) doPlayerSendTextMessage(cid, 22, "Você foi promovido.") doSendMagicEffect(cid, 14) else doPlayerSendTextMessage(cid, 22, "Você precisa de vip.") end return TRUE end
-
Fiz um basico aki Tag: <talkaction words="!buyvip" event="script" value=nome arquivo.lua"/> crie um arquivo.lua em talkaction e coloque function onSay(cid, item, position) if getPlayerStorageValue(cid,22451) >= 1 then return doPlayerSendCancel(cid,"Sorry you have vip") end doPlayerRemoveItem(cid,11192,9000) setPlayerStorageValue(cid,22451,1) doPlayerSendTextMessage(cid,27,"You received vip permanente") doSendMagicEffect(getPlayerPosition(cid),CONST_ME_POFF) return TRUE end ---------------------------------------------------------------- piso que so passa quem tiver vip crie um arquiv.lua em movements e coloque function onStepIn(cid,item,position,fromPosition) if getPlayerStorageValue(cid,22451) <= 0 then doTeleportThing(cid,fromPosition,false) doPlayerSendTextMessage(cid,21,"Sorry you no have vip") else doPlayerSendTextMessage(cid,27,"Welcome in area vip") end return TRUE end tag: <movevent type="StepIn" actionid="xxx" event="script" value="nomearquivo.lua"/> aki no xxx e action id que vc colocara atravez do map editor
-
vc colocou os ids corretos, crystal e oq remove, gold e oq vira! se possivel poste uma Ss
-
function onUse(cid, item, position, itemEx, fromPosition) local m = { gold = xx, crystal = xx } if doPlayerRemoveItem(cid,crystal,100) == TRUE then doPlayerAddItem(cid,gold,1) doPlayerSendTextMessage(cid,27,"You transform your crytal coins in gold nuget") else doPlayerSendTextMessage(cid,27,"Sorry you no have 100 crystal coins") end end nos xx e o id dos itens
-
Caso o do amigo acima n funcione! function onStepIn(cid, item, pos) local items = {2160}, {3031}, {3031}, {3031}, {3031}, {3031}, {3031} local storage,vocation,temple = 9991,13,2 for i = 1,#items do if getPlayerStorageValue(cid,storage) <= 0 then doPlayerSetTown(cid, temple) doPlayerSetVocation(cid,vocation) doPlayerAddItem(cid,items[i],1) setPlayerStorageValue(cid,storage,1) else doTeleportThing(cid,frompos) doPlayerSendCancel(cid,"você ja fez isso.") return TRUE end end end
-
CREDITOS 100% AO :Kimoszin DE UM OUTRO FORUM Bom 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. Informação: O Ladrão rouba ai é adicionado uma storage, quando o Policial usar o item no Ladrão mandara para cadeia. Se o player nao estiver com a storage do roubo, uma mensagem de erro é mandada para o Policial. OBS: achei legal e nao o vi aki entao resolvi trazer! (Me desculpem se ja tiver algo parecido ou igual ao msm)
-
crie um arquivo chamado message em creaturescripts function onLogin(cid) msg = "Para adquirir premium diga !buypremuim" doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,""..msg.."") registerCreatureEvent(cid,"MSG") return TRUE end em creaturescripts.xml coloque <event type="login" name="MSG" event="script" value="message.lua"/> se vc quizer pode mudar a menssage em msg!
-
e basicamente um pet system eu fiz por talkactions! function 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 e aki por spells so que eu dei uma implementada no da spells tem umas fazes fico legalzin! function onPet(cid) 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) addEvent(onPet,500,cid) return TRUE end end end end function onCastSpell(cid, var) addEvent(doCreatureSay,500,cid,"Pelos poderes") addEvent(doCreatureSay,1500,cid,"dados a min") addEvent(doCreatureSay,2500,cid,"eu invoco") addEvent(doCreatureSay,3500,cid,"uma criatura") addEvent(doCreatureSay,4500,cid,"Saida do inferno") addEvent(doCreatureSay,5500,cid,"erga-te") addEvent(onPet,6500,cid) return TRUE end Tag do talkactions <talkaction words="!pet;!removepet" script="nome arquivo.lua"/> e aki da spells <instant name="Pet" words="invocar" lvl="12" mana="20" prem="0" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="nome arquivo.lua"> </instant>
-
Falar Coisa "x" Receber Item "x" (Pode Fazer Isso Apenas Uma Vez)
tópico respondeu ao Pexezenho de Mulizeu em Lixeira Pública
function onSay(cid, words, param) local a = { ["sword"] = {id=1234,count=1}, --nome id == id do item count == quantidade ["axe"] = {id=2589,count=1}, ["club"] = {id=1478,count=1} } if a[param] == "" or not a[param] then return doPlayerSendCancel(cid,"no have command param") elseif getPlayerStorageValue(cid,1234) == 1 then return doPlayerSendCancel(cid,"Sorry you used commands") end doPlayerAddItem(cid,a[param].id,a[param].count) setPlayerStorageValue(cid,1234,1) return TRUE end <talkaction words="!premmy" script="NOME ARQUIVO.lua"/> mode de usar !premmy sword, ou premmy axe! mude o nome em ["sword"] para qual desejar id do item em ID e quantia em count ----------- Nao vi que haviam postado msm assim deixarei o meu -
function onEquip(cid, item, position, itemEx, fromPosition) local ropa createConditionObject(CONDITION_OUTFIT) setConditionParam(ropa, CONDITION_PARAM_STICKS, -1) addOutfitCondition(ropa, {lookType = xxx, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0}) doAddCondition(cid,ropa) return TRUE end function onDeEquip(cid, item, position, itemEx, fromPosition) doRemoveCondition(cid,CONDITION_OUTFIT) return TRUE end <movevent type="Equip" itemid="" slot="slot" event="script" value="nome arquivo.lua"/> <movevent type="DeEquip" itemid="" slot="slot" event="script" value="nome arquivo.lua"/> no slot vc coloca se é feet, hand,head!
-
Sistema De Dc Nos Treiner Depois De 15 Min
tópico respondeu ao felipao12 de Mulizeu em Lixeira Pública
no piso em q o player estiver! -
Sistema De Dc Nos Treiner Depois De 15 Min
tópico respondeu ao felipao12 de Mulizeu em Lixeira Pública
crie um arquivo.lua em moviments coloque function onStepIn(cid, positon, fromPosition) time = 15 pos = getTownTemplePosition(getPlayerTown(cid)) tp = addEvent(doTeleportThing,time*60,cid,pos) return TRUE end function onStepOut(cid, position, fromPosition) stopEvent(tp) end tag: <movevent type="StepIn" actionid="59001" event="script" value="nome arquivo.lua"/> <movevent type="StepOut" uniqueid="59001" event="script" value="nomearquivo.lua"/> actionid="59001" uniqueid="59001" ,coloque no tile -
tesnta assim! function onLogin(cid) if isPlayer(cid) == TRUE then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILL, 0) doPdoPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) doCreatureSetDropLoot(cid,FALSE) return TRUE end registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "PlayerDeath") registerCreatureEvent(cid,"Loss") return TRUE end
-
vai em data/creaturescripts crie um arquivo lua e coloque function onDeath(cid, corpse, killer) if isPlayer(cid) == TRUE then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILL, 0) doPdoPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) doCreatureSetDropLoot(cid,FALSE) return TRUE end end na msm pasta em login coloque registerCreatureEvent(cid,"Loss") em creaturescripts.xml cloque <event type="death" name="Loss" script="nome do arquivo.lua"/>
-
function onUse(cid, item, position, itemEx, fromPosition) remove = false ---coloque true se uizer que o item seja removido local min,max = 100,300 ----muda a quantia a ser healada if remove == true then doPlayerRemoveItem(cid,item.uid) end doCreatureAddHealth(cid,math.random(min,max)) return TRUE end
-
function onSay(cid, words, param) local templo = {x=,y=,z=} if isPlayer(cid) and getCreatureCondition(cid, CONDITION_INFIGHT) == true then doPlayerSendCancel(cid,"desculpe vc esta em batalha") end doTeleportThing(cid,templo) return TRUE end onde ta local templo coloca a posição do templo!
- 5 respostas
-
- pedido de script
- otserv
-
(e 2 mais)
Tags:
-
function onSay(cid, words, param) if isPlayer(cid) then doTeleportThing(cid,getTownTemplePosition(getPlayerTown(cid))) return TRUE end end
- 5 respostas
-
- pedido de script
- otserv
-
(e 2 mais)
Tags:
-
assim ! function onCastSpell(cid, var) target = getCreatureTarget(cid) if (target ~= 0) then Shar_Dim = {x=2458, y=2467, z=7} -- posição que teletronsportara doTeleportThing(target, Shar_Dim) doTeleportThing(cid, Shar_Dim) doSendMagicEffect(getCreaturePosition(cid), 13) -- id do efeito. return true end return false end
- 8 respostas
-
- teleport
- transporte
-
(e 1 mais)
Tags:
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.