MathhCunha 2 Postado Agosto 29, 2013 Share Postado Agosto 29, 2013 (editado) Venho aqui hoje, para pedir dois scripts --First-- Exevo Aura (FOXWORLD 8.4) -Informações sobre o poder: *Ele cria uma wand na mão do jogar durante 30 min, e so pode soltar a magia novamente depois de 30min :') --Second-- Bau que Learn Spell -Informações sobre o BAU: *Ele remove 10 points(comprado por R$) e da o char o direito de soltar a magia Obrigado pela a AJUDA Informações do Server : New Yoruts Slayer 8.6 TFS 0.3.6 (Crying Damson) Editado Agosto 30, 2013 por MathhCunha Link para o comentário Compartilhar em outros sites More sharing options...
0 Omega 377 Postado Agosto 30, 2013 Share Postado Agosto 30, 2013 Cara, especifique que pontos são esses. É um storage ou alguma adição no banco de dados? Bom, vou deixar aqui o script do baú se for de storage e se der eu faço o da wand depois, que vai dar mais trabalho. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em um se quiser desativar) pointsto = 9999999, -- storage dos tais pontos sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPlayerStorageValue(cid,pointsto) >= 10 then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Além disso, você tem que colocar isso aí na tag da magia para que somente os jogadores que fizeram essa quest possam usa-la. needlearn="1" Link para o comentário Compartilhar em outros sites More sharing options...
0 MathhCunha 2 Postado Agosto 30, 2013 Autor Share Postado Agosto 30, 2013 (editado) Cara, especifique que pontos são esses. É um storage ou alguma adição no banco de dados? Bom, vou deixar aqui o script do baú se for de storage e se der eu faço o da wand depois, que vai dar mais trabalho. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em um se quiser desativar) pointsto = 9999999, -- storage dos tais pontos sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPlayerStorageValue(cid,pointsto) >= 10 then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Além disso, você tem que colocar isso aí na tag da magia para que somente os jogadores que fizeram essa quest possam usa-la. needlearn="1" Eu uso um sistema de point pela a DATABASE. Obrigado. Eu uso esse Sistema de Points Editado Agosto 30, 2013 por MathhCunha Link para o comentário Compartilhar em outros sites More sharing options...
0 Omega 377 Postado Agosto 30, 2013 Share Postado Agosto 30, 2013 (editado) Então fica assim: function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em 1 se quiser desativar) points = 10 -- pontos necessários para usar o baú sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,config.sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPoints(cid) >= config.points then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') removePoints(cid,config.points) else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Editado Agosto 30, 2013 por omega blueheaven Link para o comentário Compartilhar em outros sites More sharing options...
0 MathhCunha 2 Postado Agosto 30, 2013 Autor Share Postado Agosto 30, 2013 (editado) Então fica assim: function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em 1 se quiser desativar) points = 10 -- pontos necessários para usar o baú sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,config.sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPoints(cid) >= config.points then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') removePoints(cid,config.points) else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Deu Erro. Me Manda as linhas tudinho. Obrigado [30/08/2013 18:07:01] [Error - LuaScriptInterface::loadFile] data/actions/scripts/a/podernovo.lua:6: '}' expected (to close '{' at line 3) near 'sto' [30/08/2013 18:07:01] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/a/podernovo.lua) [30/08/2013 18:07:01] data/actions/scripts/a/podernovo.lua:6: '}' expected (to close '{' at line 3) near 'sto' Editado Agosto 30, 2013 por MathhCunha Link para o comentário Compartilhar em outros sites More sharing options...
0 Omega 377 Postado Agosto 30, 2013 Share Postado Agosto 30, 2013 Erro bobo meu, tenta de novo. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em 1 se quiser desativar) points = 10, -- pontos necessários para usar o baú sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,config.sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPoints(cid) >= config.points then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') removePoints(cid,config.points) else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Link para o comentário Compartilhar em outros sites More sharing options...
0 MathhCunha 2 Postado Agosto 31, 2013 Autor Share Postado Agosto 31, 2013 Erro bobo meu, tenta de novo. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em 1 se quiser desativar) points = 10, -- pontos necessários para usar o baú sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,config.sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPoints(cid) >= config.points then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') removePoints(cid,config.points) else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Qual as Linhas? Esse Sto e a que eu tenho que coloca no bau? Link para o comentário Compartilhar em outros sites More sharing options...
0 Omega 377 Postado Agosto 31, 2013 Share Postado Agosto 31, 2013 Erro bobo meu, tenta de novo. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em 1 se quiser desativar) points = 10, -- pontos necessários para usar o baú sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,config.sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPoints(cid) >= config.points then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') removePoints(cid,config.points) else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Qual as Linhas? Esse Sto e a que eu tenho que coloca no bau? O erro foi que eu tinha esquecido de colocar vírgula listar no config. Pra colocar esse baú no jogo você coloca uma tag com a seguinte tag no actions.xml: <action actionid="actionid" script="baumagiavip.lua"/> Aí coloca um baú com o action id que você preencher (salva o código como baumagiavip.lua em actions/scripts) Link para o comentário Compartilhar em outros sites More sharing options...
0 MathhCunha 2 Postado Agosto 31, 2013 Autor Share Postado Agosto 31, 2013 Erro bobo meu, tenta de novo. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { lvl = 1, -- lvl necessário para usar o baú (deixe em 1 se quiser desativar) points = 10, -- pontos necessários para usar o baú sto = 505021, -- storage do baú, não precisa mudar nome_da_magia = 'Mega Ultimate Destruction' -- aqui você bota o nome da magia que tá no spells.xml entre aspas } if getPlayerStorageValue(cid,config.sto) == -1 then if getPlayerLevel(cid) > config.lvl then if getPoints(cid) >= config.points then doPlayerLearnInstantSpell(cid,config.nome_da_magia) doPlayerSendTextMessage(cid,27,'Voce aprendeu a magia '..config.nome_da_magia..'.') removePoints(cid,config.points) else doPlayerSendTextMessage(cid,27,'Voce nao tem a quantidade necessaria de pontos.') end else doPlayerSendTextMessage(cid,27,'Voce nao tem level suficiente para usar este bau.') end else doPlayerSendTextMessage(cid,27,'Voce ja aprendeu essa magia.') end return true end Qual as Linhas? Esse Sto e a que eu tenho que coloca no bau? O erro foi que eu tinha esquecido de colocar vírgula listar no config. Pra colocar esse baú no jogo você coloca uma tag com a seguinte tag no actions.xml: <action actionid="actionid" script="baumagiavip.lua"/> Aí coloca um baú com o action id que você preencher (salva o código como baumagiavip.lua em actions/scripts) Já coloquei, eu pensei que era UniqueID, só que eu já arrumei. -- 1ºPedido Solucionado. -- 2ºPedido em Aberto A wand, tu vai fazer? Obrigado. Link para o comentário Compartilhar em outros sites More sharing options...
0 Killua 389 Postado Setembro 1, 2013 Share Postado Setembro 1, 2013 Eu fiz o baú pra você, ve se funciona function onUse(cid, item) local pontos = 2160 -- id dos pontos. if getPlayerStorageValue(cid, 18382) < 1 then if getPlayerItem(cid, pontos) >= 10 then doPlayerLearnSpell(cid, "exevo aura") doPlayerSendTextMessage(cid, 27, "vc ganhou a magia exevo aura") doPlayerRemoveItem(cid, pontos, 10) setPlayerStorageValue(cid, 18382, 1) else doPlayerSendTextMessage(cid, 22, "vc nao tem os 10 pontos necessarios para apreder a magia!") end else doPlayerSensTextMessage(cid, 22, "vc ja aprendeu a magia!") end return TRUE end Link para o comentário Compartilhar em outros sites More sharing options...
0 MathhCunha 2 Postado Setembro 1, 2013 Autor Share Postado Setembro 1, 2013 Eu fiz o baú pra você, ve se funciona function onUse(cid, item) local pontos = 2160 -- id dos pontos. if getPlayerStorageValue(cid, 18382) < 1 then if getPlayerItem(cid, pontos) >= 10 then doPlayerLearnSpell(cid, "exevo aura") doPlayerSendTextMessage(cid, 27, "vc ganhou a magia exevo aura") doPlayerRemoveItem(cid, pontos, 10) setPlayerStorageValue(cid, 18382, 1) else doPlayerSendTextMessage(cid, 22, "vc nao tem os 10 pontos necessarios para apreder a magia!") end else doPlayerSensTextMessage(cid, 22, "vc ja aprendeu a magia!") end return TRUE end Hey valeu, mais eu ja arrumei o script. Obrigado Link para o comentário Compartilhar em outros sites More sharing options...
0 Killua 389 Postado Setembro 1, 2013 Share Postado Setembro 1, 2013 A sim tudo bem Link para o comentário Compartilhar em outros sites More sharing options...
0 MathhCunha 2 Postado Setembro 2, 2013 Autor Share Postado Setembro 2, 2013 Agora necessito da wand Se alguem ae sabe criar porfavor me ajuda Link para o comentário Compartilhar em outros sites More sharing options...
0 Omega 377 Postado Setembro 2, 2013 Share Postado Setembro 2, 2013 Cara, o chato da wand é que vão ser vários arquivos: um da spell pra criar a wand, outro de movements pra não deixar o cara tirar ela depois que cria e mais um pra se o cara logar, ele perder a wand quando voltar. Portanto, aí vai: TAGs: creaturescripts.xml: <event type="login" name="wandLogin" event="script" value="wandlogin.lua"/> movements.xml: <movevent type="DeEquip" itemid="ID DA WAND" event="script" value="wandmove.lua"/> spells.xml: <instant name="Create Wand" words="exevo aura" lvl="LEVEL PRA CASTAR A MAGIA" mana="MANA" soul="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/conjure wand.lua"> <vocation id="2"/> -- druid <vocation id="1"/> -- sorcerer <vocation id="6"/> -- ED <vocation id="5"/> -- MS </instant> Arquivos: spells/support/conjurewand.lua: local id_da_wand = 12345 local tempo_de_exhaust = 30 -- em minutos (da spell) local tempo_de_wand = 30 -- em minutos (de duração da wand) local wandsto = 505090 local storage = 505091 function doRemoveWand(cid) if not isPlayer(cid) then return false end if exhaustion.check(cid,wandsto) == true then return false end for slot = 5,6 do if getPlayerSlotItem(cid, slot).itemid == id_da_wand then doPlayerRemoveItem(cid,id_da_wand,1) end end return true end function onCastSpell(cid, var) tempo_de_wand = tempo_de_wand * 60 tempo_de_exhaust = tempo_de_exhaust * 60 if exhaustion.check(cid, storage) == false then if exhaustion.check(cid,wandsto) == false then if not getPlayerSlotItem(cid, 5) or not getPlayerSlotItem(cid,6) then doPlayerAddItem(cid,id_da_wand,1) doSendMagicEffect(getCreaturePosition(cid),12) exhaustion.set(cid,wandsto,tempo_de_wand) exhaustion.set(cid,storage,tempo_de_exhaust) addEvent(doRemoveWand,(tempo_de_wand*1000)+1000,cid) else doPlayerSendCancel(cid,'You cannot use this spell with your hands full.') doSendMagicEffect(getCreaturePosition(cid),2) end else doPlayerSendCancel(cid,'You are exhausted.') doSendMagicEffect(getCreaturePosition(cid),2) end else doSendMagicEffect(getCreaturePosition(cid),2) doPlayerSendCancel(cid,'You are exhausted.') end return true end movements/scripts/wandmove.lua: function onDeEquip(cid, item, slot) local tempo_restante = getPlayerStorageValue(cid,505090) - os.time(t) doPlayerSendTextMessage(cid,'You have to wait 'tempo_restante' seconds until the wand vanishes.') return false end creaturescripts/scripts/wandlogin.lua: local id_da_wand = 12345 function onLogin(cid) if getPlayerItemCount(cid,id_da_wand) >= 1 then if doRemoveWand(cid) == true then return true else local tempo_restante = getPlayerStorageValue(cid,505090) - os.time(t) addEvent(doRemoveWand,tempo_restante*1000,cid) end end return true end Link para o comentário Compartilhar em outros sites More sharing options...
0 MathhCunha 2 Postado Setembro 2, 2013 Autor Share Postado Setembro 2, 2013 Cara, o chato da wand é que vão ser vários arquivos: um da spell pra criar a wand, outro de movements pra não deixar o cara tirar ela depois que cria e mais um pra se o cara logar, ele perder a wand quando voltar. Portanto, aí vai: TAGs: creaturescripts.xml: <event type="login" name="wandLogin" event="script" value="wandlogin.lua"/> movements.xml: <movevent type="DeEquip" itemid="ID DA WAND" event="script" value="wandmove.lua"/> spells.xml: <instant name="Create Wand" words="exevo aura" lvl="LEVEL PRA CASTAR A MAGIA" mana="MANA" soul="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/conjure wand.lua"> <vocation id="2"/> -- druid <vocation id="1"/> -- sorcerer <vocation id="6"/> -- ED <vocation id="5"/> -- MS </instant> Arquivos: spells/support/conjurewand.lua: local id_da_wand = 12345 local tempo_de_exhaust = 30 -- em minutos (da spell) local tempo_de_wand = 30 -- em minutos (de duração da wand) local wandsto = 505090 local storage = 505091 function doRemoveWand(cid) if not isPlayer(cid) then return false end if exhaustion.check(cid,wandsto) == true then return false end for slot = 5,6 do if getPlayerSlotItem(cid, slot).itemid == id_da_wand then doPlayerRemoveItem(cid,id_da_wand,1) end end return true end function onCastSpell(cid, var) tempo_de_wand = tempo_de_wand * 60 tempo_de_exhaust = tempo_de_exhaust * 60 if exhaustion.check(cid, storage) == false then if exhaustion.check(cid,wandsto) == false then if not getPlayerSlotItem(cid, 5) or not getPlayerSlotItem(cid,6) then doPlayerAddItem(cid,id_da_wand,1) doSendMagicEffect(getCreaturePosition(cid),12) exhaustion.set(cid,wandsto,tempo_de_wand) exhaustion.set(cid,storage,tempo_de_exhaust) addEvent(doRemoveWand,(tempo_de_wand*1000)+1000,cid) else doPlayerSendCancel(cid,'You cannot use this spell with your hands full.') doSendMagicEffect(getCreaturePosition(cid),2) end else doPlayerSendCancel(cid,'You are exhausted.') doSendMagicEffect(getCreaturePosition(cid),2) end else doSendMagicEffect(getCreaturePosition(cid),2) doPlayerSendCancel(cid,'You are exhausted.') end return true end movements/scripts/wandmove.lua: function onDeEquip(cid, item, slot) local tempo_restante = getPlayerStorageValue(cid,505090) - os.time(t) doPlayerSendTextMessage(cid,'You have to wait 'tempo_restante' seconds until the wand vanishes.') return false end creaturescripts/scripts/wandlogin.lua: local id_da_wand = 12345 function onLogin(cid) if getPlayerItemCount(cid,id_da_wand) >= 1 then if doRemoveWand(cid) == true then return true else local tempo_restante = getPlayerStorageValue(cid,505090) - os.time(t) addEvent(doRemoveWand,tempo_restante*1000,cid) end end return true end Hey, quando eu uso no char la aparece que a minha mão ta cheia, só que não tem nada da minha mão. Link para o comentário Compartilhar em outros sites More sharing options...
0 Omega 377 Postado Setembro 2, 2013 Share Postado Setembro 2, 2013 tenta essa correção pro conjurewand.lua local id_da_wand = 12345 local tempo_de_exhaust = 30 -- em minutos (da spell) local tempo_de_wand = 30 -- em minutos (de duração da wand) local wandsto = 505090 local storage = 505091 function doRemoveWand(cid) if not isPlayer(cid) then return false end if exhaustion.check(cid,wandsto) == true then return false end for slot = 5,6 do if getPlayerSlotItem(cid, slot).itemid == id_da_wand then doPlayerRemoveItem(cid,id_da_wand,1) end end return true end function onCastSpell(cid, var) tempo_de_wand = tempo_de_wand * 60 tempo_de_exhaust = tempo_de_exhaust * 60 if exhaustion.check(cid, storage) == false then if exhaustion.check(cid,wandsto) == false then if not getPlayerSlotItem(cid, 5).itemid or not getPlayerSlotItem(cid,6).itemid then doPlayerAddItem(cid,id_da_wand,1) doSendMagicEffect(getCreaturePosition(cid),12) exhaustion.set(cid,wandsto,tempo_de_wand) exhaustion.set(cid,storage,tempo_de_exhaust) addEvent(doRemoveWand,(tempo_de_wand*1000)+1000,cid) else doPlayerSendCancel(cid,'You cannot use this spell with your hands full.') doSendMagicEffect(getCreaturePosition(cid),2) end else doPlayerSendCancel(cid,'You are exhausted.') doSendMagicEffect(getCreaturePosition(cid),2) end else doSendMagicEffect(getCreaturePosition(cid),2) doPlayerSendCancel(cid,'You are exhausted.') end return true end Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
MathhCunha 2
Venho aqui hoje, para pedir dois scripts
Obrigado pela a AJUDA
Informações do Server :
New Yoruts Slayer 8.6
TFS 0.3.6 (Crying Damson)
Editado por MathhCunhaLink para o comentário
Compartilhar em outros sites
Top Posters For This Question
16
14
2
Popular Days
Set 3
13
Set 2
6
Ago 30
4
Ago 31
3
Top Posters For This Question
MathhCunha 16 posts
Omega 14 posts
Killua 2 posts
Popular Days
Set 3 2013
13 posts
Set 2 2013
6 posts
Ago 30 2013
4 posts
Ago 31 2013
3 posts
Popular Posts
Omega
Cara, especifique que pontos são esses. É um storage ou alguma adição no banco de dados? Bom, vou deixar aqui o script do baú se for de storage e se der eu faço o da wand depois, que vai dar mais tra
Omega
Cara, o chato da wand é que vão ser vários arquivos: um da spell pra criar a wand, outro de movements pra não deixar o cara tirar ela depois que cria e mais um pra se o cara logar, ele perder a wand q
31 respostass a esta questão
Posts Recomendados