Postado Julho 21, 2016 8 anos Autor @Kemmlly Camarada não querendo abusar da sua boa vontade, mas já o fazendo. Tenho esse npc no server que teleporta o player para o local se tiver level 100+ , mas queria saber se é possível adicionar um storageid nele para que o player possa ser teleportado apenas uma vez. Mas caso ele não mate o boss ai pode tentar novamente. local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10} } 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 if (msgcontains(msg, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) >= tab.level) then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or more.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Postado Julho 21, 2016 8 anos alguém pode me ajudar preciso de 1 script que fique saindo [VIP] no player quando ele tiver premium account Editado Julho 21, 2016 8 anos por kauan13 (veja o histórico de edições)
Postado Julho 21, 2016 8 anos 12 minutos atrás, Felipe Lotz disse: @Kemmlly Camarada não querendo abusar da sua boa vontade, mas já o fazendo. Tenho esse npc no server que teleporta o player para o local se tiver level 100+ , mas queria saber se é possível adicionar um storageid nele para que o player possa ser teleportado apenas uma vez. Mas caso ele não mate o boss ai pode tentar novamente. local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10} } 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 if (msgcontains(msg, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) >= tab.level) then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or more.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10}, storage = 6666 -- Storage } 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 if (msgcontains(msg, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) >= tab.level) and getPlayerStorageValue(cid, tab.storage) < 1 then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) setPlayerStorageValue(cid, tab.storage, 1) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) elseif getPlayerStorageValue(cid, tab.storage) == 1 then selfSay('Voce ja matou o BOSS!', cid) elseif (getPlayerLevel(cid) < tab.level) then talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or more.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) 16 minutos atrás, kauan13 disse: alguém pode me ajudar preciso de 1 script que fique saindo [VIP] no player quando ele tiver premium account Subir efeito no player ou [VIP] atrás do nome do jogador?
Postado Julho 21, 2016 8 anos Quero Que Suba [VIP] igual Quando Solta 1 Magia Tipo Isso Quando Ele Tiver Premium account
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.