- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Action q vende TODOS os vials de sua bp UTIL DEMAIS
TO
action
Action q vende TODOS os vials de sua bp UTIL DEMAIS
Por totonho18, 30 de mar. de 2014 em Actions e Talkactions
script
1
516
Por totonho18, 30 de mar. de 2014 em Actions e Talkactions
info
Grupo: Campones
Registrado: 15/10/11
Posts: 60
Reputação: +18
Char no Tibia: Foi Del :/
Antes de mais nada quero deixar claro q os Créditos são 100% Meus!
Introdução:
Você por exemplo é um elite knight High LVL e vai ao npc,compra umas 2000 mana potions e sai MUITO bem equipado para ficar horas na hunt,e conseguir boa exp e lucros,mas quando vc volta,sua bp esta LOTADA de vials vazios das potions,e vc n sabe oq fazer com todos esses milhares de vials???
Seus problemas acabaram,com essa função você você pode clicar em uma estatua estrategicamente posicionada e dar um simples use nela,apartir do momento q vc executa essa ação,TODOS OS SEUS VIALS serão vendidos ao mesmo tempo,esvaziando sua bp na mesma HORA!
OBS:essa função é programada para vender até 1000 vials de uma só vez,se tiver mais de 1000 é só dar um click duplo,ex vamos supor q vc tenha 3000 vials,vc clica 3x e vende instantaneamente todos os 3000 vials.
Outra OBS:a função é programada para vender TODOS os tipos de vials,n apenas mana potions,mas strongs,greats e etc,cada um com um diferente preço
-------------------------Fim da Explicação-------------------------
Abra a pasta data/actions/scripts e crie um arquivo.lua com o nome "sellvials.lua" e cole a função
function onUse(cid, item, fromPosition, item2, toPosition) if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end if getPlayerItemCount(cid,7636) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7636, 100) doPlayerAddItem(cid, 2152, 10) end -------------- Empty Mana Potion,Health potion ou Small health potion compra no minimo 100 e no maximo 1000! de uma vez só if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end if getPlayerItemCount(cid,7634) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7634, 100) doPlayerAddItem(cid, 2152, 20) end ------------------------------------------------- mesmo esquema de cima porém aqui é com Strong health ou strong mana if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end if getPlayerItemCount(cid,7635) >= 100 then doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerRemoveItem(cid, 7635, 100) doPlayerAddItem(cid, 2152, 35) end ------------------------------------------------------ mesmo esquema só que para Great mana,great health ou ultimate health endfeito isso vá no arquivo xml da pasta data/actions/actions.xml e cole a tag
coloque essa action em uma estatua ou pedra,ai quando o jogador clicar nela vai acontecer oq foi explicado.
Abraços ai mais uma função exclusivamente minha!