Precisava mesmo era de spell,mas vlw ae por tentar xD
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Talk com vários CHECKS
Talk com vários CHECKS
Por Session Start, 26 de ago. de 2013 em Actions e Talkactions
info
Grupo: Infante
Registrado: 27/01/13
Posts: 1.7k
Reputação: +104
Gênero: Masculino

info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

Esse ai já ta cheio de coisinhas, pra quem ta começando é bom, só pega e muda o que quer '-'
info
Grupo: Banidos
Registrado: 25/12/07
Posts: 152
Reputação: +24
Char no Tibia: Tony Scott

Ué, o do spell, não seria só adicionar o if isPremium(cid) then na função onCast?
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

Ué, o do spell, não seria só adicionar o if isPremium(cid) then na função onCast?
??
não sei se vc consegue ler, mas é uma talkaction, e isso que vc falou não tem nada a ver
Se fosse só pra checar se é premmy vc acha que eu nao ia colocar isso na spell? pf né
info
Grupo: Banidos
Registrado: 25/12/07
Posts: 152
Reputação: +24
Char no Tibia: Tony Scott

Quanta ignorância...
Bem, fiz ele hoje a noite pra um carinha,nao consegui fazer a spell que ele queria :3, acho que pode ajudar algumas pessoas que tem dificuldade com os scripts,ou nao :3
Por causa de outro post seu que li, achei que a spell, tinha a ver com a premium..



