
luckzinsalles
Membro
-
Registro em
-
Última visita
Histórico de Curtidas
-
luckzinsalles deu reputação a Danihcv em (Resolvido)Erro PLAYER_DEPOTITEMSExecuta esse comando na sua data base:
DROP TABLE IF EXISTS `player_depotitems`; CREATE TABLE `player_depotitems` ( `player_id` INT NOT NULL, `sid` INT NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots', `pid` INT NOT NULL DEFAULT 0, `itemtype` INT NOT NULL, `count` INT NOT NULL DEFAULT 0, `attributes` BLOB NOT NULL, KEY (`player_id`), UNIQUE (`player_id`, `sid`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; -
luckzinsalles deu reputação a Bruno Minervino em (Resolvido)[GESIOR] Invalid Password no OTProblema resolvido,
Ajudei o luckzinsalles com acesso remoto.
Abraço!
-
luckzinsalles deu reputação a Danihcv em (Resolvido)NPC Teleport+ItemsDesculpe, foi falta de atenção.
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 local item1 = 2494 --Demon Armor local qntd1 = 1 --Quantidade do item 1 local item2 = 2495 --Demon Legs local qntd2 = 1 --Quantidade do item 2 local pos = {x=1, y=1, z=1} --Posicao pra onde o player vai ser teleportado local stor = 6967 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'yes') then selfSay('To do this quest you need to give me a Demon Armor and a Demon Legs. Do you have it?', cid) if msgcontains(msg, 'yes') then if getPlayerItemCount(cid, item1) >= qntd1 and getPlayerItemCount(cid, item2) >= qntd2 then if getPlayerStorageValue(cid, stor) ~= 1 then doPlayerRemoveItem(cid, item1, qntd1) doPlayerRemoveItem(cid, item2, qntd2) doTeleportThing(cid, pos) doSendMagicEffect(getThingPos(cid), 13) setPlayerStorageValue(cid, stor, 1) else selfSay('Voce ja fez esta quest.', cid) end else selfSay('Voce nao tem os itens necessarios pra fazer esta quest.', cid) end elseif msgcontains(msg, 'no') then selfSay('So go away! I have nothing to you.', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
luckzinsalles deu reputação a Snowsz em NPC não remove ITEMS!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 local item1 = 2494 --Demon Armor local qntd1 = 1 --Quantidade do item 1 local item2 = 2495 --Demon Legs local qntd2 = 1 --Quantidade do item 2 local pos = {x=201, y=259, z=7} --Posicao pra onde o player vai ser teleportado local stor = 6967 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'yes') then selfSay('To do this quest you need to give me a Demon Armor and a Demon Legs. Do you have it?', cid) if msgcontains(msg, 'yes') then if getPlayerItemCount(cid, item1) >= qntd1 and getPlayerItemCount(cid, item2) >= qntd2 then if getPlayerStorageValue(cid, stor) ~= 1 then doTeleportThing(cid, pos) doSendMagicEffect(getThingPos(cid), 13) setPlayerStorageValue(cid, stor, 1) doPlayerRemoveItem(cid, item1, qntd1) doPlayerRemoveItem(cid, item2, qntd2) else selfSay('Voce ja fez esta quest.', cid) end else selfSay('Voce nao tem os itens necessarios pra fazer esta quest.', cid) end elseif msgcontains(msg, 'no') then selfSay('So go away! I have nothing to you.', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Na próxima, pra ajudar a gente, poe em code o código...
-
luckzinsalles deu reputação a Danihcv em (Resolvido)NPC Teleport+ItemsVa na pasta data/npc e crie um arquivo chamado Jamez.xml e coloque isso dentro:
<?xml version="1.0" encoding="UTF-8"?> <npc name="Jamez" script="data/npc/scripts/jamez.lua" walkinterval="1500" speed="100" walkradius="2" floorchange="0"> <health max="100" now="100"/> <look type="129" head="115" body="88" legs="85" feet="114" addons="0" mount="0"/> <parameters> <!--MESSAGES--> <parameter key="message_greet" value="Hello, |PLAYERNAME|. Do you want to make a quest?"/> <parameter key="message_farewell" value="Good bye, |PLAYERNAME|."/> </parameters> </npc> Agora va na pasta data/npc/scripts e crie um arquivo chamado jamez.lua e coloque isso dentro:
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 local item1 = 2494 --Demon Armor local qntd1 = 1 --Quantidade do item 1 local item2 = 2495 --Demon Legs local qntd2 = 1 --Quantidade do item 2 local pos = {x=1, y=1, z=1} --Posicao pra onde o player vai ser teleportado local stor = 6967 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'yes') then selfSay('To do this quest you need to give me a Demon Armor and a Demon Legs. Do you have it?', cid) if msgcontains(msg, 'yes') then if getPlayerItemCount(cid, item1) >= qntd1 and getPlayerItemCount(cid, item2) >= qntd2 then if getPlayerStorageValue(cid, stor) ~= 1 then doPlayerRemoveItem(cid, item1, qntd1) doPlayerRemoveItem(cid, item2, qntd2) doTeleportThing(cid, pos) doSendMagicEffect(getThingPos(cid), 13) setPlayerStorageValue(cid, stor, 1) else selfSay('Voce ja fez esta quest.', cid) end else selfSay('Voce nao tem os itens necessarios pra fazer esta quest.', cid) end elseif msgcontains(msg, 'no') then selfSay('So go away! I have nothing to you.', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Funciona assim, qnd o player falar hi, o npc pergunta se ele qr fazer uma quest. Ao responder yes o npc pergunta se o player tem os itens. Se disser sim e tiver os itens, o player é teleportado.
Não esqueça de configurar isso no script .lua do npc: