vc tem q postar o system vip, falar qual é, pois varia
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- 2 Talkaction!
6
1.4k
info
Grupo: Visconde
Registrado: 11/08/10
Posts: 477
Reputação: +175
Gênero: Masculino

10 de janeiro de 2011 às 19:34
10 de janeiro de 2011 às 20:07
aqui meu sistema de VIP
function onSay(cid, words, param) -- configs access = 6 days = 31 -- end configs player = getPlayerByName(param) daysvalue = days*3600*24 storageplayer = getPlayerStorageValue(player,29000) timenow = os.time() if storageplayer == -1 or storageplayer == 0 then time = timenow+daysvalue else time = storageplayer+daysvalue end if param ~= "" then if getPlayerGroupId(cid) >= access then doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Foram adcionados ".. days .." dias de VIP no seu character.") setPlayerStorageValue(player,29000,time) quantity = math.floor((getPlayerStorageValue(player,29000) - timenow)/(3600*24)) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de VIP restantes.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Somente jogadores com acesso maior que "..access.." podem adcionar vips.") end end end
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

11 de janeiro de 2011 às 21:20
--- Script by mock
local vocations = {
1,5,9, -- sorcerer
2,6,10, -- druid
3,7,11, -- paladin
4,8,12, -- knight
}
local interval = 0.5
local ef_types = {
['normal'] = 65,
['heal'] = 11,
}
local heals = {
['hp'] = 2000000,
['mana'] = 2000000,
}
local soul = 1
----
interval = interval*1000
local function rot(cid,n,old) --- Script by mock
local tb_rot = {{0,2},{6,5},{1,3},{7,4},false}
if isPlayer(cid) == FALSE or tb_rot[n] == nil or getPlayerSoul(cid) < soul or old.x ~= getCreaturePosition(cid).x or old.y ~=
getCreaturePosition(cid).y then
return false
end
if tb_rot[n] == false then
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , ef_types['normal'])
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) , ef_types['normal'])
doPlayerAddSoul(cid, -soul)
doCreatureAddHealth(cid, heals['hp'])
doCreatureAddMana(cid, heals['mana'])
doSendMagicEffect(getCreaturePosition(cid), ef_types['heal'])
addEvent(rot, interval,cid,2,old)
return false
end
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , ef_types['normal'])
doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , ef_types['normal'])
n = n+1
addEvent(rot, interval,cid,n,old)
end
function onSay(cid, words, param)--- Script by mock
local pos = getPlayerPosition(cid)
if getTilePzInfo(pos) == TRUE then
doRemoveCondition(cid,CONDITION_INFIGHT)
--doRemoveCreature(cid)
else
doPlayerSendCancel(cid,"Voce só pode usar em area PZ.")
return TRUE
end
if getPlayerStorageValue(cid, 29000) - os.time() <= 0 then
doPlayerSendCancel(cid,"You need vip account.")
return FALSE
elseif getPlayerSoul(cid) < 0 then
doPlayerSendCancel(cid,"You need 0 soul points or more.")
return FALSE
elseif isInArray(vocations,getPlayerVocation(cid)) == FALSE then
doPlayerSendCancel(cid,"You dont have the required vocation.")
return FALSE
end
doPlayerAddSoul(cid, -soul)
doSendMagicEffect(getCreaturePosition(cid),ef_types['normal'])
addEvent(rot, interval,cid,1,getCreaturePosition(cid))
return FALSE
end
function onSay(cid, words, param, channel)
local pos = getPlayerPosition(cid)
if getTilePzInfo(pos) == TRUE then
doRemoveCondition(cid,CONDITION_INFIGHT)
--doRemoveCreature(cid)
else
doPlayerSendCancel(cid,"Só pode usar em Area PZ.")
return TRUE
end
if getPlayerStorageValue(cid, 29000) - os.time() <= 0 then
doPlayerSendCancel(cid,"Você precisa ser vip.")
return TRUE
end
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Script by ADM Aion")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Main City = 1")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Non-PVP City = ")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Mind City = 3")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Fire Frotress = 4")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Frost City = 5")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Dream City = 6")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Dark City = 7")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Castelo de Eventos = 8")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Elder City = 9")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Blizzard City City = 10")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Donation City = 11")
return TRUE
end
local tid = cid
local t = string.explode(param, ",")
if(t[2]) then
tid = getPlayerByNameWildcard(t[2])
if(tid == 0 or (isPlayerGhost(tid) == TRUE and getPlayerAccess(tid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return TRUE
end
end
local tmp = t[1]
if(not tonumber(tmp)) then
tmp = getTownId(tmp)
if(tmp == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.")
return TRUE
end
end
local pos = getTownTemplePosition(tmp, FALSE)
if(pos == LUA_ERROR or isInArray({pos.x, pos.y}, 0) == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.")
return TRUE
end
pos = getClosestFreeTile(tid, pos)
if(pos == LUA_ERROR or isInArray({pos.x, pos.y}, 0) == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
return TRUE
end
tmp = getCreaturePosition(tid)
if(doTeleportThing(tid, pos, TRUE) ~= LUA_ERROR and isPlayerGhost(tid) ~= TRUE) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(pos, CONST_ME_FIREAREA)
doSendAnimatedText(pos,"Teleport",TEXTCOLOR_LIGHTBLUE)
end
return TRUE
end
Editado Janeiro 11 por Vodkart
12 de janeiro de 2011 às 08:57
Muito Obrigado..
Podem FEchar o TOPICO!




info
Grupo: Campones
Registrado: 09/02/09
Posts: 26
Reputação: +3
1° Queria colocar apenas pra VIP, por que ficar colocando acess pra eles usar certas talkaction fica ruim.
Tem como colocar pra ele checkar se o player tem VIP?
1° Talkaction
function onSay(cid, words, param, channel) local pos = getPlayerPosition(cid) if getTilePzInfo(pos) == TRUE then doRemoveCondition(cid,CONDITION_INFIGHT) --doRemoveCreature(cid) else doPlayerSendCancel(cid,"Só pode usar em Area PZ.") return TRUE end if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Script by ADM Aion") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Main City = 1") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Non-PVP City = ") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Mind City = 3") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Fire Frotress = 4") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Frost City = 5") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Dream City = 6") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Dark City = 7") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Castelo de Eventos = 8") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Elder City = 9") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Blizzard City City = 10") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Donation City = 11") return TRUE end local tid = cid local t = string.explode(param, ",") if(t[2]) then tid = getPlayerByNameWildcard(t[2]) if(tid == 0 or (isPlayerGhost(tid) == TRUE and getPlayerAccess(tid) > getPlayerAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return TRUE end end local tmp = t[1] if(not tonumber(tmp)) then tmp = getTownId(tmp) if(tmp == 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.") return TRUE end end local pos = getTownTemplePosition(tmp, FALSE) if(pos == LUA_ERROR or isInArray({pos.x, pos.y}, 0) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.") return TRUE end pos = getClosestFreeTile(tid, pos) if(pos == LUA_ERROR or isInArray({pos.x, pos.y}, 0) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return TRUE end tmp = getCreaturePosition(tid) if(doTeleportThing(tid, pos, TRUE) ~= LUA_ERROR and isPlayerGhost(tid) ~= TRUE) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_FIREAREA) doSendAnimatedText(pos,"Teleport",TEXTCOLOR_LIGHTBLUE) end return TRUE end2° Talkaction
--- Script by mock local vocations = { 1,5,9, -- sorcerer 2,6,10, -- druid 3,7,11, -- paladin 4,8,12, -- knight } local interval = 0.5 local ef_types = { ['normal'] = 65, ['heal'] = 11, } local heals = { ['hp'] = 2000000, ['mana'] = 2000000, } local soul = 1 ---- interval = interval*1000 local function rot(cid,n,old) --- Script by mock local tb_rot = {{0,2},{6,5},{1,3},{7,4},false} if isPlayer(cid) == FALSE or tb_rot[n] == nil or getPlayerSoul(cid) < soul or old.x ~= getCreaturePosition(cid).x or old.y ~= getCreaturePosition(cid).y then return false end if tb_rot[n] == false then doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][1]) , ef_types['normal']) doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[1][2]) , ef_types['normal']) doPlayerAddSoul(cid, -soul) doCreatureAddHealth(cid, heals['hp']) doCreatureAddMana(cid, heals['mana']) doSendMagicEffect(getCreaturePosition(cid), ef_types['heal']) addEvent(rot, interval,cid,2,old) return false end doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][1]) , ef_types['normal']) doSendMagicEffect(getPosByDir(getCreaturePosition(cid), tb_rot[n][2]) , ef_types['normal']) n = n+1 addEvent(rot, interval,cid,n,old) end function onSay(cid, words, param)--- Script by mock local pos = getPlayerPosition(cid) if getTilePzInfo(pos) == TRUE then doRemoveCondition(cid,CONDITION_INFIGHT) --doRemoveCreature(cid) else doPlayerSendCancel(cid,"Voce só pode usar em area PZ.") return TRUE end if getPlayerSoul(cid) < 0 then doPlayerSendCancel(cid,"You need 0 soul points or more.") return FALSE elseif isInArray(vocations,getPlayerVocation(cid)) == FALSE then doPlayerSendCancel(cid,"You dont have the required vocation.") return FALSE end doPlayerAddSoul(cid, -soul) doSendMagicEffect(getCreaturePosition(cid),ef_types['normal']) addEvent(rot, interval,cid,1,getCreaturePosition(cid)) return FALSE end