PDA

View Full Version : |Lançamento| Query para premiar jogadores online por IP na MuEmu CORRIGIDA!



LaMO
21/04/2020, 08:53 PM
Query corrigida, a que tinha anteriormente no fórum estava com problemas!

Atenção: Sempre faça um BACKUP antes de rodar uma query que não conhece.



Use Muonline
Go

[Only registered and activated users can see links]

[Only registered and activated users can see links]
DECLARE LISTA CURSOR LOCAL FOR
SELECT distinct(IP) FROM memb_stat where connectstat=1
OPEN LISTA
[Only registered and activated users can see links]
[Only registered and activated users can see links]
begin

[Only registered and activated users can see links]

[Only registered and activated users can see links]

[Only registered and activated users can see links]
[Only registered and activated users can see links]

[Only registered and activated users can see links]

[Only registered and activated users can see links]
end
CLOSE LISTA
DEALLOCATE LISTA

[Only registered and activated users can see links]


Créditos: russo1

russo1
21/04/2020, 11:56 PM
Lembrando que meus créditos é somente por uma pequena correção destacada em vermelho, não sei quem fez a query :D

Vou deixar aqui uma outra opção para premiar com moedas do shop do X (cashshop)





USE MuOnline

Declare
@login varchar(20),
@ip varchar(20),
test int = 0

[Only registered and activated users can see links]
[Only registered and activated users can see links]
[Only registered and activated users can see links]

DECLARE LISTA CURSOR LOCAL FOR
SELECT distinct(IP) FROM memb_stat where connectstat=1
OPEN LISTA
[Only registered and activated users can see links]
[Only registered and activated users can see links]
begin

[Only registered and activated users can see links]

[Only registered and activated users can see links]
[Only registered and activated users can see links]
else
[Only registered and activated users can see links]

[Only registered and activated users can see links]
[Only registered and activated users can see links]

set test = test+1

[Only registered and activated users can see links]
end

CLOSE LISTA
DEALLOCATE LISTA

print test



Créditos:
Louis