• 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!

Help with account manager config! rep+++

Joined
Apr 22, 2008
Messages
114
Reaction score
10
I need the account manager to spawn players with 10 hp exactly. is this possible? Please/thanks/ will rep ;]
 
Yes it should be since in tfs there is a command, /attr SetHealth.. and /attr SetMaxHealth or something i can't remember :p it is along those lines, so it should be possible to do so.. I don't quite know how though, since im not an experienced scripter.. I can just about understand what the functions do and stuff so my best bet is to look at the creature scripts file login and do something.. But i am not sure! I just hope that from what i have told you, you may benefit from it :)

EDIT
Or what you could do is make a tile action.. And for first log in on that tile, it makes character to 10hp.. This is possible since i had a message tile that messaged them about the server when player stands on tile for first time. i.e new players. Therefore if you want me to share that script so you can play around and edit it, i will :)
 
Kk Heres the script for the message, so maybe look at a scripting tutorial to change the dosendmessage, to dosethealth or the command it is.. ;)

It's in movements/scripts put the code under the replace in a new document and then save as .lua

Think you need to replace
LUA:
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'message')
with this? idk but put a negative figure.. find out what the starting hp is, and remove the remainder until 10 :D so e.g. health is 90, put -80
LUA:
	doCreatureAddHealth(cid, health[, force])
in this script
LUA:
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) and getCreatureStorage(cid, 256) == -1 then
		doCreatureSetStorage(cid, 256, 1)
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'message')
	end
end

Here is the movements xml

XML:
                <movevent type="StepIn" actionid="4130" event="script" value="welcome.lua"/>

Basically just change it to suit your requirements, check the functions tutorial and look for the creature health thing.. ;P and test

Tell me if works :D i really want to know if i managed to actually help haha :D
 
Last edited:
umm where it says health i think

Otherwise

try replacing with this instead
doCreatureAddHealth(cid, health[ PUT HERE, force])


If that don't work either, try this

LUA:
		doPlayerAddHealth(cid, -80[, force])
 
lol, right in the movements.xml the line that i gave you, where it says action ID: change to one thats you don't think is in use.. e.g 3645. Then in the map editor.. The tile where new players log in for first time, right click that tile, properties, in Action ID place 3645 for example. Then the first time you walk on that tile for every character it should work...
 
lol, right in the movements.xml the line that i gave you, where it says action ID: change to one thats you don't think is in use.. e.g 3645. Then in the map editor.. The tile where new players log in for first time, right click that tile, properties, in Action ID place 3645 for example. Then the first time you walk on that tile for every character it should work...


oh yeah i did that, no go =[

it does make me fall threw the floor however
 
i am gettin this in cmd

moveevent.jpg


no idea what it means tho
 
fall? why?
Wait!!!! is that a why you want it to damage player? he falls? If so put the script on the tile below, the one he lands on! and try all of those replacement lines i gave you.. One, if not the others, should work..

Edit: The error is saying that the event is wrong.. so you need to use

doCreatureAddHealth(cid, health[, force]) then.. In this case, put the health/ - number, before the comma and after the square brakcets..
 
falls why? Idk

all i have is
in movement.xml
Code:
<movevent type="StepIn" actionid="9888" event="script" value="welcome.lua"/>


And

in welcome.lua~
Code:
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) and getCreatureStorage(cid, 426) == -1 then
		doCreatureSetStorage(cid, 426, 1)
		doPlayerAddHealth(cid, -160[, force])
	end
end



and he is falling down a floor but not lowering his max hp ;<


i want it to lower---> permanent hp <---- ;D
 
oooo ok, i thought you meant just temperarily.. Well there are a number of things you can do...
but just change the

doCreatureAddHealth(cid, health[, force])

for

setCreatureMaxHealth(cid, health)

As for the falling.. what is the id of the tile? And it may also be that your action ID is already used!
 
Back
Top