Ir para conteúdo

Npc's de Island Of Destiny


Vilk

Posts Recomendados

Como deixar o personagem que criou uma conta sem vocação.

 

1-Vá em Config.lua depois procure por (newPlayerChooseVoc = true) onde tiver True, troque por false.

 

EXEMPLO

 

accountManager = true
namelockManager = true
newPlayerChooseVoc = true > false (Assim ele iniciará sem vocação nem uma.)
newPlayerSpawnPosX = x <!-- Posição x -->
newPlayerSpawnPosY = y <!-- Posição y -->
newPlayerSpawnPosZ = z <!-- Posição z -->
newPlayerTownId = 5 <!-- Cidade -->
newPlayerLevel = 1 <!-- level que o jogador irá iniciar -->
newPlayerMagicLevel = 0
generateAccountNumber = false

 

 

2- Vá em Data/npc crie um novo npc renomeia ele como:

Sorcerer Estrella.xml Depois abra e cole isso e salva: \/

 

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Sorcerer Estrella" script="data/npc/scripts/iodsorcerer.lua" walkinterval="20000" floorchange="0">
<health now="100" max="100"/>
<look type="149" head="59" body="132" legs="94" feet="114" addons="3"/>
<parameters>
<parameter key="message_greet" value="Hi |PLAYERNAME|. are you interested in sorcerer vocation, {Ok}?."/>
</parameters>
</npc>

 

 

Agora vai em data/npc/script e crie um novo documento com o nome:

iodsorcerer.lua depois abra e cole isso dentro e salva: \/

 

 

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

item = 'You do not have the required Level or You Already have a Vocation!.'
done = 'Congratulations now you are sorcerer, Go to the dungeon and take your items and hunt.'

function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

if msgcontains(msg, 'ok') then
selfSay('Do you Want to become a sorcerer?', cid)
elseif msgcontains(msg, 'yes') then
if(getPlayerLevel(cid) > 1) then
selfSay('Say it Proudly: Yes, I Want to Become a sorcerer!', cid)
talk_state = 1
else
selfSay('You do not have the required Level or You Already have a Vocation!.', cid)
talk_state = 0
end
elseif msgcontains(msg, 'sorcerer') and talk_state == 1 then
talk_state = 0
if getCreatureStorage(cid, 43211) == 1 == FALSE then
selfSay(done, cid)
doPlayerSetVocation(cid, 1)
setPlayerStorageValue(cid, 43211,1)
doSendMagicEffect(getCreaturePosition(cid), 14)
else
selfSay(item, cid)
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok than.')
talk_state = 0
end
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

 

 

FAÇA ESSE MESMO PROCESSO COM TODOS OS OUTROS OS NOMES ESTARÃO EM DESTAQUE.

 

 

 

 

----------------------------------------------------------------------------

Knight Hykrion.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Knight Hykrion" script="data/npc/scripts/iodknight.lua" walkinterval="20000" floorchange="0">
<health now="100" max="100"/>
<look type="131" head="95" body="78" legs="78" feet="95" addons="3"/>
<parameters>
<parameter key="message_greet" value="Hi |PLAYERNAME|. are you interested in knight vocation, {Ok}?."/>
</parameters>
</npc>

 

 

iodknight.lua

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

item = 'You do not have the required Level or You Already have a Vocation!.'
done = 'Congratulations now you are knight, Go to the dungeon and take your items and hunt.'

function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

if msgcontains(msg, 'ok') then
selfSay('Do you Want to become a knight?', cid)
elseif msgcontains(msg, 'yes') then
if(getPlayerLevel(cid) > 1) then
selfSay('Say it Proudly: Yes, I Want to Become a knight!', cid)
talk_state = 1
else
selfSay('You do not have the required Level or You Already have a Vocation!.', cid)
talk_state = 0
end
elseif msgcontains(msg, 'knight') and talk_state == 1 then
talk_state = 0
if getCreatureStorage(cid, 43211) == 1 == FALSE then
selfSay(done, cid)
doPlayerSetVocation(cid, 4)
setPlayerStorageValue(cid, 43211,1)
doSendMagicEffect(getCreaturePosition(cid), 14)
else
selfSay(item, cid)
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok than.')
talk_state = 0
end
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

 

-----------------------------------------------------------------------------
Paladin Narai.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Paladin Narai" script="data/npc/scripts/iodpaladin.lua" walkinterval="20000" floorchange="0">
<health now="100" max="100"/>
<look type="137" head="114" body="63" legs="0" feet="112" addons="3"/>
<parameters>
<parameter key="message_greet" value="Hi |PLAYERNAME|. are you interested in paladin vocation, {Ok}?."/>
</parameters>
</npc>

 

 

iodpaladin.lua

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

item = 'You do not have the required Level or You Already have a Vocation!.'
done = 'Congratulations now you are paladin, Go to the dungeon and take your items and hunt.'

function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

if msgcontains(msg, 'ok') then
selfSay('Do you Want to become a paladin?', cid)
elseif msgcontains(msg, 'yes') then
if(getPlayerLevel(cid) > 1) then
selfSay('Say it Proudly: Yes, I Want to Become a paladin!', cid)
talk_state = 1
else
selfSay('You do not have the required Level or You Already have a Vocation!.', cid)
talk_state = 0
end
elseif msgcontains(msg, 'paladin') and talk_state == 1 then
talk_state = 0
if getCreatureStorage(cid, 43211) == 1 == FALSE then
selfSay(done, cid)
doPlayerSetVocation(cid, 3)
setPlayerStorageValue(cid, 43211,1)
doSendMagicEffect(getCreaturePosition(cid), 14)
else
selfSay(item, cid)
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok than.')
talk_state = 0
end
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

 

-----------------------------------------------------------------------------------------------
Druid Yandur.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Druid Yandur" script="data/npc/scripts/ioddruid.lua" walkinterval="20000" floorchange="0">
<health now="100" max="100"/>
<look type="144" head="115" body="115" legs="132" feet="115" addons="3"/>
<parameters>
<parameter key="message_greet" value="Hi |PLAYERNAME|. are you interested in druid vocation, {Ok}?."/>
</parameters>
</npc>

 

 

ioddruid.lua

Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

item = 'You do not have the required Level or You Already have a Vocation!.'
done = 'Congratulations now you are druid, Go to the dungeon and take your items and hunt.'

function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end

if msgcontains(msg, 'ok') then
selfSay('Do you Want to become a druid?', cid)
elseif msgcontains(msg, 'yes') then
if(getPlayerLevel(cid) > 1) then
selfSay('Say it Proudly: Yes, I Want to Become a druid!', cid)
talk_state = 1
else
selfSay('You do not have the required Level or You Already have a Vocation!.', cid)
talk_state = 0
end
elseif msgcontains(msg, 'druid') and talk_state == 1 then
talk_state = 0
if getCreatureStorage(cid, 43211) == 1 == FALSE then
selfSay(done, cid)
doPlayerSetVocation(cid, 2)
setPlayerStorageValue(cid, 43211,1)
doSendMagicEffect(getCreaturePosition(cid), 14)
else
selfSay(item, cid)
end
elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
selfSay('Ok than.')
talk_state = 0
end
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

 

FONTE: https://otland.net/threads/island-of-destiny-npcs-and-oracle.120126/

Editado por Vilk
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...