Ir para conteúdo

Featured Replies

Postado

@Kimos

mas e se o player relogar não vai voltar para exp normal?

por isso eu tava pensando em adicionar uma storage no player também para que quando ele faça o login dar a exp de novo '-'

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

  • Respostas 9
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • \data\talkaction\scripts\ExtraExp.lua function onSay(cid, words, param, channel) local config = { storage = 23232, storageVIP = 23233, } local s = string.explode(param, ",") local exp =

Postado

Pois é, nem tinha pensado nisso.

\data\talkaction\scripts\ExtraExp.lua

function onSay(cid, words, param, channel)


local storage = 23232

local s = string.explode(param, ",")

local exp = tonumber(s[2])

local player = getPlayerByNameWildcard(tostring(s[1]))


		if(param == '') then

				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")

				return true

		end


		if(not isPlayer(player)) then

				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.")

				return true

		end


	   doPlayerSetExperienceRate(player, exp)

	   setPlayerStorageValue(player, storage, exp)

		return true

end
\data\talkaction\talkactions.xml
<talkaction words="!exp" event="script" value="ExtraExp.lua"/>
\data\creaturescripts\scripts\ExtraExp.lua

function onLogin(cid)

   storage = 23232

   doPlayerSetExperienceRate(cid, getPlayerStorageValue(cid, storage))

return true

end

\data\creaturescripts\creaturescript.xml
<event type="login" name="ExtraExp" event="script" value="ExtraExp.lua"/>
!exp Kimoszin, 20

Postado

\data\talkaction\scripts\ExtraExp.lua


function onSay(cid, words, param, channel)


local config = {

storage = 23232,

storageVIP = 23233,

}


local s = string.explode(param, ",")

local exp = tonumber(s[2])

local player = getPlayerByNameWildcard(tostring(s[1]))


			    if(param == '') then

							    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")

							    return true

			    end


			    if(not isPlayer(player)) then

							    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.")

							    return true

			    end


		   doPlayerSetExperienceRate(player, exp)

		   setPlayerStorageValue(player, config.storage, exp)

		   setPlayerStorageValue(player, config.storageVIP, 1)

			    return true

end

\data\talkaction\talkactions.xml
<talkaction words="!exp" event="script" value="ExtraExp.lua"/>
\data\talkaction\scripts\RemoveExtraExp.lua

function onSay(cid, words, param, channel)


local config = {

storage = 23232,

}


local s = string.explode(param, ",")

local player = getPlayerByNameWildcard(tostring(s[1]))


			    if(param == '') then

							    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")

							    return true

			    end


			    if(not isPlayer(player)) then

							    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player nao existe.")

							    return true

			    end


		   doPlayerSetExperienceRate(player, 0)

		   setPlayerStorageValue(player, config.storage, 0)

			    return true

end

\data\talkaction\talkactions.xml
<talkaction words="!expremove" event="script" value="RemoveExtraExp.lua"/>
\data\creaturescripts\scripts\ExtraExp.lua
function onLogin(cid)

   storage = 23232

   doPlayerSetExperienceRate(cid, getPlayerStorageValue(cid, storage))

return true

end
\data\creaturescripts\creaturescript.xml
<event type="login" name="ExtraExp" event="script" value="ExtraExp.lua"/>
Para adicionar:
!exp Kimoszin, 2
Para remover:
!expremove Kimoszin

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 520.2k

Informação Importante

Confirmação de Termo