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

[TFS cryingdamson 0.3.6 (8.60) V5] Look on character

lokatylokacz

New Member
Joined
Feb 26, 2011
Messages
58
Solutions
2
Reaction score
4
Location
P(r)oland
Hello,
Is it possible to make other result of "Look" on character ?
Now I got "15:17 You see Shellerinii (Level 85). He is a master sorcerer."
and I would have something like "15:17 You see Shellerinii (Level 85). He is a master sorcerer. He got XXXXX frags."
where XXXXX will be numer of all frags that this player ever made :)

Is there any way to do this without changeing source of engin ??

Thx at all
LoK
 
Yes, it is possible, but I can't do scripts such scripts. I'm all to newbie for that.. :)

But I have one script for rebirth onLook, you could always check it out :)

LUA:
Efunction onLook(cid, thing, position, lookDistance)
	if(isPlayer(thing.uid) and thing.uid ~= cid and getCreatureStorage(thing.uid, 85987) ~= -1) then
		doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == PLAYERSEX_FEMALE and ".\nShe" or ".\nHe") .. " has prestiged " .. getCreatureStorage(thing.uid, 85987) .. " " .. (getCreatureStorage(thing.uid, 85987) == 1 and "time" or "times"))
	elseif(thing.uid == cid and getCreatureStorage(cid, 85987) ~= -1) then
		local message = "You see yourself."
		if(getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION)) then
			message = message .. " You are " .. getPlayerGroupName(cid) .. "."
		elseif(getPlayerVocation(cid) ~= 0) then
			message = message .. " You are a " .. getPlayerVocationName(cid):lower() .. "."
		else
			message = message .. " You have no vocation."
		end
 
		if(getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil) then
			message = message .. " You are " .. (getPlayerSex(cid) == PLAYERSEX_FEMALE and "wife" or "husband") .. " of " .. getPlayerNameByGUID(getPlayerPartner(cid)) .. "."
		end
 
		if(getPlayerGuildId(cid) > 0) then
			message = message .. " You are " .. (getPlayerGuildRank(cid) == "" and "a member" or getPlayerGuildRank(cid)) .. " of the " .. getPlayerGuildName(cid)
			message = getPlayerGuildNick(cid) ~= "" and message .. " (" .. getPlayerGuildNick(cid) .. ")." or message .. "."
		end
 
		if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS)) then
			message = message .. "\nHealth: [" .. getCreatureHealth(cid) .. " / " .. getCreatureMaxHealth(cid) .. "], Mana: [" .. getCreatureMana(cid) .. " / " .. getCreatureMaxMana(cid) .. "]."
			message = message .. "\nIP: " .. doConvertIntegerToIp(getPlayerIp(cid)) .. ", Client: " .. getClientVersion(cid) .. "."
		end
 
		if(getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION)) then
			message = message .. "\nPosition: [X: " .. position.x .. "] [Y: " .. position.y .. "] [Z: " .. position.z .. "]."
		end
 
		return false, doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, message .. " \nYou have prestiged " .. getCreatureStorage(cid, 85987) .. " " .. (getCreatureStorage(cid, 85987) == 1 and "time." or "times."))
	end
 
	return true
end
 
Thx for this but in what file is ithis code ? I would like to look on it in my OTserver version :) or where I have to add this ?

#sloved :) THX
 
Last edited:
That is in creaturescripts/scripts. name it rebirthdescription.lua
But you need to add this in creaturescripts.xml
XML:
  <event type="look" name="RebirthDescription" event="script" value="rebirthdescription.lua"/>

and you need to add this to login.lua to make it work
Code:
registerCreatureEvent(cid, "RebirthDescription")
I'll search for a link where you can add a fully working script of this. Even though it wasn't exactly what you where looking for..

I haven't done this script, it is something I have on my server. Don't know the real author..

- - - Updated - - -

Here is a link to a rebirth system, just check it out. Don't think that it is exactly the same as mine..
HERE
 
Back
Top