Postado Outubro 1, 2018 6 anos Galera estou com um problema aqui queria saber como posso resolve-lo a seguinte função doSetCreatureOutfit(cid, outfit, time) não funciona em todas vocações o que percebi e que nem é na vocation e sim na outfit exemplo eu criei uma nova vocação se eu executar um script que chama essa função pra mudar a outfit ele não muda, e as outras vocações funcionam, acho que pode ser falta de alguma configuração mas não sei onde, quem poder ajudar ai +REP!
Postado Outubro 3, 2018 6 anos Em 01/10/2018 em 17:34, matheus1234567 disse: Galera estou com um problema aqui queria saber como posso resolve-lo a seguinte função doSetCreatureOutfit(cid, outfit, time) não funciona em todas vocações o que percebi e que nem é na vocation e sim na outfit exemplo eu criei uma nova vocação se eu executar um script que chama essa função pra mudar a outfit ele não muda, e as outras vocações funcionam, acho que pode ser falta de alguma configuração mas não sei onde, quem poder ajudar ai +REP! manda os scripts Vc pode tentar colocar no script Spoiler local outfit2 = {lookType = 571} -- Seria o lookType do Outfit no lugar do doSetCreatureOutfit(cid, outfit, time) coloca esse aqui doCreatureChangeOutfit(cid, outfit2) Editado Outubro 3, 2018 6 anos por kiinho (veja o histórico de edições)
Postado Outubro 9, 2018 6 anos Autor Em 03/10/2018 em 19:09, kiinho disse: manda os scripts Vc pode tentar colocar no script Ocultar conteúdo local outfit2 = {lookType = 571} -- Seria o lookType do Outfit no lugar do doSetCreatureOutfit(cid, outfit, time) coloca esse aqui doCreatureChangeOutfit(cid, outfit2) mas é a parte do tempo?, vou mandar o script: Script: Spoiler 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 function doEffect(cid) local delay = 1 if isPlayer(cid) and getPlayerStorageValue(cid, 35012) == -1 then doSendMagicEffect(getCreaturePosition(cid), 34) addEvent(doEffect, delay*1000, cid) setPlayerStorageValue(cid, 35012, 1) end end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local outfit = {lookType = 615, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} local storage = 32184 local config = { espaco = {x=794, y=11, z=7}, earthpos = {x=106, y=149, z=10}, sandpos = {x=288, y=935, z=8}, m2pos = {x=78, y=514, z=8}, tsufurpos = {x=105, y=489, z=8}, zeltapos = {x=105, y=515, z=8}, vegetapos = {x=141, y=489, z=8}, namekpos = {x=141, y=515, z=8}, ludepos = {x=191, y=498, z=8}, premiapos = {x=191, y=524, z=8}, boarpos = {x=75, y=488, z=8}, ruudopos = {x=103, y=547, z=8}, city17pos = {x=800, y=1133, z=8}, gardiapos = {x=48, y=1274, z=8}, gelbopos = {x=120, y=472, z=8}, kanassapos = {x=140, y=470, z=8} } if msgcontains(msg, 'earth') or msgcontains(msg, 'Earth') then selfSay('Voce quer realmente se teletransportar para {Earth}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 1) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 1 then if isPlayer(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.earthpos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'sand city') or msgcontains(msg, 'Sand City') then selfSay('Voce quer realmente se teletransportar para {Sand City}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 2) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 2 then if isPlayer(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.sandpos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'm2') or msgcontains(msg, 'M2') then selfSay('Voce quer realmente se teletransportar para {M2}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 3) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 3 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.m2pos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {M2}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'tsufur') or msgcontains(msg, 'Tsufur') then selfSay('Voce quer realmente se teletransportar para {Tsufur}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 4) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 4 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.tsufurpos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Tsufur}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'zelta') or msgcontains(msg, 'Zelta') then selfSay('Voce quer realmente se teletransportar para {Zelta}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 5) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 5 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.zeltapos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Zelta}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'vegeta') or msgcontains(msg, 'Vegeta') then selfSay('Voce quer realmente se teletransportar para {Vegeta}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 6) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 6 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.vegetapos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Vegeta}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'namek') or msgcontains(msg, 'Namek') then selfSay('Voce quer realmente se teletransportar para {Namek}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 7) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 7 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.namekpos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Namek}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'lude') or msgcontains(msg, 'Lude') then selfSay('Voce quer realmente se teletransportar para {Lude}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 8) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 8 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.ludepos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Lude}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'premia') or msgcontains(msg, 'Premia') then selfSay('Voce quer realmente se teletransportar para {Premia}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 9) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 9 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.premiapos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Premia}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, "boar's island") or msgcontains(msg, "Boar's Island") then selfSay("Voce quer realmente se teletransportar para {Boar's Island}?'", cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 10) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 10 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.boarpos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay("Apenas players premium podem viajar para {Boar's Island}", cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'ruudo') or msgcontains(msg, 'Ruudo') then selfSay('Voce quer realmente se teletransportar para {Ruudo}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 11) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 11 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.ruudopos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Ruudo}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'city 17') or msgcontains(msg, 'City 17') then selfSay('Voce quer realmente se teletransportar para {City 17}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 12) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 12 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.city17pos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {City 17}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'gardia') or msgcontains(msg, 'Gardia') then selfSay('Voce quer realmente se teletransportar para {Gardia}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 13) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 13 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.gardiapos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Gardia}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'gelbo') or msgcontains(msg, 'Gelbo') then selfSay('Voce quer realmente se teletransportar para {Gelbo}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 14) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 14 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.gelbopos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Gelbo}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end if msgcontains(msg, 'kanassa') or msgcontains(msg, 'Kanassa') then selfSay('Voce quer realmente se teletransportar para {Kanassa}?', cid) talkState[talkUser] = 1 setPlayerStorageValue(cid, storage, 15) elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') and getPlayerStorageValue(cid, storage) == 15 then if isPlayer(cid) then if isPremium(cid) then doSetCreatureOutfit(cid, outfit, 2200) addEvent(doTeleportThing, 1000, cid, config.espaco, true) addEvent(doTeleportThing, 2000, cid, config.kanassapos, true) setPlayerStorageValue(cid, 35012, -1) setPlayerStorageValue(cid, storage, -1) addEvent(doEffect, 2200, cid) else selfSay('Apenas players premium podem viajar para {Kanassa}', cid) end end end if msgcontains(msg, 'no') then selfSay('Tudo bem, até mais!', cid) end end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.