It fires when K1 is updated in the chars table. I do 5 pts for each kill.
Code:
USE [PS_GameData]
GO
/****** Object: Trigger [dbo].[PointsForKills] Script Date: 09/27/2012 11:57:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create trigger [dbo].[PointsForKills]
on [PS_GameData].[dbo].[Chars]
after update
as
IF (UPDATE (k1))
begin
declare @oldk1 int
declare @newk1 int
set @oldk1 = (select k1 from deleted)
set @newk1 = (select k1 from inserted)
if @oldk1<@newk1
begin
update PS_userdata.dbo.users_master
set point=point+5
from PS_userdata.dbo.users_master m,inserted i where m.userUID=i.useruid
end
/*if I wanted to do 500 points per x000 kills I would do something like this
if (convert ( varchar (5),@newk1) like '%000')
begin
update PS_userdata.dbo.users_master
set point=point+500
from PS_userdata.dbo.users_master m,inserted i where m.userUID=i.useruid
end
This would give 500 points to every k1 value that is "like" 1000 or 2000 or 3000 etc, not just 1000 kills
*/
end
end
GO
Pseudo code of what the trigger is doing:
1. Trigger waits for K1 to be updated
2. If k1 gets updated, go compare the old value ( deleted ) with the new value ( inserted ) that was just added.
3. If old value is less than new value, go update users_master points, where userid of chars table matches userid of Users_master ( this way you don't update everyone's points lol )
Appendix:
A. There is a "from" statement because we are comparing 2 tables and you have to reference both inside. There are many ways of doing this ( joins, full object names etc ) but this is how i did it.
B. /* this begins a comment block in SQL
C. */ this ends a comment block in SQL
D. Understand what you are doing before doing it
E. Added points take a little bit to show on the client side, but a relog is NOT necessary.
[Tutorial+Tool] find other's hp mini tool + CE tutorial to find the Base Addresses 04/12/2010 - Archlord - 22 Replies this thread contains a videos of how to find you hp and ur target's hp base address using cheat engine in Archlord, along with a mini-simple tool written in C# that uses this info to find ur hp and ur target's hp by reading the process memory also the source code (for whom ever wants to use it in his own bot possibly!) ---> finding base address isnt always easy, it has try-and-error, interacting with the client to gather more info using CE... the initial 1098 value of the target mob could be...
Anything you can find i can find betterrrrr! 07/16/2008 - Runescape - 0 Replies nexus ibot....
CS-Arena.com - professionelles Game-, Rootserver- & Housingbusiness
1. go to link
2. sign up
3. download nexus ibot the latest version.
4. got up to forums and choose nexus and ibot
5. scroll down to script realeses (you might need to be logged in)
6. download the scripts needed.
7. compile
8. start ibot.