• 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]few questions about scripts

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,979
Solutions
100
Reaction score
3,423
Location
Poland
GitHub
gesior
How can I change player outfit?
I want to change player outfit when he/she login to game.
Could you give me examples of scripts using this data only:
type="130" head="95" body="120" legs="114" feet="50"

Is it possible to check how many players online has got certain feet colour [ex. feet="50"]?
 
U mean u are able to change other players outfits through your gm? It's unpossible at the moment

If you can count the amount of players that have xx Colours? hmm if Tala adds an function "GetplayerColour(cid,feet,50)"
 
My login.lua now
Code:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	local text = ""
	text = "Tester: Crunch."
	doPlayerSendTextMessage(cid, 1, text)
	doPlayerAddOutfit(cid,128,1)
	return TRUE
end
(Am I have to use "local text = "" " ? )
and it only allow my player to use addon1. I want to AUTO CHANGE outfit: when someone login and his outfit in MySQL is "type=128 ... feet= 45" script set "type=131 ... feet=50" - in game, not in MySQL!
I found (http://otland.net/showthread.php?t=1244):
Code:
addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
but i dont know how it work. Can u post here any script with "addOutfitCondition"?
 
Last edited:
My login.lua now
Code:
function onLogin(cid)
	registerCreatureEvent(cid, "PlayerDeath")
	local text = ""
	text = "Tester: Crunch."
	doPlayerSendTextMessage(cid, 1, text)
	doPlayerAddOutfit(cid,128,1)
	return TRUE
end
(Am I have to use "local text = "" " ? )
and it only allow my player to use addon1. I want to AUTO CHANGE outfit: when someone login and his outfit in MySQL is "type=128 ... feet= 45" script set "type=131 ... feet=50" - in game, not in MySQL!
I found (http://otland.net/showthread.php?t=1244):
Code:
addOutfitCondition(condition, lookTypeEx, lookType, lookHead, lookBody, lookLegs, lookFeet)
but i dont know how it work. Can u post here any script with "addOutfitCondition"?

U mean if an players log in he's only able to use 1 outfit?
 
in config.lua i can set
Code:
allowChangeOutfit = "no"
so player cant change outfit. I want to set player feet color when he login (war server, 2 teams, priv accounts and i want 2 fair teams "rand(1,2)" >>> if 1 player feet color = 50 if 2 player feet color = 65.
config.lua
Code:
noDamageToSameLookfeet = "yes"
 
in config.lua i can set
Code:
allowChangeOutfit = "no"
so player cant change outfit. I want to set player feet color when he login (war server, 2 teams, priv accounts and i want 2 fair teams "rand(1,2)" >>> if 1 player feet color = 50 if 2 player feet color = 65.
config.lua
Code:
noDamageToSameLookfeet = "yes"

uhm it wass posible but that's an source issue ask Tala turen if he could make if he maks it it should be done in 20Min and u just need to compile your own .exe of it
 
"Gesior.pl, you do not have permission to access this page. This could be due to one of several reasons:"
when trying to download "Download a Dev C++ from here: Dev C++ including all librariesThis Dev C++ Includes Lua 5.1 and Boost."
I have Dev-c++ (with boost, lua and all other libraries for Evolution) and compiled FerOTS 0.3 without problems. When i try to compile newest TFS SVN (rev.: 336) with "How to compile The Forgotten Server latest sources" i see 846378678634 errors. Can anyone post Devcpp project of TFS or its only for users with xx+ posts?

//EDIT
Wow! I made it (part of it) in LUA :)
THX for help master-m and Mokerhamer.
Its not possible (i dont know how to do this[?]) to add this script to login.lua, but i made rune to teleport player and set outfit. Now i must only add 2 outfits and 2 spawns and if rand = 1/rand = 2 and it should work :)
My test rune:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 72000000)
addOutfitCondition(condition, 0, 230, 0, 0, 0, 0)
addOutfitCondition(condition, 0, 231, 0, 0, 0, 0)
setCombatCondition(combat, condition)
local newpos = {x=96, y=124, z=7}
function onCastSpell(cid, var)
	doTeleportThing(cid,newpos,1)
	doCombat(cid, combat, var)
	return TRUE
end
 
Last edited:
Back
Top