[Request] auto resurrect UM's

08/03/2010 10:36 il.mane#1
is there anyone that have an SQL procedure to auto resurrect UM's?
08/03/2010 15:15 AriezOMG#2
Id also like a script like this.
08/03/2010 16:11 lilprohacker#3
It's going to be a complicated script because of the checks that need to be done.

1. get a list of all the UM toons that died and need to be res'd
2. For each toon:
a. Check name to make sure it wasn't taken while dead
b. Check for available slots under user to res the toon to.
c. then your going to have to change the following in Char table:
A. Del to 0
B. Change the Map and X,Z to a safe spot depending on country
C. Change the char slot to an available slot under that user.
08/05/2010 23:20 AriezOMG#4
Hmm do you think anyone could make it though?
08/07/2010 05:08 il.mane#5
yeah would be awesome to have someone sharing the procedure, it sound way to complicated for my SQL knowledge :P
08/07/2010 20:43 ProfNerwosol#6
Actually that's not all. You need to check also for:

- whether it was the only character the player had,
- if so check what country it belonged to and set it in PS_GameData.dbo.UserMaxGrow table so player won't get the screen to choose faction, oh and you can do a silly bug this way by having a i.e. AoL character on UoF side.
- then check whether that character was in guild, if yes check which guild it was, check for guild leadership, return it to guild, correct MemberCount.
- you can set safe zone as Map 0. It's D-Water. The coordinates are irrelevant since player will spawn in own faction fortress.
- adding to what lilpro wrote. You also need to check whether player requested that character to be deleted or not. Otherwise you will restore a lot of useless toons.

I have a working UM Restore script written in PHP. Can't make it public sorry. it's for Kingdom.
08/08/2010 01:36 DWater#7
Kingdom is a lucky place to have that script from you. Thanks for the reminder of guild return. ^^
08/12/2010 17:25 il.mane#8
yeah it might introduce way too many problems, at this stage ill go for a php script aswell.
08/15/2010 18:25 ProfNerwosol#9
Actually it'd be easier to write it in SQL as a procedure than PHP. The difficulty lies in checking for free slots. There's a built in function in PHP that does it for you, but I can't find one in SMSE. Writing it by myself proved itself to be difficult.

Btw, I might release the script at some point. Kingdom is closed. For now, members of my group can have a look at it.
08/15/2010 22:33 Shaiya Xtreme#10
Hi, i see Kingdom close soon can you develop the file now ?
08/16/2010 02:12 il.mane#11
I do made a php script, its not online yet but is working like a charm :) just need a little test to make sure that its 100% bug free.
It make able our players to resurrect their own toons without involve any GM's
08/16/2010 03:22 AriezOMG#12
Teasing me man :P not giving it out to public xD
08/16/2010 12:35 ShaiyaUnited#13
I have this script but its in .ASP file and is working like charm =) you need to pay Points to res (you can change it)..
08/16/2010 13:12 Shaiya Xtreme#14
can you relaese ?
08/16/2010 19:07 c0matose#15
Mane - hit me up on forums or PM here. I'm wanting to have a look at the script if you don't mind.