!sellitem , !buyitem

Subwat
Por Subwat
em Actions e Talkactions

Subwat

GAUCHO MACHO
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 27/07/09Posts: 1516Char no Tibia: Gean Riot

Informação

Bom pessoal,me baseando no servidor heroserv,que tem comandos parecidos,resolvi fazer um comando no qual você poderá comprar items donates e vende-los por comando,isso pode ser muito útil para otservers que vendam items VIPS.

 

!sellitem

este comando você poderá vender seus items VIPS por moedas VIP (vip coin).

 

!buyitem

este comando você poderá comprar items VIPS por moedas VIP (vip coin).

 

segue abaixo os scripts,já tendo os items VIPS do heroserv,para venda e compra,mude as IDS conforme os items VIPS do seu server.

 

 

COMANDO !buyitem

 

function onSay(cid, words, param)

if param == "wand" or param == "special wand" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,7424,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "axe" or param == "special axe" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,8925,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end 

if param == "club" or param == "special club" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,8929,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end 

if param == "sword" or param == "special sword" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,8932,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "arrow" or param == "special arrow" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,2352,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "bow" or param == "special bow" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,8853,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end 

if param == "hat" or param == "special hat" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,6096,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end 

if param == "armor" or param == "special armor" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,6095,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "legs" or param == "special legs" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,5918,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "boots" or param == "special boots" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,5462,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "shield" or param == "special shield" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,2527,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "life" or param == "life scroll" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,11539,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "mana" or param == "mana scroll" then
if doPlayerRemoveItem(cid,11192,5) then
doPlayerAddItem(cid,11523,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end    
end 

 

tag:

<talkaction words="!buyitem" script="buyitems.lua"/>    

 

 

COMANDO !sellitem

 

function onSay(cid, words, param)

if param == "wand" or param == "special wand" then
if doPlayerRemoveItem(cid,7424,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end 

if param == "axe" or param == "special axe" then
if doPlayerRemoveItem(cid,8925,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "club" or param == "special club" then
if doPlayerRemoveItem(cid,8932,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "arrow" or param == "special arrow" then
if doPlayerRemoveItem(cid,2352,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "bow" or param == "special bow" then
if doPlayerRemoveItem(cid,8853,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "boots" or param == "special boots" then
if doPlayerRemoveItem(cid,5462,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end  

if param == "legs" or param == "special legs" then
if doPlayerRemoveItem(cid,5918,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end 

if param == "armor" or param == "special armor" then
if doPlayerRemoveItem(cid,6095,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "hat" or param == "special hat" then
if doPlayerRemoveItem(cid,6096,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end

if param == "shield" or param == "special shield" then
if doPlayerRemoveItem(cid,2527,1) then
doPlayerAddItem(cid,11192,5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
doPlayerSendCancel(cid, 'voce nao tem este item.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end 
end

 

TAG:

<talkaction words="!sellitem" script="sellitems.lua"/>  

 

 

 

 

Créditos:

Subwat (Gean Riot)

 

 

 

 

gostou da um REP+,se não puder tudo bem vou entender.

valeu.

 

Esqueci de falar do vip coin.

 

vai em items.xml procura pela ID 11192

e poe isso.

 

	<item id="11192" name="vip coin">
	<attribute key="description" value="item de credito para sellitem e buyitem." />
	<attribute key="weight" value="10" />
</item>

Entrem Server online desde o dia 22/02/2013 Monster 24HORAS dedicado!

IP: monster24h.com

PROTOCOL:8.60

PORT:7171

 

RATES:

Exp: 9999x~10x

Skills:800x

Magic:200x

Loot:2x

Pvp-e Advanced: 1.1x Ao matar players de level semelhante.

 

Accounts Pelo Account Manager!

devotti2

Banido
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/11/10Posts: 44Char no Tibia: Hacked :S

Eu tenho o script identico do hero.

que vai para o site os points ao falar !sellitem.

breve estou postando aqui no xtibia!

Gean REP +

BANIDO POR COMÉRCIO DE SERVIDORES

Subwat

GAUCHO MACHO
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 27/07/09Posts: 1516Char no Tibia: Gean Riot

o do heroserv nao vai points no site nao fih.

vai ITEM points,que é por storage. e que eu sei fazer ,mas eu fiz por vip coin pois é mais interessante.

xd

Entrem Server online desde o dia 22/02/2013 Monster 24HORAS dedicado!

IP: monster24h.com

PROTOCOL:8.60

PORT:7171

 

RATES:

Exp: 9999x~10x

Skills:800x

Magic:200x

Loot:2x

Pvp-e Advanced: 1.1x Ao matar players de level semelhante.

 

Accounts Pelo Account Manager!

LukaszG

Lendario.
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 18/06/11Posts: 230Char no Tibia: Louco Do Gole

se boto buyitem backpack ?

4d69a6188cba4.gif

 

E-mail / MSN:

lukaszG_xtibia@hotmail.com

 

 

 

mplz1ajaxizt5mzcdc6n.png

Subwat

GAUCHO MACHO
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 27/07/09Posts: 1516Char no Tibia: Gean Riot

não mas é facil de colocar,é só você seguir o exemplo do script.

o.O

Entrem Server online desde o dia 22/02/2013 Monster 24HORAS dedicado!

IP: monster24h.com

PROTOCOL:8.60

PORT:7171

 

RATES:

Exp: 9999x~10x

Skills:800x

Magic:200x

Loot:2x

Pvp-e Advanced: 1.1x Ao matar players de level semelhante.

 

Accounts Pelo Account Manager!

YondaimeBRG

YondaimeBRG
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 29/07/11Posts: 14Char no Tibia: '-'

Bom^^

Subwat

GAUCHO MACHO
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 27/07/09Posts: 1516Char no Tibia: Gean Riot

da um rep ae pra me ajudar.

 

xD

Entrem Server online desde o dia 22/02/2013 Monster 24HORAS dedicado!

IP: monster24h.com

PROTOCOL:8.60

PORT:7171

 

RATES:

Exp: 9999x~10x

Skills:800x

Magic:200x

Loot:2x

Pvp-e Advanced: 1.1x Ao matar players de level semelhante.

 

Accounts Pelo Account Manager!

f3li93darzan

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 21/04/08Posts: 72Char no Tibia: custelah

tem como jogar isso no PHP pra colocar no site ?

Duas coisas são infinitas: o universo e a estupidez humana. Mas, no que respeita ao universo, ainda não adquiri a certeza absoluta. Albert Einstein

 

x-men_200_cover-1.jpg

 

 

 

2zqv9km.jpg