info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino
Bem, fiz ele hoje a noite pra um carinha,
nao consegui fazer a spell que ele queria :3, acho que pode ajudar algumas pessoas que tem dificuldade com os scripts,ou nao :3listinha de check que tem:
needTempoToUse = "true", Se quer cooldown (tempo pra usar dnv).
needTempoToUseStorage = 33337, Storage que vai ocupar ( nunca utilize ela 2 vezes ).
needTempoToUseInSecons = 20, Tempo em segundos, para o cooldown..
needOutfitToUse = "true", Se gostaria que o player esteja usando um LookType.
needOutfitToUseName = "citizen", Nome que vai aparecer caso ele n tenha ( vc n ta usando citizen).
needOutfitToUseLooktype = 128, Numero do LookType no caso 128 do citizen.
needPZ = "true", Se ele precisa estar em Protection zone.
needLevel = "true", Se ele precisa ter level .
needLevelis = 100, O level que precisa ser, caso o needLevel esteja como "true".
needVocation = "true", Para X vocation usar ...
needVocationID = {1, 2, 3, 4, 5, 6, 7, 8}, Numero das vocations.
needPremium = "true", Já diz tudo, precisa ser premium.
needVIP = "false", -- Se precisa ser vip ( a vip por storage )
storageDaVip = 333333333, Storage da VIP ( veja nos scripts do seu server qual é ).
needQuest = "false", Basicamente a da VIP, só que é quest.
needQuestSTORAGE = 1333333334, storage da quest...
needItemSlot = "true", Só usa se tiver um X item no X slot
needItemSlotID = 8, -- PÉS
Lista e slots pra por (peguei e um post do Vodkart ) :3
CONST_SLOT_FIRST = 1 Cabeça
CONST_SLOT_HEAD = CONST_SLOT_FIRST Cabeça
CONST_SLOT_NECKLACE = 2 Colar
CONST_SLOT_BACKPACK = 3 Backpack
CONST_SLOT_ARMOR = 4 Armor
CONST_SLOT_RIGHT = 5 Mão direita
CONST_SLOT_LEFT = 6 Mão esquerda
CONST_SLOT_LEGS = 7 Legs
CONST_SLOT_FEET = 8 Bota
CONST_SLOT_RING = 9 Ring
CONST_SLOT_AMMO = 10 Munição
CONST_SLOT_LAST = CONST_SLOT_AMMO Munição
needItemSlotID_ID_DO_ITEM = 2195, ID do item que precisa estar no SLOT
needHP = "true", Se caso o player precise estar com X HP pra poder usar
needHPtouse = 800, HP..
darTempoDexp = "true", Se quer que dê 50% a mais de XP por X tempo
darTempoDexpTempoQueVaiDURAR= 20, -- em segundos Duração do XP extra
needMANA = "true",Se caso o player precise estar com X MANA pra poder usar
needMANAtouse = 1500, MANA
showLugares = " ESCREVA AQUI OS LUGARES \n ESCREVA AQUI OS LUGARES \n ESCREVA AQUI OS LUGARES \n", Aparece upa janela caso ele use o comando sem param
local toPos ={ ["suna"] = {lugar = "Suna" ,x = 1000, y = 1000, z = 7,}, ["suna2"] = {lugar = "Suna2" ,x = 1002, y = 1000, z = 7}, ["suna3"] = {lugar = "Suna3" ,x = 1003, y = 1000, z = 7}, ["suna4"] = {lugar = "Suna4" ,x = 1004, y = 1000, z = 7}, ["suna5s"] = {lugar = "Suna5" ,x = 1005, y = 1000, z = 7}, } local config= { needTempoToUse = "true", needTempoToUseStorage = 33337, needTempoToUseInSecons = 20, needOutfitToUse = "true", needOutfitToUseName = "citizen", needOutfitToUseLooktype = 128, needPZ = "true", needLevel = "true", needLevelis = 100, needVocation = "true", needVocationID = {1, 2, 3, 4, 5, 6, 7, 8}, needPremium = "true", needVIP = "false", storageDaVip = 333333333, needQuest = "false", needQuestSTORAGE = 1333333334, needItemSlot = "true", needItemSlotID = 8, -- PÉS needItemSlotID_ID_DO_ITEM = 2195, needHP = "true", needHPtouse = 800, darTempoDexp = "true", darTempoDexpTempoQueVaiDURAR= 20, -- em segundos needMANA = "true", needMANAtouse = 1500, showLugares = " ESCREVA AQUI OS LUGARES \n ESCREVA AQUI OS LUGARES \n ESCREVA AQUI OS LUGARES \n", } function onSay(cid, words, param) --CHECK -- if config.needPremium == "true" then if not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao eh Premmy") return TRUE end end if config.needHP == "true" then if getCreatureHealth(cid) < config.needHPtouse then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Para usar essa magia voce precisa ter "..config.needHPtouse.." de LIFE, voce tem apenas "..getCreatureHealth(cid).."") return TRUE end end if config.needMANA == "true" then if getCreatureMana(cid) < config.needMANAtouse then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Para usar essa magia voce precisa ter "..config.needMANAtouse.." de MANA, voce tem apenas "..getCreatureMana(cid).."") return TRUE end end if config.needVIP == "true" then if getPlayerStorageValue(cid, config.storageDaVip) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao eh VIP") return TRUE end end if config.needQuest == "true" then if getPlayerStorageValue(cid, config.needQuestSTORAGE) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao tem a quest completada") return TRUE end end if config.needItemSlot == "true" then local item = getPlayerSlotItem(cid, config.needItemSlotID) if item.uid <= 1 or item.itemid ~= config.needItemSlotID_ID_DO_ITEM then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao esta usando "..getItemNameById(config.needItemSlotID_ID_DO_ITEM)..".") return TRUE end end if (param == '') then show = config.showLugares doShowTextDialog(cid, 7416, show) return TRUE end if config.needVocation == "true" then if (not config.needVocationID[getPlayerVocation(cid)]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao tem vocacao") return TRUE end end if (not toPos[param]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Esse lugar nao existe") return TRUE end if config.needPZ == "true" then if not getTilePzInfo(getCreaturePosition(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao esta em pz") return TRUE end end if config.needOutfitToUse == "true" then if getCreatureOutfit(cid).lookType ~= config.needOutfitToUseLooktype then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao esta usando o outfit correto, use o "..config.needOutfitToUseName..".") return TRUE end end if config.needLevel == "true" then if getPlayerLevel(cid) <= config.needLevelis then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao eh level "..config.needLevelis.." ainda!") return TRUE end end if config.needTempoToUse == "true" then if getPlayerStorageValue(cid, config.needTempoToUseStorage) < os.time () then setPlayerStorageValue(cid, config.needTempoToUseStorage, os.time () + config.needTempoToUseInSecons) --FIM CHECK -- local function darxp(cid) if config.darTempoDexp == "true" then doPlayerSetExperienceRate(cid, 1.1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Seu xp extra acabou") else doPlayerSetExperienceRate(cid, 1.1) end end --SCRIPT-- local pos = getCreaturePosition(cid) local ir = toPos[param] local foi = toPos[param].lugar doCreatureSay(cid, "Ir para "..foi.."") doSendMagicEffect(getThingPos(cid), 29) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce foi telado para "..foi.."") doTeleportThing(cid, ir, false) doSendMagicEffect(getThingPos(cid), 29) if config.darTempoDexp == "true" then doPlayerSetExperienceRate(cid, 1.5) addEvent(darxp, 1000*config.darTempoDexpTempoQueVaiDURAR, cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce tem um xp extra de "..((1.5 - 1)*100).."% por "..config.darTempoDexpTempoQueVaiDURAR.." segundos!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Que pena, o adm nao quer te dar mais xp") doPlayerSetExperienceRate(cid, 1.1) end else doPlayerSendCancel(cid, "Aguarde "..getPlayerStorageValue(cid, config.needTempoToUseStorage) - os.time ().." segundos para usar novamente ") return TRUE end end --SCRIPT-- return true endEditado Agosto 26 por Cleberadm