- 0
pedido Npc De Quest Que Da Storager
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 599 visualizações
-
- 0 respostas
- 335 visualizações
-
- 1 resposta
- 1029 visualizações
-
- 0 respostas
- 1115 visualizações
-
- 0 respostas
- 593 visualizações
-
Pergunta
godjean 0
Boa noite pessoal do xtibia.
Venho hoje pedir um script de npc mas é o seguinte
Ele vai tirar os itens do seu personagem e vai te da uma storager essas stogares estão assim
Isso é umas coisas que estarão em conjunto com essa storage
local clans = {
[1] = {
[FIREDAMAGE] = {
[1] = {atk = 1.17, def = 0.17},
[2] = {atk = 1.22, def = 0.22},
[3] = {atk = 1.27, def = 0.27},
[4] = {atk = 1.32, def = 0.32},
[5] = {atk = 1.37, def = 0.37},
},
["null"] = {
},
},
[2] = {
[WATERDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
[iCEDAMAGE] = {
[1] = {atk = 1.10, def = 0.10},
[2] = {atk = 1.15, def = 0.15},
[3] = {atk = 1.20, def = 0.20},
[4] = {atk = 1.25, def = 0.25},
[5] = {atk = 1.30, def = 0.30},
},
},
[3] = {
[ROCKDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
[GROUNDDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
},
[4] = {
[FLYDAMAGE] = {
[1] = {atk = 1.15, def = 0.15},
[2] = {atk = 1.20, def = 0.20},
[3] = {atk = 1.25, def = 0.25},
[4] = {atk = 1.30, def = 0.30},
[5] = {atk = 1.35, def = 0.35},
},
[DRAGONDAMAGE] = {
[1] = {atk = 1.10, def = 0.10},
[2] = {atk = 1.15, def = 0.15},
[3] = {atk = 1.20, def = 0.20},
[4] = {atk = 1.25, def = 0.25},
[5] = {atk = 1.30, def = 0.30},
},
},
[5] = {
[GHOSTDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
[POISONDAMAGE] = {
[1] = {atk = 1.08, def = 0.08},
[2] = {atk = 1.13, def = 0.13},
[3] = {atk = 1.18, def = 0.18},
[4] = {atk = 1.23, def = 0.23},
[5] = {atk = 1.28, def = 0.28},
},
},
[6] = {
[FIGHTDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
[NORMALDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
},
[7] = {
[PSYCHICDAMAGE] = {
[1] = {atk = 1.10, def = 0.10},
[2] = {atk = 1.15, def = 0.15},
[3] = {atk = 1.20, def = 0.20},
[4] = {atk = 1.25, def = 0.25},
[5] = {atk = 1.30, def = 0.30},
},
["null"] = {
},
},
[8] = {
[GRASSDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
[bUGDAMAGE] = {
[1] = {atk = 1.05, def = 0.05},
[2] = {atk = 1.10, def = 0.10},
[3] = {atk = 1.15, def = 0.15},
[4] = {atk = 1.20, def = 0.20},
[5] = {atk = 1.25, def = 0.25},
},
},
[9] = {
[ELECTRICDAMAGE] = {
[1] = {atk = 1.12, def = 0.12},
[2] = {atk = 1.17, def = 0.17},
[3] = {atk = 1.22, def = 0.22},
[4] = {atk = 1.27, def = 0.27},
[5] = {atk = 1.32, def = 0.32},
},
["null"] = {
},
}
}
function getClanPorcent(master, combat, option)
if getPlayerStorageValue(master, 86228) >= 1 then
local clan = clans[getPlayerStorageValue(master, 86228)]
for i = 1, 9 do
if getPlayerStorageValue(master, 86228) == i then
if clan[combat] then
if option == "atk" then
return clan[combat][getPlayerStorageValue(master, 862281)].atk
else
return clan[combat][getPlayerStorageValue(master, 862281)].def
end
end
end
end
end
return option == "atk" and 1 or 0
end
Tem um npc no server que ja esta funcionando e pondo essa storage porem eu queria meio que separar eles em parte tipo um npc da uma parte da storage e outro da outro
Base ae
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
rank = {"a Naturia Seed", "a Naturia Sprout","a Naturia Webhead","a Naturia Woodtrunk","a Naturia Keeper"}
if msgcontains(msg, 'clan') or msgcontains(msg, 'Clan') then
if getPlayerStorageValue(cid, 86228) == 8 then
selfSay("You already are of the clan naturia!", cid)
talkState[talkUser] = 0
return true
elseif getPlayerStorageValue(cid, 86228) >= 1 then
selfSay("You already are of another clan!", cid)
talkState[talkUser] = 0
return true
end
selfSay("So you want to join in my clan... Are you sure that?", cid)
talkState[talkUser] = 2
elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 2 then
if getPlayerLevel(cid) < 80 then
selfSay("You are too weak yet... You need to be atleast level 80 to enter in the clan!", cid)
talkState[talkUser] = 0
return true
end
selfSay("OK then... Now you are a great member of de clan naturia!", cid)
setPlayerStorageValue(cid, 86228, 8)
setPlayerStorageValue(cid, 862281, 1)
setPlayerStorageValue(cid, 181612, 1)
talkState[talkUser] = 0
elseif msgcontains(msg, 'rank') or msgcontains(msg, 'rank') then
if getPlayerStorageValue(cid, 86228) == 8 then
selfSay("So.. you want to move up of rank?", cid)
talkState[talkUser] = 3
else
selfSay("You aren't of the clan naturia! Get out of here!", cid)
talkState[talkUser] = 0
return true
end
elseif (msgcontains(msg, 'yes') or msgcontains(msg, 'Yes')) and talkState[talkUser] == 3 then
if (getPlayerStorageValue(cid, 862281)+1) == 2 then
level = 90
elseif (getPlayerStorageValue(cid, 862281)+1) == 3 then
level = 100
elseif (getPlayerStorageValue(cid, 862281)+1) == 4 then
level = 110
elseif (getPlayerStorageValue(cid, 862281)+1) == 5 then
level = 120
end
if getPlayerLevel(cid) < level then
selfSay("You are too weak yet... You need to be atleast level "..level.." to move up of rank!", cid)
talkState[talkUser] = 0
return true
end
if getPlayerStorageValue(cid, 862281) == 5 then
selfSay("You are already a master of our clan!", cid)
talkState[talkUser] = 0
return true
end
setPlayerStorageValue(cid, 862281, getPlayerStorageValue(cid, 862281)+1)
if getPlayerStorageValue(cid, 862281) == 5 then
setPlayerStorageValue(cid, 181623, 1)
end
selfSay("So here we are... You are now a "..rank[getPlayerStorageValue(cid, 862281)]..", rank "..getPlayerStorageValue(cid, 862281).." of our clan!", cid)
talkState[talkUser] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Espero que me ajudem e desde já Muito Obrigado.
Link para o comentário
https://xtibia.com/forum/topic/193525-npc-de-quest-que-da-storager/Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados