Ir para conteúdo

Líderes

Conteúdo Popular

Exibindo conteúdo com a maior reputação em 04/23/13 em todas áreas

  1. Ajuda NPC de Mission

    andreguima e 2 outros reagiu a GiovaniRodrigo por uma resposta no tópico

    3 pontos
    Vamos começar pelo NPC. Crie um arquivo chamado npcquest.lua na pasta data/npc/scripts e cole isso dentro Crie um arquivo chamado Npc Quest.xml na pasta data/npc e cole isso dentro <?xml version="1.0" encoding="UTF-8"?> <npc name="Nome Npc" script="data/npc/scripts/npcquest.lua" walkinterval="25" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="128" head="97" body="100" legs="115" feet="114" corpse="2212"/> <parameters> <parameter key="message_greet" value="Hello, |PLAYERNAME|! Would like to do a {mission} for me?"/> <parameter key="message_walkaway" value="Hey Hey, where you go?"/> <parameter key="message_farewell" value="Goodbye |PLAYERNAME|."/> </parameters> </npc> Configurando Agora vamos para a porta Actions Crie um arquivo chamado storagedoor.lua na pasta data/action/scripts e cole isso dentro function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, 30003) >= 1 then doTransformItem(item.uid,item.itemid+1) doTeleportThing(cid, topos) else doPlayerSendTextMessage(cid, 22, 'You don\'t have access to area.') end end Adicione a seguinte linha no arquivo actions.xml que esta na pasta data/actions <action actionid="4587" event="script" value="storagedoor.lua" /> Movements Crie um arquivo chamado storagedoor.lua na pasta data/movements/scripts e cole isso function onStepOut(cid, item, position, fromposition) doTransformItem(item.uid,item.itemid-1) end Adicione a seguinte linha no arquivo movements.xml que esta na pasta data/movements <movements type="StepOut" actionid="4587" event="script" value="storagedoor.lua" /> MapEditor No MapEditor coloque a porta com o Action ID 4587 Não testei caso der erro avise. Dúvidas? Me avise. @EDIT Editei o script do NPC pois tinha esquecido de algo. (OBS: Use portas que ela fechada seja um ID antes da aberta, ex: Fechada: 5112 e Aberta: 5113) Att. Giovani Rodrigo
  2. [Download] Narutibia - WebSite Entrance

    Flaviootp reagiu a LuckinhaSan por uma resposta no tópico

    1 ponto
    Download - Tutorial - Primeiramente, baixe o Naruto WebSite Entrance e extraia para seu Desktop. Em seguida, vá na pasta do seu Xamp, depois em htdocs. Crie uma pasta com o nome do site, e mova todos os arquivos do seu WebSite para esta pasta. Depois de ter movido, coloque os arquivos do Naruto WebSite Entranca na pasta htdocs do Xamp. Abra a pasta config do Naruto WebSite Entrance, e depois abra config.php. $entra['site'] = 'link do site'; Em link do site, apenas coloque site. O resto configure como quiser.
  3. [Npc] Banco De Guild

    GiovaniRodrigo reagiu a Skydangerous por uma resposta no tópico

    1 ponto
    Esse npc é utizado pela guild , um npc de banco para todos membros. 1- Você deve ir na sua database é adicionar esse comando alter table guilds add balance int(11) not null default 0; 2- Agora crie um arquivo na pasta npc e coloque isso dentro. <!--?xml version="1.0" encoding="UTF-8"?--> <npc name="Jhon" script="guildbank.lua" walkinterval="0" floorchange="0"> <health now="150" max="150"> <look type="129" head="114" body="119" legs="114" feet="114" corpse="2212"> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. If you wan't to see your guild's balance, say {balance}."> </parameter></parameters> </look></health></npc> Em seguida abra pasta scripts que está dentro da pasta npcs , crie um arquivo chamado guildbank e cole isto. function getGuildBalance(id) local query = db.getResult("select balance from guilds where id = " .. id .. ";") if query:getID() ~= -1 then return query:getDataInt("balance") end return LUA_ERROR end 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 local money = 0 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if msgcontains(msg, "balance") then if getPlayerGuildId(cid) < 1 then selfSay("You don't have any guild.", cid) else selfSay("The balance for the guild " .. getPlayerGuildName(cid) .. " is " .. getGuildBalance(getPlayerGuildId(cid)) .. " gold coins.", cid) talkState[talkUser] = 0 end elseif msgcontains(msg, "deposit") then if getPlayerGuildId(cid) < 1 then selfSay("You don't have any guild.", cid) else selfSay("How much money do you want deposit to your guild balance?", cid) talkState[talkUser] = 1 end elseif talkState[talkUser] == 1 then if not tonumber(msg) or tonumber(msg) < 1 then selfSay("Please tell me how much do you want to deposit to your guild's balance?", cid) end money = math.abs(tonumber(msg)) selfSay("Are you sure that do you want to deposit " .. money .. " gold coins to your guild's balance?", cid) talkState[talkUser] = 2 elseif msgcontains(msg, "yes") and talkState[talkUser] == 2 then if getPlayerGuildId(cid) < 1 then selfSay("You don't have any guild.", cid) else if getPlayerMoney(cid) >= money then local query = db.executeQuery("update guilds set balance = balance + " .. money .. " where id = " .. getPlayerGuildId(cid) .. ";") if query ~= LUA_ERROR then selfSay("You have deposited " .. money .. " gold coins to your guild's balance.", cid) doPlayerRemoveMoney(cid, money) talkState[talkUser] = 0 else selfSay("Money can not be deposited, please contact a gamemaster.", cid) error("[Error::Query] " .. query .. ", error while trying to add a value into balance.") talkState[talkUser] = 0 end else selfSay("Sorry, you don't have the money.", cid) talkState[talkUser] = 0 end end elseif msgcontains(msg, "withdraw") then if getPlayerGuildId(cid) < 1 then selfSay("You don't have any guild.", cid) else selfSay("How much money do you want to withdraw from your guild's balance?", cid) talkState[talkUser] = 3 end elseif talkState[talkUser] == 3 then if not tonumber(msg) or tonumber(msg) < 1 then selfSay("Please tell me how much do you want to withdraw from your guild's balance?", cid) end money = math.abs(tonumber(msg)) selfSay("Are you sure that do you want to withdraw " .. money .. " gold coins from your guild's balance?", cid) talkState[talkUser] = 4 elseif msgcontains(msg, "yes") and talkState[talkUser] == 4 then if getPlayerGuildId(cid) < 1 then selfSay("You don't have any guild.", cid) else if getGuildBalance(getPlayerGuildId(cid)) >= money then local query = db.executeQuery("update guilds set balance = (balance - " .. money.. ") where id = " .. getPlayerGuildId(cid) .. ";") if query then selfSay("You withdraw " .. money .. " gold coins from your guild's balance.", cid) doPlayerAddMoney(cid, money) talkState[talkUser] = 0 else selfSay("Money can not be retired, please contact a gamemaster.", cid) error("[Error::Query] " .. query .. ", error while trying to remove a value from balance.") talkState[talkUser] = 0 end else selfSay("Sorry, your guild don't have the money in the balance.", cid) talkState[talkUser] = 0 end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Pronto , bom divertimento. Créditos: darkhaos
  4. scripts

    Fire Water Earth Air reagiu a GiovaniRodrigo por uma resposta no tópico

    1 ponto
    Crie um arquivo chamado tileitem.lua na pasta data/movements/scripts e cole isso dentro local slotItem = 2 local itemId = 5785 function onStepIn(cid, item, fromPosition, item2, topos) if getPlayerSlotItem(cid, slotItem).itemid == itemId then doPlayerSendMessage(cid, 22, 'Welcome') else doTeleportThing(cid, fromPosition) doPlayerSendMessage(cid, 22, 'You need a '.. getItemNameById(itemId) ..' to pass') end end Configurando Adicione no arquivo movements.xml que está na pasta data/movements a seguinte linha <movevent type="StepIn" actionid="5785" event="script" value="tileitem.lua"/> No piso que você quer que exige o item coloque o Action ID 5785 Não testei então se der algum erro avise. Dúvidas? Me Avise Att. Giovani Rodrigo
  5. [Resolvido] Dúvida

    TathiiCarvalho reagiu a Fire Water Earth Air por uma resposta no tópico

    1 ponto
    Ve se o final das actions ou alguma coisa que vc deve ter apagado tipo isso Correto <action itemid="1967" script="scroll.lua"/> Errado <action itemid="1967" script="scroll.lua"> isso pode ser o erro ou outra coisa verifique o que acontece em seu xml action
  6. 1 ponto
    to mandando aki espero que vc saiba usar os scrypt Python ? NoenSpellcasterMOD.rar
  7. mysql_real_query ERROR

    157kolosso reagiu a Private Sub Teste por uma resposta no tópico

    1 ponto
    Unknown column 'frags_all' in 'field list' ALTER TABLE players ADD frags_all INT(11) NOT NULL DEFAULT 0; I recommend, and urgent, that you study something about Mysql ...
Líderes está configurado para São Paulo/GMT-03:00

Informação Importante

Confirmação de Termo