Hello,
this is my simple script to change outfit :3
How to use?
or
If you not set the player name, outfit will be on you.
Here we go!
talkactions.xml
newtypeex.lua
@EDIT
New command, set %hp :3
example:
Player "Noob" have full hp, when u use "/sethp 5, Noob", now have only 5% of hp :3
Its usefull to check bots, when player is in DP or something, set his hp to ~50%, and if he sudden use heal, he is a bot
talkactions.xml
sethp.lua
I think it will be helpfull for someone :3
Thanks,
Erexo.
this is my simple script to change outfit :3
How to use?
Code:
/newtypeex ITEM ID
Code:
/newtypeex ITEM ID, PLAYER NAME
If you not set the player name, outfit will be on you.
Here we go!
talkactions.xml
XML:
<talkaction log="yes" words="/newtypeex" access="4" script="newtypeex.lua"/>
newtypeex.lua
LUA:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return TRUE
end
local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return TRUE
end
if(t[2]) then
cid = getPlayerByNameWildcard(t[2])
if(cid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return TRUE
end
end
tmp = t[1]
doSetItemOutfit(cid, tmp, -1)
return TRUE
end
@EDIT
New command, set %hp :3
example:
Player "Noob" have full hp, when u use "/sethp 5, Noob", now have only 5% of hp :3
Its usefull to check bots, when player is in DP or something, set his hp to ~50%, and if he sudden use heal, he is a bot

talkactions.xml
XML:
<talkaction log="yes" words="/sethp" access="4" script="sethp.lua"/>
sethp.lua
LUA:
function onSay(cid, words, param)
if(param == "") then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return TRUE
end
local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
return TRUE
end
if(t[2]) then
cid = getPlayerByNameWildcard(t[2])
if(cid == 0 or (isPlayerGhost(pid) == TRUE and getPlayerAccess(pid) > getPlayerAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return TRUE
end
end
tmp = t[1]
hape = tmp * 0.01
doCreatureAddHealth(cid, math.floor(getCreatureMaxHealth(cid)*hape - getCreatureHealth(cid)))
return TRUE
end
I think it will be helpfull for someone :3
Thanks,
Erexo.
Last edited: