Ir para conteúdo

joadson

Campones
  • Total de itens

    26
  • Registro em

  • Última visita

Posts postados por joadson

  1. Eu resolvi, editar a sourcer, colocando para ser compatível com linux e windows.
    Tinha alguns códigos mal "formulados" gerando os possíveis crashs.

    O que vem no conteúdo a seguir contem os seguintes items :

    • Sourcers com o Cast System(Linux/Windows)
    • Código MySQL para você por na sua database.
    • Talkaction para o player poder executar o comando.
    • Cast.php, que é a página do Cast System com comandos e outros (Compatível com o gesior e em português).
    • Adicione enableCast = "true" (no seu config.lua)

    Estarei tirando dúvidas em relação as minhas modificações.

     

    Link Copilado 32Bits(Windows) http://www.mediafire.com/?166i4wg4q3te4uc

    Scan: https://www.virustotal.com/pt/file/7020fa7a169a390cf5fabaca8a8edbcbe4e4f119e99c7d9dd66c2741227dd293/analysis/1383447449/
    OBS> no scan acusou um virus, se alguém duvida de algo, baixe a source e copile por si.

     

    Link Source: http://www.mediafire.com/?w19t81fgivm6j06
    Scan: https://www.virustotal.com/pt/file/2f8b21c37316415e5175afaa12d73c43e4c5cfa8dba206cf5a144b2f909aefa7/analysis/1383448112/


    Créditos: Summ, Jamilson Collins, Eu por ter modificado

    Aproveitem, deu um pouco de trabalho para corrigir os problemas.

  2. Simples vá no seu talkaction.xml e mude sua linha que deve está mais ou menos assim

    <talkaction log="yes" words="/addskill" access="5" event="function" value="ALGUMACOISA.lua"/> e coloque esse no lugar

    <talkaction log="yes" words="/addskill" access="5" event="function" value="addSkill"/>, desse jeito já pega as funções da sourcer(executável)

  3. Tente com esse aqui.

    Vá em data/npc e crie um arquivo chamado equipe.xml e cole isso dentro

    <?xml version="1.0" encoding="UTF-8"?>
    <npc name="Equipe" script="data/npc/scripts/equipe.lua" walkinterval="2000" floorchange="0">
       <health now="100" max="100"/>
       <look type="134" head="78" body="88" legs="0" feet="88" addons="3"/>
    </npc>

    e depois vá em data/npc/script e crie outro arquivo chamado equipe.lua e coloque o codigo abaixo nele.

    local focus = 0
    local talk_start = 0
    local target = 0
    local following = false
    local attacking = false
    function onThingMove(creature, thing, oldpos, oldstackpos)
    end
    function onCreatureAppear(creature)
    end
    function onCreatureDisappear(cid, pos)
         if focus == cid then
    	  selfSay('Adeus.')
    	  focus = 0
    	  talk_start = 0
         end
    end
    function onCreatureTurn(creature)
    end
    function msgcontains(txt, str)
         return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
    end
    
    function onCreatureSay(cid, type, msg)
         msg = string.lower(msg)
    if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 4 then
    selfSay('Ola ' .. getCreatureName(cid) .. 'Você quer virar Tutor?.')
    focus = cid
    talk_start = os.clock()
    elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
    selfSay('Sorry, ' .. getCreatureName(cid) .. '! Aguarde, estou ocupado..')
    
           elseif msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then
                if getPlayerAccess(cid) >= 1 then
                    selfSay('Desculpe, você já é um Tutor')
                    talk_state = 0
                elseif getPlayerLevel(cid) < 50 then
                   selfSay('Voce precisa ter no minimo level 50...')
                   talk_state = 0
               end
           elseif talk_state == 1 then
    if getPlayerAccess(cid) >= 1 then
    selfSay('Parabens! Você acabou de virar Tutor.')
    setPlayerGroupId(cid, 2)
    end
    talk_state = 0
    end
    function onCreatureChangeOutfit(creature)
    end
    function onThink()
       doNpcSetCreatureFocus(focus)
       if (os.clock() - talk_start) > 30 then
        if focus > 0 then
    	    selfSay('Next...')
        end
        focus = 0
        talk_start = 0
       end
       if focus ~= 0 then
        if getDistanceToCreature(focus) > 5 then
    	    selfSay('Adeus')
    	    focus = 0
    	    talk_start = 0
        end
       end
    end
    end

     

    OBS: Estou começando a scriptar agora, então pode haver erros.

    Mas o que vale é a intenção :D

  4. Tente com esse aqui, se der erro só dizer :D

    function onCastSpell(cid, var)
    local playerpos = getCreaturePosition(cid)
    local target = getCreatureTarget(cid)
    local trapos = getCreaturePosition(target, getPlayerLookDir(cid), 4) -- 4 é o SQM
    local level = getPlayerLevel(cid)
    local levelz = (level*0.1)
    for teleport = 1,3 do
    if target == isMonster or isCreature then
    doTeleportThing(cid,trapos)
    doCreatureAddHealth(target, -levelz)
    doSendMagicEffect(trapos, 39)
    doSendAnimatedText(trapos, "Blink", math.random(1,255))
    else
    doPlayerSendTextMessage(cid,22,'Seu alvo não é um monstro nem player')
    end
    return true
    end
    end
    

  5. abra o seu config.lua e configure

    sqlType = "sqlite" -- se for mysql coloque mysql aqui
    sqlHost = "localhost" -- não mude
    sqlPort = 3306 -- não mude
    sqlUser = "root" -- o user que você criou no mysql
    sqlPass = "" -- a senha que você colocou no mysql
    sqlDatabase = "theforgottenserver" -- a database do otserv
    

    ou então poste o mesmo para que eu possa dar uma olhada e tentar achar o problema :D

  6. Olá gostaria de pedir á alguém que possa arrumar esse script

     

    local VocPoints = {
    	[1] = 3,
    	[2] = 3,
    	[3] = 3,
    	[4] = 5,
    	[5] = 5,
    	[6] = 5,
    	[7] = 5,
    	[8] = 8,
    	}
    function onAdvance(cid, skill, oldlevel, newlevel)
    	if not (VocPoints[getPlayerVocation(cid)]) then
    			return true
    	end
    	if (skill == 8) then
    			if (getPlayerStorageValue(cid, 14573) < newlevel) then
    					if (getPlayerStorageValue(cid, 14574) < 0) then
    							setPlayerStorageValue(cid, 14574, 0)
    							setPlayerStorageValue(cid, 14573, 0)
    					end
    					setPlayerStorageValue(cid, 14573, newlevel)
    					setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]))
    					doSendAnimatedText(getThingPos(cid), "+" .. (newlevel - oldlevel) * (VocPoints[getPlayerVocation(cid)]), 18)
    			end
    	end
    	return true
    end
    

     

    pois uso sistema de reset no meu otserv e gostaria que os pontos fossem acumulativos, o servidor é high exp então não terá problema em ser acumulativos :D

     

    Detalhes:

    Distro: TFS 0.3.6

    Versão: 8.60

     

    mesmo quando eu retiro essa linha if (getPlayerStorageValue(cid, 14573) < newlevel) then que é linha em que faz com que não dê pontos ao mesmo level, depois começa da alguns erros no distro.

     

    Obrigado à todos.

  7. Ola alguem poderia que tipo de erro é esse?

     

    attempt to perform arithmetic on a string value

    e como posso arrumar?

    ja coloquei toNumber nos scripts que dão esse erro e nada, fica normal por um tempo depois a database do nada "corrompe" e fica com uns simbolos muito estranho.

    EX: era pra ficar 13212313 e esta ficando '$$y

     

    ficou assim depois que mudei minha versão, ja mudei o distro, e atualmente uso o TFS 0.3.6(8.60).

     

    Não sei como resolver esse problema e não é só em 1 script(storage) que dá esse erro, em outros tambem, isso é erro na database, distro ou o que?

    preciso muito arrumar isso, mas não sei como.

     

    Obrigado.

     

    Alguem sabe como resolver esse problema?

     

    Ninguem pode ajudar a resolver esse problema?

  8. aqui meu sistema de VIP

    function onSay(cid, words, param)
    
    -- configs
    access = 6
    days = 31
    -- end configs
    
    player = getPlayerByName(param)
    daysvalue = days*3600*24
    storageplayer = getPlayerStorageValue(player,29000)
    timenow = os.time()
    if storageplayer == -1 or storageplayer == 0 then
    time = timenow+daysvalue
    else
    time = storageplayer+daysvalue
    end
    
    
    if param ~= "" then
    if getPlayerGroupId(cid) >= access then
    doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adcionados ".. days .." dias de VIP no seu character.")	
    setPlayerStorageValue(player,29000,time)
    quantity = math.floor((getPlayerStorageValue(player,29000) - timenow)/(3600*24))
    doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente jogadores com acesso maior que "..access.." podem adcionar vips.")	
    end
    
    end
    
    end
    

  9. 1° Queria colocar apenas pra VIP, por que ficar colocando acess pra eles usar certas talkaction fica ruim.

    Tem como colocar pra ele checkar se o player tem VIP?

    1° Talkaction

    function onSay(cid, words, param, channel)
    local pos = getPlayerPosition(cid)
    if getTilePzInfo(pos) == TRUE then
           doRemoveCondition(cid,CONDITION_INFIGHT)
    --doRemoveCreature(cid)
    else
    doPlayerSendCancel(cid,"Só pode usar em Area PZ.")
    
    return TRUE
    end
    	if(param == "") then
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Script by ADM Aion")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Main City = 1")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Non-PVP City  = ")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Mind City = 3")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Fire Frotress = 4")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Frost City = 5")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Dream City = 6")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Dark City = 7")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Castelo de Eventos = 8")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Elder City = 9")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Blizzard City City = 10")
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Donation City = 11")
    
    	return TRUE
    end
    
    local tid = cid
    local t = string.explode(param, ",")
    if(t[2]) then
    	tid = getPlayerByNameWildcard(t[2])
    	if(tid == 0 or (isPlayerGhost(tid) == TRUE and getPlayerAccess(tid) > getPlayerAccess(cid))) then
    		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
    		return TRUE
    	end
    end
    
    local tmp = t[1]
    if(not tonumber(tmp)) then
    	tmp = getTownId(tmp)
    	if(tmp == 0) then
    		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.")
    		return TRUE
    	end
    end
    
    local pos = getTownTemplePosition(tmp, FALSE)
    if(pos == LUA_ERROR or isInArray({pos.x, pos.y}, 0) == TRUE) then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.")
    	return TRUE
    end
    
    pos = getClosestFreeTile(tid, pos)
    if(pos == LUA_ERROR or isInArray({pos.x, pos.y}, 0) == TRUE) then
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
    	return TRUE
    end
    
    tmp = getCreaturePosition(tid)
    if(doTeleportThing(tid, pos, TRUE) ~= LUA_ERROR and isPlayerGhost(tid) ~= TRUE) then
    	doSendMagicEffect(tmp, CONST_ME_POFF)
    	doSendMagicEffect(pos, CONST_ME_FIREAREA)
    	doSendAnimatedText(pos,"Teleport",TEXTCOLOR_LIGHTBLUE)
    end
    
    return TRUE
    end

     

    2° Talkaction

    --- Script by mock
    local vocations = {
    1,5,9,  -- sorcerer
    2,6,10, -- druid
    3,7,11, -- paladin
    4,8,12, -- knight
    }
    local interval = 0.5
    local ef_types = {
    ['normal'] = 65,
    ['heal'] = 11,
    }
    local heals = {
    ['hp'] = 2000000,
    ['mana'] = 2000000,
    }
    local soul = 1
    ----
    interval = interval*1000
    local function rot(cid,n,old) --- Script by mock
      local tb_rot = {{0,2},{6,5},{1,3},{7,4},false}     
      if isPlayer(cid) == FALSE or tb_rot[n] == nil or getPlayerSoul(cid) < soul or old.x ~= getCreaturePosition(cid).x or old.y ~= 
    
    getCreaturePosition(cid).y then
         return false
      end
      if tb_rot[n] == false then
         doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , ef_types['normal'])
         doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) , ef_types['normal'])
         doPlayerAddSoul(cid, -soul)
         doCreatureAddHealth(cid, heals['hp'])
         doCreatureAddMana(cid, heals['mana'])
         doSendMagicEffect(getCreaturePosition(cid), ef_types['heal'])
         addEvent(rot, interval,cid,2,old)
         return false
      end
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , ef_types['normal'])
      doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , ef_types['normal'])
      n = n+1
      addEvent(rot, interval,cid,n,old)
    end
    function onSay(cid, words, param)--- Script by mock
    local pos = getPlayerPosition(cid)
    if getTilePzInfo(pos) == TRUE then
           doRemoveCondition(cid,CONDITION_INFIGHT)
    --doRemoveCreature(cid)
    else
    doPlayerSendCancel(cid,"Voce só pode usar em area PZ.")
    
    return TRUE
    end
            if getPlayerSoul(cid) < 0 then
               doPlayerSendCancel(cid,"You need 0 soul points or more.")
               return FALSE
            elseif isInArray(vocations,getPlayerVocation(cid)) == FALSE then
               doPlayerSendCancel(cid,"You dont have the required vocation.")
               return FALSE
            end
            doPlayerAddSoul(cid, -soul)
            doSendMagicEffect(getCreaturePosition(cid),ef_types['normal'])
            addEvent(rot, interval,cid,1,getCreaturePosition(cid))
    
            return FALSE
    end

  10. quero que alguem tente, arrumar meu script de /addvip, porque quero colocar pra vender VIP por site e nao quero reconfigurar tudo...

    se tiver como colocar pra usar o item e addvip no char que usou e depois o item sumir!!

    aqui o script da minha VIP

    o id do item é 10309

    function onSay(cid, words, param)
    
    -- configs
    access = 6
    days = 31
    -- end configs
    
    player = getPlayerByName(param)
    daysvalue = days*3600*24
    storageplayer = getPlayerStorageValue(player,29000)
    timenow = os.time()
    if storageplayer == -1 or storageplayer == 0 then
    time = timenow+daysvalue
    else
    time = storageplayer+daysvalue
    end
    
    
    if param ~= "" then
    if getPlayerGroupId(cid) >= access then
    doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adcionados ".. days .." dias de VIP no seu character.")	
    setPlayerStorageValue(player,29000,time)
    quantity = math.floor((getPlayerStorageValue(player,29000) - timenow)/(3600*24))
    doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.")
    else
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente jogadores com acesso maior que "..access.." podem adcionar vips.")	
    end
    
    end
    
    end

     

    Thanks!

     

    Podem fechar o TOPICO, ja consegui!

  11. 1° minha database ta em 150mb, mas o xammp nao quer aceitar ela, da erro porque o tamanho maximo dele é 128mb.

    como posso importar minha database pro xammp?

     

    2°como arrumar os debug de um servidor sem saber o problema?

    porque no meu server umas 15 pessoas deram debug no msm lugar ou ate eu fui com o god e deu debug nao entra no char +, e sem saber o que é pra resolver fica dificil

    aki o debug

    ----- 03/01/2011 23:28:09 - ADM Aion  -----
    Debug Assertion 8.50 Objects.cpp 277
    Mon Jan 03 17:28:16 2011
    Graphic Engine: DirectX5 (0)
    Operating System: Windows Vista Ultimate Edition 32 Bit in BRA
    Processor: Dual Core Intel Pentium E5200 @ 2
    Video Card: Intel (R) G33/G
    Last Packet Types: 100 108 180 030 180 180 180 180 180 180
    Last Packet: 180 018 019 000 047 103 111 116 111 032 050 050 054 048 044 032
    Player Position: [340,1456,5]
    Player Name: ADM Aion (Offline)
    Player Action: 049 057 057 046 049 053 046 050 053 052 046 054 055 058 055 049 055 050
    Player.cpp 361: exception occurred, reason:
    Network.cpp 992: exception occurred (ErrorCode = 0), reason:
    Control.cpp 1326: exception occurred (Type = 100) (MainWindow = 37112256), reason:
    Communication.cpp 1634: exception occurred (PlayerX = 2260) (PlayerY = 3081), reason:
    Communication.cpp 1612: exception occurred (xmin = 0) (ymin = 0), reason:
    Communication.cpp 1591: exception occurred (Type = 9757) (OldType = 4353), reason:
    Objects.cpp 280: exception occurred (Type = 9757) (Flag = 11), reason:
    Objects.cpp 277: assertion failed (Type = 9757) (ObjectProperties->high() = 9627), reason:
    In(Type,ObjectProperties->low(),ObjectProperties->high())

     

    alguem sabe como resolver?

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...