Refe
-
Total de itens
645 -
Registro em
-
Última visita
-
Dias Ganhos
10
Posts postados por Refe
-
-
function onUse(cid, item, fromPos, item2, toPos) local item1 = xxx -- 30 % de chance local item2 = xxx -- 60 % de chance local item3 = xxx -- 10% de chance local sto = 255465 local tempo = 24*60*60 -- Em segundos if os.time()-getPlayerStorageValue(cid, sto) > tempo then if math.random(1,10) == 1 or math.random(1,10) == 2 or math.random(1,10) == 3 then doPlayerAddItem(cid, item1) setPlayerStorageValue(cid, sto, os.time()) elseif math.random(1,10) == 4 or math.random(1,10) == 5 or math.random(1,10) == 6 or math.random(1,10) == 7 or math.random(1,10) == 8 or math.random(1,10) == 9 then doPlayerAddItem(cid, item2) setPlayerStorageValue(cid, sto, os.time()) elseif math.random(1,10) == 10 then doPlayerAddItem(cid, item3) setPlayerStorageValue(cid, sto, os.time()) else return doPlayerSendCancel(cid, "Voce precisa esperar 1 Dia fazer a quest!") end return true end end
adiciona um end no final
-
e onde baixo essa dll?
Não tem, só pagando
-
só com a DLL no old mesmo
-
Não suporta OTC ?
-
Nao teria como so implementar essa função nessa script mesmo?
Pq eu usei 10 chares e 5 veio o de 30 dias, coincidência ou não...
Por ser o melhor item dentre os outros, eu queria deixa-lo mais dificil entendeu..
Se não for pedir de mais, eu aceito se for necessario!
Vou refazer
Nao teria como so implementar essa função nessa script mesmo?
Pq eu usei 10 chares e 5 veio o de 30 dias, coincidência ou não...
Por ser o melhor item dentre os outros, eu queria deixa-lo mais dificil entendeu..
Se não for pedir de mais, eu aceito se for necessario!
function onUse(cid, item, fromPos, item2, toPos) local item1 = xxx -- 30 % de chance local item2 = xxx -- 60 % de chance local item3 = xxx -- 10% de chance local sto = 255465 local tempo = 24*60*60 -- Em segundos if os.time()-getPlayerStorageValue(cid, sto) > tempo then if math.random(1,10) == 1 or math.random(1,10) == 2 or math.random(1,10) == 3 then doPlayerAddItem(cid, item1) setPlayerStorageValue(cid, sto, os.time()) elseif math.random(1,10) == 4 or math.random(1,10) == 5 or math.random(1,10) == 6 or math.random(1,10) == 7 or math.random(1,10) == 8 or math.random(1,10) == 9 then doPlayerAddItem(cid, item2) setPlayerStorageValue(cid, sto, os.time()) elseif math.random(1,10) == 10 then doPlayerAddItem(cid, item3) setPlayerStorageValue(cid, sto, os.time()) else return doPlayerSendCancel(cid, "Voce precisa esperar 1 Dia fazer a quest!") end return true end
tá ai
-
Então ele tinha mais sprites que o sem ser estendido aceita...
-
Men Tipo as ultimas sprints são bugadas, tipo elas estão falhadas por ex: era um pokemon agr viro uns itens bug tendeu??
Você baixou o client já estendido ?
-
Funcionou, obrigado!
OBS: no caso como eu faria para por a porcentagem em cada 1 dos 3 items q eu editei no script, no caso seria 3 itens, que dá acesso a uma area, de 1 dia, 7 dias e 30 dias. Eu diminuir a porcentagem de chance de vim ele... como eu faria?
Putz, aí eu teria que refazer o script, quer que eu refaça ?
-
Vou testar aqui..
Mais normalmente não tem a porcentagem de chance para nos editarmos?
math.random(1, #premios)
Só trocar o "1"
-
Pode enviar um print ?
-
Tô sem servidor aqui para testar...
mas tenta:
function onLogout(cid, position) F = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z} -- frente /\ D = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z} -- direita E = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z} -- direita T = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z} -- tras doRemoveCreature(getThingfromPos(F).uid) doRemoveCreature(getThingfromPos(D).uid) doRemoveCreature(getThingfromPos(E).uid) doRemoveCreature(getThingfromPos(T).uid) end
-
No Forum tem o tutorial do Zipter sobre mega stone se não me engano
-
Quando o player dá exit e consequentimente desloga o treiner continua lá, era pra ele sumir .
Aqui funfa normal só quando ele sai andando do tile, qnd ele exit n funfa de sumir o treiner...
Um minuto.
Em Movements:
function onStepIn(cid, item, position, fromPosition) local colocar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19446] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, [19447] = {x = getCreaturePosition(cid).x-1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253} } local e = colocar[item.actionid] local get = getThingfromPos(e) if get.itemid < 1 then addEvent(doCreateMonster,1*1-1,"Training Monk", e) doSendMagicEffect(e, CONST_ME_TELEPORT) setPlayerStorageValue(cid, 5665454,1) end return true end function onStepOut(cid, item, position, fromPosition) local retirar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z, stackpos = 253}, -- frente /\ [19446] = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, -- direita [19447] = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, -- tras [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z, stackpos = 253} } local e = retirar[item.actionid] local remove= getThingfromPos(e) if remove.itemid > -0 then doSendMagicEffect(e, CONST_ME_POFF) doRemoveCreature(getThingfromPos(e).uid) setPlayerStorageValue(cid, 5665454,0) end return true end
Em Creaturescripts:
function onLogout(cid) local retirar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z, stackpos = 253}, -- frente /\ [19446] = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, -- direita [19447] = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, -- tras [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z, stackpos = 253} } local e = retirar[item.actionid] local remove= getThingfromPos(e) if getCreatureStorage(cid, 5665454) == 0 then else if remove.itemid > -0 then doSendMagicEffect(e, CONST_ME_POFF) doRemoveCreature(getThingfromPos(e).uid) end return true end end
Tag creaturescripts:
<event type="logout" name="LogoutTrainer" event="script" value="arquivo.lua"/>
Em login.lua (creaturescripts/script), Põe perto das parecidas:
registerCreatureEvent(cid, "LogoutTrainer")
-
-
Bom, Hoje vou ensinar a criar novas Escadas, só testei em servidores
8.54, 8.60, porém estarei dando suporte para outras versões caso venha a ocorrer erros
Vamos lá,
Em Movements/Scripts crie um arquivo chamado
escadas.lua
E Dentro cole:
function onStepIn(cid, item, frompos, item2, topos) if not isPlayer(cid) then return true end local norte = {xxx, xxx, xxx, xxx} --Ecadas viradas para o Norte local sul = {xxx, xxx, xxx, xxx} -- Escadas viradas para o sul local leste = {xxx, xxx, xxx, xxx} -- Escadas viradas para o leste local oeste = {xxx, xxx, xxx, xxx} -- Escadas viradas para o Oeste local descer = {xxx, xxx, xxx, xxx} -- Escadas para descer -- NORTH if item2.itemid == [norte] then playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y-1, z=getCreaturePosition(cid).z-1} -- SOUTH elseif item2.itemid == [sul] then playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z-1} -- EAST elseif item2.itemid == [leste] then playerpos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z-1} -- WEST elseif item2.itemid == [oeste] then playerpos = {x=getCreaturePosition(cid).x-1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z-1} --DOWN elseif item2.itemid == [descer] then playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z+1} end
Bom, no próprio Script ensina como adiciona as escadas.
Agora em Movements/movements.xml
Adicione a tag:
<movevent type="StepIn" itemid="item1;item2;item3" event="script" value="escadas.lua"/>
E Pronto, já tem as novas escadas no seu Servidor
Se for adicionar as escadas no client, elas devem ter as propriedades:
Não pode Ser Movido
-
Esqueci de um detalhe, antes de testar você poderia colocar pra poder fazer essa quest 1x por dia?
function onUse(cid, item, fromPos, item2, toPos) local premios = {xxx, xxx, xxx, xxx} local sto = 255465 local tempo = 24*60*60 -- Em segundos if os.time()-getPlayerStorageValue(cid, sto) > tempo then local randomChance = math.random(1, #premios) doPlayerAddItem(cid, premios[randomChance]) setPlayerStorageValue(cid, sto, os.time()) else return doPlayerSendCancel(cid, "Voce precisa esperar 1 Dia fazer a quest!") end return true end
-
Script continua a mesma coisa... Só qe agora com esse erro na distro.
function onStepIn(cid, item, position, fromPosition) local colocar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19446] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, [19447] = {x = getCreaturePosition(cid).x-1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253} } local e = colocar[item.actionid] local get = getThingfromPos(e) if get.itemid < 1 then addEvent(doCreateMonster,1*1-1,"Training Monk", e) doSendMagicEffect(e, CONST_ME_TELEPORT) setPlayerStorageValue(cid, 5665454,1) end return true end function onLogout(cid) local retirar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z, stackpos = 253}, -- frente /\ [19446] = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, -- direita [19447] = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, -- tras [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z, stackpos = 253} } local e = retirar[item.actionid] local remove= getThingfromPos(e) if getCreatureStorage(cid, 5665454) == 0 then else if remove.itemid > -0 then doSendMagicEffect(e, CONST_ME_POFF) doRemoveCreature(getThingfromPos(e).uid) end return true end end function onStepOut(cid, item, position, fromPosition) local retirar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z, stackpos = 253}, -- frente /\ [19446] = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, -- direita [19447] = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, -- tras [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z, stackpos = 253} } local e = retirar[item.actionid] local remove= getThingfromPos(e) if remove.itemid > -0 then doSendMagicEffect(e, CONST_ME_POFF) doRemoveCreature(getThingfromPos(e).uid) setPlayerStorageValue(cid, 5665454,0) end return true end
-
Jogo de roubar carro, Se não sabe a dificuldade que era pra pegar uma moto no san andreas.
Sei sim, mas tinha o respawn de uma moto em um prédio lá :v
-
-
-
Mais no caso desse, eu iria ter que fazer varios e varios scripts, pois tem 100 cabines para por os treiners '-'
Se tiver como modificar essa script, pois ela ta funfando quase perfeitamente, porém, ela n reconhece quando o player da exit, ao deslogar o char o treiner fica lá.. Queria arrumar só isso nesse script, consegue?
Script::
function onStepIn(cid, item, position, fromPosition) local colocar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19446] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, [19447] = {x = getCreaturePosition(cid).x-1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253} } local e = colocar[item.actionid] local get = getThingfromPos(e) if get.itemid < 1 then addEvent(doCreateMonster,1*1-1,"Training Monk", e) doSendMagicEffect(e, CONST_ME_TELEPORT) end return true end function onStepOut(cid, item, position, fromPosition) local retirar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z, stackpos = 253}, -- frente /\ [19446] = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, -- direita [19447] = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, -- tras [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z, stackpos = 253} } local e = retirar[item.actionid] local remove= getThingfromPos(e) if remove.itemid > -0 then doSendMagicEffect(e, CONST_ME_POFF) doRemoveCreature(getThingfromPos(e).uid) end return true end
Tenta:
function onStepIn(cid, item, position, fromPosition) local colocar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19446] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, [19447] = {x = getCreaturePosition(cid).x-1, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253} } local e = colocar[item.actionid] local get = getThingfromPos(e) if get.itemid < 1 then addEvent(doCreateMonster,1*1-1,"Training Monk", e) doSendMagicEffect(e, CONST_ME_TELEPORT) setPlayerStorageValue(cid, 5665454,1) end return true function onLogout(cid) local retirar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z, stackpos = 253}, -- frente /\ [19446] = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, -- direita [19447] = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, -- tras [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z, stackpos = 253} } local e = retirar[item.actionid] local remove= getThingfromPos(e) if getCreatureStorage(cid, 5665454) == 0 then else if remove.itemid > -0 then doSendMagicEffect(e, CONST_ME_POFF) doRemoveCreature(getThingfromPos(e).uid) end return true end end end function onStepOut(cid, item, position, fromPosition) local retirar = { [19445] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y-2, z = getCreaturePosition(cid).z, stackpos = 253}, -- frente /\ [19446] = {x = getCreaturePosition(cid).x+2, y = getCreaturePosition(cid).y+1, z = getCreaturePosition(cid).z, stackpos = 253}, -- direita [19447] = {x = getCreaturePosition(cid).x-2, y = getCreaturePosition(cid).y-1, z = getCreaturePosition(cid).z, stackpos = 253}, -- tras [19448] = {x = getCreaturePosition(cid).x+1, y = getCreaturePosition(cid).y+2, z = getCreaturePosition(cid).z, stackpos = 253} } local e = retirar[item.actionid] local remove= getThingfromPos(e) if remove.itemid > -0 then doSendMagicEffect(e, CONST_ME_POFF) doRemoveCreature(getThingfromPos(e).uid) setPlayerStorageValue(cid, 5665454,0) end return true end
-
Bom Dia xTibianos..
O titulo já diz tudo, estou precisando de um script(quest) que dê items aleatorio (configuravel), se alguem puder me ajudar..
Grato desde já !
Tenta aí
function onUse(cid, item, fromPos, item2, toPos) local premios = {xxx, xxx, xxx, xxx} local sto = 255465 if getCreatureStorage(cid, stp) == 0 then doPlayerSendCancel(cid, "Você não pode fazer a quest!") else local randomChance = math.random(1, #premios) doPlayerAddItem(cid, premios[randomChance]) setPlayerStorageValue(cid, sto, 1) end return true end
-
Bom dia Xtibianos..
Gostaria de saber se alguém poderia me disponibilizar uma script de treiner, na qual o treiner so aparece quando pisa no sqm.
Treiner aparece quando pisa no sqm
Treiner some quando sai do sqm
Treiner some caso o cara exita no sqm q aparece o treiner. (pois vi um script q o treine ficava la qnd exitava)
Seria possivel?
Obg , valendo rep+ pela colaboração.
up
up
pos = {x = X, y = Y, z = Z} -- XYZ do NPC nome = "" -- Nome do NPC function onStepIn(cid, position) doCreateNpc(nome, pos) end function onStepOut(cid, position) rd = getTopCreature(pos) if rd > 0 then doRemoveCreature(rd) end
Deve dar certo
-
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
[Encerrado] [Duvida] Como passar OTC para OLD Client
em Tópicos Sem Resposta
Postado
Não sei, mas tem um cara que faz elas...