• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

New at OTs, need help :/

tric

New Member
Joined
Aug 26, 2012
Messages
5
Reaction score
0
I began to create a server a few days ago and everything was going great, i tested it today and found a problem, when a character dies his location sets to xpos 0, ypos 0 and zpos 7, my temple is in xpos 950, ypos 1010 and zpos 7, how can i fix this issue, new players do spawn in my temple.
Thanks
 
If by spawn position you mean this:
newPlayerSpawnPosX = 953
newPlayerSpawnPosY = 1007
newPlayerSpawnPosZ = 7
newPlayerTownId = 1
Then yes, i have already done that, whats town Id for??
 
None of those, im currently doing it locally on my pc, previously i mentioned it is an SQL because i run it with SQLiteStudio, if thats not SQL please forgive me, im kind of new :S. Thanks. I believe the problem is because the default value on the Data Base is set to 0, how can i edit that?
 
go into your db and set account manager to your temple position. Should fix it I think... Been awhile sense i messed with sqlite...
 
Also check the town id of the temple in Remere's Map editor > CTRL + T.
Then put the town ID in config.lua

Code:
newPlayerTownId = ?

and open your DB in SQLite Studio and edit the following values in the character Account Manager: town id, and position x y z.
 
MM... Didnt work, i also changed the default x, y, zpos to 953,1007,7 respectively and still, when someone dies it changes them to 0, the bes way to fix this is to use xampp or uniserver?? because if it is ill try to use them but ill have to learn first :) Thanks

EDIT: Already fixed it, thanks for all your help. If i happened to have different temples how can I make the character to respawn in different temples according to the town he is in?
 
Last edited:
Try creating a new lua file in craturescripts / scripts folder, let's call it: death1.lua

Code:
function onDeath(cid, corpse, killer)

                                    doPlayerSetTown(cid,1)

		end

in 1 you will put the TOWN ID of your principal town.

also add to creaturescripts.xml

Code:
<event type="death" name="PlayerDeathTown" script="death1.lua"/>
 
I think you can only set it from one temple. There "home town" aka town id. to set temple in town that is done in the map editor.
 
If the character was created before the fix then you have to goto the database and change the characters town ID to the one you want them to respawn to.
 
Back
Top