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
<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
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
<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
info
Grupo: Campones
Registrado: 27/04/15
Posts: 26
Reputação: +5
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
true> false (Assim ele iniciará sem vocação nem uma.)2- Vá em Data/npc crie um novo npc renomeia ele como:
Sorcerer Estrella.xml Depois abra e cole isso e salva: \/
Agora vai em data/npc/script e crie um novo documento com o nome:
iodsorcerer.lua depois abra e cole isso dentro e salva: \/
FAÇA ESSE MESMO PROCESSO COM TODOS OS OUTROS OS NOMES ESTARÃO EM DESTAQUE.
----------------------------------------------------------------------------
Knight Hykrion.xml
iodknight.lua
-----------------------------------------------------------------------------
Paladin Narai.xml
iodpaladin.lua
-----------------------------------------------------------------------------------------------
Druid Yandur.xml
ioddruid.lua
FONTE: https://otland.net/threads/island-of-destiny-npcs-and-oracle.120126/
Editado Agosto 7 por Vilk