BR
suporte otserv

(resolvido) (Pedido) Premium

Por BrunooMaciell, 31 de dez. de 2016 em Resolvidos

otserv
4
1.6k
BrunooMaciellB
31 de dezembro de 2016 às 10:58

Eu queria pedir uma ajuda pra por uma tag nessa 2 script.

 

OBS: uma tag pra ativer ou desativar pra premium pode usar.

 

Ex: queria por pra premium so premium pode usa o systema de bike.

 

Script Bike System

Spoiler

local function BikeSpeedOn(cid, t)                  
setPlayerStorageValue(cid, t.s, t.speed) 
doChangeSpeed(cid, -getCreatureSpeed(cid)) 
doChangeSpeed(cid, t.speed) 
end 

local function BikeSpeedOff(cid, t)
setPlayerStorageValue(cid, t.s, -1) 
doRegainSpeed(cid) 
end 

local t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 6000}

function onUse(cid, item, fromPosition, itemEx, toPosition)

local pos = getThingPos(cid) 

if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or 
getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or
getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then   --alterado v1.9
   return doPlayerSendCancel(cid, "You can't do that right now.")
end

if getPlayerStorageValue(cid, t.s) <= 0 then
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.text, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')
   BikeSpeedOn(cid, t)
   if getPlayerSex(cid) == 1 then
      doSetCreatureOutfit(cid, {lookType = 1393}, -1)
   else
       doSetCreatureOutfit(cid, {lookType = 1394}, -1)
   end
else
   doSendMagicEffect(pos, 177)
   doCreatureSay(cid, t.dtext, 19)
   doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')
   BikeSpeedOff(cid, t)
   doRemoveCondition(cid, CONDITION_OUTFIT)
end
return true
end

E queria por o systema de casino pra premium pode a postar porem nao sei qual script ou onde fica se alguem souber so fala que eu posto ^^

DrakopoulosD
31 de dezembro de 2016 às 18:16
7 horas atrás, brunoo1996 disse:

Eu queria pedir uma ajuda pra por uma tag nessa 2 script.

OBS: uma tag pra ativer ou desativar pra premium pode usar.

Ex: queria por pra premium so premium pode usa o systema de bike.

local function BikeSpeedOn(cid, t) 	setPlayerStorageValue(cid, t.s, t.speed) 	doChangeSpeed(cid, -getCreatureSpeed(cid)) 	doChangeSpeed(cid, t.speed) endlocal function BikeSpeedOff(cid, t)	setPlayerStorageValue(cid, t.s, -1) 	doRegainSpeed(cid) endlocal t = {text='Mount, bike!', dtext='Demount, bike!', s=5700, speed = 6000, needPremium = true}function onUse(cid, item, fromPosition, itemEx, toPosition)	local pos = getThingPos(cid) 	if t.needPremium and not isPremium(cid) then		return doPlayerSendCancel(cid, "You are not premium.")	end	if getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or 	getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or	getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then --alterado v1.9		return doPlayerSendCancel(cid, "You can't do that right now.")	end	if getPlayerStorageValue(cid, t.s) <= 0 then		doSendMagicEffect(pos, 177)		doCreatureSay(cid, t.text, 19)		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce Montou na bike.')		BikeSpeedOn(cid, t)		if getPlayerSex(cid) == 1 then			doSetCreatureOutfit(cid, {lookType = 1393}, -1)		else			doSetCreatureOutfit(cid, {lookType = 1394}, -1)		end	else		doSendMagicEffect(pos, 177)		doCreatureSay(cid, t.dtext, 19)		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Voce saio da bike.')		BikeSpeedOff(cid, t)		doRemoveCondition(cid, CONDITION_OUTFIT)	end	return trueend

E o sistema de cassino é em actions\scripts\slotmachine.lua

Para vc colocar pra somente premium usar, no começo da função onUse vc adiciona..

	if not isPremium(cid) then		return doPlayerSendCancel(cid, "You are not premium.")	end

 

 

BrunooMaciellB
31 de dezembro de 2016 às 18:37

Valeu irmao como sempre me ajudando RS ^^

 

Testei aqui e pego certinho valeu =):

 

Rep+

 

PoccnnP
02 de janeiro de 2017 às 07:32

Caro membro, seu tópico foi movido de Otserv > Suporte Otserv para Suporte Otserv > Otserv > Pedidos e Dúvidas Resolvidos.