65

Tutor Por 1 Mes

Por 6543210, 21 de out. de 2010 em Archived

5
940
65432106
21 de outubro de 2010 às 15:15

Queria um comando de tutor pa god q desse tutor pra alguem por 1 mes soh e depois ele voltava a ser player

ajuda aew por favor

Ot 8.6

jakaamarelaJ
22 de outubro de 2010 às 13:05

Tbm keria esse script , mais pra dar god pra uma pessoa por um mes ou um tempo determinado tipo uma semana um ano daih eh soh mudar entao alguem pur favor da uma ajuda aew.....

N to atrapalhando so comentando que também preciso do script , entao por favor algum vicio faiz o script q eu tbm vou usar, abraços

SkyDangerousS
22 de outubro de 2010 às 13:18

pow

 

Eu tava fazendo o script aqui em casa e acabou dando errado.

 

Como não sei elaborar uns script bem faceis .. eu deixei um script muito dificil de ser configurado .. bem complicado.

 

Vou ver com o vodkart se ele ajuda vocês.

 

Ou o que vocês podem fazer , igual eu .. aprender script ;)

VodkartV
22 de outubro de 2010 às 16:33

talkacitons

 

addtutor.lua

function onSay(cid, words, param)

local t = string.explode(param, ",")
if not t[2] then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")
end

local player = getPlayerByName(t[1])
local days = t[2]
local pid = getPlayerByNameWildcard(t[1])
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

local daysvalue = days*3600*24
local storageplayer = getPlayerStorageValue(player, 14000)
local timenow = os.time()

local time = storageplayer <= 0 and (timenow + daysvalue) or (storageplayer + daysvalue)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você deu " ..days.." dias de tutor para o jogador chamado "..t[1]..".")
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "você agora é tutor por "..days.." dias.")
setPlayerStorageValue(player, 14000, time)
setPlayerGroupId(player, 2)
return TRUE
end

 

talakctions.xml

	<talkaction log="yes" words="/tutor" access="5" event="script" value="addtutor.lua"/>

 

 

Comando:

 

/tutor NOME,DIAS

 

 

creaturescript

 

tutorcheck.lua

function onLogin(cid) 

if getPlayerStorageValue(cid, 14000) - os.time() > 0 then 
setPlayerStorageValue(cid, 20536, 1)
elseif getPlayerStorageValue(cid, 20536) == 1 and getPlayerStorageValue(cid, 14000) - os.time() < 1 or getPlayerStorageValue(cid, 14000) - os.time() == 0 then 
doPlayerPopupFYI(cid, "Você deixou de ser um Tutor.") 
setPlayerStorageValue(cid, 20536, -1)
setPlayerStorageValue(cid, 14000, -1)
setPlayerGroupId(cid, 1) 
end 
return TRUE 
end

 

em creaturescript.xml

<event type="login" name="TutorCheck" script="tutorcheck.lua"/>

65432106
22 de outubro de 2010 às 22:02

Valeu aew , mt boa essa ajuda

S2

 

Se puder tbm da uma olhadinha nesse otro pedido ake q ninguem conseguiu fazer...

 

http://www.xtibia.com/forum/topic/143357-item-criado/

 

e se alguem kizer tbm ajuda aew por favor preciso mt desse otro script...

 

Abraços