Ir para conteúdo

Featured Replies

  • 10 months later...
  • Respostas 10
  • Visualizações 20.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTS

  • @pergher  testa esse script do changegold pra tfs 1.2   actions.xml <action itemid="2148" script="other/changegold.lua" /> <action itemid="2152" script="other/changegold.lua" /&

Postado
Em 10/07/2017 ás 17:56, romulo21 disse:

to usando o magebot aqui e não sei onde adicionar esse script, alguem pode dar uma ajuda?

 

amigo, esse script é do servidor  , não é para bots.

Em 17/08/2016 ás 04:05, liranking disse:

alguem me ajuda ? tipo nao sei como montar o script 

como assim?  explica melhor .

  • 2 years later...
Postado
Em 26/11/2013 em 22:20, Nolis disse:

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

 

Este tópico foi movido:

De: "OTServScriptingActions e TalkActions"

Para: "OTServSuporte OTServ"

 

actions\scripts\changegold.lua


local coins = {
[ITEM_GOLD_COIN] = {
to = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_YELLOW
},
[ITEM_PLATINUM_COIN] = {
from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_LIGHTBLUE
},
[ITEM_CRYSTAL_COIN] = {
from = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_TEAL
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerFlagValue(cid, PLAYERFLAG_CANNOTPICKUPITEM)) then
return false
end
local coin = coins[item.itemid]
if(not coin) then
return false
end
if(coin.to ~= nil and item.type == ITEMCOUNT_MAX) then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, coin.to, 1)
doSendAnimatedText(fromPosition, "$$", coins[coin.to].effect)
elseif(coin.from ~= nil) then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX)
doSendAnimatedText(fromPosition, "$$", coins[coin.from].effect)
end
return true
end

actions.xml


<!-- Change gold -->
<action itemid="2148" event="script" value="other/changegold.lua"/>
<action itemid="2152" event="script" value="other/changegold.lua"/>
<action itemid="2160" event="script" value="other/changegold.lua"/>

by: beddy


Aqui, não rolou.. 

2020-06-04 17:00:44.070 ( 252.289s) [                ]            actions.cpp:751   WARN| Function[] does not exist!

Usando server versão 11.

Postado

@pergher  testa esse script do changegold pra tfs 1.2

 

actions.xml

<action itemid="2148" script="other/changegold.lua" /> <action itemid="2152" script="other/changegold.lua" /> <action itemid="2160" script="other/changegold.lua" />

 

changegold.lua

local config = {
    [ITEM_GOLD_COIN] = {changeTo = ITEM_PLATINUM_COIN},
    [ITEM_PLATINUM_COIN] = {changeBack = ITEM_GOLD_COIN, changeTo = ITEM_CRYSTAL_COIN},
    [ITEM_CRYSTAL_COIN] = {changeBack = ITEM_PLATINUM_COIN}
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local coin = config[item:getId()]
    if coin.changeTo and item.type == 100 then
        item:remove()
        player:addItem(coin.changeTo, 1)
    elseif coin.changeBack then
        item:remove(1)
        player:addItem(coin.changeBack, 100)
    else
        return false
    end
    return true
end

 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo