retirado.
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Fight System E Heart System E Npc Draken Fighter
Fight System E Heart System E Npc Draken Fighter
Por DevilMoon, 31 de ago. de 2010 em Actions e Talkactions
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

Editado Setembro 1 por Vodkart
info
Grupo: Campones
Registrado: 25/12/08
Posts: 23
Reputação: 0
Char no Tibia: fuck

acho que os créditos do subwat pela base do script deveria ter ^^.
se eu Pudesse daria rep+ mas ja dei hj flws
info
Grupo: Conde
Registrado: 30/01/10
Posts: 706
Reputação: +125
Gênero: Masculino
Char no Tibia: Bakwin

Funfo Nao, Nao deu nenhum errinho no distro..
n sei pq vou ver aki..
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

entra msn preto
vo fla ctg la
info
Grupo: Campones
Registrado: 25/12/08
Posts: 23
Reputação: 0
Char no Tibia: fuck

Aqui Funfo.
OFF - ALGUEM AE É DE PORTO ALEGRE RS E CONHECE A ESCOLA MONTEIRO LOBATO NA ANDRADAS?
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

hm funfo certinho entao?
qual?
o meu que o jogador tem que aceitar?
@sobre a escola
n
info
Grupo: Conde
Registrado: 30/01/10
Posts: 706
Reputação: +125
Gênero: Masculino
Char no Tibia: Bakwin

OFF - ALGUEM AE É DE PORTO ALEGRE RS E CONHECE A ESCOLA MONTEIRO LOBATO NA ANDRADAS?
Conheço!!
@Vodkart
Consegui Fazer Funfar, Tinha esquecido de colocar o event="script" por isso que nao funfava!!
vou editar e colocar..
Topico Reformulado
info
Grupo: Infante
Registrado: 27/07/09
Posts: 1.5k
Reputação: +405
Char no Tibia: Gean Riot

OFF - ALGUEM AE É DE PORTO ALEGRE RS E CONHECE A ESCOLA MONTEIRO LOBATO NA ANDRADAS?
ESTUDO NELA.
O SCRIPT FICOU PERFEITO,
TINHA SID0 MEU PRIMEIRO SCRIPT GRANDINHO POR ISSO QUE FICO TODO BUGADO.
Editado Setembro 1 por Subwat
info
Grupo: Conde
Registrado: 30/01/10
Posts: 706
Reputação: +125
Gênero: Masculino
Char no Tibia: Bakwin

Comentarios Como Esse Sao Considerados como Flood!
Nao Faça mais Isso Porque voce podera ser Alertado!
Abraços..
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

Subwat = GEAN RIOT
mesmo ip
para com isso mano
iuHIUSHIuhIUHisuhSIIUHSIiuS
info
Grupo: Infante
Registrado: 27/07/09
Posts: 1.5k
Reputação: +405
Char no Tibia: Gean Riot

ACHO Que ficaria Melhor SEM PRECISAR DO ITEM,OU SE FOSSE POR GRANA.
dae eu mudei pra 2160 koasokas ´só alguem ae sabe como botar a QUANTIDADE?
Editado Setembro 1 por Subwat
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

por dinheiro usa esse aqui:
--[[ Fight System by Subwat]]--
--[[ Updated by Vodkart ]]--
function onSay(cid, words, param)
config = {
level1= 100, -- level necessario do player 1 pra usar o fight system.
level2= 100, -- level necessario do player 2 pra usar o fight system.
pid=getPlayerGUID(cid), -- não mecha
premium = "yes", -- se precisa ser premium account ("yes" or "no")
redskull="yes", -- players com red skull podem huntar? ("yes" or "no").
prot="no", -- players precisam estar em protection zone pra huntar? ("yes" or "no").
bat="no", --players precisam estar sem fight pra huntar? ("yes" or "no").
Posplayer1 = {x=1007, y=989, z=7}, -- para onde o jogador que deu fight sera levado
Posplayer2 = {x=1012, y=989, z=7}, -- para onde o jogador que aceito fight sera levado
custo = "yes", -- se ira custar ("yes" or "no")
price = 50000, -- preço do fight
storage = 9696
}
if words == '!fight' then
local player = getPlayerByName(param)
local pid = getPlayerByNameWildcard(param)
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.")
return TRUE
end
if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then
doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem Usar Fight System.")
elseif (getPlayerLevel(cid) < config.level1) then
doPlayerSendTextMessage(cid,22,"você precisa ter level " .. config.level1 .. " pra usar o fight system.")
elseif (getPlayerLevel(player) < config.level2 ) then
doPlayerSendTextMessage(cid,22,"o jogador não tem level " .. config.level2 .. " para vc dar fight system.")
elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid,22,"você precisa estar em protection zone pra usar o fight system.")
elseif(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"você precisa estar sem battler pra usar o fight system.")
elseif(config.redskull == "no") and (getCreatureSkullType(player) == 4) then
doPlayerSendTextMessage(cid,22,"o outro player precisa estar sem red skull usar o fight system.")
elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(player)) == FALSE) then
doPlayerSendTextMessage(cid,22,"o outro player precisa estar em protection zone pra usar o fight system.")
elseif(config.bat == "yes") and (getCreatureCondition(player, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"o outro player precisa estar sem battler pra usar o fight system.")
elseif(config.premium == "yes") and (not isPremium(cid)) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "apenas players com premium account podem dar fight.")
elseif(config.custo == "yes") and (doPlayerRemoveMoney(cid, config.price) == FALSE) then
doPlayerSendTextMessage(cid, 22, "Desculpe,voce não tem " .. config.price .. " gps para dar fight.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
elseif isPlayer(player) then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Voce acaba de Desafiar o Player chamado " .. getPlayerName(player) .." espere ele aceitar.")
doPlayerSendTextMessage(player,MESSAGE_STATUS_WARNING,getCreatureName(cid) .. ' Acaba De Dar Fight em Você,o pvp entre os dois não resultará em skulls deseja aceitar? diga !aceitar se não diga !recusar.')
setPlayerStorageValue(player, config.storage, 1)
doTeleportThing(cid,config.Posplayer1)
doCreatureSetSkullType(cid, 2)
end
return TRUE
end
if words == '!aceitar' then
if getPlayerStorageValue(cid,config.storage) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "o jogador aceito,começara o fight.")
setPlayerStorageValue(cid, config.storage, -1)
doCreatureSetSkullType(cid, 2)
doTeleportThing(cid,config.Posplayer2)
else
doPlayerSendTextMessage(cid, 22, "Desculpe,voce não foi envitado para fight.")
end
return TRUE
end
if words == '!recusar' then
if getPlayerStorageValue(cid,config.storage) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "você recusou o fight.")
setPlayerStorageValue(cid, config.storage, -1)
end
return TRUE
end
return TRUE
end
Editado Setembro 1 por Vodkart
info
Grupo: Infante
Registrado: 27/07/09
Posts: 1.5k
Reputação: +405
Char no Tibia: Gean Riot

thanks dude,fico mara(vilhoso) .




info
Grupo: Conde
Registrado: 30/01/10
Posts: 706
Reputação: +125
Gênero: Masculino
Char no Tibia: Bakwin
Fight System:
Bom Galera Tudo Bem? Lembra aqui na Area de Talkactions Tinha um Sistema de Fight que tu falava !fight NOMEDOPLAYER, 1 e o Script tava todo erradao.
Entao Fui tentar Mecher no Script e Ageitei umas coisinhas e Outras ate que uma hora deu um Bug no Script e eu nao consegui Resolver
Elseif e RETURN TRUE
Bom Pedi para meu Professor Gordo e Tesudo Vodkart para dar umas Ageitadas... e Primeiramente a Talkaction Ira Remover um Item que é as Herts Depois Falo Disso..
Antigo Script estava um Calapso, Tinha que falar !fight DevilMoon, 1 e acresentar a virgula e o 1 entao removemos Isso e demos umas Ageitadas.. O Vodkart Ok!
Vamos ao que Intereça Vá em Data>Talkactions Crie uma pasta.lua chamada desafio.lua e coloque isso:
--[[ Fight System by Subwat]]-- --[[ Updated by Vodkart ]]-- function onSay(cid, words, param) config = { level1= 100, -- level necessario do player 1 pra usar o fight system. level2= 100, -- level necessario do player 2 pra usar o fight system. pid=getPlayerGUID(cid), -- não mecha premium = "yes", -- se precisa ser premium account ("yes" or "no") redskull="yes", -- players com red skull podem huntar? ("yes" or "no"). prot="no", -- players precisam estar em protection zone pra huntar? ("yes" or "no"). bat="no", --players precisam estar sem fight pra huntar? ("yes" or "no"). Posplayer1 = {x=1007, y=989, z=7}, -- para onde o jogador que deu fight sera levado Posplayer2 = {x=1012, y=989, z=7}, -- para onde o jogador que aceito fight sera levado RemoveItem = "yes", -- se ira remover o item ("yes" or "no") item = 5943, -- id do item storage = 9696 } if words == '!fight' then local player = getPlayerByName(param) local pid = getPlayerByNameWildcard(param) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return TRUE end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem Usar Fight System.") elseif (getPlayerLevel(cid) < config.level1) then doPlayerSendTextMessage(cid,22,"você precisa ter level " .. config.level1 .. " pra usar o fight system.") elseif (getPlayerLevel(player) < config.level2 ) then doPlayerSendTextMessage(cid,22,"o jogador não tem level " .. config.level2 .. " para vc dar fight system.") elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"você precisa estar em protection zone pra usar o fight system.") elseif(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"você precisa estar sem battler pra usar o fight system.") elseif(config.redskull == "no") and (getCreatureSkullType(player) == 4) then doPlayerSendTextMessage(cid,22,"o outro player precisa estar sem red skull usar o fight system.") elseif(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(player)) == FALSE) then doPlayerSendTextMessage(cid,22,"o outro player precisa estar em protection zone pra usar o fight system.") elseif(config.bat == "yes") and (getCreatureCondition(player, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"o outro player precisa estar sem battler pra usar o fight system.") elseif(config.premium == "yes") and (not isPremium(cid)) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "apenas players com premium account podem dar fight.") elseif(config.RemoveItem == "yes") and (doPlayerRemoveItem(cid, config.item, 1) == FALSE) then doPlayerSendTextMessage(cid, 22, "Desculpe,voce não tem 1 " .. getItemNameById(config.item) .. " para dar fight.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) elseif isPlayer(player) then doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Voce acaba de Desafiar o Player chamado " .. getPlayerName(player) .." espere ele aceitar.") doPlayerSendTextMessage(player,MESSAGE_STATUS_WARNING,getCreatureName(cid) .. ' Acaba De Dar Fight em Você,o pvp entre os dois não resultará em skulls deseja aceitar? diga !aceitar se não diga !recusar.') setPlayerStorageValue(player, config.storage, 1) doTeleportThing(cid,config.Posplayer1) doCreatureSetSkullType(cid, 2) end return TRUE end if words == '!aceitar' then if getPlayerStorageValue(cid,config.storage) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "o jogador aceito,começara o fight.") setPlayerStorageValue(cid, config.storage, -1) doCreatureSetSkullType(cid, 2) doTeleportThing(cid,config.Posplayer2) else doPlayerSendTextMessage(cid, 22, "Desculpe,voce não foi envitado para fight.") end return TRUE end if words == '!recusar' then if getPlayerStorageValue(cid,config.storage) >= 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "você recusou o fight.") setPlayerStorageValue(cid, config.storage, -1) end return TRUE end return TRUE endE Agora vá em Data>Talkactions.xml e Acressente esta Tag:
Para Desafiar o Player so Falar !fight DevilMoon ou !fight NOMEDOPLAYER
Heart System:
Bom Heart System, Nao Sabia que Existia e Fui Fazendo as vezes fico Fazendo Scripts para ir Pegando a "Manha" De Mecher entao Fizz e Testei e Ficou Legal, Porem pesquisei no Google e Achei Varios...o Leo Criador do Styller e Muintos Outros. Mais Vim Postar Aqui!!
Vá em Data>CreatureEvents>Scripts crie uma pasta.lua chamada hearts.lua e coloque isso:
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) local cidpos = getPlayerPosition(lastHitKiller) loot = 5943 item = doPlayerAddItem(lastHitKiller,loot,1) if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerName(lastHitKiller) doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..hitKillerName..".") doPlayerSendTextMessage(lastHitKiller, MESSAGE_STATUS_CONSOLE_ORANGE, "You Killed " .. getCreatureName(cid) .. ".") doSendMagicEffect(cidpos,12) else hitKillerName = getCreatureName(lastHitKiller) doSetItemSpecialDescription(item,"This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by a "..hitKillerName..".") end setItemName(item, ""..getPlayerName(cid).."\'s Heart") return TRUE endAgora vá em Data>CreatureScripts.xml e Adicione esta Tag la:
Assim Tu mata um Player e tu Vai Ganhar um Item Morgaroth Heart, So que com o outro name assim!!
Draken Fighter:
Um Npc para Ajudar os Noobs a Saber Duelar, Comprar e Vender suas Hearts se nao quiserem Duelar!!
Vá em Data>Npc Crie uma pasta.xml chamada Draken Fighter e coloca isso dentro:
<npc name="Draken Fighter" script="data/npc/scripts/hearts.lua" access="5" walkinterval="1000" lookdir="1"> <health now="1000" max="1000"/> <look type="144" head="97" body="97" legs="94" feet="97" addons="3"/> <parameters> <parameter key="message_greet" value="Hey |PLAYERNAME| Compro e Vendo {Hearts} de Players Mortos diga {Trade} Se Tiver Alguns! Diga {Info} Para Saber mais Sobre Fight!"/> <parameter key="message_farewell" value="Venha Sempre aqui Se Tiver Mais!"/> <parameter key="module_keywords" value="1" /> <parameter key="keywords" value="info;hearts" /> <parameter key="keyword_reply1" value="Para Duelar fale !fight nomedoplayer. Nao Pode Duelar com Pessoas da Staff, e Custa 1 Heart para Duelar." /> <parameter key="keyword_reply2" value="Hearts sao a Riqueza do Seu Inimigo que Foi Morto quando Voce Matou-o"/> <parameter key="module_shop" value="1"/> </parameters> </npc>Agora vá em Data>Npcs>Scripts crie uma pasta.lua chamada hearts e coloque isso:
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'heart'}, 5943, 100000, 1, 'heart') shopModule:addSellableItem({'heart'}, 5943, 10000, 1, 'heart') npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())Motivo do Fight, Npc e Heart
Fight, Voce pode Deichar sem Item ou com Item vai ser mais Emocionante pelomenos ele Paga Algo, Se nao vai ficar desafiando Toda Hora, Isso poderia Ser Chato..
Npc, Ele Pode Ser Muinto Util para quem Recem Criou Char, Ou ate mesmo os Players do seu ot que nao sabem a novidade!!
Hearts, Pura Diversao Ganha Premios e quando tu mata um Top voce pode colocar na Sua House...
Screen Shoots:
Draken Fighter:
Fight System:
Heart System:
Arena Sbot:
Voces podem Tirar uma Ideia como eu Fiz a Minha.
A E eu matei o Carinha na Arena ele Foi so num Hadouken.
Obs: Nao Liguem para o 1 Player Online Recem Tinha Ligado o Ot Oquey?
Sugestoes e Duvidas Somente Neste Topico!!
Abraços..
Editado Agosto 31 por DevilMoon