fiz correndo aqui, creio eu que tera erros *-* fiz do psycraft, não deu pra entende muito mais vms la
data/npc/script/xxxx.lua
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
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
msg = string.lower(msg)
---------
local RewardsOutlandPsy = {
Artefatos_Remove = xxxx,
Sto_Outfit = xxxx,
item_add = xxxx,
Sto_Add = 53512,
}
if (msgcontains(msg, 'outland') or msgcontains(msg, 'help')) then
SelfSay("intão você você tem os artefatos?", cid)
talkState[talkUser] = 2
return true
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 2 then
if getPlayerItemCount(cid, RewardsOutlandPsy.Artefatos_Remove) >= 1 then
selfSay("Desculpe mais você não tem os artefatos necessarios para me ajuda.", cid)
return true
end
SelfSay("Muito bom, você me ajudou e muito", cid)
doPlayerRemoveItem(cid, RewardsOutlandPsy.Artefatos_Remove, 1)
doPlayerAddLevel(cid, 15)
setPlayerStorageValue(cid, RewardsOutlandPsy.Sto_Outfit, 1)
SetPlayerStorageValue(cid, RewardsOutlandPsy.Sto_Add, 1)
doPlayerAddItem(cid, RewardsOutlandPsy.item_add, 1)
return true
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
você sabe cria xml de npc né? só cria um mandando o npc fala outland ou help
vo tenta explica oque tu tem q altera ;x
essa é a tabela q tu vai te q modifica completamente adicionado os ids..
local RewardsOutlandPsy = {
Artefatos_Remove = xxxx,
Sto_Outfit = xxxx,
item_add = xxxx,
Sto_Add = 53512,
}
Artefatos_Remove = xxxx,
em xxxx, tu coloka o id do artefatos,
~~~~~~~~~~~~~~
Sto_Outfit = xxxx,
tu coloka a storage q da a outfit.. la em xml tu pode ve q nas outfit tem quest=xxxx, nas outfit..ai tu coloka isso na outfit da pscraft exemplo..
<outfit id="40" quest="xxxxx">
<list gender="0" lookType="1435" name="Psycraft Master"/>
<list gender="1" lookType="1426" name="Psycraft Master"/>
</outfit>
ai tu coloka no script qualquer numeros q tu quizer exemplo se ali na quest tiver esse numero na frente 63252 ai no script tu coloka
Sto_Outfit = 63252,
lembrando q eu nunca fiz npc q da outfit n sei se vai funfa isso ;x
~~~~~~~~
~item_add = xxxx,
em xxx tu coloka o id q vai adiiciona ao player quando ele completa a quest. qualquer item qualquer..
~~~~~~~~
~Sto_Add = 53512,
nem meixa..é storage q vai se adicionada para n completa 2x
ah esqueçi..em baixo disso no script do npc..
if (msgcontains(msg, 'outland') or msgcontains(msg, 'help')) then
adiciona isso..
getPlayerStorageValue(cid, Sto_Add) >= 0 then
selfSay("Desculpe mais você ja fez essa quest", cid)
talkState[talkUser] = 0
return true
end
ah sim e pra adiciona + item quando completa a quest na tabela em baixo disso...
item_add = xxxx,
adiciona isso
item_add2 = xxxx, item_add3 = xxxx, item_add4 = xxxx, item_add5 = xxxx,
ai em baixo disso.. la no fim..
doPlayerAddItem(cid, RewardsOutlandPsy.item_add, 1)
tu adiciona isso
doPlayerAddItem(cid, RewardsOutlandPsy.item_add2, 1)
doPlayerAddItem(cid, RewardsOutlandPsy.item_add3, 1)
doPlayerAddItem(cid, RewardsOutlandPsy.item_add4, 1)
doPlayerAddItem(cid, RewardsOutlandPsy.item_add5, 1)
vo da um exemplo pra sabe edita a quantidade..
doPlayerAddItem(cid, RewardsOutlandPsy.item_add2, 1)
o 1 la no fim é a quantidade..
avisa quais bug pode ter no script pq to meio ocupadinho
bjos







info
Grupo: Campones
Registrado: 28/07/12
Posts: 43
Reputação: +29
to fazendo uma Outland Main quest '-', mas..
Eu queria sabe como faz o npc pra da outfit, items e exp?
Tipo ele vai pedi o itens
Por exemplo:
Npc: Você tem 1 artefato?
Player: Yes
Npc: Parabéns toma seu premio.
Pra cada de promotion.
Psycraft, Malefic, Volcanic e não seja muito, só 1 que ganha outfit mesma promotion.
Não sou otima português. E_E