Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Reset limit day by day  (Visto 1618 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline mututhan Posteado: March 18, 2020, 05:36:15 AM

  • 0 puntos por ventas
  • *
  • Rank: Sup. destacado
  • Posts: 112
  • Gracias recibida: 942
  • vn
hi everybody ,
I'm new member.
I have a problem looking forward to your help.
I want config to limit reset per day . Reset limit by Top 1 of Server.
For example : limit reset = 20 .
The first day, all members will be reset 20 . The following day, will count according to the reset of the top 1 + 20.
I have been guided by louis "you need to Create in the character table the Colunn ResetDay

and edit the procedures, WZ_setResetInfo and Wz_GetResetInfo"

but I cant do it
I hope someone can guide me.
Thank you.



Gracias:


Offline louis #1 Posteado: March 18, 2020, 07:22:05 AM | Modificado: March 18, 2020, 08:37:25 AM by louis

  • MAESTRO

  • US. DE HONOR

  • LEYENDA

  • C++ Coder
  • +11 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 844
  • Gracias recibida: 36402
  • br
1 - You have to set the ResetDay Default value to 0
2 - In the WZ_SetResetInfo procedure set the query to UPDATE Character SET ResetCount=@Reset, ResetDay=@ResetDay WHERE AccountID=@Account AND Name=@Name
3 - In the WZ_GetResetInfo procedure set the query to SELECT @Reset=ResetCount,@ResetDay=ResetDay,@ResetWek=0,@ResetMon=0 FROM Character WHERE AccountID=@Account AND Name=@Name

Update 36 is ready!!!

Gracias:

Gracias estan bloqueadas

Offline kayito #2 Posteado: March 18, 2020, 11:22:45 AM

  • MAESTRO

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.035
  • Gracias recibida: 15038
  • ar
1 - You have to set the ResetDay Default value to 0
2 - In the WZ_SetResetInfo procedure set the query to UPDATE Character SET ResetCount=@Reset, ResetDay=@ResetDay WHERE AccountID=@Account AND Name=@Name
3 - In the WZ_GetResetInfo procedure set the query to SELECT @Reset=ResetCount,@ResetDay=ResetDay,@ResetWek=0,@ResetMon=0 FROM Character WHERE AccountID=@Account AND Name=@Name

If you set as Default Value 0, when you go to select character and enter with another character, the ResetDay column turns 0.

hi everybody ,
I'm new member.
I have a problem looking forward to your help.
I want config to limit reset per day . Reset limit by Top 1 of Server.
For example : limit reset = 20 .
The first day, all members will be reset 20 . The following day, will count according to the reset of the top 1 + 20.
I have been guided by louis "you need to Create in the character table the Colunn ResetDay

and edit the procedures, WZ_setResetInfo and Wz_GetResetInfo"

but I cant do it
I hope someone can guide me.
Thank you.




Here i made an example video where i show how to activate and config ResetDay, ResetWeek and ResetMonth. Also added a ResetDate column to know when was the last reset made by that character.

Video:


PD: sorry for my english haha

Gracias:

Gracias estan bloqueadas

Offline louis #3 Posteado: March 18, 2020, 02:49:28 PM

  • MAESTRO

  • US. DE HONOR

  • LEYENDA

  • C++ Coder
  • +11 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 844
  • Gracias recibida: 36402
  • br

If you set as Default Value 0, when you go to select character and enter with another character, the ResetDay column turns 0.


Default value in the database man, for not null values, not in the procedure...


Update 36 is ready!!!

Offline kayito #4 Posteado: March 18, 2020, 05:50:24 PM | Modificado: March 18, 2020, 05:55:03 PM by kayito

  • MAESTRO

  • C++ Coder
  • 0 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 1.035
  • Gracias recibida: 15038
  • ar

If you set as Default Value 0, when you go to select character and enter with another character, the ResetDay column turns 0.


Default value in the database man, for not null values, not in the procedure...

Si declaras así:

ALTER TABLE [MuOnline].[dbo].[Character] ADD ResetDay INT NOT NULL DEFAULT ((0))

Cuando clickeas en Seleccionar Personaje y entras con otro personaje distinto, al personaje anterior se le modifica ResetDay a 0. Me pasó en mi antiguo servidor con users online y tuve ese problema. Lo solucioné declarando:

ALTER TABLE [MuOnline].[dbo].[Character] ADD ResetDay INT

Si no prueba tu mismo.
1: añade esto >> ALTER TABLE [MuOnline].[dbo].[Character] ADD ResetDay INT NOT NULL DEFAULT ((0))
2: actualiza procedures GetReset y SetReset
3: entra al juego y crea 2 personajes
4: con el personaje1 haz 1 reset
5: revisa ResetDay de personaje1
6: entra con el personaje2
7: vuelve a revisar ResetDay del personaje1 y va a estar en 0

Gracias:

Gracias estan bloqueadas

Offline louis #5 Posteado: March 18, 2020, 06:10:05 PM

  • MAESTRO

  • US. DE HONOR

  • LEYENDA

  • C++ Coder
  • +11 puntos por ventas
  • *
  • Rank: Puto amo
  • Posts: 844
  • Gracias recibida: 36402
  • br

If you set as Default Value 0, when you go to select character and enter with another character, the ResetDay column turns 0.


Default value in the database man, for not null values, not in the procedure...

Si declaras así:

ALTER TABLE [MuOnline].[dbo].[Character] ADD ResetDay INT NOT NULL DEFAULT ((0))

Cuando clickeas en Seleccionar Personaje y entras con otro personaje distinto, al personaje anterior se le modifica ResetDay a 0. Me pasó en mi antiguo servidor con users online y tuve ese problema. Lo solucioné declarando:

ALTER TABLE [MuOnline].[dbo].[Character] ADD ResetDay INT

Si no prueba tu mismo.
1: añade esto >> ALTER TABLE [MuOnline].[dbo].[Character] ADD ResetDay INT NOT NULL DEFAULT ((0))
2: actualiza procedures GetReset y SetReset
3: entra al juego y crea 2 personajes
4: con el personaje1 haz 1 reset
5: revisa ResetDay de personaje1
6: entra con el personaje2
7: vuelve a revisar ResetDay del personaje1 y va a estar en 0

Ya verifique y aqui no sucede oO

Update 36 is ready!!!

Offline matheusgom #6 Posteado: March 18, 2020, 09:55:22 PM

  • 0 puntos por ventas
  • *
  • Rank: Dedicado
  • Posts: 31
  • Gracias recibida: 6
  • br
Muito bom, parabéns!


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
6 Replies
790 Views
Last post July 19, 2020, 06:26:31 PM
by Leandro RS
0 Replies
276 Views
Last post September 23, 2020, 10:05:42 PM
by Madness
5 Replies
465 Views
Last post October 16, 2020, 10:31:44 PM
by Madness
2 Replies
432 Views
Last post December 02, 2020, 01:17:55 AM
by ZabiinoOo
0 Replies
398 Views
Last post December 03, 2020, 02:02:50 PM
by Concha