- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- [Action] Dollar Transformation (Hd-Td) - Pokemon Dash Advanced
SP
action
[Action] Dollar Transformation (Hd-Td) - Pokemon Dash Advanced
Por Spiga, 31 de dez. de 2011 em Actions e Talkactions
action pokemon-dash-advanced
pokemon-dash-advanced
script
1
1.3k
info
Grupo: Campones
Registrado: 17/12/06
Posts: 16
Reputação: +13
Char no Tibia: Nem fudeno
Essa é uma Action que altera o valor da nota azul, (inves de 10000 dollars e ela vai valer 1000 dollares, assim são necessários apenas 10HD pra virar 1TD facillitando a dinâmica do jogo, na minha opnião) para voltar de hd pra dollar deve-se trocar menos de 10 notas.
----------------------------------------------------------------------------------------------------
ACTION:
local coins = {
[12416] = {to = 2148},
[2148] = {to = 2152, from = 12416},
[2152] = {to = 2160, from = 2148},
[2160] = {from = 2152},
}
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 >= 10) then
if coin.to == 2160 and item.type >= 10 then
doChangeTypeItem(item.uid, item.type - 10)
doPlayerAddItem(cid, coin.to, 1)
elseif item.type == 100 then
doChangeTypeItem(item.uid, item.type - item.type)
doPlayerAddItem(cid, coin.to, 1)
end
elseif(coin.from ~= nil) then
if coin.from == 2152 then
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, coin.from, 10)
else
doChangeTypeItem(item.uid, item.type - 1)
doPlayerAddItem(cid, coin.from, 100)
end
end
return true
end
----------------------------------------------------------------------------------------------------
ITEMS:
PROCURE POR:
.hundred dollar (substituir):
<attribute key="weight" value="0" />
<attribute key="worth" value="10000" />
<attribute key="description" value="A dozen of these can be converted in a thousand dollar note." />
</item>
.ten thousand dollar (substituir):
<item id="2160" article="a" name="thousand dollar note" plural="thousand dollar notes">
<attribute key="weight" value="0" />
<attribute key="worth" value="100000" />
<attribute key="description" value="Valuable money!" />
</item>
[b]----------------------------------------------------------------------------------------------------[/b]
[b][color=#008000][size=4]Pra mais actions e scripts de pokemon dash veja minha assinatura![/size][/color][/b]