Vilk 5 Postado Agosto 7, 2015 Share Postado Agosto 7, 2015 (editado) 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) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() enditem = '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') thenif(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 = 0if 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 trueendnpcHandler: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) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() enditem = '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') thenif(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 = 0if 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 trueendnpcHandler: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) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() enditem = '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') thenif(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 = 0if 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 trueendnpcHandler: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) endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) endfunction onThink() npcHandler:onThink() enditem = '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') thenif(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 = 0if 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 trueendnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)npcHandler:addModule(FocusModule:new()) FONTE: https://otland.net/threads/island-of-destiny-npcs-and-oracle.120126/ Editado Agosto 7, 2015 por Vilk Link para o comentário Compartilhar em outros sites More sharing options...
Jow man 2 Postado Agosto 7, 2015 Share Postado Agosto 7, 2015 Só uma pequena correção: não é falce e sim false. Abraços. Link para o comentário Compartilhar em outros sites More sharing options...
Vilk 5 Postado Agosto 7, 2015 Autor Share Postado Agosto 7, 2015 VLW PELA CORREÇÃO!! Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados