SE VC É AQUELE CARA PREGUIÇOSO OU QUE SÓ QUER USAR AQUELA ##### DE QUEST Q TEM Q COLOCA O ID DO ITEM NO UID DA CHEST PODE SAIR JÁ
se vc quer aprender a fazer desde a + simples como as "fodas" esta no lugar certo
1º passo
Para vc num ficar lotado de arquivos q ate msm vc num sabe onde tah
faça apenas um com todas
normalmente chame-se chest.lua
nesse arquivo vc num ira indicar os ids dos lugares q darão itens (como id do bau,da estatua) e sim a uid assim
qualquer lugar pode dar sua recompensa desde baus ate paredes
apenas uma parte dele:
if item.uid == 2300 thenqueststatus = getPlayerStorageValue(cid,2300)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 29.50 then
doPlayerSendTextMessage(cid,22,"You have found a demon helmet.")
doPlayerAddItem(cid,2493,1)
setPlayerStorageValue(cid,2300,1)
else
doPlayerSendTextMessage(cid,22,"You have found a demon helmet. Weighing 29.50 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
Indica a UID (uniqueid q vc coloca no map editor)q o chest ira usar
Se o player não tiver o storage (queststatus = -1)ele manda a msg its empty
Checa se o player tem 29.50 de capacidade,se num tiver ele manda a msg lá
Adiciona o item x ao player
ai a base de um script basico
+ se vc num entende como se faz uma action,nem adinata continuar
vou explicar como se faz usando apenas coisas dessa quest
Sempre tem q ter um end fechando a função
Sempre quando ter um if tem q ter um end fechando ele
Depois de um if se quiser pode usar um elseif ao inves de outro if
A cada if ou elseif se poder usar um else,mas tera q usar um end no final dele
Os ifs chão checados em ordem,então coloque uma ordem de importancia
Tipo qdo há mais de um else o ultimo if q conta
exemplo
queststatus = getPlayerStorageValue(cid,2300)if queststatus == -1 then
if getPlayerFreeCap(cid) >= 29.50 then
doPlayerSendTextMessage(cid,22,"You have found a demon helmet.")
doPlayerAddItem(cid,2493,1)
setPlayerStorageValue(cid,2300,1)
else
doPlayerSendTextMessage(cid,22,"You have found a demon helmet. Weighing 29.50 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
o 1º else é do getplayerfree cap
e o else é do storage
Assim acho q da pra entender dai
Se vc num entendeu e só quer fazer
ai um exemplo
function onUse(cid, item, frompos, item2, topos)
--DEMON HELMET--
if item.uid == 2300 then
queststatus = getPlayerStorageValue(cid,2300)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 29.50 then
doPlayerSendTextMessage(cid,22,"You have found a demon helmet.")
doPlayerAddItem(cid,2493,1)
setPlayerStorageValue(cid,2300,1)
else
doPlayerSendTextMessage(cid,22,"You have found a demon helmet. Weighing 29.50 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
elseif item.uid == 2301 then
queststatus = getPlayerStorageValue(cid,2301)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 26.00 then
doPlayerSendTextMessage(cid,22,"You have found a demon shield.")
doPlayerAddItem(cid,2520,1)
setPlayerStorageValue(cid,2301,1)
else
doPlayerSendTextMessage(cid,22,"You have found a demon shield. Weighing 26.00 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
end
return 1
end
ai é so editando a gosto
arrume a capacidade , o uid e as frases a gosto xD
se quiser add + apenas add outro
elseif item.uid == 2301 thenqueststatus = getPlayerStorageValue(cid,2301)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 26.00 then
doPlayerSendTextMessage(cid,22,"You have found a demon shield.")
doPlayerAddItem(cid,2520,1)
setPlayerStorageValue(cid,2301,1)
else
doPlayerSendTextMessage(cid,22,"You have found a demon shield. Weighing 26.00 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
antes do end,return 1 ,end.
e em actions.xml
<action uniqueid="2300" script="chest.lua" /><action uniqueid="2301" script="chest.lua" />
ai é só ir add outros
2º passo
Se vc gosta de quest do estilo aniq q tem varios baus onde so pode pegar um unico item
é facil
apenas deixe o storagevalue de todos os baus o msm
queststatus = getPlayerStorageValue(cid,2301)if queststatus == -1 then
setPlayerStorageValue(cid,2301,1)
deixando todos os baus com esse storage ele vai cancela outro
facil n?
3º passo
So scripts num ajudam em nada certo ?
como ja disse vc pode add o uid em qualquer lugar
então vejamos ideias de quests
Quests q prescisam de duas partes
Vc quer fazer aquela quest q tem q falar com um npc pra pode-la fazer ?
Como num mecho com npc a muito tempo faça ele adicionar um storagevalue x no player qdo falar a palavra x
e os script ficaria assim
elseif item.uid == 2301 thenqueststatus = getPlayerStorageValue(cid,2301)
if queststatus == -1 then
queststatus1 = getPlayerStorageValue(cid,5000)
if queststatus1 == -1 then
if getPlayerFreeCap(cid) >= 26.00 then
doPlayerSendTextMessage(cid,22,"You have found a demon shield.")
doPlayerAddItem(cid,2520,1)
setPlayerStorageValue(cid,2301,1)
else
doPlayerSendTextMessage(cid,22,"You have found a demon shield. Weighing 26.00 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"Prescisa falar com o sam para fazer essa quest.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
Ou seja se ele num tiver o storage value x aparecera a msg
Essa parte do NPC num posso ajudar pois depende muito da versão e tudo +
Pode ser ate msm por action
Quests com bag
Desde muito tempo atras as pessoas queriam fazer quest com bags como no rl
Existiam poucos codes em c++ para isso e nem eram postados ou abertos so publico.No revbattlesys ele ficou e vamos a um exemplo de quest
elseif item.uid == 2309 thenqueststatus = getPlayerStorageValue(cid,2309)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 50.00 then
doPlayerSendTextMessage(cid,22,"You found a Bag.")
container = doPlayerAddItem(cid, 1987, 1)
doAddContainerItem(container, 2171, 1)
doAddContainerItem(container, 2168, 1)
doAddContainerItem(container, 2124, 1)
doAddContainerItem(container, 2145,3)
doAddContainerItem(container, 2146, 4)
setPlayerStorageValue(cid,2309,1)
else
doPlayerSendTextMessage(cid,22,"You have found a bag. Weighing 50.00 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
ele nomeia a bag de container (apenas no script)
Ele adiciona itens dentro do container,infinitos se quiser
Quests com bag,quem vem uma outra bag dentro dela recheada
facil como no passo anterior nomeie outra bag tbm
elseif item.uid == 2309 thenqueststatus = getPlayerStorageValue(cid,2309)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 50.00 then
doPlayerSendTextMessage(cid,22,"You found a Bag.")
container = doPlayerAddItem(cid, 1987, 1)
container2 = doPlayerAddItem(container, 1987, 1)
doAddContainerItem(container, 2171, 1)
doAddContainerItem(container2, 2168, 1)
doAddContainerItem(container2, 2124, 1)
doAddContainerItem(container, 2145,3)
doAddContainerItem(container, 2146, 4)
setPlayerStorageValue(cid,2309,1)
else
doPlayerSendTextMessage(cid,22,"You have found a bag. Weighing 50.00 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
Adiciona essa bag dentro do container
Adiciona esses itens no container2 q esta dentro do container
4º passo
Como diz é um tutorial num um script gratis
então vou ensinar como criar "impedimentos para o player"
seria mais um requesito
Quest q só pode ser feita se ele tiver dinheiro
Como ja disse o If são checados na ordem q vc adiciona eles nos script
Ou seja um requesito de remover dinheiro nesse script
if item.uid == 2300 thenqueststatus = getPlayerStorageValue(cid,2300)
if queststatus == -1 then
if getPlayerFreeCap(cid) >= 29.50 then
doPlayerSendTextMessage(cid,22,"You have found a demon helmet.")
doPlayerAddItem(cid,2493,1)
setPlayerStorageValue(cid,2300,1)
else
doPlayerSendTextMessage(cid,22,"You have found a demon helmet. Weighing 29.50 oz it is too heavy.")
end
else
doPlayerSendTextMessage(cid,22,"The chest is empty.")
end
Estaria em que lugar ?
pelo menos para mim ele é + importante do q a capacidade
então como adicionar ?
adiciondo
if doPlayerRemoveMoney(cid,1000) --remove 1000 gps do player
else
doPlayerSendTextMessage(cid,22,"Sem dinheiro para completar a quest.")
end
+ onde ?
prestem atenção a tudo q eu falei
Num desçam a pagina tentem descobrir sozinho
como num coube aki ta no proximo post pensem bem heim...