tens que criar um storege para verificar se o script foi executado uma vez, dae na segunda vez tu remove o item e zera o storage. Se não entendeu me passa teu script que eu arrumo pra ti!
- Forums
- xTibia - Notícias e Suporte
- Soluções
- Archived
- [Talkactions] Skull
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

info
Group: Artesão
Joined: 13/07/11
Posts: 104
Reputation: +4
Tibia Character: Willliam Serravalle

ta ae manin no spoiler
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

malz aew, meu google crome não tava abrindo spoiler mais resolvi. Ta aew te script nem testei ainda se der ero me avisa:
function onSay(cid, words, param, channel) if (getCreatureSkullType(cid) == SKULL_BLACK) then if (getPlayerItemCount(cid, 10064) > 0 and getPlayerStorageValue(cid, 102065) == 1) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerRemoveItem(cid, 10064, 1) doPlayerSendTextMessage(cid, 25, "Black Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065,0) return true end if getPlayerItemCount(cid, 10064) > 0 then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 25, "Black Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065,1) else doPlayerSendTextMessage(cid, 25, "Voce precisa Do Iten Vip Para Remover Skull!") end end if (getCreatureSkullType(cid) == SKULL_RED) then if (getPlayerItemCount(cid, 10064) > 0 and getPlayerStorageValue(cid, 102065) == 1) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerRemoveItem(cid, 10064, 1) doPlayerSendTextMessage(cid, 25, "Red Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065,0) return true end if getPlayerItemCount(cid, 10064) > 0 then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 25, "Red Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065,1) else doPlayerSendTextMessage(cid, 25, "Voce precisa Do Iten Vip Para Remover Skull!") end end if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendTextMessage(cid, 25, "Voce Nao Tem Mas Nem Uma Skull Para Retirar!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end
info
Group: Artesão
Joined: 13/07/11
Posts: 104
Reputation: +4
Tibia Character: Willliam Serravalle

man rep+ agora e rep+ amanha deu aki de boa so que quero saber como eu almento tipo assim ele usa duas veses ae o iten some
queria que vc me esplicase ou botase ele pra retirar depois de ele usar o item 5 veses ae aparense a mensagem vc tem tal chanse de usar esse iten ainda!
info
Group: Conde
Joined: 30/06/11
Posts: 631
Reputation: +371
Tibia Character: Warrior of Mort

ta aew:
function onSay(cid, words, param, channel) local cargas = 5 if (getCreatureSkullType(cid) == SKULL_BLACK) then if (getPlayerItemCount(cid, 10064) > 0 and getPlayerStorageValue(cid, 102065) == cargas) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerRemoveItem(cid, 10064, 1) doPlayerSendTextMessage(cid, 25, "Black Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065,0) return true end if getPlayerItemCount(cid, 10064) > 0 then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 25, "Black Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065, getPlayerStorageValue(cid, 102065)+1) else doPlayerSendTextMessage(cid, 25, "Voce precisa Do Iten Vip Para Remover Skull!") end end if (getCreatureSkullType(cid) == SKULL_RED) then if (getPlayerItemCount(cid, 10064) > 0 and getPlayerStorageValue(cid, 102065) == cargas) then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerRemoveItem(cid, 10064, 1) doPlayerSendTextMessage(cid, 25, "Red Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065,0) return true end if getPlayerItemCount(cid, 10064) > 0 then doCreatureSetSkullType(cid, SKULL_NONE) doPlayerSendTextMessage(cid, 25, "Red Skull Retirada.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE) setPlayerStorageValue(cid, 102065, getPlayerStorageValue(cid, 102065)+1) else doPlayerSendTextMessage(cid, 25, "Voce precisa Do Iten Vip Para Remover Skull!") end end if (getCreatureSkullType(cid) == SKULL_NONE) then doPlayerSendTextMessage(cid, 25, "Voce Nao Tem Mas Nem Uma Skull Para Retirar!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end


info
Group: Artesão
Joined: 13/07/11
Posts: 104
Reputation: +4
Tibia Character: Willliam Serravalle
Ola Boa tarde , tenho uma pequena duvida , eu tenho um comando aqui para player de removerskull , só que eu modifiquei ele só pode remover se tiver com ( X ) Item mas eu queria que esse ( X ) Item tive-se 2 chance de ser usado.
ex: o player pego red , ae ele fala !removerskull , ae aparese na tela dele vc tem mas uma chanse de usa o remover de skull a mesma coisa com o black skull , como faço isso ou tem como alguém fazer pra me vou posta. 2 REP+
Edited Novembro 24 by Churupetinhaa